Jump to content

Hide Currency symbol in pdf invoice


ionut1982

Recommended Posts

Hello,
We have an e-commerce store on Prestashop 1.6.1.6 version.
Please, help with a problem: we would like to hide currency symbol in pdf invoice, just display the numbers (values).
Is it possible? How? 
I have tried all possibilities, but no way.

Thank you!

 

Link to comment
Share on other sites

The easiest way it probably to create override/classes/PDFGenerator.php with the following:

<?php

class PDFGenerator extends PDFGeneratorCore
{
    public function createContent($content)
    {
        $sign = Context::getContext()->currency->sign;
        $content = str_replace($sign, '', $content);
        $this->content = $content;
    }
}

Remember to go to Advanced Parameters > Performance and then click the "Clear cache" button (or manually delete cache/class_index.php) so PrestaShop can find the override.

Link to comment
Share on other sites

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...