Atanda Posted November 6, 2013 Share Posted November 6, 2013 Hi friends, Using this tutorial on this page Adding new tabs and fields to Prestashop products’ back office, I was able to add a new field for author for products in my Prestashop. I was also able to display it on product page by adding Product.php to override/classes/ and inserting this code below: class Product extends ProductCore { /** @var string Custom Product Field */ public $custom_field; } I then added {$product->custom_field} to product.tpl to display the new field. My problem now is that the same code does not work when added to product-list.tpl and the homefeatured.tpl module files. Can any one explain how to achieve this? Thank you. Link to comment Share on other sites More sharing options...
vekia Posted November 6, 2013 Share Posted November 6, 2013 homefeatured you will have to modify sql query to get this new field in Category class getProducts() function product lists the same as above what is your field name? 1 Link to comment Share on other sites More sharing options...
Atanda Posted November 6, 2013 Author Share Posted November 6, 2013 homefeatured you will have to modify sql query to get this new field in Category class getProducts() function product lists the same as above what is your field name? Thank you for your help. I don't get what you meant by the field name, but the modules helps me add additional information for each product which can be displayed on the product page. In my case, I used it to display the name of artists for different music under the product title on the product page and I want it to show in product-list.tpl and homefeatured.tpl too. I don't know if I make sense, I am only good at following tutorials. Link to comment Share on other sites More sharing options...
eaposztrof Posted May 12, 2015 Share Posted May 12, 2015 In my case, I used it to display the name of artists for different music under the product title on the product page and I want it to show in product-list.tpl and homefeatured.tpl too. I don't know if I make sense, I am only good at following tutorials. here is my solution: http://stackoverflow.com/a/30202876/1589669 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