spencermjax Posted June 26, 2006 Posted June 26, 2006 This is my shipping costs: 1-3 items - $10.00 4-6 items - $20.00 7-9 items - $30.00 etc... Using the per item will not quite work for me because I am using an even number shipping amount per odd number of items. In the per item shipping module I think this is the code I need to modify: 'cost' => (MODULE_SHIPPING_ITEM_COST * $total_count) + MODULE_SHIPPING_ITEM_HANDLING))); I had a javascript cart once that I had shipping calculated like this: ((Math.ceil(fItems/3 ))*10); Will this work: 'cost' => (MODULE_SHIPPING_ITEM_COST * (Math.ceil($total_count/3 ))*10) + MODULE_SHIPPING_ITEM_HANDLING))); Quote
spencermjax Posted June 26, 2006 Author Posted June 26, 2006 (edited) did it again...posted without really trying on my own first. Sorry! PHP does not use Math.ceil() like javascript. All that is needed is ceil() This is now my modification and it works: 'cost' => (MODULE_SHIPPING_ITEM_COST * (ceil($total_count/3 ))) + MODULE_SHIPPING_ITEM_HANDLING))); Edited June 26, 2006 by spencermjax Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.