VirtueMart Forum

VirtueMart 1.1.x [ Old version - no longer supported ] => Shipping VM 1.1 => USPS (U.S. Postal Service) VM 1 => Topic started by: fenriswolf on December 14, 2010, 22:51:43 PM

Title: charging multiple times for shipping
Post by: fenriswolf on December 14, 2010, 22:51:43 PM
I am building a shopping cart for a fitness diet store. They want to sell their food plan to their clients(all three meals and a weeks worth at a time)and ship the food fresh weekly. the actual product items are 1 week and 4 and 8 weeks worth of food. I am setting up one week of food in the description (both product dimension, weight etc) and so what I need to do is multiply the final shipping price by four and eight for the different pricing plans so that We can charge the entire amount of shipping correctly at the time of purchase. the problem I am having is that I cannot figure out how to multiply the shipping by 4 and 8 so that all shipping costs are charged up front.
Title: Re: charging multiple times for shipping
Post by: lowmips on December 16, 2010, 17:28:49 PM
You will need to modify the usps shipping module, list_rates() function.  You'll need to look up the cart items and determine multiplier should be used based on those items. Then, when the final rates are calculated, use the multiplier on those rates.  You may even want to modify the rate display text to indicate that it is for several shipments of food.

-Reggie