Skip to main content

How to show category title in product list div.

More
12 years 4 months ago #154851 by apatiu
sorry. i'm try to search for solution. but i'm not see anything.

How can I show Category title under Product name in product list div?.

Thanks

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

More
12 years 4 months ago #154853 by apatiu
and can i'm show brand image on product list too?

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

More
12 years 4 months ago - 12 years 4 months ago #154899 by lousyfool
Category title:
You can copy the relevant code from view category/listing_img_title and insert it into product/listing__img_title where you want it - just without the part displaying the number of products in that category, I guess. The rest is CSS.

Brand image:
Very similar, it's the same views/files involved. I managed to display the brand image in a div a.k.a subcontainer or thumbnail with this code:
Code:
<div class="you-name-it"> <?php if($this->config->get('manufacturer_display', 0) && !empty($this->row->product_manufacturer_id)){ $class = hikashop_get('class.category'); $manufacturer = $class->get($this->row->product_manufacturer_id, true); global $Itemid; $categoryClass = hikashop_get('class.category'); $categoryClass->addAlias($manufacturer); echo $this->image->display($manufacturer->file_path,false,$manufacturer->file_name, '', '', $this->image->main_thumbnail_x, $this->image->main_thumbnail_y); } ?> </div>
Insert in product/listing_img_title where it suits your div layout. The rest, like size and all, is again a matter of CSS.

It works for me. Should there be a better way, I'm sure the support team here will advise.

Need help with customisations of layouts, style or other site development? PM me!
(Don't forget to turn on "E-mail notification of new messages" )
Last edit: 12 years 4 months ago by lousyfool.
The following user(s) said Thank You: apatiu

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

More
12 years 4 months ago - 12 years 4 months ago #154900 by lousyfool
Replied by lousyfool on topic Sorry, double post
.

Need help with customisations of layouts, style or other site development? PM me!
(Don't forget to turn on "E-mail notification of new messages" )
Last edit: 12 years 4 months ago by lousyfool.

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

More
12 years 4 months ago #154947 by apatiu
Thank you very much now Brand image is showing by this code
Code:
if(!empty($this->row->product_manufacturer_id)){ $class = hikashop_get('class.category'); $manufacturer = $class->get($this->row->product_manufacturer_id, true); global $Itemid; $categoryClass = hikashop_get('class.category'); $categoryClass->addAlias($manufacturer); echo $this->image->display($manufacturer->file_path,false,$manufacturer->file_name, '', '', $this->image->main_thumbnail_x, $this->image->main_thumbnail_y); }

if have
Code:
$this->config->get('manufacturer_display', 0)
it's not working. (Where can i set 'manufacturer_display' from menu.

but Category title not working by copy this to product/list_img-title
Code:
<span class="hikashop_category_name"> <a href="<?php echo $link;?>"> <?php echo $this->row->category_name; if($this->params->get('number_of_products',0)){ echo ' ('.$this->row->number_of_products.')'; } ?> </a> </span>

Can you have some reccomend for me?

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

More
12 years 4 months ago #154951 by lousyfool
Try this:
Code:
<?php $link = $this->getLink($this->row->category_id,$this->row->alias);?> <span class="hikashop_category_name"> <a href="<?php echo $link;?>"> <?php echo $this->row->category_name; ?> </a> </span>

Need help with customisations of layouts, style or other site development? PM me!
(Don't forget to turn on "E-mail notification of new messages" )
The following user(s) said Thank You: apatiu

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

More
12 years 4 months ago #154970 by apatiu
error on
Code:
<?php $link = $this->getLink($this->row->category_id,$this->row->alias);?>

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

More
12 years 4 months ago #154976 by lousyfool
Hmm, strange. Works for me. Sorry.

I give up, time for the officials here to take over. Might make sense if you added what the error message is.

Need help with customisations of layouts, style or other site development? PM me!
(Don't forget to turn on "E-mail notification of new messages" )

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

More
12 years 4 months ago #155102 by apatiu
Thanks for your help.

i will try again. and be back again.

Thanks very much

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

Time to create page: 0.188 seconds
Powered by Kunena Forum