May 29, 2010 at 12:18 pm #1277usr_localMember
This is similar to the shipping cost post. Am attempting to drop the item price by 1 if item quantity is > 2. I tried this and got no results at all. Any ideas or help with my coding would be great. I am no PHP guru. Thanks!
This is what I added to the function:
if ($item > 2)
$item += $item – 1;
$total += $item * $item;
$total += $item * $item;
$item_total_shipping += $item * $item;
$total_items += $item;
}May 29, 2010 at 1:55 pm #21057amin007Participant
Can you please post a link to the shipping cost post that you are referring to so we can both be on the same page?May 29, 2010 at 2:06 pm #21058usr_localMember
There ya go admin007. Thats where I got the idea that my code edit might work.May 30, 2010 at 2:31 am #21059amin007Participant
You won’t be able to follow that shipping cost example and do what you are after. It’s because you will need to modify the item price itself if the quantity is greater than 2 and modification needs to happen when the “Add to Cart” button is clicked or the quantity change happens. So you code to change the item price needs to go inside the
if ($_POST['addcart'])block of code and also in the
else if ($_POST['cquantity'])block.March 1, 2014 at 6:39 pm #21060joybelle1080Member
I am trying to do something similar, give an automatic discount when a user purchases more than one of a certain product. I have it set up using the Automatic Discount, apply coupon for quantity over 1 apply x coupon. then x coupon is set to a percent/$$ amount. however I need the end price to a certain amount – my amounts are not even. So when applying this coupon it is a penny off. I need to change this amount though up to 4 items. Such as purchase one it is 6.50, purchase two it’s 6.375 a box or 12.75, three boxes, 6 each/18 total, or 4 boxes 5.75/23 total.
I at first had set my product to have 4 different prices pending on number selected, but it cancelled out my limit of 4 purchased when in the shopping cart – it would make a different item purchased if I chose a quantity of 2, 3 or 4. BUT the price would be how I wanted it to be.
How do I modify the code to do one of the two things above? I can explain more if needed. I would greatly appreciate any help. I purchased this product for the auto discount feature and the simplicity of the interface/awesome instruction and documentation.
Thank you.March 2, 2014 at 3:04 am #21061adminKeymaster
It seems like you should be able to do what you are after using the following estore addon:
Have you checked that addon?
- You must be logged in to reply to this topic.