rpaezg Posted July 18, 2015 Share Posted July 18, 2015 (edited) Hi friends, I need your help, I need to place a link button on each product in product-list page that can let me go to an external page. The link must be configurable in a field inside product configuration in backoffice page. I've placed a button inside the box but I need you to help me with code and variables that can be necessary to create a new field or also using one of the short or long descriptions that already exist. Previously using short and long descriptions fields I achieved to create a link button in product page, but when I attempt to insert it on products list, only appears button text and it does not work as a link. If there is the possibility to enable a link button using short or long description in products list could also serve. On the picture I show you what we need. File to modify: product-list.tpl and other if necessary. Thanks in advance! Edited July 18, 2015 by rpaezg (see edit history) Link to comment Share on other sites More sharing options...
NemoPS Posted July 18, 2015 Share Posted July 18, 2015 If you want to use descriptions, you need to remove strip_tags from the product-list.tpl template. It might be the quickest way to achieve what you need 1 Link to comment Share on other sites More sharing options...
rpaezg Posted July 18, 2015 Author Share Posted July 18, 2015 Thank you my friend! With your help I could manage to resolve the detail, I had to have erased the last part of the line of code to work properly: Original line Code: {$product.description_short | strip_tags:'UTF-8' | truncate:360:'...'} Edited line Code: {$product.description_short} Had 2 weeks trying to solve that, 1000 times thank you !!! Ricardo. Link to comment Share on other sites More sharing options...
rpaezg Posted July 19, 2015 Author Share Posted July 19, 2015 Hello, I would like to change the color of the new button that I created through Product Description using the sentence: {$product->description} The new button that has been generated is related to CSS item: ".btn-default" inside of "global.css". When I make some change, this are reflected in all buttons. I wonder where I make the change to use a custom item CSS for example: ".btn-new" and thus to change the colors and features according to my needs without affecting the rest of the system buttons. I have looked everywhere and I can not find where the chain {$product->description} is generated to make the required change. Beforehand very grateful for your help. RPG. Link to comment Share on other sites More sharing options...
NemoPS Posted July 20, 2015 Share Posted July 20, 2015 Give it a class like you mentioned (btn-new), but make sure you turn off the html purifier, or it will be stripped out. THen, in global.css, just style it normally Link to comment Share on other sites More sharing options...
rpaezg Posted July 20, 2015 Author Share Posted July 20, 2015 Hello Nemo1, Thanks for your answer, The problem is that I can not find where the chain is created: {$product->description}. So I could then replace the class .btn-default by .btn-new class. Thanks in advance! Link to comment Share on other sites More sharing options...
NemoPS Posted July 22, 2015 Share Posted July 22, 2015 ?You simply have to modify it in the back office, using the html editor fort the description 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