close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

WA_eCart : TotalPrice - TruePrice

Thread began 10/01/2015 10:15 am by Fritz Stickers | Last modified 10/04/2015 6:16 pm by Ray Borduin | 3105 views | 6 replies |

Fritz Stickers

WA_eCart : TotalPrice - TruePrice

After changing the calculation of categorie 31, the calculations of categories 1-30 (when ordering more than 1 product) aren't correct anymore (see attached image).
In attach :
* OK.txt : before changing calculation 31 - calculations 1-30 OK
* not_OK : after changing calculation 31 - calculations 1-30 not_OK


I think it must be someting with the brackets in the code, but I searched and tried in vain.

Attached Files
OK.txt
not_OK.txt
stickersBE_VB.asp
Sign in to reply to this post

Ray BorduinWebAssist

It looks like you are missing the fourth ")" from the end of that line.

Sign in to reply to this post
Did this help? Tips are appreciated...

Fritz Stickers

When I add a fourth ")", the error says :

End of the instruction is expected
/stickers/WA_eCart/stickersBE_VB.asp, line 194

........ Quantity > 19 AND itmObj.ProductCatID <> 57))*0.04) - ((abs(itmObj.Quantity > 50 AND itmObj.ProductCatID <> 57))*0.05)))'c
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------^

Sign in to reply to this post

Ray BorduinWebAssist

It looks like you are also missing an open "(" before: ((itmObj.Size-15)

it should be:
(((itmObj.Size-15)

Sign in to reply to this post
Did this help? Tips are appreciated...

Fritz Stickers

Now there's no error, but the calculations for categorie 1-30 are still not correct when ordering more than one of the same product.
In the TotalPrice, only the discount price for one product is shown. The calculation doesn't multiply the price. See previously attached image.

Maybe there's another calculation rule for :

(Abs(itmObj.ProductCatID = 31) * (itmObj.Price+(abs(itmObj.Size < 110) * ( ((itmObj.Size-15)/5)) + (abs(itmObj.Size = 110) * (+18)) + (abs(itmObj.Size = 120) * (+19)) + (abs(itmObj.Size = 130) * (+20)) + (abs(itmObj.Size = 140) * (+21)) + (abs(itmObj.Size = 150) * (+22))) )+

The price for products > 110 (size cm) must be increased by 1 (euro) each 10 (size cm).



This calculation worked fine :
(Abs(itmObj.ProductCatID = 31) * (itmObj.Price+(abs(itmObj.Size <= 65) * ((itmObj.Size-15)/5)) + (abs(itmObj.Size > 65) * (((itmObj.Size-65)/10) + 10))))+

The price for products > 65 (size cm) are increased by 0,5 (euro) each 5 (size cm).
But here the max size was 100. Now the max size is 150, so the calculation should be edited.

Sign in to reply to this post

Ray BorduinWebAssist

Try this one:
(Abs(itmObj.ProductCatID = 31)*(itmObj.Price + (abs(itmObj.Size < 110) * ((itmObj.Size-15)/5)) + (abs(itmObj.Size = 110) * (+18)) + (abs(itmObj.Size = 120) * (+19)) + (abs(itmObj.Size = 130) * (+20)) + (abs(itmObj.Size = 140) * (+21)) + (abs(itmObj.Size = 150) * (+22))))+

Sign in to reply to this post
Did this help? Tips are appreciated...

Fritz Stickers

I used your new line, but get the same error :
End of the instruction is expected
/stickers/WA_eCart/stickersBE_VB.asp, line 194

........ Quantity > 19 AND itmObj.ProductCatID <> 57))*0.04) - ((abs(itmObj.Quantity > 50 AND itmObj.ProductCatID <> 57))*0.05)))'c
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------^


I deleted one bracket on the end of line 194, 196 and 197.
Now it's working fine !


Thanks a lot Ray ! :-)

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