Skip to content

HunkBenny/hs_code-prestashop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Description

This plugin adds HS-code functionalities to Prestashop. It adds a new database table where the HS-code is stored. Where possible, overrides are avoided.

HS-codes can be set from the Backoffice: image Or via the webservice, using the products-endpoint.

Accessing HS-codes in the invoice templates.

HS-codes are also passed as Smarty variables and are accessible in the invoice templates. For how to change PDF-templates, refer to: https://devdocs.prestashop-project.org/8/modules/concepts/pdf/#invoices The HS-code can be accessed from an associative array, indexed by the product_id to which it corresponds: $order_invoice->hs_codes[$order_detail['id_product']]. For example, you could add the following in the file pdf/invoice.product-tab.tpl; image

Which adds this field to the invoice; HS-code on invoice

HS-code via the webservice

HS-codes can be accessed via the hs_code field in the products end-point. Unfortunately, no hooks exist in PrestaShop that allow us to extend existing endpoints. So, for the webservice to work, an override is added.

Installation:

Under versions you can download the latest version. Simply drag-and-drop this zip-file in the module section of your e-commerce store.

Tested on versions:

If a PrestaShop version is not in this table, it means it has not been tested yet.

VersionTested
8.2

About

A module that adds HS-code functionality to Prestashop

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages