Adding A New Banner Template

Hi Everyone,

I’ve been looking to put together an addon to add support for a different slider other than owl carousel for CS-Cart. I “thought” i had don’t everything correctly, however have no idea how to add a new option to the current “banners” module. Basically CS-Cart out of the box has the banner templates of:

  • Original
  • Carousel
I’d like to add a third option. Currently I have the following making up the addon:


app/addons/addon_name/schemas/block_manager/blocks.post.tpl

app/addons/addon_name/addon.xml



	addon_name
    1.0
	Addon Name
    en
	active

	Addon Name


    banners

app/addons/addon_name/func.php

js/addons/addon_name/js_name.js
- containing the js needed

design/themes/responsive/css/addons/addon_name/styles.css
- containing the css needed

design/themes/responsive/templates/addons/addon_name/blocks/addon_name.tpl
- containing the front end code needed

design/themes/responsive/templates/addons/addon_name/hooks/scripts.post.tpl
- containing the link to the aforementioned js

design/themes/responsive/templates/addons/addon_name/hooks/styles.post.tpl
- containing the link to the aforementioned css



What am I missing? (the list of templates for the banner block still only shows original and carousel not the new template I am trying to add). Any help is much appreciated and once complete the addon will be released free of charge here.

Have a wonderful New Year!

Rob

It is `block_manager` not `block-manager`. Besides that, you should also clear your cache after changing those files or enable development mode and disable block caching.

app/addons/addon_name/schemas/block_manager/blocks.post.tpl

Furthermore, your schema should look as follows:

$schema[‘banners’][‘templates’][‘addons/addon_name/blocks/addon_name.tpl’] = array();

return $schema;

It is `block_manager` not `block-manager`. Besides that, you should also clear your cache after changing those files or enable development mode and disable block caching.

app/addons/addon_name/schemas/block_manager/blocks.post.tpl

Furthermore, your schema should look as follows:

$schema[‘banners’][‘templates’][‘addons/addon_name/blocks/addon_name.tpl’] = array();

return $schema;

Thanks for the comments, I was using block_manager I just wrote it wrong when putting together the post (edited now to reflect the correct path). Also I have changed the schema (tried this one previously and edited my post to reflect the latest "attempt") and still not working for me - cache cleared and dev mode has been one since I started.

If anyone else has any recommendations to why it's not displaying I would be grateful! Thanks again harmsmitsdev.

QUICK UPDATE: Think I have found the problem, by adding:


5000
to addon.xml - everything seems to have kicked in!

Hi everyone! Thanks for the great info here.

I was wondering, can someone help me understand the specific steps to creating a new banner type. Just a carousel based on the basic one which looks different and has arrow nav options? I know that there are addons that offer other options for banners but I need to make my own. I want mine to look more like the one on amazon's home page.

I have reviewed the docs and get the basics of addon creation, but need someone to draw the process together for me.

Thanks for any help in advance.