I want to add custom field, but one for all products, instead one per product.
For that I have created override/classes/Product.php:
class Product extends ProductCore{
public $is_exclusive = null;
function __construct( $id_product = null, $full = false, $id_lang = null,
$id_shop = null, Context $context = null ) {
Product::$definition['fields']['is_exclusive'] =
array('type' => self::TYPE_HTML, 'lang' => true, 'validate' => 'isCleanHtml');
}
I can create a field in ps_product_lang, but this will create one row per one product.
What I want is one field for all products. It can be edited and in "Product" page.
If you want just one field for all products, you have to add one Configuration.
You can override Product class and add this to construction method (if this field is only readable)
also you have to add your custom value to Configuration table manually
True way is creating new module. you can manage your configurations in module config page:
If your data are affiliated with the language:
tip: The easiest way is to create a new module through PrestaShop module creator and then edit it.