Show brand on listings

  • Posts: 359
  • Thank you received: 24
  • Hikaserial Standard Hikashop Business
3 years 4 months ago #337046

-- url of the page with the problem -- : passtheport.thr.nu/white-port
-- HikaShop version -- : 4.4.4
-- Joomla version -- : 3.10.3
-- PHP version -- : 7.4

Hi

Would it be possible to list the brand of and item on top of the name of the product on listing?
passtheport.thr.nu/white-port

Regards
Thomas

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

  • Posts: 83402
  • Thank you received: 13496
  • MODERATOR
3 years 3 months ago #337060

Hi,

There is no option for that, so it will require editing the product / listing_img_title.php view file via the menu Display>Views and adding custom code:
www.hikashop.com/support/forum/4-how-to/...in-product-list.html

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

  • Posts: 359
  • Thank you received: 24
  • Hikaserial Standard Hikashop Business
3 years 3 months ago #337066

Perfect, thank you so much! :-)

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

  • Posts: 359
  • Thank you received: 24
  • Hikaserial Standard Hikashop Business
3 years 3 months ago #337078

How can I get other data from that table?
Like:
category_alias
category_canonical

<?php
$db = JFactory::getDBO();
$db->setQuery('SELECT category_name FROM '.hikashop_table('category').' WHERE category_id='.(int)$this->row->product_manufacturer_id);
$brandName = $db->loadResult();
echo $brandName;
?>

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

  • Posts: 83402
  • Thank you received: 13496
  • MODERATOR
3 years 3 months ago #337081

Hi,;

Like so:

<?php
$db = JFactory::getDBO();
$db->setQuery('SELECT * FROM '.hikashop_table('category').' WHERE category_id='.(int)$this->row->product_manufacturer_id);
$brand = $db->loadObject();
echo $brand->category_name;
echo $brand->category_alias;
?>

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

  • Posts: 359
  • Thank you received: 24
  • Hikaserial Standard Hikashop Business
3 years 3 months ago #337111

Great!
Thanks!

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

Time to create page: 0.060 seconds
Powered by Kunena Forum