Skip to main content

Customize show category title on a product page

More
9 years 5 months ago #267483 by andreasuriani
Hi Guys,
i know this argument is very "oldy" but let me explain:

When i try to put the follow code on a show_defoult.php the code works but the result is more or less this:
Code:
<?php foreach ($this->categories as $key => $value) { ?> <div id="hikashop_product_category_<?php echo $value->category_id ?>"> <?php echo $value->category_name ?> </div> <?php }

The Result is:

product category
category1
subcategory

I'd like to show something like this:

product category > category1 >subcategory

How can o do this?

Please Log in or Create an account to join the conversation.

More
9 years 5 months ago #267485 by Jerome
Hello,

Use some CSS ? Not use "div" but span ?
Please understand that your question is related to some customization, but there is no real link with HikaShop because you already have the content and all ; you're just want to change the design and it is outside what our support can do.
www.hikashop.com/support/documentation/1...ize-the-display.html

Regards,

Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Please Log in or Create an account to join the conversation.

More
9 years 5 months ago - 9 years 5 months ago #267766 by andreasuriani
I made a solution:
Code:
<?php $i=0; foreach ($this->categories as $key => $value) { echo '<strong><span id="hikashop_product_category_'.$value->category_id.'">'; echo $value->category_name; if(($i+1)<count($this->categories)){ echo " > "; } echo "</span></strong>"; $i++; } ?>

Hope is it will useful for everybody...

Ciao Ciao
A.
Last edit: 9 years 5 months ago by Jerome. Reason: indent code

Please Log in or Create an account to join the conversation.

Time to create page: 0.148 seconds
Powered by Kunena Forum