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

rating

Passing double cost of item to paypal

Thread began 2/04/2013 4:52 pm by phil107723 | Last modified 2/06/2013 3:32 pm by Jason Byrnes | 523 views | 5 replies |

phil107723

Passing double cost of item to paypal

Hi
All my prices display fine on the website until they get passed on to paypal. If the buyer buys 2 of one product then paypal uses the cost of the 2 products for each individual product i.e item costs $200 , 2= $400 the cost in Paypal shows $800.

I think I caused the problem by sorting out this issue:
When an item is ordered and there are different options that cost more, the additional cost was displaying on the website but was not being passed onto paypal. I confess I fiddled with TotalPrice in the code that gets passed onto paypal.

So my original problem was the extra cost of options and currently that is working on the website but it has caused the problem at the top of this post.
In the hope that you can help I've attached the code.

Thanks for your time.

Attached Files
error.zip
Sign in to reply to this post

Jason ByrnesWebAssist

please post a link where i can see the problem.

Sign in to reply to this post

phil107723

the website is www.adrenalinr.com and if you try and purchase any muffler and change the quantity to 2 (as far as paypal ) this doubles the price.
For an example of an increase in price for an option go here productdetail.php?productID=518 and select the 101mm inlet size.

I've also attached my ecart1_php.php to see if that will offer some clues.
Thanks Jason

Attached Files
eCart1_PHP.zip
Sign in to reply to this post

Jason ByrnesWebAssist

on the cart page, change the following code:


php:
<input type="hidden" name="amount_<?php echo $eCart1_Index+1?>" id="amount_<?php echo $eCart1_Index+1?>" value="<?php echo WA_eCart_FormatNumber($eCart1->DisplayInfo("TotalPrice") - (($eCart1->DisplayInfo("Price")/$eCart1->TotalColumn("TotalPrice")) * $eCart1->GetDiscounts()), false2?>" />



to:

php:
<input type="hidden" name="amount_<?php echo $eCart1_Index+1?>" id="amount_<?php echo $eCart1_Index+1?>" value="<?php echo WA_eCart_FormatNumber($eCart1->DisplayInfo("truePrice")), false2?>" />
Sign in to reply to this post

phil107723

Success

Thanks Jason
This line produced an error:
<input type="hidden" name="amount_<?php echo $eCart1_Index+1; ?>" id="amount_<?php echo $eCart1_Index+1; ?>" value="<?php echo WA_eCart_FormatNumber($eCart1->DisplayInfo("truePrice")), false, 2) ?>" />

So I tried putting truePrice into the original in the place you suggested and it worked.
<input type="hidden" name="amount_<?php echo $eCart1_Index+1; ?>" id="amount_<?php echo $eCart1_Index+1; ?>" value="<?php echo WA_eCart_FormatNumber($eCart1->DisplayInfo("truePrice") - (($eCart1->DisplayInfo("Price")/$eCart1->TotalColumn("TotalPrice")) * $eCart1->GetDiscounts()), false, 2) ?>" />


Thanks again your help is really appreciated

Sign in to reply to this post

Jason ByrnesWebAssist

glad to hear it is working.

Sign in to reply to this post

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...