wlp Posted July 15, 2013 Share Posted July 15, 2013 Hello everyone, Am trying to make a change to the product-list pages. Instead of the add-to-cart button, i would like to add a 'view more' button (on the spot of the add-to-cart button. I'm aware that when a product has features you can set the item to go to the specific product page and not to display the add-to-cart button but i would like to add a 'view more' button instead on that spot when the item has extra features/options. At the homepage of the shop i'm displaying 'new items' in this overview all items have a 'view more' button and I would like to make the looks of these product listings uniform throughout the site. I will attach 2 images, one of an item placed at the homepage and the other one of an item from the standard product list (of which i would like to replace the cart button). Hope this makes sense and that someone can point me in the right direction. Link to comment Share on other sites More sharing options...
vekia Posted July 15, 2013 Share Posted July 15, 2013 well, you're using non-default template so it is hard to say what you have to change. if it is possible, please share the url to your store, also the contents of the product-list.tpl file will be realy helpfull Link to comment Share on other sites More sharing options...
jetx Posted October 2, 2014 Share Posted October 2, 2014 Hello, I would like to achieve the same thing. Any ideas would be appreciated. From product-list.tpl (not default template), the code for "Add to Cart" which I want to change to "View" (got it to partially work, but am doing something wrong). Here is the unedited code: <div class="button-container"> {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 alt" 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 alt" 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} {else} <div class="replae_add_to_cart_catalog_mode"></div> {/if} Link to comment Share on other sites More sharing options...
Anoushka Posted October 3, 2014 Share Posted October 3, 2014 I think you should replace: <a class="button ajax_add_to_cart_button btn btn-default alt" 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}" with: <a class="button ajax_add_to_cart_button btn btn-default alt" href="{$product.link|escape:'html':'UTF-8'}" title="{$product.name|escape:'html':'UTF-8'}" itemprop="url"> This only changes the functionality of the button, it's up to you to change the code/css to aquire the desired look . Link to comment Share on other sites More sharing options...
jetx Posted October 4, 2014 Share Posted October 4, 2014 (edited) Thanks Anoshka, what got it working properly was: <a class="button.ajax_add_to_cart_button btn btn-default" href="{$product.link|escape:'html':'UTF-8'}" title="{l s='View'}" itemprop="url" > <span>{l s='More'}</span> </a> edit: this worked without CSS editing. Edited October 4, 2014 by jetx (see edit history) Link to comment Share on other sites More sharing options...
Anoushka Posted October 4, 2014 Share Posted October 4, 2014 Oh lol, yeah I forgot to change the 'title' element . Glad it worked! 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