neetupahwa Posted August 26, 2013 Share Posted August 26, 2013 How can I add free shipping for only one carrier in the list. Prestashop by default assigns free shipping for all the carriers. I am trying to modify the code in the classes--> cart.php. I found the answer here--> http://www.prestasho...e-carrier-only/ but it is applicable for 1.4.3. $free_fees_price = 0; if (isset($configuration['PS_SHIPPING_FREE_PRICE'])) $free_fees_price = Tools::convertPrice((float)($configuration['PS_SHIPPING_FREE_PRICE']), Currency::getCurrencyInstance((int)($this->id_currency))); $orderTotalwithDiscounts = $this->getOrderTotal(true, Cart::BOTH_WITHOUT_SHIPPING); if ($orderTotalwithDiscounts >= (float)($free_fees_price) AND (float)($free_fees_price) > 0) return $shipping_cost; if (isset($configuration['PS_SHIPPING_FREE_WEIGHT']) AND $this->getTotalWeight() >= (float)($configuration['PS_SHIPPING_FREE_WEIGHT']) AND (float)($configuration['PS_SHIPPING_FREE_WEIGHT']) > 0) return $shipping_cost; It says to replace the code with the following code. $disable_freeshipping = array(A-ID); $free_fees_price = 0; if (isset($configuration['PS_SHIPPING_FREE_PRICE'])) $free_fees_price = Tools::convertPrice((float)($configuration['PS_SHIPPING_FREE_PRICE']), Currency::getCurrencyInstance((int)($this->id_currency))); $orderTotalwithDiscounts = $this->getOrderTotal(true, Cart::BOTH_WITHOUT_SHIPPING); if ($orderTotalwithDiscounts >= (float)($free_fees_price) AND (float)($free_fees_price) > 0 AND !in_array($id_carrier, $disable_freeshipping)) return $shipping_cost; if (isset($configuration['PS_SHIPPING_FREE_WEIGHT']) AND !in_array($id_carrier, $disable_freeshipping) AND $this->getTotalWeight() >= (float)($configuration['PS_SHIPPING_FREE_WEIGHT']) AND (float)($configuration['PS_SHIPPING_FREE_WEIGHT']) > 0) return $shipping_cost; I am using 1.5.4.1, How can I modify the code to use for my version? Link to comment Share on other sites More sharing options...
germs Posted August 26, 2013 Share Posted August 26, 2013 (edited) Hi, I am using 1.5.4.1 and I have two carriers setup. One is "free" - (self-collect, in store), and one has a charge applied for delivery within the same island. Have you tried [.. Shipping > Carriers > Edit]? and setup [Price ranges], [Weight ranges], [Zones] and [Country Selection]? Germs Edited August 26, 2013 by germs (see edit history) Link to comment Share on other sites More sharing options...
Emmanuel M. Posted August 27, 2013 Share Posted August 27, 2013 Hi, You can use my module: http://addons.prestashop.com/en/shipping-logistics-delivery-prestashop-modules/7490-freelivery-free-delivery.html If you have any question, please ask me! Regards, Emmanuel Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now