puhycz Posted September 21, 2013 Share Posted September 21, 2013 Hi all, I need add some short link and php code to product detail. Please where is file with product detail? I don´t find it. Thanks. Link to comment Share on other sites More sharing options...
yaniv14 Posted September 21, 2013 Share Posted September 21, 2013 If you mean product page, than you need to edit 'product.tpl' inside your theme folder Link to comment Share on other sites More sharing options...
vekia Posted September 21, 2013 Share Posted September 21, 2013 well, you can't use php code in .tpl files, so in this case - if you want to add php code to product page - you will have to edit productController located in /controllers/ directory 1 Link to comment Share on other sites More sharing options...
puhycz Posted September 22, 2013 Author Share Posted September 22, 2013 to: vekia Yes, it is this file. When I paste php code to this productController then it show at left corner of page. I need show it near the price block. How do it? Thanks. Link to comment Share on other sites More sharing options...
vekia Posted September 22, 2013 Share Posted September 22, 2013 you need to pass variable to smarty array then you will be able to use it in product.tpl file located in your theme directory 1 Link to comment Share on other sites More sharing options...
puhycz Posted October 5, 2013 Author Share Posted October 5, 2013 many thanks, but I need next help with this:-) in ProductController.php I paste my text php code to function "protected function formatQuantityDiscounts" For example I paste echo($price); to ProductController.php (in real I need paste some php code for leasing calculator, but for example I write only echo($price); ... ) It is ok and it show price at left corner of page. But I need this text remove to price area. I don´t know, how pass variable to smarty array then you will be able to use it in product.tpl in theme directory Please help, many thanks ... Link to comment Share on other sites More sharing options...
vekia Posted October 6, 2013 Share Posted October 6, 2013 hello you have to edit productController file located in controllers/front/ directory you've got there smarty array definition: $this->context->smarty->assign(array( with many variables defined inside. just define own variable there - then you will be able to use it in product.tpl file (theme file) 1 Link to comment Share on other sites More sharing options...
Shashikant N Sharma Posted October 21, 2015 Share Posted October 21, 2015 Thanks for sharing good tips. I have been able to edit the products page. Link to comment Share on other sites More sharing options...
RVPSRichard Posted November 18, 2015 Share Posted November 18, 2015 I am using prestashop 1.6.1 and Titanshop theme.I want to change the display name for reference code to SKU instead of Model. I also want to add more product field to display on product detail page. Link to comment Share on other sites More sharing options...
Recommended Posts