Add extra shipping charge
On a different Cart - My client wants me to add a drop down list on the Cart form shoppingcart.asp with an option to select NEXT DAY at a cost of £5.00
Please advise how this should be added.
Thanks
John
On a different Cart - My client wants me to add a drop down list on the Cart form shoppingcart.asp with an option to select NEXT DAY at a cost of £5.00
Please advise how this should be added.
Thanks
John
on the checkout page add the dropdown list:
<select name="shippingOption" id="shippingOption">
<option value="">Select Shipping Option</option>
<option value="Next Day">Next Day</option>
</select>
On the confirm page, add a hidden form element with the same name to capture the value posted from the checkout page:
<input name="shippingOption" type="hidden" id="shippingOption" value="<?php echo((isset($_POST["shippingOption"]))?$_POST["shippingOption"]:"") ?>" />
Then add a set session value server behavior to the confirm page. On the server behaviors panel, click the plus button and select eCart -> General -> Set Session Variable.
Set the name to shippingOption
set the trigger to Any Form post
For the value, click the lightning bolt and select the shippingOption form element.
Finally add a new shipping charge on the shipping tab of the eCart object.
Set the trigger to "Based on session Variables value":
Id the Session Variable 'shippingOption' has a value '=' to 'Next Day'
for the calculation, use a flat rate of 5.00
I have followed your instructions step by step al fine. Until the session variable.
I now have e Cart 5 on my main Installation so set up a 2nd User for E Cart 4 sites like this one aspe your website instructions.
When I try to add the session variable - it says I need to set up the testing server. This is odd because I have already done this. I can add a recordset to the page which means it is happy with my testng server settings - but I cannot add an e cart session..
Any idea on what is happening here ? I have e cart on the page already as well. My site settngs are attached
Thanks
John
The code that Jason gave you is PHP and your site is ASP i.e.
<input name="shippingOption" type="hidden" id="shippingOption" value="<?php echo((isset($_POST["shippingOption"]))?$_POST["shippingOption"]:"") ?>" />
I have not used ASP in a long time so I am not sure what the correct format would be to convert this code, maybe you can figure it out or perhaps Jason will post the correct code snippet.
Jason
Please can you give me the correct code for ASP ?
the correct code for ASP would be:
<input name="shippingOption" type="hidden" id="shippingOption" value="<%= Request.Form("shippingOption") %>" />
Thanks Jason
Ticket can now be closed - all working brilliantly
Great, glad to hear it is working.
All is working perfectly on the Cart as regards the Shipping Charge
When you select Next Day shipping - it updates the Cart perfectly on Screen and adds £5 to the Shipping and increases the total by £5.00 on the checkout page ready for the customer to check out.
Then when you fill in name and address etc and select checkout - the page transfers you to our payment server and e mails my client a copy of the order with the shopping cart in it and also a copy to the client - both by Universal E Mail.
I have the latest universal e mail . However - I am using the older Universal E mail on this site as it is one of my older ASP sites.
I have gone into the Checkout form and copied the cart table from the Checkout page ( which is now showing the added £5.00 for next day and also has the Grand total increased by the £5 as well ) and then pasted it inside the universal e mail body form along with client data fields showing name address etc.
For some reason it seems to lose the session value for the shippingOption when you submit the checkout button - it posts the E mail copy of the customers order perfectly and the cart items are in the e mail as they should be - but the Shipping Charge and Total are not holding the £5 charge previously added on the universl e mail confirmation form .
I have attached a copy of how the form comes through ( mht ) and the 2 Universal e mail scripts as well as the checkout forms -please can you tell me how to fix this issue ?
Thank you in anticipation
at line 662, the hidden form element is using the php code:
<input name="shippingOption" type="hidden" id="shippingOption" value="<?php echo((isset($_POST["shippingOption"]))?$_POST["shippingOption"]:"") ?>" />
you need to change this to use ASP code:
<input name="shippingOption" type="hidden" id="shippingOption" value="<%= Request.Form("shippingOption") %>" />
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.