How to add custom field in prestashop product

How to add custom field in product:- /primoknot/admin791uwji8u/themes/default/template/controllers/products/information.tpl
———————————————

Add code in this file- /primoknot/admin791uwji8u/themes/default/template/controllers/products/information.tpl

{include file=”controllers/products/multishop/checkbox.tpl” field=”internal_name” type=”tinymce” multilang=”true”}

<label class=”control-label col-lg-2″ for=”internal_name”>
<span class=”label-tooltip” data-toggle=”tooltip”
title=”{l s=’Appears in the body of the product page.’}”>
{l s=’Size/Description’}
</span>
</label>

{$product->internal_name}

</div>

Add code in this file:- /primoknot/classes/product.php
—————————

/** @var string Tax rate */
public $internal_name;

public static $definition = array( ‘fields’ => array(
/* Classic fields */
‘internal_name’ => array(‘type’ => self::TYPE_STRING, ‘validate’ => ‘isCleanHtml’),
),
);

Call code in file:- /primoknot/themes/pf_newfashionstore/sub/product_info/tab-v.tpl
=—————————————————————————

{if $product->internal_name}

{$product->internal_name}

{/if}

Advertisements