Post by johnnyart » Wed Apr 28, 2010 7:45 am

Is it possible to apply a discount on a per item basis instead of to the total?
If all items had the same price then it could be achieved by using a percentage but since they don't, this is no good.
I'm pretty sure I could extend the current code to include that, but before getting to it, I thought I'd ask if it's already
out there.

User avatar
Newbie

Posts

Joined
Tue Mar 02, 2010 5:13 pm

Post by Qphoria » Wed Apr 28, 2010 8:13 am

not sure what you mean.
Specials and discounts are already set per-item

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by johnnyart » Wed Apr 28, 2010 3:46 pm

Maybe I'm experiencing something wrong but if I add a coupon with a set ammount of money to discount instead of a percentage, I get that discount applied to the total and not to each item.

Lets expand this with an example:
- I add Item #1 with a price of 140usd to my cart twice
- I add Item #2 with a price of 180usd to my cart once

My cart now has a total of 460usd.

I have added a coupon that can be applied to BOTH items called couponCode40 which is meant to discount 40usd from each of the items eligeable to that coupon.
-If the coupon is of type "fixed amount" I get a discount of 40usd and a total of 440usd for my cart.
-If the coupon is of type "percentage" I would get a 40% discount and a total of ~264usd for my cart.

I could've miss something on the coupon edit page, but as far as I see it, it's just doing the fixed amount discount on a total basis instead of a per item as I required.

Anyway, I've already coded a "Discount per item" option and added it to the coupon type drop-down. If anyone is interested let me know. If the option is already coded and I missed it.
Apologies.

User avatar
Newbie

Posts

Joined
Tue Mar 02, 2010 5:13 pm

Post by Qphoria » Wed Apr 28, 2010 7:57 pm

johnnyart wrote: Lets expand this with an example:
- I add Item #1 with a price of 140usd to my cart twice
- I add Item #2 with a price of 180usd to my cart once

My cart now has a total of 460usd.
Interesting math (140 + 180 = 320)
I have added a coupon that can be applied to BOTH items called couponCode40 which is meant to discount 40usd from each of the items eligeable to that coupon.
-If the coupon is of type "fixed amount" I get a discount of 40usd and a total of 440usd for my cart.
Even by your math that should be 420 if it just applies to one of the 2 products.


So to summarize, if you have
2 products
And a coupon that applies to only one product.
If you use percent. It takes off the correct amount from that single product
If you use static amount, it takes off the total instead of just the product?

That is technically by design. Though you might want it to take $10 off each product just like it takes 10% off each product. I can look into that

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by dbstr » Wed Apr 28, 2010 9:07 pm

Qphoria wrote:
johnnyart wrote: - I add Item #1 with a price of 140usd to my cart twice
- I add Item #2 with a price of 180usd to my cart once

My cart now has a total of 460usd.
Interesting math (140 + 180 = 320)
140+140+180 = 460 :D

Request Reviews v1.0 released.


Active Member

Posts

Joined
Sun Aug 30, 2009 12:20 am

Post by johnnyart » Wed Apr 28, 2010 9:11 pm

As I've said, I've already done it, but thanks for the offer.
If anyone wants the per article addition let me know.

About my maths, they are correct, you misread my text. Let me highlight it for you.
JohnnyArt wrote:Lets expand this with an example:
- I add Item #1 with a price of 140usd to my cart twice
- I add Item #2 with a price of 180usd to my cart once

My cart now has a total of 460usd.
That's a total of 3 items (2+1) and a price of 460usd. Correct?

User avatar
Newbie

Posts

Joined
Tue Mar 02, 2010 5:13 pm

Post by Qphoria » Wed Apr 28, 2010 9:26 pm

ya ya.. ok.. it was early morning :)

And to all your foreigners.. the word is "math" there is no plural. Why is it the country that spawned the language can't speak it!

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by print-n-tees » Sat Nov 16, 2013 3:29 pm

Is this an actual mod that I can get access too or purchase? If not, can someone create it?

Looking to add a discount per product... so for example $2.00 off every product you purchase.

So if a customer orders 1 item... then get $2.00 off.
If they order 4 items they get $8.00 off

Would like for it to be with discount code and to have the option to make it automatic discount any order.

Also need it to work for multi stores so while one store may require a coupon code... another may just have auto discounts.

Thank you

User avatar
New member

Posts

Joined
Sun Feb 24, 2013 2:54 pm


Post by Johnathan » Sat Nov 16, 2013 11:32 pm

Product-Based Fee/Discount can do this automatically, but it doesn't utilize a coupon code. If you need that, take a look at opcrat's extensions, which might work for you.

Image
Image Image Image Image


User avatar
Global Moderator

Posts

Joined
Fri Dec 18, 2009 3:08 am


Post by print-n-tees » Sun Nov 17, 2013 5:21 am

Thank you!! I will check out the first option and see if that will work for my customer.

User avatar
New member

Posts

Joined
Sun Feb 24, 2013 2:54 pm


Post by buyinflatables » Sun Nov 17, 2013 5:24 am

I would be interested in this too.


Posts

Joined
Sun Nov 17, 2013 5:23 am
Who is online

Users browsing this forum: No registered users and 3 guests