Jump to content

Categories / Subcategories Dropdown


Guest Stuart B

Recommended Posts

Guest Stuart B

Hi,

New to the forum but not new to CubeCart. Can manage styling of it quite well without issue.

What I am wanting to do is create a Dropdown Menu, to show subcategories.

i.e

HOMEPAGE | CATEGORY 1

SUBCATEGORY 1

SUBCATEGORY 2

SUBCATEGORY 3

SUBCATEGORY 4

SUBCATEGORY 5

I am looking at : skins/mySkin/styleTemplates/boxes/categories.tpl

I can see that there is a property for CATEGORY ({DATA.cat_id} & {DATA.cat_name}

How can I access the inbuilt property for SUBCATEGORY. I'm assuming {data.sub_cat_name} or similar?

Thanks in advance.

Link to comment
Share on other sites

Welcome Stuart B! Glad to see you made it to the forums.

I may wrong (as I know CC3 quite well), but I thought CC4 stock skins already did this. (OK, now I'm seeing that they don't.)

But if want something different, visit www.cubecartforums.org and look at:

http://www.cubecartforums.org/index.php?showtopic=1731

The subcategories will use the same {DATA} placeholders as a sub-cat is just a cat with a parent cat. In the template file you will need to code a sub-list, then in the .inc.php file, code the engine to fill the respective parts. As it is, the code just keeps building nested lists.

Link to comment
Share on other sites

Guest Stuart B

Welcome Stuart B! Glad to see you made it to the forums.

I may wrong (as I know CC3 quite well), but I thought CC4 stock skins already did this. (OK, now I'm seeing that they don't.)

But if want something different, visit www.cubecartforums.org and look at:

http://www.cubecartforums.org/index.php?showtopic=1731

The subcategories will use the same {DATA} placeholders as a sub-cat is just a cat with a parent cat. In the template file you will need to code a sub-list, then in the .inc.php file, code the engine to fill the respective parts. As it is, the code just keeps building nested lists.

Thanks for the welcome and answer bsmither.

I've looked at that MOD and thats not exactly what I'm after. I am after a Dropdown Menu, rather than a select menu. I would like the user to hover over the CATEGORY, That then brings up the SUBCATEGORIES listed within it. I also thought CubeCart V4 had it already built in, But am unable to find an example site that use's what I'm after. Which I am very surprised at. Particularly when its how a lot of shopping sites such as Amazon et al function.

I am looking for something a bit like : This

But I need to know what Cubecart uses to pull through the SUBCATEGORIES to achieve this.

Any help appreciated.

Link to comment
Share on other sites

Hi

I have achieved this using CSS, but it wouldn't be very practical to explain exactly what I have done because it would be determined on the style of your site and/or what skin you are using.

Are you ok with CSS? If so, I altered some of the styles on layout.css, between Start Cross-Browser DHTML Menu and End Cross-Browser DHTML Menu.

Hope that helps a little :)

Lee

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...