admin974 Posted April 10, 2013 Share Posted April 10, 2013 Bonjour, Le devlellopeur RSI ne répondant pas a mes question, je la pose ici. Le module productbycategory fonctionn très bien, juste un détail qui m'agace, Impossible d'afficher les remises et les marques et j'en ai besoin. Voici le php : if(_PS_VERSION_ > "1.5.0.0"){ $image = "http://".$image; } $width2= 32; $xmlbc .='<li class="ajax_block_product" style="margin-left:'.$number.'px;width:'.$width2.'%; position:relative; float:left; margin-bottom:5px;border:'.$borders2.'px #'.$borderc2.' '.$bordert2.' padding-top:10px; border-right: 1px solid #CCCCCC;"> <h5 style=" display:none"><a href="'.$link.'">'.$name.'</a></h5>'; if($colordesc == "yes"){ $xmlbc .=' <p class="product_desc" style="min-height:52px; max-height:'.$minheight.'px; overflow:hidden">'.$description_short2.'...</p>'; } else{ $xmlbc .=''; } $xmlbc .=' <div style="position:relative"> <a href="'.$link.'" class="product_image" >'; if ($disablei == "yes"){ $xmlbc .=' <img src="'.$image.'" width="'.$width.' height="'.$width.'" '.(Configuration::get('PRODUCTS_BYCATEGORY_ZOOM') == "yes" ? 'class="effectzoom" style="clear:both;left: 0;overflow: hidden; position: absolute; top: 0; z-index: 998;"' : ' style="clear:both; margin:0 auto"').'>'; } $xmlbc .=' </a></div> <div class="clearfix"></div> <div style="position:relative">'; $xmlbc .=' <h5 style="font-size: 11px; height: 17px; margin-bottom: 8px; overflow: hidden;"><a href="'.$link.'">'.$name.'</a></h5>'; if($align == "yes"){ $xmlbc .=' <p class="price_container"><span class="price" style="background: none repeat scroll 0 0 #4AADFF; border-radius: 4px 4px 4px 4px; color: white; padding: 5px;">'.$price.'</span></p></div>'; } else{ $xmlbc .='</div>'; } if($acart == "yes"){ $xmlbc .=' <div style="width:100%; position:relative; float:left; display:none" align="center"> <a class="button ajax_add_to_cart_button exclusive" rel="ajax_id_product_'.$no.'" href="'.__PS_BASE_URI__.'cart.php?qty=1&id_product='.$no.'&token='.$static_token.'&add">'.$this->l('Add to cart').'</a></div>'; }else{} $xmlbc .=' </li> '; $i++; } $xmlbc .='</div></ul></div>'; } //end// $xmlbc .='</div><div class="clear"></div>'; } $smarty->assign(array( 'xmlbc' => $xmlbc, 'pbc' => $products )); return $this->display(__FILE__, 'productsbycategory.tpl'); } function hookFooter($params) { return $this->hookHome($params); } function hookHeader($params) { global $smarty, $cookie; if(Configuration::get('PRODUCTS_BYCATEGORY_ZOOM') == "yes"){ if(_PS_VERSION_ > "1.4.0.0" && _PS_VERSION_ < "1.5.0.0"){ Tools::addJS($this->_path.'js/imageeffects.js'); /* Tools::addJS(__PS_BASE_URI__.'modules/touchslider/jquery.touchwipe.min.js', 'all');*/ } if(_PS_VERSION_>"1.5.0.0"){ $this->context->controller->addJS(($this->_path).'js/imageeffects.js'); } if(_PS_VERSION_<"1.4.0.0"){ return $this->display(__FILE__, 'productsbycategory-header.tpl'); } } } } ?> Voici le TPL : {if isset($pbc) AND $pbc} {$xmlbc} {/if} Si quelqun à une idée de comment insérer les remises et les marques la dedans je serrais tres intérrésé Merci 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