Jump to content

How to modify invoice in Prestashop 1.6.0.6


Recommended Posts

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!

 

post-803235-0-09783000-1403817359_thumb.jpg

Edited by Cantilever (see edit history)
Link to comment
Share on other sites

  • 2 weeks later...
  • 9 months later...

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

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

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

  • 1 year later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...