close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Add extra shipping charge

Thread began 6/05/2010 3:19 am by J7HNW | Last modified 6/23/2010 10:05 am by Jason Byrnes | 3235 views | 11 replies |

J7HNW

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

Sign in to reply to this post

Jason ByrnesWebAssist

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

Sign in to reply to this post

J7HNW

Please advise

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

Attached Files
Seats for Kids.zip
Sign in to reply to this post

Dave BuchholzBeta Tester

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.

Sign in to reply to this post

J7HNW

Please advise Jason

Jason

Please can you give me the correct code for ASP ?

Sign in to reply to this post

Jason ByrnesWebAssist

the correct code for ASP would be:

<input name="shippingOption" type="hidden" id="shippingOption" value="<%= Request.Form("shippingOption") %>" />
Sign in to reply to this post

J7HNW

Thank you

Thanks Jason

Ticket can now be closed - all working brilliantly

Sign in to reply to this post

Jason ByrnesWebAssist

Great, glad to hear it is working.

Sign in to reply to this post

J7HNW

Sorry - problem on e mailed cart

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

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

Jason ByrnesWebAssist

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") %>" />

Sign in to reply to this post
loading

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