lugoismad Posted December 2, 2006 Posted December 2, 2006 question: I am setting up a shopping cart for a gun shop. When ammunition is mailed it has to be sent via UPS and costs extra because its hazardous. How would I add an extra amount to the shipping costs for only certain items? I know I could just make them "Weigh" more, but say they buy 2 boxes, the shipping would be redicoulas, and thats not what I want. How would I do this? Thanks.
porpoise1954 Posted December 3, 2006 Posted December 3, 2006 question: I am setting up a shopping cart for a gun shop. When ammunition is mailed it has to be sent via UPS and costs extra because its hazardous. How would I add an extra amount to the shipping costs for only certain items? I know I could just make them "Weigh" more, but say they buy 2 boxes, the shipping would be redicoulas, and thats not what I want. How would I do this? Thanks. I have set up something similar to this for "Long Items" (over 610cms) which can only go via parcel post. The code I have implemented basically sets only the parcel option as being valid if any order contains a "Long Item". I'm sure it would be fairly simple to modify it to adjust the postage instead..... It's basically done by adding a field to the products table called "long_item" which contains a 1 or 0 (true/false) flag. (and added a field to the admin product data entry form so that the flag could be set at the same time a product is added - rather than having to SQL the database manually each time a "long" product was added to the inventory). This value is then collected along with the rest of the product data into the customer's cart and is counted along with item quantity (so if there are three "Long Items" in the basket, the "Long Items Count" (extra field added to the shopping_cart) is also set to 3. When the customer moves onto the shipping methods, this data is then used to restrict the shipping options to parcel only. So, basically, I think you could probably do something similar, except make the field "Hazardous" or something, then give that field a multiplier or fixed amount with which to adjust the final shipping amount. Steve * * * * * * * * * * * * * * * * * * * * * Porpoises are most happy when wet! \ _ \ _ \ _ \ _ \ _ \ _ \ _ \ _ \ _ \ _ \ _ \ _
Recommended Posts
Archived
This topic is now archived and is closed to further replies.