close ad
Install the LAtest Updates to Work with CC 2017 and CC 2018
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Cart is Passing Discounts Incorrectly to PayPal

Thread began 3/05/2014 2:08 pm by troyd | Last modified 3/06/2014 12:05 pm by troyd | 429 views | 9 replies

troyd

Cart is Passing Discounts Incorrectly to PayPal

I have an eCart with a Coupon Code Discount Rule. Somehow I am either calculating them wrong, or passing the item index values wrong to PayPal.

Discount itself is working fine:
This 10% discount is correctly applied to a particular item in the cart by using a "coupon" rule.
The coupon is a $_SESSION['PromoCode'] that is set by the customer entering a code "Food10".
The eligible items are Dog Food, which have been given a "Group" column entry of "10".

Example of working cart page and confirm page:

Dog Food $18.00 <---(item to be discounted)
Dog Bowl $5.00
Dog Collar $10.00

Sub-total: $33.00
Discount Applied: - $1.80
Sale Tax: $2.31

Grand Total: $33.51

Ok, good so far.
The Dog Food is discounted 10%. The Grand Total is correct.

Problem:
As the cart is passed to PayPal, each item's price value has been recalculated. The actual total is still correct.

Dog Food $17.02 <---(only item that should be discounted)
Dog Bowl $4.73 <---(should not be discounted)
Dog Collar $9.45 <---(should not be discounted)

Item total $31.20
Tax: $2.31

Total: $33.51 <---(this is correct)

Looking at the source code on the confirm.php page, I can see the hidden form elements have the newly discounted values spread out among all items rather than just taking the $1.80 off of the Dog Food's price.

The Discount Rule is like this:

"Number of items with a specific column value"
Number of items with Group of 10 > 0
AND
"Based on session variable value"
If Session variable PromoCode == Food10
"Based on items with a specific value"
Total of TotalPrice where Group has a value of 10 times 0.10

How can I confine the discount to only the Dog Food items and leave the other prices at the full amount?

(Currently using eCart 5.0.7)

Thanks,
TroyD

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...