close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

shipping rule error

Thread began 4/06/2016 3:31 am by etekLab | Last modified 4/07/2016 4:34 pm by Ray Borduin | 2058 views | 14 replies |

etekLab

shipping rule error

I have a shipping rule where first item should be charged 10.50 and rest is charged 1.00
also if the shopping cart has a particular category "Category1" then shipping will be 12.50 each.

Problem is
First Item is charged both 10.50 and 1.00
Category1 is charged both 12.50 and 1.00, Second quantity is charged 10.50, third is charged 1.00 and so on....

I am not sure what I did wrong

Sign in to reply to this post

Ray BorduinWebAssist

In order to do this effectively you need to use calculations with your shipping rules. First add three calculations:

1) PistolCaseQty = ([ItemCatName]=='Pistol Carry Case')?[Quantity]:0

2) EliteCaseQty = ([ItemCatName]=='Elite Series Cases')?[Quantity]:0

3) StandardQty = ([ItemCatName]=='Elite Series Cases' || [ItemCatName]=='Pistol Carry Case')?0:[Quantity]

Then creating the rules becomes much easier:

1) Shipping & Handling : Trigger = SubTotal of StandardQty > 0 : Calculation = Flat rate $9.50

2) Shipping & Handling per item : Trigger = SubTotal of StandardQty > 1 : Calculation = Based on column subtotal StandardQty times 1

3) Pistol Case Shipping : Trigger = SubTotal of PistolCaseQty > 1 : Calculation = Based on column subtotal PistolCaseQty times 12.50

4) Elite Shipping : Trigger = SubTotal of EliteCaseQty > 1 : Calculation = Based on column subtotal EliteCaseQty times 12.50

Attached Files
eCart1_PHP.php
Sign in to reply to this post
Did this help? Tips are appreciated...

etekLab

The code works with one quantity but if I add 2 in the quantity it does not change the shipping amount.

eg. Pistol Carry Case if quantity is 1 - shipping shows 12.50
if it is 2 - shipping still shows 12.50 (it should show 25.00)
Same with Elite

With standard also 1st quantity shows 10.50 but when I add 2 to the quantity of same item it doesn't add 1.00
But when I add a new item then shipping shows 12.50 whereas it should show 11.50

Sign in to reply to this post

Ray BorduinWebAssist

Did you use the cart object I sent or did you do it on your own? Please send me a current copy and I will take a look to see if I can spot the problem.

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

etekLab

Thank you for looking into the problem.
I used the .php you send. I replaced the eCart1_PHP.php with the one you send. This code only works with one quantity for each item. If the one Item has 2 or more quantity then the code does not work. (standardQTY) and when I add a new Item then the code adds 1.00 also to the first Item.
rule should be
First item is 9.50
Second item or quantity is 1.00

except for Pistol and Elite which is both 12.50, that code is working...on any quantity...but when I add a different item it adds 10.50 when it should only add 1.00 (hope that explains)

When first item is added it shows 9.50 but when you add a quantity or new item shipping shows 11.50 it should show 10.50

Sign in to reply to this post

Ray BorduinWebAssist

The second rule is wrong... I have:
2) Shipping & Handling per item : Trigger = SubTotal of StandardQty > 1 : Calculation = Based on column subtotal StandardQty times 1

it should be:
2) Shipping & Handling per item : Trigger = SubTotal of StandardQty > 0 : Calculation = Based on column subtotal StandardQty times 1

OK I think I see what you are saying... so if they have both an elite and a standard item, they just pay the additional dollar for the standard? What if they have two elite?

Try this updated cart attached.

Attached Files
eCart1_PHP.php
Sign in to reply to this post
Did this help? Tips are appreciated...

etekLab

Great! almost done.
StandardQty working great now...

Problem is with the Elite or Pistol Items,,,

if item is elite or pistol in the cart the shipping is 12.50,,(that part is fine) If I have two quantity of same item that is also working fine....(showing 25.00) but when Standard item is added it adds 10.50,,,
(10.50 should only come when the first item in the cart is standard item and Elite or Pistol item is not added)
all others should just add 1.00. Which also mean that if the first item was standard and then we added Elite then the first item should be 1.00 instead of 10.50
I hope that explains

Sign in to reply to this post

Ray BorduinWebAssist

That should be what the latest version I sent you does. Are you sure you uploaded it?

I updated the first rule to be:
Shipping & Handling : Trigger = SubTotal of StandardQty > 0 AND SubTotal of EliteCaseQty = 0 AND SubTotal of PistolCaseQuantity = 0 : Calculation = Flat rate $9.50

Which should make it so that the $9.50 base charge for a Standard item wouldn't be added if an Elite or Pistol category item was in the cart.

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

etekLab

Thank you,
I changed the > 1 to > 0, didnt realize you made other changes...Now I replaced the .php file with the one you send and everything is working fine now..
Just one last question regarding shipping.
if a promocode is entered for Elite item then the item should get 10% discount and first shipping cost (12.50) should be deducted. If you notice in discount I already have a promocode for all product to get 10% (this is another code entered) but I created another discount (new code) for Elite Discount to only give Elite Item 10% discount with first shipping free (note; other quantity will get 12.50 shipping charged).

Please review the discount: it is giving discount to all product whereas it should only get discount on Elite items ,,,i need to also know how to make rule for discounting first shipping cost in Elite item and rest will be charged 12.50

Sign in to reply to this post

Ray BorduinWebAssist

I think you will need to add another calcuation:

EliteTotal = ([ItemCatName]=='Elite Series Cases')?[TotalPrice]:0

Then you can set the discount rule to be based on the EliteTotal Column Total instead of the entire cart.

The second discount rule would be:
Trigger = SubTotal of EliteCaseQty > 0 : Calculation = Flat Rate $12.50

(Both would also have the discount code trigger)

Sign in to reply to this post
Did this help? Tips are appreciated...
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...