Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Increase quantity based on Buy 1 Get 1 Free


Guest

Recommended Posts

I'm working on a feature for a client that will give the person a second product free. Since this will be the same item that was purchased (a fitness class in this case), I need to adjust the quantity in the cart to reflect the change, as well as keep the price the same. Everything that I do to it either increases too much for some reason or gives me other frustrations. Has anyone done a successful operation such as this?

 

As an example, I have a class that is $0.50 per person, and a user opts to add themselves to the class online through our site. Now, when this class was entered, the admin said that this could be a buy 1 get 1 free class, so they can bring a friend along with them. I now need to increase the amount of people coming into attendance accordingly based off of the sale of this class. I don't know if that helps out at all, but it's the best that I can think of after being away for 20+hours.

 

Thank you in advance.

Link to comment
Share on other sites

The way I could think of is to check if the product is enabled to buy 1 get 1 free and add a simple text to the cart that says "+1 free" and when it comes to an order, let it calculate the price and after that increase the number of items by 1 and store it to the database. Or did I get something wrong?

Link to comment
Share on other sites

The way I could think of is to check if the product is enabled to buy 1 get 1 free and add a simple text to the cart that says "+1 free" and when it comes to an order, let it calculate the price and after that increase the number of items by 1 and store it to the database. Or did I get something wrong?

 

No, it sounds like you're on the right track... the checkout_shipping page had been modified to accept the names of the people who are in attendance, as well as given a number of attendee's based on the number of items that are in the cart... but I think that I like you're way better. hehe. I'll play around with it for a bit and see what I can work out.

 

Thank you for your suggestion!

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...