Jump to content

Un problème pour les cracks


Recommended Posts

Bonjour, je souhaite reproduire le coche de validation sur l'image suivante qui est actuellement dans la fiche produit. 

post-811368-0-93850000-1416102485_thumb.png

Ps : si vous avez le thème défault 1.6 le votre est bleu et à gauche de " ajouter au panier " 

 

Je souhaite donc le reproduire pour qu'il soit également dans la liste produit.

 

Des bouts de code qui peuveut p-e vous aider à m'aider xD

 

prest/themes/default-bootstrap/ product.tpl     donc ici c'est la fiche produit j'aimerais copié ce code

<div class="box-cart-bottom">
						<div{if (!$allow_oosp && $product->quantity <= 0) || !$product->available_for_order || (isset($restricted_country_mode) && $restricted_country_mode) || $PS_CATALOG_MODE} class="unvisible"{/if}>
							<p id="add_to_cart" class="buttons_bottom_block no-print">
								<button type="submit" name="Submit" class="exclusive">
									<span>{l s='Add to cart'}</span>
								</button>
							</p>
						</div>

prest/themes/default-bootstrap/ product-list.tpl         ici c'est la liste produit ou je veux intégrer le cache

{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 btn btn-default" href="{$link->getPageLink('cart',false, NULL, "add=1&id_product={$product.id_product|intval}&token={$static_token}", false)|escape:'html':'UTF-8'}" rel="nofollow" title="{l s='Add to cart'}" data-id-product="{$product.id_product|intval}">
										
								
									<span>{l s='Add to cart'}</span>
								
							
									</a>
									
								{else}
									<a   class="button ajax_add_to_cart_button btn btn-default" href="{$link->getPageLink('cart',false, NULL, 'add=1&id_product={$product.id_product|intval}', false)|escape:'html':'UTF-8'}" rel="nofollow" title="{l s='Add to cart'}" data-id-product="{$product.id_product|intval}">
										
								
									<span>{l s='Add to cart'}</span>
								
							
									</a>
									
								{/if}
								
								
								
							{else}
								<span class="button ajax_add_to_cart_button btn btn-default disabled">
									<span>{l s='Add to cart'}</span>
								</span>
								
							{/if}
							
						{/if}

Ma demande est compliquée alors ceux qui aime les problèmes faites vous plaisir :D

 

Merci, Thomas

Edited by thomas767 (see edit history)
Link to comment
Share on other sites

  • 2 weeks later...

Bonjour, je me permet de faire un petit up.

 

Je n'ai toujours pas pu faire fonctionner mon idée.

 

J'ai réussi à afficher la validation dans ma liste produit  (product-list.tpl  )  par contre il affiche cela.

PS : quand je clique sur OK le produit c'est malgrès tout ajouté au panier !! :D

 

post-811368-0-80621800-1417162697_thumb.png

 

 

ma question : cmt enlever ce problème de message d'erreur 

 

product-list.tpl

{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 btn btn-default" href="{$link->getPageLink('cart',false, NULL, "add=1&id_product={$product.id_product|intval}&token={$static_token}", false)|escape:'html':'UTF-8'}" rel="nofollow" title="{l s='Add to cart'}" data-id-product="{$product.id_product|intval}">
				// J'AI INSERRE DE ICI 					<p id="add_to_cart" class="buttons_bottom_block no-print">
								<button type="submit" name="Submit" class="exclusive">
									<span>{l s='Add to cart'}</span>
								</button>
				// JUSQUE ICI			</p>						
									</a>
									
								{else}
									<a   class="button ajax_add_to_cart_button btn btn-default" href="{$link->getPageLink('cart',false, NULL, 'add=1&id_product={$product.id_product|intval}', false)|escape:'html':'UTF-8'}" rel="nofollow" title="{l s='Add to cart'}" data-id-product="{$product.id_product|intval}">
									<span>{l s='Add to cart'}</span>
								</a>
									
								{/if}
											
							{else}
								<span class="button ajax_add_to_cart_button btn btn-default disabled">
									<span>{l s='Add to cart'}</span>
								</span>
								
							{/if}
							
						{/if}
Edited by thomas767 (see edit history)
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...