close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Division by zero

Thread began 12/10/2010 5:32 pm by massimo173451 | Last modified 12/13/2010 3:01 pm by Jason Byrnes | 1435 views | 5 replies |

massimo173451

Division by zero

Hi there

I am tring to solve the issue myself , but unfortunately I am not expert in PHP language, the issue happens when in the cart is present only an item with price 0 (zero), and when put in the cart another item with different price > 0, in this case the checkout is ok, but the PayPal price is in USD not in Euro why??? Any suggestion or support are appreciate.

Sign in to reply to this post

Jason ByrnesWebAssist

try changing line 935 to:

php:
if (($WA_Store_Cart->TotalColumn("TotalPrice") != 0) && (WA_eCart_FormatNumber($WA_Store_Cart->DisplayInfo("Price") - (($WA_Store_Cart->DisplayInfo("Price")/$WA_Store_Cart->TotalColumn("TotalPrice")) * $WA_Store_Cart->GetDiscounts()), false, 2) > 0)) {
Sign in to reply to this post

massimo173451

Great Jason works fine now, but clearly the item in the cart is a digital file (downloadable) with price 0 (zero), and the cart is empty to the final process on PP, is possible send to the customer in all cases the link for dowload the file with receipt (by passing PayPal checkout)? Second issue when in the cart is present an item with price > 0 in the final step, on PP form compare the price in USD not in EURO how can I change this setting??

Sign in to reply to this post

Jason ByrnesWebAssist

on the process transaction page, you can by pass paypal if the totla of the cart is 0 by changing the following code block:

php:
<?php

// if in test mode, skip all checkout code
if ($WAGLOBAL_Test_Mode != true) {
?>




to:

php:
<?php

if($WA_Store_Cart->TotalColumn("TotalPrice") <= 0$WAGLOBAL_Test_Mode true;
// if in test mode, skip all checkout code
if ($WAGLOBAL_Test_Mode != true) {
?>




to change the currency code sent to paypal, look for the following code:

php:
$PP_DirectPayment_required[0][$nextIndex] = "Currency";

  $PP_DirectPayment_required[1][$nextIndex] = "USD";



and change it to:

php:
$PP_DirectPayment_required[0][$nextIndex] = "Currency";

  $PP_DirectPayment_required[1][$nextIndex] = "EUR";
Sign in to reply to this post

massimo173451

Jason,

Where are located the PP files for change the currency in PS4, I try to find it but the search fails???

Sign in to reply to this post

Jason ByrnesWebAssist

changing the currency in power store is not a supported modification, see this post for a tip on how to use Dreamweaver's find and replace function though:
showpost.php?p=76115&postcount=7

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