Customize show category title on a product page

  • Posts: 177
  • Thank you received: 1
7 years 1 week ago #267483

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:

<?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.

  • Posts: 26008
  • Thank you received: 4004
  • MODERATOR
7 years 1 week ago #267485

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.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 177
  • Thank you received: 1
7 years 1 week ago #267766

I made a solution:

<?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: 7 years 1 week ago by Jerome. Reason: indent code

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

Time to create page: 0.055 seconds
Powered by Kunena Forum