Volume Discount

  • Posts: 2
  • Thank you received: 0
3 days 8 hours ago #367457

-- url of the page with the problem -- : jimmysmoothsbbq.com/shop/product/1-smok-n-salsa-mild
-- HikaShop version -- : 5.1.6
-- Joomla version -- : 5.3.1

Very new to the backend part of all this. The product is priced by quantity ordered: 1 for $9, 2 for $15, 3 for $21. I have installed the Price Calculation plugin, but can't figure out how to write the necessary formulas. This is what I have so far, but it's not working:



Thanks for any help!

Attachments:

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

  • Posts: 83932
  • Thank you received: 13588
  • MODERATOR
3 days 6 hours ago #367458

Hi,

The condition should be:

{cart_product_quantity}==2
because this evaluates a condition in PHP, and in PHP, you need two "=" characters like this to compare the equality of two elements.

And the formula should ideally be:
15/{cart_product_quantity}
because you want to provide the unit price and thus you need to divide the total price by the quantity selected by the user.

The following user(s) said Thank You: jimmysmooth

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

  • Posts: 2
  • Thank you received: 0
2 days 20 hours ago #367475

Thank you so much, that worked perfectly!

Is there any way to also accommodate the 3 for 21 pricing?

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

  • Posts: 83932
  • Thank you received: 13588
  • MODERATOR
2 days 16 hours ago #367476

Hi,

Sure, it's the same principle.
Add a second row to the plugin, and use the condition:

{cart_product_quantity}==3
and the formula:
21/{cart_product_quantity}
You can add as many rows as you want.

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

Time to create page: 0.056 seconds
Powered by Kunena Forum