close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

need to add a charge after each set of 10 items

Thread began 5/24/2012 5:52 pm by lr_leal239405 | Last modified 6/01/2012 5:13 pm by Jason Byrnes | 690 views | 6 replies |

lr_leal239405

need to add a charge after each set of 10 items

I'm opening this new thread because I got an answer from page 1 dated way back. You didn't go to page 2 where I had added a question. I figured this would happen so I should've just opened this thread. Anyways, my original posted question yesterday (5-23) was:

I'm adding a snapshot of what I have for shipping, which is working fine. However, I need to add an extra charge of about $2.00 after each set of 10. I'm not sure what the formulas should be. Please help.

Thank you.

Sign in to reply to this post

Jason ByrnesWebAssist

create a new shipping rule. set the trigger to number of unique items > 0

for the calculation, use a flat rate charge an enter the following code:

php:
floor($this->TotalColumn("Quantity") / 10) *2
Sign in to reply to this post

lr_leal239405

thanks. I'll try that.

Sign in to reply to this post

lr_leal239405

I played around it for some time but it doesn't work the way I want. The question is where exactly am I supposed to put the code: floor($this->TotalColumn("Quantity") / 10) *2

Thank you.

Sign in to reply to this post

Jason ByrnesWebAssist

as the flat rate charge in your shipping calculation.

Sign in to reply to this post

lr_leal239405

Ok, it works and I understand it. I've never been good in Math so I don't know why I'm trying to program sometimes. So it works except that it charges right away once there's 10 items in the basket, because 10 / 10 = 1 x 2 = $2. It's always going to add a charge for the first set of 10, which I don't want. Likewise if you add 30 items to the basket it will charge $6 when it should charge $4. It's not supposed to charge on the first 10 period. I'm trying to figure it out but maybe you've already got the answer.

Thanks Jason.

Sign in to reply to this post

Jason ByrnesWebAssist

it was not clear in the initial question that the first 10 should not be included.


Set the trigger to:
"Subtotal For Any Column"
if the subtotal of the column "Quantity" is ">=" "20"


and use the following for the flat rate charge:
floor(($this->TotalColumn("Quantity") - 10) / 10) *2

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