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.php The 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