Daminou56 Posted March 10, 2015 Share Posted March 10, 2015 Bonjour, Je travail actuellement sur une version de prestashop 1.5.0 et j'ai acquis le module freeshipping. Malheureusement lorsque je clique sur installation, j'ai ce message d'erreur : Le ou les modules suivants n'ont pas été correctement installés : - freeshipping : Impossible d'installer la surcharge : Ce fichier doit être modifiable : /home/prestashop/override/controllers/OrderController.phpThe module is not installed. Je n'y arrive pas . Dans mon fichier OrderController.php, j'ai ceci : <?php class OrderController extends OrderControllerCore { public function displayContent() { global $currency, $cart; $products = $cart->getProducts(); $nb_giftvoucher = 0; foreach ( $products as $product ) { if ( $product['is_giftvoucher'] == 1 ) { /* on vérifie que le type d'envoi est bien par courrier */ $nomTable = _DB_PREFIX_.'dmugiftvouchers'; $sql = sprintf("SELECT voucher_type FROM %s WHERE id_giftvoucher = ( SELECT id_giftvoucher FROM %s WHERE id_product = %d)", $nomTable.'_options', $nomTable, $product['id_product']); $voucher_type = Db::getInstance()->getValue($sql); /* si oui, on ajoute le produit */ if ($voucher_type == 'physical') $nb_giftvoucher += $product['cart_quantity']; } } if ( (int)$this->step == 2 ){ if ( $nb_giftvoucher > 0 ) { /* si envoi physique on affiche les frais d'envoi */ if ( Configuration::get('PS_DMUGIFTVOUCHER_PHYSICAL') == '1') self::$smarty->assign('HOOK_DMUGIFTVOUCHERADDITIONAL' , Module::hookExec('dmugiftvoucherAdditional')); } } if ( empty($this->step) ) { if ( $nb_giftvoucher > 0 ) { /* si envoi physique on affiche les frais d'envoi */ if ( Configuration::get('PS_DMUGIFTVOUCHER_PHYSICAL') == '1') { $dmugiftvoucher_additionnal = $nb_giftvoucher * Configuration::get('PS_DMUGIFTVOUCHER_ADDITIONAL'); self::$smarty->assign('dmugiftvoucher_additional' , Tools::displayPrice($dmugiftvoucher_additionnal)); } } } parent::displayContent(); } } En espérant pouvoir avoir de l'aide =) ? Merci Link to comment Share on other sites More sharing options...
fred-vinapresta Posted March 10, 2015 Share Posted March 10, 2015 Bonjour, à vérifier si c'était déja le cas pour la 1.5.0 mais normalement ce controller OrderController.php devrait plutot dans override/controllers/front/. Vous pouvez toujours récupérer le fichier OrderController.php dans le module et le placer manuellement dans override/controllers/front/ Il faudra par ailleurs éffacer manuellement le fichier cache/class_index.php (il se recréera automatiquement) pour que OrderController.php soit pris en compte 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