Jump to content

Ajouter la legend (alt) de mon image on passant la souris


Recommended Posts

Bonjour,

J’utilise le module modalcart Fenêtre modale après ajout au panier

J’essaye désespérément d’ajouter la legend (alt) de mon image on passant la sourie sur celle ci, mais j’avoue que je ne suis pas un bon programmeur.
il est bien present, , i.`id_image`, il.`legend`, mais dans le fichier modalcart_modal.tpl {$product_pack.legend} impossible d'afficher la legend

   public function getProductsMultiple($products_id,$productsAttribute,$id_lang) {
       return Product::getProductsProperties($id_lang, Db::getInstance()->ExecuteS('SELECT p.*, pa.`id_product_attribute`, pl.`description`, pl.`description_short`, pl.`available_now`, pl.`available_later`, pl.`link_rewrite`, pl.`meta_description`, pl.`meta_keywords`, pl.`meta_title`, pl.`name`, i.`id_image`, il.`legend`, m.`name` AS manufacturer_name, tl.`name` AS tax_name, t.`rate`,
               (p.`price` * ((100 + (t.`rate`))/100) - IF((DATEDIFF(`reduction_from`, CURDATE()) <= 0 AND DATEDIFF(`reduction_to`, CURDATE()) >=0) OR `reduction_from` = `reduction_to`, IF(`reduction_price` > 0, `reduction_price`, (p.`price` * ((100 + (t.`rate`))/100) * `reduction_percent` / 100)),0)) AS orderprice
               FROM `'._DB_PREFIX_.'product` p
               LEFT JOIN `'._DB_PREFIX_.'product_attribute` pa ON (p.`id_product` = pa.`id_product`)
               LEFT JOIN `'._DB_PREFIX_.'product_lang` pl ON (p.`id_product` = pl.`id_product` AND pl.`id_lang` = '.intval($id_lang).')
               LEFT JOIN `'._DB_PREFIX_.'product_attribute_image` pai ON (pai.`id_product_attribute` = pa.`id_product_attribute`)
               LEFT JOIN `'._DB_PREFIX_.'image` i ON (pai.`id_image` = i.`id_image` AND i.`id_product` = p.`id_product`)
               LEFT JOIN `'._DB_PREFIX_.'image_lang` il ON (i.`id_image` = il.`id_image` AND il.`id_lang` = '.intval($id_lang).')
               LEFT JOIN `'._DB_PREFIX_.'tax` t ON t.`id_tax` = p.`id_tax`
               LEFT JOIN `'._DB_PREFIX_.'tax_lang` tl ON (t.`id_tax` = tl.`id_tax` AND tl.`id_lang` = '.intval($id_lang).')
               LEFT JOIN `'._DB_PREFIX_.'manufacturer` m ON m.`id_manufacturer` = p.`id_manufacturer`
               WHERE pai.`id_product_attribute` IN ('.implode(', ', $productsAttribute).')'));
   }




mais pas ici


   public function displayModalProduct($id_product,$id_product_attribute,$is_wishlist = false,$id_wishlist=false) {
       global $cookie,$smarty;


       $image = $this->getProductAttributeImage($cookie->id_lang,$id_product,$id_product_attribute);
       if(!$image) {
           $image = Product::getCover($id_product);
           $image['id_product'] = $id_product;
       }
       $id_image = Product::defineProductImage($image);
       $product = new Product($id_product,false,$cookie->id_lang);

       $product->name = $product->name;

       $declinaisons = false;
       if(Configuration::get('MC_ATTRIBUTE') == true && $id_product_attribute)
           $declinaisons = $this->getProductAttributesArray($id_product_attribute);
       $redirect_after = Configuration::get('MC_REDIRECT_AFTER');
       if(Module::isInstalled('pm_simplyorder') && intval(Configuration::get('EAO_WHEREDISPLAY')) === 1 && intval($redirect_after) == 2) {
           $redirect_after = 3;
       }
       $config = array('MC_FREETXT_DISPLAY_ABOVE','MC_FREETXT_DISPLAY_BELOW');
        $smarty->assign(array(
            'PMModalCart_config'        => Configuration::getMultiple($config,$cookie->id_lang),
           'productModal'                 => $product,
           'id_image_modal'             => $id_image,
           'productModalDeclinaison'    => $declinaisons,
            'redirectAfter'                => $redirect_after,
           'is_wishlist'                => $is_wishlist,
           'id_wishlist'                => $id_wishlist
       ));
       return $this->display(__FILE__, 'modalcart_modal.tpl');
   }





Pouvez vous m'aider SVP
Merci d'avance

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...