* @copyright 2018 Areama * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * International Registered Trademark & Property of Areama */ include_once dirname(__FILE__).'/ArSeoProJsonLDAbstract.php'; class ArSeoProJsonLDGeneral extends ArSeoProJsonLDAbstract { const CONFIG_PREFIX = 'arseojsong_'; public $enable; public $cleanup; public $organization; public $type; public $name; public $description; public $site; public $logo; public $phone; /*public $email; public $address_country; public $address_region; public $address_locality; public $address_street; public $address_postal; public $lat; public $lng;*/ public $sameas; public $breadcrumbs; public $webpage; public $website; public $store; public $workinghours; public function rules() { return array( array( array( 'enable', 'cleanup', //'organization', //'type', 'name', 'description', 'site', 'logo', //'phone', //'email', //'address_country', //'address_region', //'address_locality', //'address_street', //'address_postal', //'lat', //'lng', //'sameas', 'breadcrumbs', //'webpage', //'website', //'store', //'workinghours', ), 'safe' ) ); } public function typeSelectOptions() { return array( array( 'id' => 'local', 'name' => $this->l('Local Business') ), array( 'id' => 'org', 'name' => $this->l('Organization') ) ); } public function attributeDefaults() { return array( 'enable' => 1, 'cleanup' => 1, 'name' => Configuration::get('PS_SHOP_NAME'), 'description' => Configuration::get('PS_SHOP_DETAILS'), 'site' => Context::getContext()->shop->getBaseURL(true, true), 'logo' => (Configuration::get('PS_LOGO')) ? (Context::getContext()->shop->getBaseURL(true, false) . _PS_IMG_ . Configuration::get('PS_LOGO')) : '', 'breadcrumbs' => 1, ); } public function attributeLabels() { return array( 'enable' => $this->l('Enable JSON-LD submodule', 'ArSeoProJsonLDGeneral'), 'cleanup' => $this->l('Remove existing microdata', 'ArSeoProJsonLDGeneral'), 'name' => $this->l('Shop name', 'ArSeoProJsonLDGeneral'), 'description' => $this->l('Shop description', 'ArSeoProJsonLDGeneral'), 'site' => $this->l('Shop site URL', 'ArSeoProJsonLDGeneral'), 'logo' => $this->l('Shop logo URL', 'ArSeoProJsonLDGeneral'), 'breadcrumbs' => $this->l('Enable breadcrumbs JSON-LD microdata', 'ArSeoProJsonLDGeneral') ); } public function attributeDescriptions() { return array( 'cleanup' => $this->l('This option will remove all microdata generated by other modules/templates. No files will be affected or changed. You can revert this option any time.', 'ArSeoProJsonLDGeneral'), ); } public function attributeTypes() { return array( 'enable' => 'switch', 'cleanup' => 'switch', 'organization' => 'switch', 'type' => 'select', 'name' => 'text', 'description' => 'textarea', 'site' => 'text', 'logo' => 'text', 'phone' => 'text', 'email' => 'text', 'address_country' => 'text', 'address_region' => 'text', 'address_locality' => 'text', 'address_street' => 'text', 'address_postal' => 'text', 'lat' => 'text', 'lng' => 'text', 'sameas' => 'textarea', 'breadcrumbs' => 'switch', 'webpage' => 'switch', 'website' => 'switch', 'store' => 'switch', 'workinghours' => 'text', ); } public function getConfigPrefix() { return self::CONFIG_PREFIX; } }