caco Posted September 23, 2009 Share Posted September 23, 2009 Bonjour, Je voudrais savoir s'il est possible de faire en sorte que les clients ne puissent commander qu'à partir d'un certain prix.Par exemple s'ils commandent pour moins de 100euros, le seule mode de "livraison" est le retrait au magasin. Au delà de 100 euros, ils peuvent être livrés chez eux. Je n'ai pas l'impression que ce soit possible, mais je voudrais en être sûre. Merci d'avance de vos réponses! Link to comment Share on other sites More sharing options...
swguy Posted September 23, 2009 Share Posted September 23, 2009 Hi there! I can't speak French - hopefully Babelfish can translate this for you.Two things you have to do here:a) In admin/shipping/carriers, edit your carrier and set out of range behavior to "disable carrier." See my comments in this bug report:http://www.prestashop.com/bug_tracker/view/2605/apply my fix and it will work. Just tested on 1.2.4. Link to comment Share on other sites More sharing options...
swguy Posted September 24, 2009 Share Posted September 24, 2009 I just realized I left out some background steps which you may not have already done:i) In Admin->Shipping, set Billing to be done according to total price.ii) In Admin->Shipping->Price Ranges, set the range for the shipping option you want to disable under E100 to start at E100 (and go to some large number). Link to comment Share on other sites More sharing options...
Patric Posted September 24, 2009 Share Posted September 24, 2009 Please post only in French in this forums. Next time I'll have to delete your posts. Link to comment Share on other sites More sharing options...
swguy Posted September 24, 2009 Share Posted September 24, 2009 Excusez-moi, je n'ai pas su cette règle.Pour un problème relatif, voyez svp http://www.prestashop.com/bug_tracker/view/2967/ Link to comment Share on other sites More sharing options...
caco Posted September 24, 2009 Author Share Posted September 24, 2009 Hi there! I can't speak French - hopefully Babelfish can translate this for you.Two things you have to do here:a) In admin/shipping/carriers, edit your carrier and set out of range behavior to "disable carrier." See my comments in this bug report:http://www.prestashop.com/bug_tracker/view/2605/apply my fix and it will work. Just tested on 1.2.4. Peux tu me dire où mettre AND ‘.floatval($orderTotal).’ >= r.`delimiter1` exactement? J'ai peur de faire une bêtise... :-) Link to comment Share on other sites More sharing options...
swguy Posted September 24, 2009 Share Posted September 24, 2009 Version 1.2.4 classes/Carrier.php remplacez la fonction -checkDeliveryPriceByWeight- checkDeliveryPriceByPrice avec static public function checkDeliveryPriceByPrice($id_carrier, $orderTotal, $id_zone) { $result = Db::getInstance()->getRow(' SELECT d.`price` FROM `'._DB_PREFIX_.'delivery` d LEFT JOIN `'._DB_PREFIX_.'range_price` r ON d.`id_range_price` = r.`id_range_price` WHERE d.`id_zone` = '.intval($id_zone).' AND ‘.floatval($orderTotal).’ >= r.`delimiter1` AND '.floatval($orderTotal).' <= r.`delimiter2` AND d.`id_carrier` = '.intval($id_carrier).' ORDER BY r.`delimiter1` ASC'); if (!isset($result['price'])) return false; return true; } Note: checkDeliveryPriceByWeight inexactement dit original message. Link to comment Share on other sites More sharing options...
caco Posted September 28, 2009 Author Share Posted September 28, 2009 J'ai la version 1.2.4 et quand je remplace static public function checkDeliveryPriceByWeight($id_carrier, $totalWeight, $id_zone) { $result = Db::getInstance()->getRow(' SELECT d.`price` FROM `'._DB_PREFIX_.'delivery` d LEFT JOIN `'._DB_PREFIX_.'range_weight` w ON d.`id_range_weight` = w.`id_range_weight` WHERE d.`id_zone` = '.intval($id_zone).' AND '.floatval($totalWeight).' <= w.`delimiter2` AND d.`id_carrier` = '.intval($id_carrier).' ORDER BY w.`delimiter1` ASC'); if (!isset($result['price'])) return false; return true; } par le code que tu proposes, mon panier disparaît, et du coup, impossible de commander quoi que ce soit ! :-(C'est bien cette partie qu'il faut remplacer par ton code? Link to comment Share on other sites More sharing options...
swguy Posted September 29, 2009 Share Posted September 29, 2009 Fonction fausse. Pas checkDeliveryPriceByWeight. Vous voulez *checkDeliveryPriceByPrice*. Link to comment Share on other sites More sharing options...
caco Posted September 29, 2009 Author Share Posted September 29, 2009 Je dois avoir l'esprit embrumé, mais je dois remplacer quoi par quoi finalement? Link to comment Share on other sites More sharing options...
swguy Posted September 30, 2009 Share Posted September 30, 2009 Désolé pour la confusion. L'inscription en français est très difficile pour moi.remplacez la fonction *checkDeliveryPriceByPrice()* avec static public function checkDeliveryPriceByPrice($id_carrier, $orderTotal, $id_zone) { $result = Db::getInstance()->getRow(' SELECT d.`price` FROM `'._DB_PREFIX_.'delivery` d LEFT JOIN `'._DB_PREFIX_.'range_price` r ON d.`id_range_price` = r.`id_range_price` WHERE d.`id_zone` = '.intval($id_zone).' AND ‘.floatval($orderTotal).’ >= r.`delimiter1` AND '.floatval($orderTotal).' <= r.`delimiter2` AND d.`id_carrier` = '.intval($id_carrier).' ORDER BY r.`delimiter1` ASC'); if (!isset($result['price'])) return false; return true; } Link to comment Share on other sites More sharing options...
caco Posted October 5, 2009 Author Share Posted October 5, 2009 Great!!!!! C'est exactement ce que je cherchais! Merci beaucoup, ça fonctionne à merveille! Link to comment Share on other sites More sharing options...
swguy Posted October 5, 2009 Share Posted October 5, 2009 Heureux d'aider. 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