After copying the shop data over from PS 1.6 to TB 103 via MigrationPro module, the pdf invoices do not have the shop address in the header.
I found this fix but do not know how to follow the directions. Do I edit both files before putting the copy in /override/classes/pdf, or do I put the copy in before editing?
Not even sure the directions will work but posted it here in case it needs a permanent fix in TB.
Can someone please help me out. I have an invoice I have to print but it does not have the shop address in the header.
This is the code from:
http://angelwings.net/blog/prestashop-1-6-add-shop-address-to-header-in-pdf-invoice/
Prestashop 1.6: Add shop address to header in PDF invoice
Posted on May 18, 2016 by admin
************IMPORTANT NOTE*************
ISSUE: Shop address at the top of current customised PDF invoice doesn’t seem to be updated when address is changed to a new one via Backoffice.
The order invoice’s shop address data is added to the database (TABLE: psorderinvoice) upon creation under the “shop_address” field.
Changing the following will not update old invoice entries
1) Backoffice, Preferences > Store Contacts or
2) Modules Custom Contact Page (Warehouse)
It will only affect new invoice entries.
When using the same code in the footer.tpl on header.tpl, the shop address doesn’t show up. This is because the header function that loads the header data doesn’t contain the code to retrieve the shop address. The following will add the code to do so.
1) Copy /classes/pdf/HTMLTemplate.php (and put the copy in /override/classes/pdf)
go to public function assignCommonHeaderData()
Under $shopname = Configuration::get(‘PSSHOPNAME’, null, null, $idshop);
Question
basix101
After copying the shop data over from PS 1.6 to TB 103 via MigrationPro module, the pdf invoices do not have the shop address in the header.
I found this fix but do not know how to follow the directions. Do I edit both files before putting the copy in /override/classes/pdf, or do I put the copy in before editing?
Not even sure the directions will work but posted it here in case it needs a permanent fix in TB.
Can someone please help me out. I have an invoice I have to print but it does not have the shop address in the header.
This is the code from:
http://angelwings.net/blog/prestashop-1-6-add-shop-address-to-header-in-pdf-invoice/
Prestashop 1.6: Add shop address to header in PDF invoice Posted on May 18, 2016 by admin ************IMPORTANT NOTE************* ISSUE: Shop address at the top of current customised PDF invoice doesn’t seem to be updated when address is changed to a new one via Backoffice. The order invoice’s shop address data is added to the database (TABLE: psorderinvoice) upon creation under the “shop_address” field. Changing the following will not update old invoice entries 1) Backoffice, Preferences > Store Contacts or 2) Modules Custom Contact Page (Warehouse) It will only affect new invoice entries.
When using the same code in the footer.tpl on header.tpl, the shop address doesn’t show up. This is because the header function that loads the header data doesn’t contain the code to retrieve the shop address. The following will add the code to do so.
1) Copy /classes/pdf/HTMLTemplate.php (and put the copy in /override/classes/pdf)
go to public function assignCommonHeaderData()
Under $shopname = Configuration::get(‘PSSHOPNAME’, null, null, $idshop);
Add
$shop_address = $this->getShopAddress();
Next, under ‘shopname’ => $shopname,
Add
‘shopaddress’ => $shopaddress,
2) Open /pdf/header.tpl
Remove {$shop_name|escape:’html':’UTF-8′}
Add {$shop_address|escape:’html':’UTF-8′}
Adjust css styles as required.
11 answers to this question
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