- Posts: 259
- Thank you received: 22
Adding Badges by Manufacturer
- rodfarrell
-
Topic Author
- Offline
Less
More
12 years 1 month ago #167224
by rodfarrell
Adding Badges by Manufacturer was created 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.
-- 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.
12 years 1 month ago #167261
by Jerome
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Replied by Jerome on topic Adding Badges by Manufacturer
Hi,
Please edit the file "administrator/components/com_hikashop/classes/badge.php" and replace
By
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.
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);
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;
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.
- rodfarrell
-
Topic Author
- Offline
Less
More
- Posts: 259
- Thank you received: 22
12 years 1 month ago #167354
by rodfarrell
Replied by rodfarrell on topic Adding Badges by Manufacturer
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.
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.
12 years 1 month ago #167360
by Jerome
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Replied by Jerome on topic Adding Badges by Manufacturer
Thanks,
You'll make me blush !
(and for sure the rest of the team too when they will see your message)
Regards,
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