-
Posts
7 -
Joined
-
Last visited
Everything posted by maxi64000
-
Ajouter une exception au listing produit
maxi64000 replied to maxi64000's topic in PrestaShop pour les développeurs
non toujours pas... de mon coté j'ai trouvé la solution! Dans le Manufacture.php Dans la function getProducts Juste après la ligne "$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql);" On ajoute : foreach($result as $key => $product) { $sql = Db::getInstance()->ExecuteS('SELECT id_category_default FROM ps_product WHERE id_product = '.$product["id_product"].''); if ($sql[0]["id_category_default"] == 94) { unset($result[$key]); } } mon problème est réglé mais celui de la pagination commence... :'(- 12 replies
-
Ajouter une exception au listing produit
maxi64000 replied to maxi64000's topic in PrestaShop pour les développeurs
ça affiche bien les id- 12 replies
-
Ajouter une exception au listing produit
maxi64000 replied to maxi64000's topic in PrestaShop pour les développeurs
DSL mais je ne peu pas donner les accès FTP je suis stage de dev et c'est un site pro que l'agence dans laquelle je bosse modifie en prod. merci de ton aide et je pense que tu a raison sur le fait qu'une modification du .tpl est mieu... je continue de tester et fais signe une fois la solution trouvé (pour aider ceux qui auraient le même problème)- 12 replies
-
Ajouter une exception au listing produit
maxi64000 replied to maxi64000's topic in PrestaShop pour les développeurs
non le problème n'est pas résolue... :'( en fait pour ne pas casser le CSS du product_list je pense que la seul solution est de modifier la requête... Le problème c'est que je ne sais pas ou et comment...- 12 replies
-
Ajouter une exception au listing produit
maxi64000 replied to maxi64000's topic in PrestaShop pour les développeurs
merci pour la réponse rapide. je ne pense pas que le problème puisse être réglé dans le product_list mais plutôt dans la requête SQL qui va chercher les produits en BDD.- 12 replies
-
Ajouter une exception au listing produit
maxi64000 replied to maxi64000's topic in PrestaShop pour les développeurs
{if isset($products)} <!-- Products list --> <div id="product_list" class="clearfix"> {foreach from=$products item=product name=products} {if Configuration::get('productlistcols')>1&&($product@iteration%Configuration::get('productlistcols')==1)} <div class="clearfix product-block"> {/if} <div class="col-sm-{(12/Configuration::get('productlistcols'))} ajax_block_product {if ($product@iteration%Configuration::get('productlistcols')!=0 && $smarty.foreach.products.last)} border-style {/if}"> <div class="product-container"> <div class="image" style="position: relative;"> <a href="{$product.link|escape:'htmlall':'UTF-8'}" class="product_img_link" title="{$product.name|escape:'htmlall':'UTF-8'}"> {assign var='specific_prices' value=$product.specific_prices} {if $specific_prices.reduction_type == 'percentage' && ($specific_prices.from == $specific_prices.to OR ($smarty.now|date_format:'%Y-%m-%d %H:%M:%S' <= $specific_prices.to && $smarty.now|date_format:'%Y-%m-%d %H:%M:%S' >= $specific_prices.from))} <p id="reduction_percent" class="discountcss p_reduc_vignette"> <span id="reduction_percent_display" class="reduc_vignette"> -{$specific_prices.reduction*100|floatval}% </span> </p> {/if} <img class="img-responsive" src="{$link->getImageLink($product.link_rewrite, $product.id_image, 'home_default')|escape:'html'}" alt="{if !empty($product.legend)}{$product.legend|escape:'htmlall':'UTF-8'}{else}{$product.name|escape:'htmlall':'UTF-8'}{/if}" title="{if !empty($product.legend)}{$product.legend|escape:'htmlall':'UTF-8'}{else}{$product.name|escape:'htmlall':'UTF-8'}{/if}" {if isset($homeSize)} width="{$homeSize.width}" height="{$homeSize.height}"{/if} /> {if isset($product.new) && $product.new == 1}<span class="new">{l s='New'}</span>{/if} </a> </div> <div class="product-meta"> <h3 class="name">{if isset($product.pack_quantity) && $product.pack_quantity}{$product.pack_quantity|intval|cat:' x '}{/if}<a href="{$product.link|escape:'htmlall':'UTF-8'}" title="{$product.name|escape:'htmlall':'UTF-8'}">{$product.name|truncate:35:'...'|escape:'htmlall':'UTF-8'}</a></h3> <div class="description">{$product.description_short|strip_tags:'UTF-8'|truncate:240:'...'}</div> {if (!$PS_CATALOG_MODE AND ((isset($product.show_price) && $product.show_price) || (isset($product.available_for_order) && $product.available_for_order)))} <div class="content_price"> {if isset($product.show_price) && $product.show_price && !isset($restricted_country_mode)}<span class="price">{if !$priceDisplay}{convertPrice price=$product.price}{else}{convertPrice price=$product.price_tax_exc}{/if} {if $priceDisplay == 1}{l s='tax excl.'}{else}{l s='tax incl.'}{/if}</span>{/if} <span class="price-discount price_reduc">{if $product.reduction}{convertPrice price=$product.price_without_reduction} HT{else}<br>{/if}</span> </div> <div id="location_3_ans"> {assign var="loc5ans" value=0} {math equation="(prixVente * 0.06) / 3" prixVente=$product.price_tax_exc assign=loc5ans} <span class="texte_loc">{l s='Location sur 5 ans : '}</span><span class="prix_loc">{convertPrice price=$loc5ans} {l s='HT/mois'}</span> </div> {if isset($product.available_for_order) && $product.available_for_order && !isset($restricted_country_mode)}<span class="availability">{if ($product.allow_oosp || $product.quantity > 0)}{l s='Available'}{elseif (isset($product.quantity_all_versions) && $product.quantity_all_versions > 0)}{l s='Product available with different options'}{else}<span class="warning_inline">{l s='Out of stock'}</span>{/if}</span>{/if} {if isset($product.online_only) && $product.online_only}<span class="online_only">{l s='Online only'}</span>{/if} {/if} {if isset($product.on_sale) && $product.on_sale && isset($product.show_price) && $product.show_price && !$PS_CATALOG_MODE}<span class="on_sale">{l s='On sale!'}</span> {elseif isset($product.reduction) && $product.reduction && isset($product.show_price) && $product.show_price && !$PS_CATALOG_MODE}{*<span class="discount">{l s='Reduced price!'}*}</span>{/if} </div> <div class="product_bottom"> {if ($product.id_product_attribute == 0 || (isset($add_prod_display) && ($add_prod_display == 1))) && $product.available_for_order && !isset($restricted_country_mode) && $product.minimal_quantity <= 1 && $product.customizable != 2 && !$PS_CATALOG_MODE} {if ($product.allow_oosp || $product.quantity > 0)} {if isset($static_token)} <a class="button ajax_add_to_cart_button exclusive" rel="ajax_id_product_{$product.id_product|intval}" href="{$link->getPageLink('cart',false, NULL, "add=1&id_product={$product.id_product|intval}&token={$static_token}", false)|escape:'html'}" title="{l s='Add to cart'}"><span></span>{l s='Add to cart'}</a> {else} <a class="button ajax_add_to_cart_button exclusive" rel="ajax_id_product_{$product.id_product|intval}" href="{$link->getPageLink('cart',false, NULL, "add=1&id_product={$product.id_product|intval}", false)|escape:'html'}" title="{l s='Add to cart'}"><span></span>{l s='Add to cart'}</a> {/if} {else} <span class="exclusive"><span></span>{l s='Add to cart'}</span> {/if} {/if} <a class="button lnk_view" href="{$product.link|escape:'htmlall':'UTF-8'}" title="{l s='View'}">{l s='View'}<span class="icon-play"></span></a> {if isset($comparator_max_item) && $comparator_max_item} <p class="compare"> <input type="checkbox" class="comparator" id="comparator_item_{$product.id_product}" value="comparator_item_{$product.id_product}" {if isset($compareProducts) && in_array($product.id_product, $compareProducts)}checked="checked"{/if} autocomplete="off"/> <label for="comparator_item_{$product.id_product}">{l s='Select to compare'}</label> </p> {/if} </div> </div> </div> {if Configuration::get('productlistcols')>1&&($product@iteration%Configuration::get('productlistcols')==0||$smarty.foreach.products.last)} </div> {/if} {/foreach} </div> <!-- /Products list --> {/if}- 12 replies
-
Bonjour, lorsque j'affiche la liste des produits d'une catégorie, il faudrait pouvoir afficher uniquement les produits dont le id_category_default est différent de 94... Or je ne sais pas ou placer cette exception. Quelqu'un a t-il une idée? Merci d'avance.
- 12 replies