Jump to content

[Résolu] Comment mettre un bouton ajouter au panier sur produits phares?


Recommended Posts

Oui.

 

Pour vous faire gagner du temps...

 

{if ($product.id_product_attribute == 0 OR (isset($add_prod_display) AND ($add_prod_display == 1))) AND $product.available_for_order AND !isset($restricted_country_mode) AND $product.minimal_quantity == 1 AND $product.customizable != 2 AND !$PS_CATALOG_MODE}
                           {if ($product.quantity > 0 OR $product.allow_oosp)}
                           <a class="exclusive ajax_add_to_cart_button" rel="ajax_id_product_{$product.id_product}" href="{$link->getPageLink('cart.php')}?qty=1&id_product={$product.id_product}&token={$static_token}&add" title="{l s='Add to cart' mod='homefeatured'}">{l s='Add to cart' mod='homefeatured'}</a>
                           {else}
                           <span class="exclusive">{l s='Add to cart' mod='homefeatured'}</span>
                           {/if}
                       {else}
                           <div style="height:23px;"></div>
                       {/if}

 

V++

 

Atch

Link to comment
Share on other sites

Oui.

 

Pour vous faire gagner du temps...

 

{if ($product.id_product_attribute == 0 OR (isset($add_prod_display) AND ($add_prod_display == 1))) AND $product.available_for_order AND !isset($restricted_country_mode) AND $product.minimal_quantity == 1 AND $product.customizable != 2 AND !$PS_CATALOG_MODE}
						{if ($product.quantity > 0 OR $product.allow_oosp)}
						<a class="exclusive ajax_add_to_cart_button" rel="ajax_id_product_{$product.id_product}" href="{$link->getPageLink('cart.php')}?qty=1&id_product={$product.id_product}&token={$static_token}&add" title="{l s='Add to cart' mod='homefeatured'}">{l s='Add to cart' mod='homefeatured'}</a>
						{else}
						<span class="exclusive">{l s='Add to cart' mod='homefeatured'}</span>
						{/if}
					{else}
						<div style="height:23px;"></div>
					{/if}

 

V++

 

Atch

 

Je suis un peu chiant, mais en remplaçant mon code par le votre, çà n'affiche toujours pas le bouton. :wacko:

Voici le mien :

 

 

{if ($product.id_product_attribute == 0 OR (isset($add_prod_display) AND ($add_prod_display == 1))) AND $product.available_for_order AND !isset($restricted_country_mode) AND $product.minimal_quantity == 1 AND $product.customizable != 2 AND !$PS_CATALOG_MODE}

{if ($product.quantity > 0 OR $product.allow_oosp)}

<a class="exclusive ajax_add_to_cart_button" rel="ajax_id_product_{$product.id_product}" href="{$link->getPageLink('cart.php')}?qty=1&id_product={$product.id_product}&token={$static_token}&add" title="{l s='Add to cart' mod='homefeatured'}">{l s='Add to cart' mod='homefeatured'}</a>

{else}

<span class="exclusive">{l s='Add to cart' mod='homefeatured'}</span>

{/if}

{else}

<div style="height:23px;"></div>

{/if}

Link to comment
Share on other sites

Dans quel répertoire avez vous mis le code?

Ce module est certainement sur couché dans le theme.

Regardez si dans le thème, il n'y a pas un répertoire modules avec le module homefeatured à l'intérieur.

 

V++

 

Atch

Link to comment
Share on other sites

Les boutons y sont !!!

il y a un display none dans le css du theme ( global.css certainement)

 

 

#featured-products_block_center li .ajax_add_to_cart_button {


display: none;
}

 

Virez cette ligne.

 

 

V++

 

Atch

  • Like 2
Link to comment
Share on other sites

:) Merci mon ami.

 

Merci vous êtes très gentil, çà fait plaisir de rencontrer quelqu'un d'aussi généreux que vous, çà devient rare dans ce monde...

 

En bref, vous êtes un véritable expert de prestashop et mon héros du jour.

 

Merci encore infiniment.

Bonne journée.

  • Like 1
Link to comment
Share on other sites

  • 1 month later...
  • 1 year later...

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