kollek Posted September 15, 2013 Share Posted September 15, 2013 Hi, How can I change "Add to cart" button on "View more"? I have prestashop 1.4.8.2 and products with attributes. I don't need "Add to cart" button on the top of product view. I would like to change it on home page and product list. Regards Karol Link to comment Share on other sites More sharing options...
vekia Posted September 15, 2013 Share Posted September 15, 2013 You use default theme? homepage everything depends on module that you use to display products on homepage product list in this case you have to edit product-list.tpl file located in your theme directory, or just css styles (just hide button with css command: display:none) Link to comment Share on other sites More sharing options...
kollek Posted September 15, 2013 Author Share Posted September 15, 2013 Thank you @Vekia for you post. No, I don't use default theme. My website is: www.be-fashion.me This theme was buy on the presta addons. In this template I have only "add to cart" button. I would like to change it on "View more". Link to comment Share on other sites More sharing options...
vekia Posted September 15, 2013 Share Posted September 15, 2013 i checked your website and i've noticed that you use non-default module for "featured" products. I don't know the module name and its contents/ You know what module you use there? if so, can you share module .tpl file? i will inspect code and show you which part of code you have to change Link to comment Share on other sites More sharing options...
kollek Posted September 15, 2013 Author Share Posted September 15, 2013 Do you mean 'product-list.tpl' file? Link to comment Share on other sites More sharing options...
vekia Posted September 15, 2013 Share Posted September 15, 2013 products on homepage - module .tpl file (i don't know the name because i don't know module that you use) products in categories - product-list.tpl file from your theme directory Link to comment Share on other sites More sharing options...
kollek Posted September 16, 2013 Author Share Posted September 16, 2013 OK, I think these files will be OK. First one, blockhomeproductslide.tpl is responsible for products on hompage. Second, product-list.tpl is responsible (I think so ) for all products visible after click on a category. Link to comment Share on other sites More sharing options...
vekia Posted September 16, 2013 Share Posted September 16, 2013 ok, thanks, first filr (blockhomeproductslide.tpl) {if ($product.quantity > 0 OR $product.allow_oosp) AND $product.customizable != 2} <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='blockhomeproductslide'}"><span class="addtocard">{l s='Add to cart' mod='blockhomeproductslide'}</span></a> {else} <span class="exclusive"><span class="addtocard">{l s='Out of stock' mod='blockhomeproductslide'}</span></span> {/if} change it to: <a href="{$product.link}" title="{$product.name|escape:html:'UTF-8'}" class="product_image">{l s='view more' mod='blockhomeproductslide'}</a> in second file (product-list.tpl) change: {if ($product.allow_oosp || $product.quantity > 0) && $product.customizable != 2} <a class="button ajax_add_to_cart_button exclusive" rel="ajax_id_product_{$product.id_product|intval}" href="{$link->getPageLink('cart.php')}?add&id_product={$product.id_product|intval}{if isset($static_token)}&token={$static_token}{/if}" title="{l s='Add to cart'}"><span class="addtocard">{l s='Add to cart'}</span></a> {else} <span class="exclusive"><span class="addtocard">{l s='Out of stock'}</span></span> {/if} to: <a href="{$product.link}" title="{$product.name|escape:html:'UTF-8'}" class="product_image">{l s='view more' mod='blockhomeproductslide'}</a> Link to comment Share on other sites More sharing options...
kollek Posted September 16, 2013 Author Share Posted September 16, 2013 (edited) Thank a lot. It works but gave a little bit different result as I wanted. This solution meant that the button has disappeared. Look here how does it look like. How to leave buttons as they were? Edited September 16, 2013 by kollek (see edit history) Link to comment Share on other sites More sharing options...
kollek Posted September 16, 2013 Author Share Posted September 16, 2013 ok, thanks, first filr (blockhomeproductslide.tpl) {if ($product.quantity > 0 OR $product.allow_oosp) AND $product.customizable != 2} <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='blockhomeproductslide'}"><span class="addtocard">{l s='Add to cart' mod='blockhomeproductslide'}</span></a> {else} <span class="exclusive"><span class="addtocard">{l s='Out of stock' mod='blockhomeproductslide'}</span></span> {/if} One more thing. In this .tpl file I have this code three times. Change them all? Link to comment Share on other sites More sharing options...
kollek Posted September 16, 2013 Author Share Posted September 16, 2013 I have it three times because one is for 'Bestsellers', one for 'News' and one for 'Featured' I think. Link to comment Share on other sites More sharing options...
vekia Posted September 16, 2013 Share Posted September 16, 2013 ok, thanks, first filr (blockhomeproductslide.tpl) {if ($product.quantity > 0 OR $product.allow_oosp) AND $product.customizable != 2} <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='blockhomeproductslide'}"><span class="addtocard">{l s='Add to cart' mod='blockhomeproductslide'}</span></a> {else} <span class="exclusive"><span class="addtocard">{l s='Out of stock' mod='blockhomeproductslide'}</span></span> {/if} One more thing. In this .tpl file I have this code three times. Change them all? that's right, change all instances of code i mentioned above Link to comment Share on other sites More sharing options...
kollek Posted September 17, 2013 Author Share Posted September 17, 2013 It works but gave a little bit different result as I wanted. This solution meant that the button has disappeared. Look here how does it look like. How to leave buttons as they were? Link to comment Share on other sites More sharing options...
vekia Posted September 17, 2013 Share Posted September 17, 2013 so if you want to create a button instead of simple text, then use class="button" like here: <a href="{$product.link}" title="{$product.name|escape:html:'UTF-8'}" class="button">{l s='view more' mod='blockhomeproductslide'}</a> unfortunately i don't know your css styles, but method above in default template creates a "button" efffect 1 Link to comment Share on other sites More sharing options...
kollek Posted September 17, 2013 Author Share Posted September 17, 2013 Now it's much better . Thank you a lot! Link to comment Share on other sites More sharing options...
vekia Posted September 17, 2013 Share Posted September 17, 2013 you're welcome im going to mark this topic as [solved] if you will have any questions related to this case - feel free to continue discussion here best regards Link to comment Share on other sites More sharing options...
Sinto001 Posted November 3, 2013 Share Posted November 3, 2013 I have similar problem with my blogger site. I have e-commerce template installed so I want to avoid Add to Cart to be used in certain blog post where I am using affiliate links and doesn't need to be added to shopping cart. Link to comment Share on other sites More sharing options...
vekia Posted November 4, 2013 Share Posted November 4, 2013 sorry but please shed some light on your question. you have got add to cart buttons on your blog ? based od blogger? Link to comment Share on other sites More sharing options...
Sinto001 Posted November 4, 2013 Share Posted November 4, 2013 I have installed this johnny Megastore template on blogger. This is good in all aspect but I require one thing extra. After installing this template you only need to give image url link, price and little description. All post will automatically have add to cart and view details coming in the website. But...I need to change the Add to Cart coming in the post for certain post where I need the check this out button instead So that it will take the user to affiliated network site. But I am not able to change the Add to Cart appearing in such post even by using <b:if cond ..> </b:if> in blogger template. Its like every post calls the item_add and when clicked the add to cart it adds item in the post to Shopping Cart even I have not mentioned item_price. I want 'add to Cart' button replaced for 'Check this out' button for such post. The class item_add calls this add to cart appear and I don't know how to modify it. My Blog Address: http://giveasample.blogspot.com/ Please suggest how to make the desired change...? Link to comment Share on other sites More sharing options...
vekia Posted November 4, 2013 Share Posted November 4, 2013 sorry but how it 's related to this thread? it's prestashop forum, not blogger Link to comment Share on other sites More sharing options...
Sinto001 Posted November 4, 2013 Share Posted November 4, 2013 i am using prestashop products as an affiliate....!! Link to comment Share on other sites More sharing options...
dianix416 Posted November 6, 2013 Share Posted November 6, 2013 Hello, When I click on a category, I would like to have a more uniform display. I wanted to get rid of that "add to cart" button for products that don't have any variations. I have attached a picture. I appreciate any help. Thanks! Link to comment Share on other sites More sharing options...
dianix416 Posted November 7, 2013 Share Posted November 7, 2013 Hello, When I click on a category, I would like to have a more uniform display. I wanted to get rid of that "add to cart" button for products that don't have any variations. I have attached a picture. I appreciate any help. Thanks! I might have solved it myself! Yay! I am definitely not an expert, but I will post my solution in case anyone needs to refer to it. I went to "themes/default/product-list.tpl" I changed my code from: <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> to: {*<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>*} I just added the {* *} 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