public function __construct($moduleInstance)
 {
     parent::__construct($moduleInstance);
     $productIdOptions = array(array('value' => 0, 'name' => $this->l('Reference Code')), array('value' => 1, 'name' => $this->l('EAN-13 or JAN barcode')), array('value' => 2, 'name' => $this->l('UPC barcode')));
     $this->addSelectField($this->l('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' => $this->l('Product Manufacturer')), array('value' => 1, 'name' => $this->l('Product Supplier')));
     $this->addSelectField($this->l('Product Manufacturer'), 'map_manufacturer', $productManufacturerOptions, true, $this->l('Select the field you are using to specify the manufacturer'));
     $productLinkOptions = array(array('value' => 0, 'name' => $this->l('Use Product Link')));
     $this->addSelectField($this->l('Product Link'), 'map_link', $productLinkOptions, true, $this->l('URL that leads to product. For upcoming features'));
     $productImageLinkOptions = array(array('value' => 0, 'name' => $this->l('Cover Image')), array('value' => 1, 'name' => $this->l('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' => $this->l('Categories')), array('value' => 1, 'name' => $this->l('Tags')));
     $this->addSelectField($this->l('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' => $this->l('Retail price with tax')), array('value' => 1, 'name' => $this->l('Pre-tax retail price')), array('value' => 2, 'name' => $this->l('Pre-tax wholesale price')));
     $this->addSelectField($this->l('Product Prices'), 'map_price_with_vat', $productPriceOptions, true, $this->l('This 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' => $this->l('Reference Code')), array('value' => 1, 'name' => $this->l('EAN-13 or JAN barcode')), array('value' => 2, 'name' => $this->l('UPC barcode')), array('value' => 3, 'name' => $this->l('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' => $this->l('Reference Code')), array('value' => 1, 'name' => $this->l('EAN-13 or JAN barcode')), array('value' => 2, 'name' => $this->l('UPC barcode')), array('value' => 3, 'name' => $this->l('Supplier Reference')));
     $this->addSelectField($this->l('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($this->l('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($this->l('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'));
 }
 /**
  * @param \Module $moduleInstance
  */
 public function __construct($moduleInstance)
 {
     parent::__construct($moduleInstance);
     $this->addTextField($this->l('XML Generate Request Variable Name'), 'request_var')->addTextField($this->l('XML Generate Request Variable Value'), 'request_var_value')->addTextField($this->l('XML file path'), 'xml_location', true, $this->l('File path relative to your PrestaShop install folder. eg "upload" is the PrestaShop upload dir'))->addTextField($this->l('XML file name'), 'xml_fileName', true, $this->l('File name. eg "bestprice.xml"'))->addTextField($this->l('Product availability when in stock'), 'avail_inStock', true, $this->l('This the product availability when this is in stock. It should match store availability string'))->addTextField($this->l('Product availability when out of stock'), 'avail_outOfStock', false, $this->l('This the product availability when this is out stock. It should reflect store availability so default is empty'))->addTextField($this->l('Product availability when out of stock and back-orders are allowed'), 'avail_backorders', false, $this->l('This the product availability when this is out of stock and back-orders are allowed. Default is empty'));
     $this->addYesNoField($this->l('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($this->l('Include disabled products'), 'include_disabled', true, $this->l('Set to yes if you want to include disabled products in XML file'))->addYesNoField($this->l('Fashion store'), 'is_fashion_store', true, $this->l('Your store contains fashion items, eg shoes, clothes etc'))->addYesNoField($this->l('Bookstore'), 'is_book_store', true, $this->l('Enable this if you are selling books'));
 }