close ad
Help us test the new Databridge BETA with MySQLi support
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

2 forms with eCart not working

Thread began 12/22/2011 6:23 am by steve287725 | Last modified 1/05/2012 10:10 am by Jason Byrnes | 1029 views | 6 replies |

steve287725

2 forms with eCart not working

Hello all

I have 2 forms on one eCart 'confirm' page - the first sends the order details through to a secure payment gateway and inserts the contents into my database absolutely fine, and also sends the confirmation email with the cart display in it to the buyer and me - all good.

I have a second form on the page which is intended simply to email the cart contents to the buyer without paying (but still insert the information into the orders database) - weird I know but that's what the customer wants - as a pre-priced enquiry.

The issue - when the second form is submitted it hangs for a while, does not send the email and only inserts partial info into my database.
Then instead of going to the GoTo page as set, it returns to my cart!

I have raked through the forum and made sure that the form triggers are separate, and the second form (the one that does not go to the gateway) is the only one with a 'GoTo' page set.
Obviously the first form has its action set to the gateway, the second one has no action set.

Anyone shed any light on this please?
The code looks right as far as I can see.
Any help would be appreciated

File attached for reference

Thanks all

Steve

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

Jason ByrnesWebAssist

add the following hidden elements to the second form:

php:
<input type="hidden" name="OrderRef" id="OrderRef" value="<?php echo((isset($_POST["OrderRef"]))?$_POST["OrderRef"]:""); ?>" />

<input type="hidden" name="firstname" id="firstname" value="<?php echo((isset($_POST["firstname"]))?$_POST["firstname"]:""); ?>" />
<input type="hidden" name="lastname" id="lastname" value="<?php echo((isset($_POST["lastname"]))?$_POST["lastname"]:""); ?>" />
<input type="hidden" name="email" id="email" value="<?php echo((isset($_POST["email"]))?$_POST["email"]:""); ?>" />
<input type="hidden" name="phone" id="phone" value="<?php echo((isset($_POST["phone"]))?$_POST["phone"]:""); ?>" />
<input type="hidden" name="phonetype" id="phonetype" value="<?php echo((isset($_POST["phonetype"]))?$_POST["phonetype"]:""); ?>" />
<input type="hidden" name="fax" id="fax" value="<?php echo((isset($_POST["fax"]))?$_POST["fax"]:""); ?>" />
<input type="hidden" name="street1" id="street1" value="<?php echo((isset($_POST["street1"]))?$_POST["street1"]:""); ?>" />
<input type="hidden" name="street2" id="street2" value="<?php echo((isset($_POST["street2"]))?$_POST["street2"]:""); ?>" />
<input type="hidden" name="city" id="city" value="<?php echo((isset($_POST["city"]))?$_POST["city"]:""); ?>" />
<input type="hidden" name="state_province" id="state_province" value="<?php echo((isset($_POST["state_province"]))?$_POST["state_province"]:""); ?>" />
<input type="hidden" name="postcode" id="postcode" value="<?php echo((isset($_POST["postcode"]))?$_POST["postcode"]:""); ?>" />
<input type="hidden" name="country" id="country" value="<?php echo((isset($_POST["country"]))?$_POST["country"]:""); ?>" />
<input type="hidden" name="shipping_firstname" id="shipping_firstname" value="<?php echo((isset($_POST["shipping_firstname"]))?$_POST["shipping_firstname"]:""); ?>" />
<input type="hidden" name="shipping_lastname" id="shipping_lastname" value="<?php echo((isset($_POST["shipping_lastname"]))?$_POST["shipping_lastname"]:""); ?>" />
<input type="hidden" name="shipping_email" id="shipping_email" value="<?php echo((isset($_POST["shipping_email"]))?$_POST["shipping_email"]:""); ?>" />
<input type="hidden" name="shipping_phone" id="shipping_phone" value="<?php echo((isset($_POST["shipping_phone"]))?$_POST["shipping_phone"]:""); ?>" />
<input type="hidden" name="shipping_phonetype" id="shipping_phonetype" value="<?php echo((isset($_POST["shipping_phonetype"]))?$_POST["shipping_phonetype"]:""); ?>" />
<input type="hidden" name="shipping_phonetype" id="shipping_phonetype" value="<?php echo((isset($_POST["shipping_phonetype"]))?$_POST["shipping_phonetype"]:""); ?>" />
<input type="hidden" name="shipping_fax" id="shipping_fax" value="<?php echo((isset($_POST["shipping_fax"]))?$_POST["shipping_fax"]:""); ?>" />
<input type="hidden" name="shipping_street1" id="shipping_street1" value="<?php echo((isset($_POST["shipping_street1"]))?$_POST["shipping_street1"]:""); ?>" /> 
<input type="hidden" name="shipping_street2" id="shipping_street2" value="<?php echo((isset($_POST["shipping_street2"]))?$_POST["shipping_street2"]:""); ?>" />
<input type="hidden" name="shipping_city" id="shipping_city" value="<?php echo((isset($_POST["shipping_city"]))?$_POST["shipping_city"]:""); ?>" />
<input type="hidden" name="shipping_state_province" id="shipping_state_province" value="<?php echo((isset($_POST["shipping_state_province"]))?$_POST["shipping_state_province"]:""); ?>" />
<input type="hidden" name="shipping_postcode" id="shipping_postcode" value="<?php echo((isset($_POST["shipping_postcode"]))?$_POST["shipping_postcode"]:""); ?>" />
<input type="hidden" name="shipping_country" id="shipping_country" value="<?php echo((isset($_POST["shipping_country"]))?$_POST["shipping_country"]:""); ?>" />
Sign in to reply to this post

steve287725

Oh dear

Hello Jason

Sorry - so simple (and to be honest a bit embarrassing) but thanks.
This is all OK now except the redirect - it still goes back to the (full) cart?

Thanks again

Steve

Sign in to reply to this post

Jason ByrnesWebAssist

send a copy of the enquiry_success.php page, also a link where i can see this happen would be helpful.

Sign in to reply to this post

steve287725

Page Attached

Hello Jason

Pages attached - confirm.php and enquiry_success.php.
If it helps, submitting the payment_form properly inserts the order details into my database, sends the variables properly to the payment gateway but does not send the confimation email - I think that the email should be sent when the form is submitted?

The enquiry_form does send the email properly but redirects to the cart, which still has its contents.

Many thanks and all the best for 2012

Steve

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

steve287725

Link

Sorry - forgot to add the link to the site which is www.onlytshirts.co.uk - follow it through

Thanks again

Sign in to reply to this post

Jason ByrnesWebAssist

I have created a support ticket so we can look into this issue further.

To view and edit your support ticket, please log into your support history:
supporthistory.php

If anyone else is experiencing this same issue, please append to this thread.

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