Products in promotion
11 years 6 months ago #193248
by filiar
Products in promotion was created by filiar
Please Log in or Create an account to join the conversation.
11 years 6 months ago #193276
by Jerome
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
Replied by Jerome on topic Products in promotion
Hi,
It will first depends on how you set discounts on the products.
Regards,
It will first depends on how you set discounts on the products.
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
Please Log in or Create an account to join the conversation.
11 years 6 months ago #193291
by filiar
Replied by filiar on topic Products in promotion
Please Log in or Create an account to join the conversation.
11 years 6 months ago #193293
by filiar
Replied by filiar on topic Products in promotion
The only way that I found searching the forum is by adding all the discounted products in a category and then listing that category. But for the multivendor case where each of the vendors creates his own discounts this is not so suitable.
Is there another way to do that?
Thank You!
Is there another way to do that?
Thank You!
Please Log in or Create an account to join the conversation.
11 years 6 months ago #193319
by Jerome
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
Replied by Jerome on topic Products in promotion
Hi,
That's right, there is no such kind of filter in the HikaShop product listing (menu/modules).
But it is possible to add such feature using a plugin and there are two different solutions for the implementation.
You can use a plugin which will add settings when you configure a product listing menu/module (like HikaMarket do for the settings "show sold by" or "link vendor category to vendor page").
Then the plugin can read the setting when a product listing is displayed.
The other solution is to have a plugin which contains the ID of the modules/menu it has to filter.
The plugin "hikashop / productvendorfilter" currently do this job and you can use this plugin as a base for a new one.
Thanks to it, you can copy the plugin (to have a new one) and change the part of the filter
Into something like
(which should be improve if you want to manage the ACL ; I did not test it so I can't guarantee that it will work directly).
Regards,
That's right, there is no such kind of filter in the HikaShop product listing (menu/modules).
But it is possible to add such feature using a plugin and there are two different solutions for the implementation.
You can use a plugin which will add settings when you configure a product listing menu/module (like HikaMarket do for the settings "show sold by" or "link vendor category to vendor page").
Then the plugin can read the setting when a product listing is displayed.
The other solution is to have a plugin which contains the ID of the modules/menu it has to filter.
The plugin "hikashop / productvendorfilter" currently do this job and you can use this plugin as a base for a new one.
Thanks to it, you can copy the plugin (to have a new one) and change the part of the filter
Code:
$vendor = hikamarket::loadVendor(false);
$filters[] = 'b.product_vendor_id = ' . (int)$vendor;
Code:
$c .= ' INNER JOIN ' . hikashop_table('discount').' AS discount ON discount.discount_type = \'discount\' AND (discount.discount_product_id = b.product_id OR discount.discount_product_id LIKE CONCAT(\'%,\', b.product_id, \',%\')';
$filters[] = 'discount.discount_published = 1';
$filters[] = '(discount.discount_start = 0 OR discount.discount_start >= ' . time().')';
$filters[] = '(discount.discount_end = 0 OR discount.discount_end <= ' . time() .')';
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
The following user(s) said Thank You: filiar
Please Log in or Create an account to join the conversation.
11 years 6 months ago #193343
by filiar
Replied by filiar on topic Products in promotion
Thank You, Jerome.
Please Log in or Create an account to join the conversation.
Moderators: Obsidev
Time to create page: 0.239 seconds