discount based on cart quatity

  • Posts: 59
  • Thank you received: 2
7 years 1 week ago #282538

-- HikaShop version -- : 2.6.4
-- Joomla version -- : 3.6.2
-- PHP version -- : 5.6.31
-- Browser(s) name and version -- : edge /ff / gc

hello,
we need to implement discount based on cart quantity items of a specific category.

we want to add products to a "promoção" category (both products have same price 9,5€) if we choose 9 the price will be 9 x 9,5€ if we choose 10 to 14, it will be 10 x 5€, if we chose 15 to 24 it will be 15x 4,7€

we already tried coupon / discount but we can't solve this.

imagine we have 5 items + 5 items of same category it applies the discount..

any idea how to solve this?

thanks in advanced

Last edit: 7 years 1 week ago by allbs.

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

  • Posts: 4747
  • Thank you received: 644
  • MODERATOR
7 years 1 week ago #282586

Hello,

I think that you have to use the Coupon system, and define a percentage per product, the minimum number of products.
Plus, restricted your products by category (and if needed including sub categories), active auto load in cart if possible, and finally don't forget to limit the Coupon on restricted products (Coupon percentage applies to product only).



See this screenshot and try to reproduce this configuration.
Hope this will fit your needs.

Regards

Last edit: 7 years 1 week ago by Philip.

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

  • Posts: 59
  • Thank you received: 2
7 years 1 week ago #282676

Dear Philip, thank you

we already tried this it works partial but it only shows the discount after checkout process..

it's not the best solution but we need to have something til the end of the day..


we will test if it Works with many coupons configured.. we need to have:

10 .. 14 items price is 5€ and not 9,5
15 .. 24 items price is 4,7 and note 9,5
25 .. 34 items price is 4,5
35 .. 44 items price is 4€
45.. 149 items price 3,85€
150 or more 2,95€

we have other problem, the total in the checkout sum is not correct but we will debug it today.

thank you

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

  • Posts: 82868
  • Thank you received: 13376
  • MODERATOR
7 years 1 week ago #282678

Hi,

The method Philip propose should work directly in the cart right after you press the add to cart button.
So you should see the coupon during the whole checkout, in the cart module and in the cart view of the checkout.
I'm not sure what you mean by "seeing it only after the checkout" ?

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

  • Posts: 59
  • Thank you received: 2
7 years 3 days ago #282999

thank you for your sugestion, we tried with coupon but the items with variants are also included and we don't want that.

we will try to change original code to do this:

we are thinking on:

add a field in hikashop_product called grouppromotion, it will assume null or a number, this number identify the group of the promotion.

we need to check on the checkout what items have this field filled and sum them all, and with that sum we can make the apropriate discount, we will have a temp table with the range of discounts.

can you tell us how to grab that information on the checkout ?

thanks in advanced

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

  • Posts: 82868
  • Thank you received: 13376
  • MODERATOR
7 years 2 days ago #283007

Hi,

In that case, I would recommend implementing the onAfterCartProductsLoad trigger of the cart API in a plugin of the group "hikashop":
www.hikashop.com/support/documentation/6...fterCartProductsLoad
In it, you'll be given the content of the cart with the products in $cart->products.
And you can add your discount with the "additional" system.
You can see an example of that system being used in the plugin available here:
www.hikashop.com/forum/taxes/873285-fix-tax-import.html#190511

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

Time to create page: 0.066 seconds
Powered by Kunena Forum