public function __construct($moduleInstance)
 {
     parent::__construct($moduleInstance);
     $productIdOptions = array(array('value' => 0, 'name' => 'Reference Code'), array('value' => 1, 'name' => 'EAN-13 or JAN barcode'), array('value' => 2, 'name' => 'UPC barcode'));
     $this->addSelectField('Product ID', 'map_id', $productIdOptions, true, $this->l('Select the product reference group you are using in your store'));
     $productManufacturerOptions = array(array('value' => 0, 'name' => 'Product Manufacturer'), array('value' => 1, 'name' => 'Product Supplier'));
     $this->addSelectField('Product Manufacturer', 'map_manufacturer', $productManufacturerOptions, true, $this->l('Select the field you are using to specify the manufacturer'));
     $productLinkOptions = array(array('value' => 0, 'name' => 'Use Product Link'));
     $this->addSelectField('Product Link', 'map_link', $productLinkOptions, true, $this->l('URL that leads to product. For upcoming features'));
     $productImageLinkOptions = array(array('value' => 0, 'name' => 'Cover Image'), array('value' => 1, 'name' => 'Random Image'));
     $this->addSelectField('Product Image', 'map_image', $productImageLinkOptions, true, $this->l('Choose if you want to use cover image or some random image from product\'s gallery'));
     $productCategoriesOptions = array(array('value' => 0, 'name' => 'Categories'), array('value' => 1, 'name' => 'Tags'));
     $this->addSelectField('Product Categories', 'map_category', $productCategoriesOptions, true, $this->l('Choose product tags if and only if no categories are set and instead product tags are in use'));
     $productPriceOptions = array(array('value' => 0, 'name' => 'Retail price with tax'), array('value' => 1, 'name' => 'Pre-tax retail price'), array('value' => 2, 'name' => 'Pre-tax wholesale price'));
     $this->addSelectField('Product Prices', 'map_price_with_vat', $productPriceOptions, true, $this->l('s option specify the product price that will be used in XML. This should be left to "Retail price with tax"'));
     $productMPNOptions = array(array('value' => 0, 'name' => 'Reference Code'), array('value' => 1, 'name' => 'EAN-13 or JAN barcode'), array('value' => 2, 'name' => 'UPC barcode'), array('value' => 3, 'name' => 'Supplier Reference'));
     $this->addSelectField('Product Manufacturer Reference Code', 'map_mpn', $productMPNOptions, true, $this->l('This option should reflect product\' manufacturer SKU'));
     $productISBNOptions = array(array('value' => 0, 'name' => 'Reference Code'), array('value' => 1, 'name' => 'EAN-13 or JAN barcode'), array('value' => 2, 'name' => 'UPC barcode'), array('value' => 3, 'name' => 'Supplier Reference'));
     $this->addSelectField('Product ISBN', 'map_isbn', $productISBNOptions, true, $this->l('This field will be used if you sell books in your store, to specify the ISBN of the book'));
     // Multiselect from attribute groups
     $default_lang = (int) \Configuration::get('PS_LANG_DEFAULT');
     $productSizesOptions = array();
     $productColorOptions = array();
     $attributes = \AttributeGroup::getAttributesGroups($default_lang);
     foreach ($attributes as $attribute) {
         if ($attribute['is_color_group']) {
             $productColorOptions[] = array('value' => $attribute['id_attribute_group'], 'name' => $attribute['name']);
         } else {
             $productSizesOptions[] = array('value' => $attribute['id_attribute_group'], 'name' => $attribute['name']);
         }
     }
     $this->addMultiSelectField('Size Attributes', 'map_size', $productSizesOptions, true, $this->l('Choose the attributes that you use to specify product sizes. This field is used only if Fashion Store option is enabled'))->addMultiSelectField('Color Attributes', 'map_color', $productColorOptions, true, $this->l('Choose the attributes that you use to specify product colors. This field is used only if Fashion Store option is enabled'));
 }
 public function __construct($moduleInstance)
 {
     parent::__construct($moduleInstance);
     $generateUrl = \Tools::getHttpHost(true) . __PS_BASE_URI__ . 'index.php?' . $this->Options->getValue('request_var') . '=' . $this->Options->getValue('request_var_value');
     $this->desc = $this->l('Give the following URL to skroutz.gr: ') . '<a href="' . $generateUrl . '" target="_blank">' . $generateUrl . '</a>';
     $this->addTextField('XML Generate Request Variable Name', 'request_var')->addTextField('XML Generate Request Variable Value', 'request_var_value')->addTextField('XML file path', 'xml_location', true, $this->l('File path relative to your PrestaShop install folder. eg "upload" is the PrestaShop upload dir'), '', false, _PS_ROOT_DIR_ . '/')->addTextField('XML file name', 'xml_fileName', true, $this->l('File name. eg "skroutz.xml"'));
     $options = array();
     foreach ($this->Options->availOptions as $k => $v) {
         $options[] = array('name' => $v, 'value' => $k);
     }
     $this->addSelectField('Product availability when in stock', 'avail_inStock', $options, true, $this->l('This the product availability when this is in stock. It should match store availability string'));
     $options = array();
     $options[] = array('name' => 'Do not include', 'value' => 0);
     foreach ($this->Options->availOptions as $k => $v) {
         $options[] = array('name' => $v, 'value' => $k + 1);
     }
     $this->addSelectField('Product availability when out of stock', 'avail_outOfStock', $options, true, $this->l('This the product availability when this is out stock. It should reflect store availability so default is "Do not include"'))->addSelectField('Product availability when out of stock and back-orders are allowed', 'avail_backorders', $options, true, $this->l('This the product availability when this is out of stock and back-orders are allowed. Default is "Do not include"'));
     $this->addYesNoField('Append Product SKU to Product Name', 'map_name_append_sku', true, $this->l('If this option is enabled then the product SKU will be appended to Product Name'))->addYesNoField('Include disabled products', 'include_disabled', true, $this->l('Set to yes if you want to include disabled products in XML file'))->addYesNoField('Fashion store', 'is_fashion_store', true, $this->l('Your store contains fashion items, eg shoes, clothes etc'))->addYesNoField('Bookstore', 'is_book_store', true, $this->l('Enable this if you are selling books'));
 }
 public function __construct($moduleInstance)
 {
     parent::__construct($moduleInstance);
     $this->addHtml($this->infoContent());
 }