Best approach for discounts?

  • Posts: 33
  • Thank you received: 0
13 years 2 months ago #25251

I was wondering what would be the best approach to have a certain discount when a user(group) order a certain amount (Euro's) per category.

Like in cat.A, if more the x in total, discount is 5%
if more then y, discount is 10%. etc...
but only for the products in that categorie, not for the whole cart.

I was thinking of writing a plugin for that, perhaps in combination with custom field(s)..

Any pointers for me?

thx

Last edit: 13 years 2 months ago by hko.

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

  • Posts: 82868
  • Thank you received: 13377
  • MODERATOR
13 years 2 months ago #25252

Hi,

For a long term solution, in HikaShop, it means to add new options for coupons and change the coupon system in depth in order to handle that.

For a way more simple solution, you could do that category check in one of the views of your checkout and automatically add/remove a product which would have a negative price (I think that it's possible). You can easily add a product to the cart by redirecting the customer to the URL:
index.php?option=com_hikashop&ctrl=product&task=updatecart&product_id=XX&quantity=YY&checkout=1

where XX is the id of the product and YY is the new quantity of the product in the cart.

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

  • Posts: 33
  • Thank you received: 0
13 years 2 months ago #25441

Hi Nicolas,

thx for the tips.
FYI, it is not possible to have a negative price for products with the normal admin HS interface. It will be converted to positive (ABS function). So the only way to do that is by modifying directly in the database... not nice.
Also, it looks a bit weird to have a product in the cart like that because you can change the amount etc as end user.. so that was a dead end.

I finally took the approach of adding some Joomla User groups and creating different discounts which are only available for that specific product group and also only for a specific (newly created) Joomla group.

Then created a Plugin which will calculate the total amount for that specific group and if above a threshold (which can be set in the plugin) it will add the shopping user to the next Joomla group. That results in HS now applying the next discount.
If the total amount is reduced again, the user will be removed from that extra group again.
(I just needed two steps above the standard discount)
Plugin ended as being a little bit bigger then expected but it seems to work flawlessly..




Hope this helps others perhaps.

Attachments:
Last edit: 13 years 2 months ago by hko.

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

Time to create page: 0.099 seconds
Powered by Kunena Forum