- Posts: 73
- Thank you received: 2
Display brand as link
10 years 9 months ago - 10 years 9 months ago #223335
by mypetfly
Display brand as link was created by mypetfly
-- url of the page with the problem -- :
right.travelsat.com.au/browse-products/a...onal-satellite-meter
-- HikaShop version -- : 2.6.0
-- Joomla version -- : 3.4.5
-- PHP version -- : 5.3.29
-- Browser(s) name and version -- : Firefox 41.0.2
-- Error-message(debug-mod must be tuned on) -- : No message
Hello,
I am trying to implement showing brands at product page. Currently I am using following code for this:
This code shows brand name, but I'd like to make brand name as link - I'd like to show user all products of the same brand when user clicks on brand name. How it's possible to implement?
-- HikaShop version -- : 2.6.0
-- Joomla version -- : 3.4.5
-- PHP version -- : 5.3.29
-- Browser(s) name and version -- : Firefox 41.0.2
-- Error-message(debug-mod must be tuned on) -- : No message
Hello,
I am trying to implement showing brands at product page. Currently I am using following code for this:
Code:
$db =& JFactory::getDBO();
$query = 'select category_name from '.hikashop_table('category').' where category_id = '.$this->element->product_manufacturer_id;
$db->setQuery($query);
$brand = $db->loadResult();
if ($brand != NULL) {
echo '<span class="h_brands">Brand: '.$brand.'</span>';
}
Last edit: 10 years 9 months ago by Jerome. Reason: [code] is nice
Please Log in or Create an account to join the conversation.
10 years 9 months ago #223367
by nicolas
Replied by nicolas on topic Display brand as link
Hi,
It's actually quite easy to do.
Turn on the "Display the manufacturer" setting of the HikaShop configuration and that should do it automatically.
It's actually quite easy to do.
Turn on the "Display the manufacturer" setting of the HikaShop configuration and that should do it automatically.
Please Log in or Create an account to join the conversation.
10 years 9 months ago #223521
by mypetfly
Replied by mypetfly on topic Display brand as link
It was already enabled, but there was an template override for the view used for displaying product and there was no code for displaying brands. I've had a look at original hikashop view file and restored code that was rendering brand. Thank you!
Please Log in or Create an account to join the conversation.
Time to create page: 0.174 seconds