close ad
WARNING: Do Not Install the DREAMWEAVER CC 2017 or 2018 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Checking out with and without Payment Gateway

Thread began 8/16/2011 4:18 am by lr_leal239405 | Last modified 8/17/2011 8:16 pm by lr_leal239405 | 634 views | 2 replies |

lr_leal239405

Checking out with and without Payment Gateway

I created a checkout form with the Payment Gateway included, but the shopping cart is for FREE stuff. The reason is that I also added a Donation option so that the visitor can simultaneously make a donation if he so wishes. The problem I have right now is that whenever no donation is made, there's no $ for the Paypal to process so I get an error because it can't charge 0. How do I make it so that when the visitor does not check the donation box, the payment Behavior is not active, but when they check the box to make a donation, the payment Behavior becomes active? In order other words how do I deactivate the ecart local checkout depending on whether the donation checkbox is not checked. That way it will process the transaction, put the data in the dbs and return the email receipt, but without going through the Payment gateway so I don't get an error.

Also, I want in a form to copy the fields from the billing info to the shipping info automatically (so that I can hide the shipping info when there is none required). I found some java code that works, except on the SELECT fields, such as as State and Country it only changes when there's some invalid entries and it bounces back to the form. But I need it to automatically change to the State I select in the Billing form after I tab out of it (onblur)....It doesn't work. Any suggestions?

Thank you.

Sign in to reply to this post

Jason ByrnesWebAssist

you would need to add an if statement around the local checkout behaivor on the confirm page.


to locate the local checkout behavior code, go to the server behaviors panel and select the local cehckout behavior in the list of behaviors.

Now, change Dreamweaver to Code view, the local checkout code block will be highlighted

you will need to add a new php code block just before the opening "<?php" tag and another just after the closing "?>" tag.

for example:

php:
<?php if($yourCartName->GrandTotal() > 0) { ?>

<?php
<local checkout code>
?>
<?php 
} else { $yourCartName->redirStr "checkout_success.php"; } ?>



where "yourCartName" is the name of your eCart object.

for the shipping script problem, the eCart form has a a checkbox that when checked will copy the bill;ing info to the shipping elements using an onclick event:
<input type="checkbox" name="eC_SameAs" id="eC_SameAs" value="1" onClick="eCart_copyBillingToShipping(this);" />

you can add that same onclick code to the onblur event of your state select list.

Sign in to reply to this post

lr_leal239405

Thanks Jason. It works.

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