close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Shipping increments for extra item

Thread began 2/22/2011 7:25 pm by ccdantas101117 | Last modified 3/04/2011 2:28 pm by Jason Byrnes | 1791 views | 3 replies |

ccdantas101117

Shipping increments for extra item

Okay here is the situation:

Two items formats: CD and LP
CD has a flat rate of $8.99
LP has a Flat rate of $13.99

Increments For CD Only int the cart:
If a cd is in the car any other CD will have the shipping of $4.50

Increments for LP only in the cart:
If only LP is in the cart any other LP will have shipping rate of $6.99

So Far so good OK

Now if the cart has 2 LP and 2 CD (just an example):

The shipping charges should be:

$13.99 + 6.99 + 4.50 + 4.50 So what I need to achieve is the shipping rule needs to pick the higher amount and based on the format of the other items add the increments

I know sounds dumb but can any one help on that I got stuck.

The increments for the same items in the cart i got but when is mixed that's the problem.

Sign in to reply to this post

Jason ByrnesWebAssist

this one was a head scratcher, but i think I have it:

This is assuming you have a column that marks the product category. In my example, I using a column named "category", in the add to cart buttons, I'm giving it the value "cd" or "lp"

you need to create 4 rules using the Number Of Items with a specific column value trigger:

Name: 1 LP
Triggers:
Number of items where 'category' has a value of 'lp' is '>=' a value of '1'

Calculation:
Flat Rate: 13.99

Name: more than 1 LP
Triggers:
Number of items where 'category' has a value of 'lp' is '>' a value of '1'

Calculation:
Flat Rate:

php:
($this->ConditionalTotal("Quantity", "category", "lp")-1) * 6.99




Name: 1 CD:
Triggers:
Number of items where 'category' has a value of 'cd' is '>=' a value of '1'

AND
Number of items where 'category' has a value of 'lp' is '<=' a value of '1'

Calculation:
Flat Rate: 8.99


Name: More than 1 CD
Triggers:
Number of items where 'category' has a value of 'cd' is '>' a value of '1'


Calculation:
Flat Rate:

php:
($this->ConditionalTotal("Quantity", "category", "cd")-1) * 4.99 + (($this->ConditionalTotal("Quantity", "category", "lp") >=2)?4.99:0)
Sign in to reply to this post

ccdantas101117

Originally Said By: Jason Byrnes
  this one was a head scratcher, but i think I have it:

This is assuming you have a column that marks the product category. In my example, I using a column named "category", in the add to cart buttons, I'm giving it the value "cd" or "lp"

you need to create 4 rules using the Number Of Items with a specific column value trigger:

Name: 1 LP
Triggers:
Number of items where 'category' has a value of 'lp' is '>=' a value of '1'

Calculation:
Flat Rate: 13.99

Name: more than 1 LP
Triggers:
Number of items where 'category' has a value of 'lp' is '>' a value of '1'

Calculation:
Flat Rate:
php:
($this->ConditionalTotal("Quantity", "category", "lp")-1) * 6.99



Name: 1 CD:
Triggers:
Number of items where 'category' has a value of 'cd' is '>=' a value of '1'

AND
Number of items where 'category' has a value of 'lp' is '<=' a value of '1'

Calculation:
Flat Rate: 8.99


Name: More than 1 CD
Triggers:
Number of items where 'category' has a value of 'cd' is '>' a value of '1'


Calculation:
Flat Rate:
php:
($this->ConditionalTotal("Quantity", "category", "cd")-1) * 4.99 + (($this->ConditionalTotal("Quantity", "category", "lp") >=2)?4.99:0)
  



Jason you are the light at the end of the tunnel, my friend.

BTW: the amount is $4.50, instead of $4.99 for the increment, my mistake (it really doesn't matter it is just because I'm sending the images and I don't want you to get confused). I'm sending images of the shopping cart so you can see what is happening, the rest is perfect if a LP is added the calculation is correct when 1 LP and 2CD are in the cart (image attached).

1 problem is when only 2 CD are in the cart the shipping is only 4.50 instead of 8.99 + 4.50 (image attached)
2 problem when the cart has 1cd and 1lp it should pick the LP freight and add the CD increment it should (13.99 + 4.50) and it is calculate (13.99 + 8.99) (image attached)
I know you will get because you are in the right track, I gave up trying to find the solution 3 days ago.

Thanks

Attached Files
shopcart_cdlp.zip
Sign in to reply to this post

Jason ByrnesWebAssist

OK, leave the 1lp and more than 1 lp rules the same.

change the 1 cd rule to:
Name: 1 CD:
Triggers:
Number of items where 'category' has a value of 'cd' is '>=' a value of '1'

AND
Number of items where 'category' has a value of 'lp' is '<' a value of '1'

Calculation:
Flat Rate: 8.99



and change the more than 1 cd rule to:

Name: More than 1 CD
Triggers:
Number of items where 'category' has a value of 'cd' is '>=' a value of '1'


Calculation:
Flat Rate:

php:
($this->ConditionalTotal("Quantity", "category", "cd")-1) * 4.50 + (($this->ConditionalTotal("Quantity", "category", "lp") >=1)?4.50: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...