prestashop: add custom column on product page and display it on product.tpl


  1. Create the table manually on the database.
  2. Declare the variable on /classes/product.php
  3. add the variable onĀ /controllers/front/ProductController.php in the following matter.

$product_tariff = $this->product->em_mg_tariff_code;
$this->context->smarty->assign(‘tariff_code’, $product_tariff);

4. Add the field on your tpl on the following matter.




Leave a Reply

Your email address will not be published. Required fields are marked *