Cantilever Posted June 26, 2014 Share Posted June 26, 2014 (edited) Dear friends, I'd like to modify invoice template in Prestashop 1.6.0.6, I'm using default theme. I was playing with invoice.tpl and product-list.tpl, but without success. Items to solve (please see the attachment): 1. How to show column with prices before discount (tax included)? If the product has no discount, than it is OK. 2. How to show "Discount Total" at the end of invoice? 3. I'd like to change order number to something with numbers. How and where can I do this? It would be great if this number would be the same as the Invoice number. 4. How to delete a name of the country at the end of page? In my case it shows "Slovenia". IMPORTANT: I know a lot about html+css, but Prestashop (sql, php...etc.) is a new world to me. Thank you for help! Best regards! Edited June 26, 2014 by Cantilever (see edit history) Link to comment Share on other sites More sharing options...
Mikael K Posted June 28, 2014 Share Posted June 28, 2014 You seem to be in the right file, invoice.tpl, what do you mean no success? Link to comment Share on other sites More sharing options...
Cantilever Posted June 30, 2014 Author Share Posted June 30, 2014 You seem to be in the right file, invoice.tpl, what do you mean no success? I tried to change few variables, but I didn't get the result as I wanted. Does anybody know how to do it? Thank you! Best regards! Link to comment Share on other sites More sharing options...
tuk66 Posted July 9, 2014 Share Posted July 9, 2014 You should know, even if you will be successful with all invoice changes, that the original invoice sometimes displays wrong amounts - http://www.prestashop.com/forums/topic/166816-pdf-invoice-in-different-prestashop-versions-wrong-amounts-updated/ Link to comment Share on other sites More sharing options...
Cantilever Posted July 14, 2014 Author Share Posted July 14, 2014 You should know, even if you will be successful with all invoice changes, that the original invoice sometimes displays wrong amounts - http://www.prestashop.com/forums/topic/166816-pdf-invoice-in-different-prestashop-versions-wrong-amounts-updated/ Thank you for your effort... and sorry for late reply Link to comment Share on other sites More sharing options...
Rosie Posy Posted May 5, 2015 Share Posted May 5, 2015 Hi guys I need to widen the invoice column in payments to display '347,00 € ' and not '347 €' and to display '1001,00 €' and not '1 001,00€' on different lines. BUT, I read in the invoice.tpl file that ............ Do not edit or add to this file if you wish to upgrade PrestaShop to newer * versions in the future. If you wish to customize PrestaShop for your * needs please refer to http://www.prestashop.com for more information. Yes I would like to upgrade PrestaShop in the future but then my settings will change so is there a way around this 'hitch' Thanks for any advice Kind regards Len Link to comment Share on other sites More sharing options...
tuk66 Posted May 6, 2015 Share Posted May 6, 2015 Try this return str_replace (' ', ' ', Tools::displayPrice($params['price'])); on the last row in Tools::displayPriceSmarty method. Link to comment Share on other sites More sharing options...
Rosie Posy Posted May 6, 2015 Share Posted May 6, 2015 HI M4, Thanks for your reply, where do I find the Tools tab? Is it in the BO or in the invoice.tpl file? kind regards Len Link to comment Share on other sites More sharing options...
tuk66 Posted May 6, 2015 Share Posted May 6, 2015 /classes/Tools.php Link to comment Share on other sites More sharing options...
Rosie Posy Posted May 6, 2015 Share Posted May 6, 2015 I have { $smarty = Context::getContext()->smarty; Tools::clearCache($smarty); Tools::clearCompile($smarty); } public static function clearColorListCache($id_product = false) { // Change template dir if called from the BackOffice $current_template_dir = Context::getContext()->smarty->getTemplateDir(); Context::getContext()->smarty->setTemplateDir(_PS_THEME_DIR_); Tools::clearCache(null, 'product-list-colors.tpl', ($id_product ? 'productlist_colors|'.(int)$id_product.'|'.(int)Context::getContext()->shop->id : 'productlist_colors')); Context::getContext()->smarty->setTemplateDir($current_template_dir); } You suggested return str_replace (' ', ' ', Tools::displayPrice($params['price'])); on the last row in Tools::displayPriceSmarty method. I don't find the Tools::displayPriceSmarty method in File: /www/PrestaShop/classes/Tools.php Link to comment Share on other sites More sharing options...
tuk66 Posted May 6, 2015 Share Posted May 6, 2015 Search for displayPriceSmarty. Link to comment Share on other sites More sharing options...
Rosie Posy Posted May 6, 2015 Share Posted May 6, 2015 Ok I found ... public static function displayPriceSmarty($params, &$smarty) { if (array_key_exists('currency', $params)) { $currency = Currency::getCurrencyInstance((int)($params['currency'])); if (Validate::isLoadedObject($currency)) return Tools::displayPrice($params['price'], $currency, false); } return Tools::displayPrice($params['price']); } so you suggested adding under on the last row in Tools::displayPriceSmarty method return str_replace (' ', ' ', Tools::displayPrice($params['price'])); I don't see the exact wording 'Tools::displayPriceSmarty ' could you give an example please? Thanks , I am not a coder so don't want to mess up th site.... Link to comment Share on other sites More sharing options...
Priyadharshinip Posted December 2, 2016 Share Posted December 2, 2016 I want to print the total in footer invoice pdf for prestashop 1.6.1.6 .. Can u tell me how to do this Link to comment Share on other sites More sharing options...
tuk66 Posted December 2, 2016 Share Posted December 2, 2016 The footer is a different part of the page. I'm not sure if it is possible. Link to comment Share on other sites More sharing options...
Priyadharshinip Posted December 2, 2016 Share Posted December 2, 2016 Ok then tell me how to place the total in the end of the invoice pdf.. Even many products are added also total should be in the bottom of a pdf.. Link to comment Share on other sites More sharing options...
Priyadharshinip Posted December 2, 2016 Share Posted December 2, 2016 And i have to set border for whole invoice pdf.. Not design like header, invoice, footer areas separately.. 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