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

java script error trying edit ecart 5

Thread began 8/11/2013 4:27 pm by Christie | Last modified 8/13/2013 3:05 pm by Christie | 386 views | 8 replies |

Christie

java script error trying edit ecart 5

I am trying to edit the ecart object and am getting this error. All was working just fine until today.

While executing timer in WA eCart Object.htm, the following JavaScript errors occurred:
At line 686 of file "macintosh HD:Users:my name:Library:Application Support:Adobe:Dreamweaver CS6:en_US:Configuration:Commands:WA ecart
Object.js":
unmatched ) in regular expression

Any help would be appreciated. Thanks.

Sign in to reply to this post

Jason ByrnesWebAssist

Send a copy of the eCart object file in the WA_eCart folder of your site please.

Sounds like a corrupted rule, but i will need to examine the code to be sure.

Sign in to reply to this post

Christie

I found the WA_eCart folder. Which file would be the eCart object?

Sign in to reply to this post

Jason ByrnesWebAssist

it will contain the name of the eCart object your created. the default eCart object name is "eCart1" so the eCart object file would be named eCart1_PHP.php

if you used a different name, the eCart object file will use that name instead:
<objectName>_PHP.php

Sign in to reply to this post

Christie

Ok I have it. Will try to attach it for you......

Attached Files
eCart1_PHP.php
Sign in to reply to this post

Jason ByrnesWebAssist

the error is caused by the following code that was added to the cart file:
$gift = 0;
if (stripos($this->giftWrap, "yes") === 0) {
$gift = 6;
}

this hand coding ion the object file is causing the error.

Sign in to reply to this post

Christie

Thank you. Question #1- What is the reason this code causes the conflict as the cart works just fine (except for the object edit feature)? Remember I was having problems due to the columns not working correctly because of a conflict with DWcs6. I then had to seek a bit of hand coding help.
Question #2 - Is it possible to edit the ecart object with hand coding and have the object edit feature work as it should?

Sign in to reply to this post

Jason ByrnesWebAssist

1) on editing the eCart object, it needs to read the object file to determine the settings that are being used. your hand coding is not recognized by the translator that reads the code and translates it to the settings. this is causing the error.

2) No, once you start hand coding the eCart object file, you will not be able to use the Object Editor to make changes, even if it does not generate errors, it would over write your custom coding, since it would not be recognized by the editor.


instead of using the hand coding for adding the giftwarp charge, you can do this on the calculations screen by editing the true price calculation to:


((abs([giftWrap] == 'yes')?6:0) + [Price]) * [Quantity]

undo the hand editing, then edit the cart object using the above calculation.

Sign in to reply to this post

Christie

Great and thank you. Will try this.

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