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

Free Freight With Coupon

Thread began 2/16/2016 12:15 pm by mrobben375515 | Last modified 2/16/2016 6:51 pm by Ray Borduin | 328 views | 6 replies |

mrobben375515

Free Freight With Coupon

I am trying to edit the eCart object Shipping Cost such that when there is a coupon value greater than zero, freight is also zero. I tried to add a rule to the existing cart that reads per the attached file, but it also seemed to zero out freight on an order where the user did not enter a coupon code.

Sign in to reply to this post

Ray BorduinWebAssist

The issue is that if the Session variable isn't set it isn't = 0... Try using this condition instead: "custom expression evaluates to true" and the expression is:
(isset($_SESSION['PromoCodeValue'])?$_SESSION['PromoCodeValue']:'0') == 0

Sign in to reply to this post

mrobben375515

When I posted the new eCart1.php, I immediately got this error:

Parse error: syntax error, unexpected '"', expecting T_STRING in /home/content/05/11651305/html/1to1-silpada/WA_eCart/eCart1_PHP.php on line 112

Sign in to reply to this post

Ray BorduinWebAssist

Please attach a current copy of the cart file so I can look at that line.

Sign in to reply to this post

mrobben375515

Originally Said By: Ray Borduin
  Please attach a current copy of the cart file so I can look at that line.  


See attached.

Sign in to reply to this post

Ray BorduinWebAssist

i used double quotes in my example and it looks like you need to use single quotes. Update line 112 to:
if (true && (("UPS"=="UPS")&&(isset($_SESSION["eCart1_UPS_Quote"]))&&(floatval($_SESSION["eCart1_UPS_Quote"]) > 0) && (( (isset($_SESSION['PromoCodeValue'])?$_SESSION['PromoCodeValue']:'0') == 0 )))) {

Sign in to reply to this post

mrobben375515

Thank you, that worked!

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