Monday, May 9, 2011

Adding a expand dropdown menu in cs-cart

(1) In schemas\static_data\schema.php line 90
add array( 'title' => 'popup_direction',
'type' => 'select', 'name' => 'param_4',
'values' => array( 'right' => 'right', 'left' => 'left', 'expand' => 'expand' ),

(2) In language variable add expand => Expand

(3) In Top Menu section, Pop-up direction, select "expand"

(4) In skins\your_skin\customer\top_menu.tpl line 3 change to:
(5) You should able to get the expand dropdown menu as,

11 comments:

  1. Hi, please how can I make this work for other skins as well, i tried it and always got error thanks

    ReplyDelete
  2. What is your error message?

    ReplyDelete
  3. Hi Jack, I've added; 'expand' => 'expand' to the schema file, plus added the language variable in the admin. Also went and made the changes to the top_menu.tpl but not seeing the changesin the storefront.

    Im actually not using the Nefeli skin, so I imagine that changes also have to be added in the Admin, to Design> Top Menu editor?

    Do i have to add category items or something? Thanks for posting this tip.

    Cheers,

    Scott.

    ReplyDelete
  4. (1) In my category setting, the top category is "skin care", and it has 3 sub-categories, "Shop by Collection", "Shop by Skin Condition", and "Shop by Function". Each sub-category has it's own sub-category.
    In "Shop by Collection" sub-category has "Bright Radiance", "Anti-Aging/Wrinkle Care", "Natural Beauty Serums"... sub-categories. After all you add the items into those "Bright Radiance" sub-category.

    (2) In admin' top menu section, you have to add a new item, select expand for Pop-up direction. In "Generate submenu" section, select your "Category".

    ReplyDelete
  5. Thanks Jack, will give it a try.

    Cheers,

    Scott.

    ReplyDelete
  6. hi Jack
    i want to now if is it possible to use your top menu in left position or not

    ReplyDelete
  7. Yes, you can use it for left position. But you will not get expand menu look.

    ReplyDelete
  8. hi
    i'm run cod and shon this error :
    Fatal error: Smarty error: [in top_menu.tpl line 45]: syntax error: unclosed tag \{else} (opened line 44). (Smarty_Compiler.class.php, line 316) in C:\Program Files\xampp\htdocs\iman\lib\templater\Smarty.class.php on line 1095

    ReplyDelete
  9. my source code,

    http://jack-cscart.blogspot.com/2011/07/expand-menu-source-file-link.html

    ReplyDelete
  10. Hello, thanks a lot for this script!

    May you also post a .css example to give some style to it, please?

    Thanks
    Francesco

    ReplyDelete
  11. Hello, I wonder if you are still checking this post. My client wants a drop down menu, but that it will have subcategories like the side bar. He doesn't want it like your screen shot that has it products under each category. He wants the categories, and then when you hover that category (button) it opens another menu next to it.

    thanks

    ReplyDelete