97 lines
2.5 KiB
PHP
97 lines
2.5 KiB
PHP
<?php
|
|
/**
|
|
* 2022 ECSoft
|
|
*
|
|
* NOTICE OF LICENSE
|
|
*
|
|
* This source file is subject to the Academic Free License (AFL 3.0)
|
|
* that is bundled with this package in the file LICENSE.txt.
|
|
* It is also available through the world-wide-web at this URL:
|
|
* http://opensource.org/licenses/afl-3.0.php
|
|
* If you did not receive a copy of the license and are unable to
|
|
* obtain it through the world-wide-web, please send an email
|
|
* to dev.ecsoft@gmail.com so we can send you a copy immediately.
|
|
*
|
|
* @author ECSoft <dev.ecsoft@gmail.com>
|
|
* @copyright 2022 ECSoft
|
|
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
|
* International Registered Trademark & Property of ECSoft
|
|
*/
|
|
include_once dirname(__FILE__) . '/EcsGtmProModelAbstract.php';
|
|
|
|
class EcsGtmProGtmRemarketingConfig extends EcsGtmProModelAbstract
|
|
{
|
|
public $enable;
|
|
public $product_id;
|
|
public $product_prefix;
|
|
|
|
public function productIdSelectOptions()
|
|
{
|
|
return array(
|
|
array(
|
|
'id' => 'id',
|
|
'name' => $this->l('ID')
|
|
),
|
|
array(
|
|
'id' => 'reference',
|
|
'name' => $this->l('Reference')
|
|
),
|
|
array(
|
|
'id' => 'ean13',
|
|
'name' => $this->l('EAN13')
|
|
),
|
|
array(
|
|
'id' => 'upc',
|
|
'name' => $this->l('UPC')
|
|
)
|
|
);
|
|
}
|
|
|
|
public function attributeDefaults()
|
|
{
|
|
return array(
|
|
'id' => 'id'
|
|
);
|
|
}
|
|
|
|
public function attributeTypes()
|
|
{
|
|
return array(
|
|
'product_id' => 'select',
|
|
'product_prefix' => 'text'
|
|
);
|
|
}
|
|
|
|
public function attributeLabels()
|
|
{
|
|
return array(
|
|
'enable' => $this->l('Enable Remarketing Parameters', 'EcsGtmProGtmRemarketingConfig'),
|
|
'product_id' => $this->l('Product ID in Google Merchant Center', 'EcsGtmProGtmRemarketingConfig'),
|
|
'product_prefix' => $this->l('Product ID prefix', 'EcsGtmProGtmRemarketingConfig'),
|
|
);
|
|
}
|
|
|
|
public function rules()
|
|
{
|
|
return array(
|
|
array(
|
|
array(
|
|
'enable',
|
|
'product_id',
|
|
'product_prefix'
|
|
), 'safe'
|
|
)
|
|
);
|
|
}
|
|
|
|
public function configKey()
|
|
{
|
|
return 'ecsgtm_remarketing';
|
|
}
|
|
|
|
public function getActiveTab()
|
|
{
|
|
return 'EcsGtmProGtmConfig';
|
|
}
|
|
}
|