koko01 Posted March 17, 2003 Share Posted March 17, 2003 Hi All I would like to give free shipping to a customer if the cart includes specific items. The free shipping will be on the entire order if such item is in the cart. I can not use the weight field for that. Did anyone do such thing? Thanks Link to comment Share on other sites More sharing options...
Ajeh Posted March 17, 2003 Share Posted March 17, 2003 Are you saying if any order contains even 1 of these specific items, regardless of how many other things are in the order then the whole order is Free? And I am assuming that if the order contains only 1 or more of these specific items and no other normal products then the shipping is Free? If so, you could add a new field to the products table products_order_free_shipping Then, make a function to process the shopping cart to see if it contains one of the defined products marked products_orders_free_shipping Then, modify the shipping modules with a small function to turn all the shipping modules off and just show a Free shipping module when this happens. It would take a bit of coding, but it can be done. Link to comment Share on other sites More sharing options...
koko01 Posted March 17, 2003 Author Share Posted March 17, 2003 and the implementation you proposed is exactly what I had in mind. But I had no success. I will in time, my PHP is getting better. I just wanted to know if anyone else already did such a thing. Thanks Link to comment Share on other sites More sharing options...
Ajeh Posted March 17, 2003 Share Posted March 17, 2003 I have written a number of deviations to the shipping and payment modules as far as how they are displayed and when some modules appear/vanish based on cart weight, total, what's in the cart, etc. So the good news is ... it can be done ... :D You just need to get the functions right and how to hide/show modules One thing to consider is in the shipping modules is a setting for $this->enabled ... example in flat.php there is the line: $this->enabled = ((MODULE_SHIPPING_FLAT_STATUS == 'True') ? true : false); If you put your IF statement around that and have a function validating the cart contents, you can return true or false and this will either let the shipping module show or hide it. Have it only show when cart evaluates to false on free shipping. Then, on the Free Shipping Module, have that only show when the cart evaluates to Free Shipping. Link to comment Share on other sites More sharing options...
koko01 Posted March 17, 2003 Author Share Posted March 17, 2003 Linda, Thanks for the information. I will try it. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.