Skip to main content

Adding Badges by Manufacturer

More
12 years 1 month ago #167224 by rodfarrell
-- HikaShop version -- : 2.3.0
-- Joomla version -- : 3.2.1

Is there a way to get badges to display based on the manufacturer rather than the product category? It seems a shame to have to replicate all of the manufacturers into product categories just for this.

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

More
12 years 1 month ago #167261 by Jerome
Hi,

Please edit the file "administrator/components/com_hikashop/classes/badge.php" and replace
Code:
$categoryClass = hikashop_get('class.category'); $productClass = hikashop_get('class.product'); $loadedCategories = $productClass->getCategories($product_id);
By
Code:
$categories = array( 'originals' => array(), 'parents' => array() ); $categoryClass = hikashop_get('class.category'); $productClass = hikashop_get('class.product'); $loadedCategories = $productClass->getCategories($product_id); if(isset($row->main->product_manufacturer_id)) $categories['originals'][$row->main->product_manufacturer_id] = $row->main->product_manufacturer_id; if(isset($row->product_manufacturer_id)) $categories['originals'][$row->product_manufacturer_id] = $row->product_manufacturer_id;
It will add the support for manufacturers for the badges.

In the badge configuration, instead of selecting a product category, you can select the target manufacturer in the "root / brand" part.

Regards,

PS : This modification will be include in the next HikaShop release.

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

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

More
12 years 1 month ago #167354 by rodfarrell
Jerome, that is brilliant. I am constantly amazed at the speed and quality of response I get from you guys. If I had posted anything like this on the Virtuemart forum it would have taken at least a week to get a response and the response would have been along the lines that my client shouldn't want to do that.

For the record, this is for one of two projects I currently have underway replacing other Joomla shopping carts (Virtuemart and Tienda) with Hikashop and my clients are loving it.
The following user(s) said Thank You: Jerome

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

More
12 years 1 month ago #167360 by Jerome
Thanks,

You'll make me blush !
(and for sure the rest of the team too when they will see your message)

Regards,

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

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

Time to create page: 0.135 seconds
Powered by Kunena Forum