close ad
Install the LAtest Updates to Work with CC 2017 and CC 2018
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Session Variable - Ecart - Not working

Thread began 6/07/2010 10:01 pm by Maplemac | Last modified 6/08/2010 10:41 am by Jason Byrnes | 706 views | 1 replies |

Maplemac

Session Variable - Ecart - Not working

Hi
I am having trouble setting up a session variable to apply a charge of a value is greater then 6 in a selected drop down.

I have set up a drop down list on my order page: order-indoor.php

<select name="CanuckHTC_15_SkirtLength_Add" size="1" id="SkirtLength">
<option value="No Skirt">No Skirt</option>
<option value="1">1</option>
<option value="1.25">1.25</option>
<option value="1.5">1.5</option>
<option value="1.75">1.75</option>
<option value="2.0">2.0</option>
<option value="2.25">2.25</option>
<option value="3.0">3.0</option>
<option value="3.25">3.25</option>
<option value="3.5">3.5</option>
<option value="3.75">3.75</option>
<option value="4.0">4.0</option>
<option value="4.25">4.25</option>
<option value="4.5">4.5</option>
<option value="4.75">4.75</option>
<option value="5.0">5.0</option>
<option value="5.25">5.25</option>
<option value="5.5">5.5</option>
<option value="5.75">5.75</option>
<option value="6.0">6.0</option>
<option value="6.25">6.25</option>
<option value="6.5">6.5</option>
<option value="6.75">6.75</option>
<option value="7.0">7.0</option>
<option value="7.25">7.25</option>
<option value="7.5">7.5</option>
<option value="7.75">7.75</option>
<option value="8.0">8.0</option>
<option value="8.25">8.25</option>
<option value="8.5">8.5</option>
<option value="8.75">8.75</option>
<option value="9.0">9.0</option>
<option value="9.25">9.25</option>
<option value="9.5">9.5</option>
<option value="9.75">9.75</option>
<option value="10.0">10.0</option>
</select>

Set hidden form element on the cart page cart.php

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

Then set session value on cart page cart.php

Then edited ECart Charges page - based on session variable value (is greater than 6.0) to add $12 as a flat rate charge

It doesn't pick up the charges to show in the order summary.
Hope you can help

Sign in to reply to this post

Jason ByrnesWebAssist

the skirt length is already being added to the "SkirtLength" column in the ecart object, there is no need to capture it in another session variable.

On the calculation tab of the eCart object, create a new calculation:
name: SkirtCalc:
(([SkirtLength] > 6)?12:0) * [Quantity]


then on the charges tab, create a new charge:
Triggers:
Subtotal For Any Column:
If the subtotal of column 'SkirtCalc' is '>' a value of '0'

calculation:
based on Column subtotal:
subtotal of column 'SkirtCalc' 'plus' '0'

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