sitte Posted March 13, 2015 Share Posted March 13, 2015 Hello is there a way to disable specyfic carrier when order bigger then 100$? If there is no way to do this in configuration please point me a file where I can set this restriction. Link to comment Share on other sites More sharing options...
unlimitedgrain Posted March 13, 2015 Share Posted March 13, 2015 You can set the carrier with a price range (or weight range). Link to comment Share on other sites More sharing options...
rocky Posted March 14, 2015 Share Posted March 14, 2015 After setting up a price range like $0 - $100, you'll also need to change the "Out-of-range behavior" to "Disable carrier". Link to comment Share on other sites More sharing options...
sitte Posted March 14, 2015 Author Share Posted March 14, 2015 Thank You for respond. If I undestand Your suggestion You're talking about setting carrier based on order price. But the shipping price depends on weight of order, so the price ranges has to be set on weight. What I need is disable one carrier (cash on delivery) if the order is to expensive. Link to comment Share on other sites More sharing options...
rocky Posted March 14, 2015 Share Posted March 14, 2015 Cash on Delivery is a payment method, not a carrier. That changes things. In that case, you can change line 83 of modules/cashondelivery/cashondelivery.php from: if ($this->hasProductDownload($params['cart'])) to: if ($this->hasProductDownload($params['cart']) || $params['cart']->getOrderTotal() > Tools::convertPrice(100, $params['cart']->id_currency)) This should hide the Cash on Delivery payment option when the order total is greater than 100. 1 Link to comment Share on other sites More sharing options...
sitte Posted March 14, 2015 Author Share Posted March 14, 2015 Hello. I'm using DPD carrier module (dpdpoland module) that has 2 different shipping options. One is regular shipping and other is COD shipping. I need to disable COD carrier for big orders. I looked into modules/dpdpoland/dpdpoland.php to find point where there is made decision if option is available but so far no luck. I think I'm looking for some global function, some point in prestashop code that is choosing available carriers for current order to add an additional restriction. Link to comment Share on other sites More sharing options...
rocky Posted March 14, 2015 Share Posted March 14, 2015 Sorry, I don't have that module, so I can't help you with customising it. I can only say that it's the Cart::getDeliveryOptionList function that decides which carriers to display. Link to comment Share on other sites More sharing options...
sitte Posted March 14, 2015 Author Share Posted March 14, 2015 Thank You very much for help. I'll look into this function and write back for others if I find solution. Link to comment Share on other sites More sharing options...
PeggyPollice Posted March 30, 2015 Share Posted March 30, 2015 Hi, I need to set free shipping after $100 in the United States only. I also need it to only show 2 carriers for this option UPS ground and USPS first class. I would appreciate any help with this very much. Thank you Peggy Link to comment Share on other sites More sharing options...
devexi Posted December 2, 2016 Share Posted December 2, 2016 Does anyone can help about this? i want to disable a carrier for order amount bigger than 35 euro i have two carriers i want to display the first fot total order amount below 35 euro and second bigger than 35 euro. i use weight ranges at both. Link to comment Share on other sites More sharing options...
pl.sabotinov Posted June 3, 2022 Share Posted June 3, 2022 Hello, one option for PS 1.6.1.xx is to make override of the class - Carrier.php. Put in in folder override/classes and leave only the function getCarriersForOrder(). In this function after line 70 put the following: $configuration = Configuration::getMultiple(array( 'PS_SHIPPING_FREE_PRICE', 'PS_SHIPPING_FREE_PRICE2' )); $NonFreeCarriers = [ 'XXXX carrier', ]; $free_condition_price = Tools::convertPrice((float)$configuration['PS_SHIPPING_FREE_PRICE2'], Currency::getCurrencyInstance((int)$cart->id_currency)); $orderTotalwithDiscounts = $cart->getOrderTotal(true, Cart::BOTH_WITHOUT_SHIPPING, null, null, false); if (in_array($row['name'], $NonFreeCarriers) && $orderTotalwithDiscounts >= (float)($free_condition_price) && (float)$free_condition_price > 0) { unset($result[$k]); continue; } Of course you should have set before that the price for free delivery (in my case are two: PS_SHIPPING_FREE_PRICE2). That is all. Your XXXX carrier (name of carrier) will be disabled for orders over PS_SHIPPING_FREE_PRICE2. 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