2 For 1 on set products from a category.

  • Posts: 59
  • Thank you received: 1
10 years 2 weeks ago #179342

I'm trying to find a way which if you purchase 2 products from category X you get an additional product from category X for free (with the cheapest being free)

What's the best way forward with this?

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

  • Posts: 82868
  • Thank you received: 13376
  • MODERATOR
10 years 2 weeks ago #179367

You can develop a Joomla plugin of the group hikashop implementing the trigger onBeforeCartUpdate( &$cartClass, &$cart, &$product_id, &$quantity, &$add, &$type,&$resetCartWhenUpdate,&$force,&$do) so that each time something is added/removed to cart, you can check if there are enough products from that category to add/keep/remove the free product in the cart.
You can also implement the onBeforeCalculateProductPriceForQuantity trigger to set the price of that product to 0 before the calculations for the total of the cart.

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

  • Posts: 59
  • Thank you received: 1
10 years 1 week ago #179410

Thanks for this Nicolas.

Is there no way to do this out of the box? Or to do this as 2 for 1 on the whole store?

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

  • Posts: 12953
  • Thank you received: 1778
10 years 1 week ago #179430

Hello,
A solution can be to use that Joomla extension .

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

Time to create page: 0.051 seconds
Powered by Kunena Forum