Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

buy one get one half price


Recommended Posts

hi guys,


i am trying to make this well known special offer: buy one get one half price.


it should work like this:


let's say the price of the walkman is $100.


when you buy 1 walkman you pay $100.

when you buy 2 walkmans you pay $100 + $50 = $150.

when you buy 3 walkmans you pay $100 + $50 + $100 = $250.

when you buy 4 walkmans you pay $100 + $50 + $100 + $50 = $300.

when you buy 5 walkmans you pay $100 + $50 + $100 + $50 + $100 = $400.


so it means you get 50% discount for every second walkman.


i've checked Quantity Discount order_total module v1.2 by Joshua Dechant.

(it doesn't work on a product_id but later on about that)


if i configure this module to 2:25 it means:

if you buy 2 or more products you get 25% discount on both of them.

it will work like this:


when you buy 1 walkman you pay $100.

when you buy 2 walkmans you pay $75 + $75 = $150 (which is pretty alike "buy one get one half price")

when you buy 3 walkmans you pay $75 + $75 + $75 = $225 (which is not good, bacause i want every SECOND walkman with a discount, to force customer to buy 4 and not 3 walkmans. but it is still ok to sell the THIRD one with 25% discount)


OK, but as i said the mentioned quantity discount module by Joshua Dechant does not work on product_id but on the total quantity of the products, so it doesn't fit to BUY ONE GET ONE HALF PRICE.


it works like this:

walkman = $100, a ball = $20.


for the quantity >=2 giving 25% discount:

$100-$25 + $20-$5 = $75 + $15 = $90...


do you know any other modules like this but based on a product_id ?


thank you.


kind regards,


Link to comment
Share on other sites



I know this is my first post, and I am trying to learn about this product but from a 'programming' standpoint this is how I would break your problem down.


You want to offer your discount when someone purchases the 2nd item, or mulitple of 2.


If quantity > 1


If quantity/2 = wholenumber (integer)

pricing50% = wholenumber * price

pricing100% = wholenumber * price



If quanity/2 = has a remainder

pricing50% = ((quantity-1)/ 2) * price

pricing100% = (quantity - (quantity-1)/2) * price



totalPrice = pricing50% + pricing100%




totalPrice = quantity * price ~normal price



I don't know if there is a module that will do that, but I think that is an example of mechanics.


Hopefully, someone has done this before.



Link to comment
Share on other sites

  • 12 years later...

@@smajk The Quantity Price Breaks addon will do what you want. The only difference might be that it requires you to enter in the price breaks in admin for the product, as opposed to it being calculated on the fly.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...