when product price is zero
Some products in my DB are for free so when its is been added in cart & when "checkout" is clicked.. i get error like Warning: Division by zero in c:\******\confirm.php on line 659
Some products in my DB are for free so when its is been added in cart & when "checkout" is clicked.. i get error like Warning: Division by zero in c:\******\confirm.php on line 659
you cant pass a $0 valued transaction through a payment gateway, they wont except it.
either you will need to force the cart to have at least one item that has a price in it before checking out, or create a second set of checkout pages using the checkout wizard, this time selecting No Gateway.
make sure that these new checkout pages have a unique name.
then add code to the original checkout pages to pass over to the no gateway pages if the cart price is 0. and add code the No gateway pages to pass to the gateway pages if the price is > 0.
I added new checkout pages... i created with different names..
now next WHAT DOES THIS MEAN?
then add code to the original checkout pages to pass over to the no gateway pages if the cart price is 0. and add code the No gateway pages to pass to the gateway pages if the price is > 0.
can you please elaborate..? i mean i m not good in writing codes..
u said add code to the original checkout pages to pass over to the no gateway pages.. which all code from the new checkout page should i copy? & where to paste exactly? there are so many codes so.. & how to make //no gateway pages if the cart price is 0\\
& also //and add code the No gateway pages to pass to the gateway pages if the price is > 0.\\
on the checkout pages, there will be code similar to this near the top:
<?php
//WA eCart Include
require_once("WA_eCart/yourCartName_PHP.php");
?><?php
$yourCartName->GetContent();
?>
where yourCartName is the name of your eCart object.
on the pages that do connect to the gateway, change that code to:
<?php
//WA eCart Include
require_once("WA_eCart/yourCartName_PHP.php");
?><?php
$yourCartName->GetContent();
?>
<?php if($eCart1->GrandTotal() == "0") header("Location: noGatewayCheckout.php"); ?>
on the pages that do not connect to the gateway use this code:
<?php
//WA eCart Include
require_once("WA_eCart/yourCartName_PHP.php");
?><?php
$yourCartName->GetContent();
?>
<?php if($eCart1->GrandTotal() > "0") header("Location: gatewayCheckout.php"); ?>
thanks a lot for this help.. i added & tried.. but then the product is not been displayed at DOWNLOAD CENTRE.. i went through noGatewayCheckout.php n etc.. it got confirmed.. i had created download_centre by looking in support..
I recreated the pages like customer_order_history&details.php pages....
& also download_centre.php
now when i go to details page i get error like --
Unknown column 'WADAOrderID' in 'where clause'
Secondly i created all pages.then i added products once again with price in it.. den i went through check out & had disconnected internet.. As it went to paypal (net wasnt connected) so payment was not done.. den when i went to download centre that product was shown there but it was not downloadable.. how can it display the product when payment is not done? please help.
What paypal system are you using?
Send a copy of the download center page that is having the problem.
i used PayPal website payment standard. i have added 2 more pages.. please look into it.
I do not recommend using paypal payments standard for creating a store that sells downloadable goods.
the issue is that paypal payments standard is not a real time payment gateway, the order needs to be stored in the database before the user is transferred to paypal. with payments standard, you need to set the status of the order to pending when the order is first inserted.
Paypal standard uses a system called IPN to post the results of the transaction to your site when the transaction is processed, you need to create a page that will act on this ipn post to update the order status:
ipn
paypal payments standard and IPN is one of the more difficult gateway options to configure correctly.
I recommend using payments pro instead, payments pro is a real time solution.
for the error on the detail page, edit the wadaorders recordset
create a new parameter:
Name: WADAOrderID
Type: Integer
default Value: -1
Run Time Value: $_GET['OrderID']
for the download center page, double check that the users id is being stored in the orders.oderUserID column
and add the following code after the <body> tag of the download center page to show the recordset SQL"
<?php echo"SQL: ".$query_limit_WADAorders); ?>
Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.
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.