Beispiel #1
0
 protected function _prepareForm()
 {
     $default = $this->activeRecordFactory->getObject('Ebay\\Template\\Synchronization')->getStopDefaultSettings();
     $formData = $this->getFormData();
     $formData = array_merge($default, $formData);
     $form = $this->_formFactory->create();
     $form->addField('ebay_template_synchronization_form_data_stop', self::HELP_BLOCK, ['content' => $this->__('Set the Conditions when M2E Pro should stop Listings on eBay.<br/><br/>
                 If all Conditions are set to No or No Action then no eBay Items using this Synchronization
                 Policy will be Stopped.
                 If all Options are enabled, then an Item will be Stopped if at least one of the Stop
                 Conditions is met.<br/><br/>
                 More detailed information about ability to work with this Page you can find
                 <a href="%url%" target="_blank">here</a>.', $this->getHelper('Module\\Support')->getDocumentationUrl(NULL, NULL, 'x/QwItAQ'))]);
     $fieldset = $form->addFieldset('magento_block_ebay_template_synchronization_form_data_stop_rules', ['legend' => $this->__('Stop Conditions'), 'collapsable' => false]);
     $fieldset->addField('stop_messages', self::MESSAGES, ['messages' => [['type' => MessageInterface::TYPE_NOTICE, 'content' => $this->__('
                         If <strong>Out of Stock</strong> Control option is enabled, the
                         <strong>Good Till Cancelled</strong> Items
                         will be <strong>Revised instead of  being Stopped</strong> based
                         on the Stop Conditions specifed below.
                         Their Status will be updated to <strong>Listed (Hidden)</strong>.
                     ')]]]);
     $fieldset->addField('stop_status_disabled', 'select', ['name' => 'synchronization[stop_status_disabled]', 'label' => $this->__('Stop When Status Disabled'), 'value' => $formData['stop_status_disabled'], 'values' => [Synchronization::STOP_STATUS_DISABLED_NONE => $this->__('No'), Synchronization::STOP_STATUS_DISABLED_YES => $this->__('Yes')], 'tooltip' => $this->__('Automatically stops an Item that is on eBay if Status is changed to \'Disabled\' in Magento.')]);
     $fieldset->addField('stop_out_off_stock', 'select', ['name' => 'synchronization[stop_out_off_stock]', 'label' => $this->__('Stop When Out Of Stock'), 'value' => $formData['stop_out_off_stock'], 'values' => [Synchronization::STOP_OUT_OFF_STOCK_NONE => $this->__('No'), Synchronization::STOP_OUT_OFF_STOCK_YES => $this->__('Yes')], 'tooltip' => $this->__('Automatically stops an Item that is on eBay if Stock Availability is changed
                 to \'Out of Stock\' in Magento.')]);
     $fieldset->addField('stop_qty_magento', 'select', ['name' => 'synchronization[stop_qty_magento]', 'label' => $this->__('Stop When Magento Quantity Is'), 'value' => $formData['stop_qty_magento'], 'values' => [Synchronization::STOP_QTY_NONE => $this->__('No Action'), Synchronization::STOP_QTY_LESS => $this->__('Less or Equal'), Synchronization::STOP_QTY_BETWEEN => $this->__('Between')], 'tooltip' => $this->__('Automatically stops an Item on eBay if Magento Quantity is changed <b>and</b> it
                  meets the selected Conditions.')])->addCustomAttribute('qty_type', 'magento');
     $fieldset->addField('stop_qty_magento_value', 'text', ['container_id' => 'stop_qty_magento_value_container', 'name' => 'synchronization[stop_qty_magento_value]', 'label' => $this->__('Quantity'), 'value' => $formData['stop_qty_magento_value'], 'class' => 'validate-digits', 'required' => true]);
     $fieldset->addField('stop_qty_magento_value_max', 'text', ['container_id' => 'stop_qty_magento_value_max_container', 'name' => 'synchronization[stop_qty_magento_value_max]', 'label' => $this->__('Max Quantity'), 'value' => $formData['stop_qty_magento_value_max'], 'class' => 'validate-digits M2ePro-validate-conditions-between', 'required' => true]);
     $fieldset->addField('stop_qty_calculated', 'select', ['name' => 'synchronization[stop_qty_calculated]', 'label' => $this->__('Stop When Calculated Quantity Is'), 'value' => $formData['stop_qty_calculated'], 'values' => [Synchronization::STOP_QTY_NONE => $this->__('No Action'), Synchronization::STOP_QTY_LESS => $this->__('Less or Equal'), Synchronization::STOP_QTY_BETWEEN => $this->__('Between')], 'tooltip' => $this->__('Automatically stops an Item on eBay if calculated Quantity according to the Price,
                  Quantity and Format Policy is changed <b>and</b> it meets the selected Conditions.')])->addCustomAttribute('qty_type', 'calculated');
     $fieldset->addField('stop_qty_calculated_value', 'text', ['container_id' => 'stop_qty_calculated_value_container', 'name' => 'synchronization[stop_qty_calculated_value]', 'label' => $this->__('Quantity'), 'value' => $formData['stop_qty_calculated_value'], 'class' => 'validate-digits', 'required' => true]);
     $fieldset->addField('stop_qty_calculated_value_max', 'text', ['container_id' => 'stop_qty_calculated_value_max_container', 'name' => 'synchronization[stop_qty_calculated_value_max]', 'label' => $this->__('Max Quantity'), 'value' => $formData['stop_qty_calculated_value_max'], 'class' => 'validate-digits M2ePro-validate-conditions-between', 'required' => true]);
     $this->setForm($form);
     return parent::_prepareForm();
 }
Beispiel #2
0
    protected function _prepareForm()
    {
        $default = $this->activeRecordFactory->getObject('Ebay\\Template\\Synchronization')->getRelistDefaultSettings();
        $formData = $this->getFormData();
        $formData = array_merge($default, $formData);
        $form = $this->_formFactory->create();
        $form->addField('ebay_template_synchronization_form_data_relist', self::HELP_BLOCK, ['content' => $this->__(<<<HTML
                    <p>If <strong>Relist Action</strong> is enabled, M2E Pro will relist Items that have been 
                    stopped or finished on eBay if they meet the Conditions you set. (Relist Action will not 
                    list Items that have not been Listed yet)</p><br>
                    
                    <p>If the automatic relisting doesn't work (usually because of the errors returned from eBay),
                    M2E Pro will attempt to list the Item again only if there is a change of Product Status, 
                    Stock Availability or Quantity in Magento.</p><br>
                    
                    <p>More detailed information about how to work with this Page you can find
                    <a href="%url%" target="_blank">here</a>.</p>
HTML
, $this->getHelper('Module\\Support')->getDocumentationUrl(NULL, NULL, 'x/QQItAQ'))]);
        $fieldset = $form->addFieldset('magento_block_ebay_template_synchronization_form_data_relist_filters', ['legend' => $this->__('General'), 'collapsable' => false]);
        $fieldset->addField('relist_mode', 'select', ['name' => 'synchronization[relist_mode]', 'label' => $this->__('Relist Action'), 'value' => $formData['relist_mode'], 'values' => [Synchronization::RELIST_MODE_NONE => $this->__('Disabled'), Synchronization::RELIST_MODE_YES => $this->__('Enabled')], 'tooltip' => $this->__('Choose whether you want to Relist Items covered by M2E Pro Listings using this
                    Policy if the Relist Conditions are met.')]);
        $fieldset->addField('relist_filter_user_lock', 'select', ['container_id' => 'relist_filter_user_lock_tr_container', 'name' => 'synchronization[relist_filter_user_lock]', 'label' => $this->__('Relist When Stopped Manually'), 'value' => $formData['relist_filter_user_lock'], 'values' => [Synchronization::RELIST_FILTER_USER_LOCK_YES => $this->__('No'), Synchronization::RELIST_FILTER_USER_LOCK_NONE => $this->__('Yes')], 'tooltip' => $this->__('Choose whether you want the Automatic Relist Rules to Relist Items even
                    if they\'ve been Stopped manually.')]);
        $fieldset->addField('relist_send_data', 'select', ['container_id' => 'relist_send_data_tr_container', 'name' => 'synchronization[relist_send_data]', 'label' => $this->__('Synchronize Data'), 'value' => $formData['relist_send_data'], 'values' => [Synchronization::RELIST_SEND_DATA_NONE => $this->__('No'), Synchronization::RELIST_SEND_DATA_YES => $this->__('Yes')], 'tooltip' => $this->__('<p><strong>No:</strong> Items are Relisted on eBay as per previously Listed Information 
                    and Settings, ignoring any changes that have been made in Magento. (Recommended)</p>
                    <p><strong>Yes:</strong> Any changes made to Items in Magento will be Reflected 
                    on the eBay Listings after they are Relisted.</p>')]);
        $fieldset = $form->addFieldset('magento_block_ebay_template_synchronization_form_data_relist_rules', ['legend' => $this->__('Relist Conditions'), 'collapsable' => false]);
        $fieldset->addField('relist_messages', self::MESSAGES, ['messages' => [['type' => MessageInterface::TYPE_NOTICE, 'content' => $this->__('
                            If <strong>Out of Stock</strong> Control option is enabled, the
                            <strong>Good Till Cancelled</strong> Items
                            will be <strong>Revised instead of  being Relisted</strong>
                            based on the Relist Conditions specifed below.
                        ')]]]);
        $fieldset->addField('relist_status_enabled', 'select', ['name' => 'synchronization[relist_status_enabled]', 'label' => $this->__('Product Status'), 'value' => $formData['relist_status_enabled'], 'values' => [Synchronization::RELIST_STATUS_ENABLED_NONE => $this->__('Any'), Synchronization::RELIST_STATUS_ENABLED_YES => $this->__('Enabled')], 'class' => 'M2ePro-validate-stop-relist-conditions-product-status', 'tooltip' => $this->__('<p><strong>Enabled:</strong> Relist Items on eBay automatically if they have status 
                    Enabled in Magento Product. (Recommended)</p>
                    <p><strong>Any:</strong> Relist Items on eBay automatically with any 
                    Magento Product status.</p>')]);
        $fieldset->addField('relist_is_in_stock', 'select', ['name' => 'synchronization[relist_is_in_stock]', 'label' => $this->__('Stock Availability'), 'value' => $formData['relist_is_in_stock'], 'values' => [Synchronization::RELIST_IS_IN_STOCK_NONE => $this->__('Any'), Synchronization::RELIST_IS_IN_STOCK_YES => $this->__('In Stock')], 'class' => 'M2ePro-validate-stop-relist-conditions-stock-availability', 'tooltip' => $this->__('<p><strong>In Stock:</strong> Relist Items automatically if Products are in Stock. 
                    (Recommended)</p>
                    <p><strong>Any:</strong> Relist Items automatically regardless of Stock availability.</p>')]);
        $fieldset->addField('relist_qty_magento', 'select', ['name' => 'synchronization[relist_qty_magento]', 'label' => $this->__('Magento Quantity'), 'value' => $formData['relist_qty_magento'], 'values' => [Synchronization::RELIST_QTY_NONE => $this->__('Any'), Synchronization::RELIST_QTY_MORE => $this->__('More or Equal'), Synchronization::RELIST_QTY_BETWEEN => $this->__('Between')], 'class' => 'M2ePro-validate-stop-relist-conditions-item-qty', 'tooltip' => $this->__('<p><strong>Any:</strong> Relist Items automatically with any Quantity available.</p>
                    <p><strong>More or Equal:</strong> Relist Items automatically if the Quantity available 
                    in Magento is at least equal to the number you set. (Recommended)</p>
                    <p><strong>Between:</strong> Relist Items automatically if the Quantity available in 
                    Magento is between the minimum and maximum numbers you set.</p>')])->addCustomAttribute('qty_type', 'magento');
        $fieldset->addField('relist_qty_magento_value', 'text', ['container_id' => 'relist_qty_magento_value_container', 'name' => 'synchronization[relist_qty_magento_value]', 'label' => $this->__('Quantity'), 'value' => $formData['relist_qty_magento_value'], 'class' => 'validate-digits', 'required' => true]);
        $fieldset->addField('relist_qty_magento_value_max', 'text', ['container_id' => 'relist_qty_magento_value_max_container', 'name' => 'synchronization[relist_qty_magento_value_max]', 'label' => $this->__('Max Quantity'), 'value' => $formData['relist_qty_magento_value_max'], 'class' => 'validate-digits M2ePro-validate-conditions-between', 'required' => true]);
        $fieldset->addField('relist_qty_calculated', 'select', ['name' => 'synchronization[relist_qty_calculated]', 'label' => $this->__('Calculated Quantity'), 'value' => $formData['relist_qty_calculated'], 'values' => [Synchronization::RELIST_QTY_NONE => $this->__('Any'), Synchronization::RELIST_QTY_MORE => $this->__('More or Equal'), Synchronization::RELIST_QTY_BETWEEN => $this->__('Between')], 'class' => 'M2ePro-validate-stop-relist-conditions-item-qty', 'tooltip' => $this->__('<p><strong>Any:</strong> Relist Items automatically with any Quantity available.</p>
                    <p><strong>More or Equal:</strong> Relist Items automatically if the Quantity is at least equal
                    to the number you set, according to the Price, Quantity and Format Policy. (Recommended)</p>
                    <p><strong>Between:</strong> Relist Items automatically if the Quantity is between the 
                    minimum and maximum numbers you set, according to the Price, Quantity and Format Policy.</p>')])->addCustomAttribute('qty_type', 'calculated');
        $fieldset->addField('relist_qty_calculated_value', 'text', ['container_id' => 'relist_qty_calculated_value_container', 'name' => 'synchronization[relist_qty_calculated_value]', 'label' => $this->__('Quantity'), 'value' => $formData['relist_qty_calculated_value'], 'class' => 'validate-digits', 'required' => true]);
        $fieldset->addField('relist_qty_calculated_value_max', 'text', ['container_id' => 'relist_qty_calculated_value_max_container', 'name' => 'synchronization[relist_qty_calculated_value_max]', 'label' => $this->__('Max Quantity'), 'value' => $formData['relist_qty_calculated_value_max'], 'class' => 'validate-digits M2ePro-validate-conditions-between', 'required' => true]);
        $this->setForm($form);
        return parent::_prepareForm();
    }
Beispiel #3
0
    protected function _prepareForm()
    {
        $default = $this->activeRecordFactory->getObject('Ebay\\Template\\Synchronization')->getListDefaultSettings();
        $formData = $this->getFormData();
        $formData = array_merge($default, $formData);
        $form = $this->_formFactory->create();
        $form->addField('synchronization_id', 'hidden', ['name' => 'synchronization[id]', 'value' => !$this->isCustom() && isset($formData['id']) ? (int) $formData['id'] : '']);
        $form->addField('synchronization_title', 'hidden', ['name' => 'synchronization[title]', 'value' => $this->getHelper('Data')->escapeHtml($this->getTitle())]);
        $form->addField('synchronization_is_custom_template', 'hidden', ['name' => 'synchronization[is_custom_template]', 'value' => $this->isCustom() ? 1 : 0]);
        $form->addField('ebay_template_synchronization_form_data_list', self::HELP_BLOCK, ['content' => $this->__(<<<HTML
                    <p><strong>List Action</strong> - this Action can be executed for each Item in M2E Pro Listings
                    which has <strong>Not Listed</strong> Status and which Settings meet the List Condition. If an 
                    Item was not initially Listed for some reason, automatic synchronization will attempt to list 
                    it again only if there is a change of Product Status, Stock Availability or Quantity
                    in Magento.</p><br>
                    
                    <p><strong>Note:</strong> M2E Pro Listings Synchronization must be enabled in 
                    Synchronization <strong>(eBay Integration > Configuration > Settings > Synchronization)</strong>.
                    Otherwise, Synchronization Policy Rules will not take effect.</p><br>
                    
                    <p>More detailed information about how to work with this Page you can find 
                    <a href="%url%" target="_blank">here</a>.</p>
HTML
, $this->getHelper('Module\\Support')->getDocumentationUrl(NULL, NULL, 'x/PQItAQ'))]);
        $fieldset = $form->addFieldset('magento_block_ebay_template_synchronization_form_data_list', ['legend' => $this->__('General'), 'collapsable' => false]);
        $fieldset->addField('list_mode', 'select', ['name' => 'synchronization[list_mode]', 'label' => $this->__('List Action'), 'value' => $formData['list_mode'], 'values' => [Synchronization::LIST_MODE_NONE => $this->__('Disabled'), Synchronization::LIST_MODE_YES => $this->__('Enabled')]]);
        $fieldset = $form->addFieldset('magento_block_ebay_template_synchronization_form_data_list_rules', ['legend' => $this->__('List Conditions'), 'collapsable' => false]);
        $fieldset->addField('list_status_enabled', 'select', ['name' => 'synchronization[list_status_enabled]', 'label' => $this->__('Product Status'), 'value' => $formData['list_status_enabled'], 'values' => [Synchronization::LIST_STATUS_ENABLED_NONE => $this->__('Any'), Synchronization::LIST_STATUS_ENABLED_YES => $this->__('Enabled')], 'tooltip' => $this->__('<p><strong>Enabled:</strong> List Items on eBay automatically if they have status Enabled 
                    in Magento Product. (Recommended)</p>
                    <p><strong>Any:</strong> List Items with any Magento Product status on eBay automatically</p>')]);
        $fieldset->addField('list_is_in_stock', 'select', ['name' => 'synchronization[list_is_in_stock]', 'label' => $this->__('Stock Availability'), 'value' => $formData['list_is_in_stock'], 'values' => [Synchronization::LIST_IS_IN_STOCK_NONE => $this->__('Any'), Synchronization::LIST_IS_IN_STOCK_YES => $this->__('In Stock')], 'tooltip' => $this->__('<b>In Stock:</b> List Items automatically if Products are in Stock. (Recommended.)<br/>
                    <b>Any:</b> List Items automatically, regardless of Stock availability.')]);
        $fieldset->addField('list_qty_magento', 'select', ['name' => 'synchronization[list_qty_magento]', 'label' => $this->__('Magento Quantity'), 'value' => $formData['list_qty_magento'], 'values' => [Synchronization::LIST_QTY_NONE => $this->__('Any'), Synchronization::LIST_QTY_MORE => $this->__('More or Equal'), Synchronization::LIST_QTY_BETWEEN => $this->__('Between')], 'tooltip' => $this->__('<p><strong>Any:</strong> List Items automatically with any Quantity available.</p>
                    <p><strong>More or Equal:</strong> List Items automatically if the Quantity available 
                    in Magento is at least equal to the number you set. (Recommended)</p>
                    <p><strong>Between:</strong> List Items automatically if the Quantity available in 
                    Magento is between the minimum and maximum numbers you set. </p>')])->addCustomAttribute('qty_type', 'magento');
        $fieldset->addField('list_qty_magento_value', 'text', ['container_id' => 'list_qty_magento_value_container', 'name' => 'synchronization[list_qty_magento_value]', 'label' => $this->__('Quantity'), 'value' => $formData['list_qty_magento_value'], 'class' => 'validate-digits', 'required' => true]);
        $fieldset->addField('list_qty_magento_value_max', 'text', ['container_id' => 'list_qty_magento_value_max_container', 'name' => 'synchronization[list_qty_magento_value]', 'label' => $this->__('Max Quantity'), 'value' => $formData['list_qty_magento_value_max'], 'class' => 'validate-digits M2ePro-validate-conditions-between', 'required' => true]);
        $fieldset->addField('list_qty_calculated', 'select', ['name' => 'synchronization[list_qty_calculated]', 'label' => $this->__('Calculated Quantity'), 'value' => $formData['list_qty_calculated'], 'values' => [Synchronization::LIST_QTY_NONE => $this->__('Any'), Synchronization::LIST_QTY_MORE => $this->__('More or Equal'), Synchronization::LIST_QTY_BETWEEN => $this->__('Between')], 'tooltip' => $this->__('<p><strong>Any:</strong> List Items automatically with any Quantity available.</p>
                    <p><strong>More or Equal:</strong> List Items automatically if the calculated Quantity 
                    according to the Price, Quantity and Format Policy is at least equal to the number you set. 
                    (Recommended)</p>
                    <p><strong>Between:</strong> List Items automatically if the Quantity according to the Price,
                    Quantity and Format Policy is between the minimum and maximum numbers you set. </p>')])->addCustomAttribute('qty_type', 'calculated');
        $fieldset->addField('list_qty_calculated_value', 'text', ['container_id' => 'list_qty_calculated_value_container', 'name' => 'synchronization[list_qty_calculated_value]', 'label' => $this->__('Quantity'), 'value' => $formData['list_qty_calculated_value'], 'class' => 'validate-digits', 'required' => true]);
        $fieldset->addField('list_qty_calculated_value_max', 'text', ['container_id' => 'list_qty_calculated_value_max_container', 'name' => 'synchronization[list_qty_calculated_value_max]', 'label' => $this->__('Max Quantity'), 'value' => $formData['list_qty_calculated_value_max'], 'class' => 'validate-digits M2ePro-validate-conditions-between  ', 'required' => true]);
        $this->setForm($form);
        return parent::_prepareForm();
    }
Beispiel #4
0
 protected function _prepareForm()
 {
     $default = $this->activeRecordFactory->getObject('Ebay\\Template\\Synchronization')->getReviseDefaultSettings();
     $formData = $this->getFormData();
     $formData = array_merge($default, $formData);
     $form = $this->_formFactory->create();
     $form->addField('ebay_template_synchronization_form_data_revise', self::HELP_BLOCK, ['content' => $this->__('Set the Conditions when M2E Pro should Revise Items on eBay.<br/><br/>
                 <b>Partial Revise</b> - if Conditions here are met, eBay Items will be updated with just the
                 specific data that has changed.<br/>
                 <b>Full Revise</b> - Conditions here relate to changes that are made to the
                 Policies made in the M2E Pro Listing.
                 If Conditions here are met, eBay Items will be updated in full, with all data being sent to eBay.
                 <br/><br/>
                 More detailed information about ability to work with this Page you can find
                 <a href="%url%" target="_blank">here</a>.', $this->getHelper('Module\\Support')->getDocumentationUrl(NULL, NULL, 'x/PwItAQ'))]);
     $fieldset = $form->addFieldset('magento_block_ebay_template_synchronization_form_data_revise_products', ['legend' => $this->__('Partial Revise'), 'collapsable' => true]);
     $fieldset->addField('revise_update_qty', 'select', ['name' => 'synchronization[revise_update_qty]', 'label' => $this->__('Quantity'), 'value' => $formData['revise_update_qty'], 'values' => [Synchronization::REVISE_UPDATE_QTY_NONE => $this->__('No'), Synchronization::REVISE_UPDATE_QTY_YES => $this->__('Yes')], 'tooltip' => $this->__('Automatically Revise the eBay Quantity if there is a change to the Quantity
                 (or the Attribute used for Quantity) in Magento.')]);
     $fieldset->addField('revise_update_qty_max_applied_value_mode', 'select', ['container_id' => 'revise_update_qty_max_applied_value_mode_tr', 'name' => 'synchronization[revise_update_qty_max_applied_value_mode]', 'label' => $this->__('Conditional Revise'), 'value' => $formData['revise_update_qty_max_applied_value_mode'], 'values' => [Synchronization::REVISE_MAX_AFFECTED_QTY_MODE_OFF => $this->__('No'), Synchronization::REVISE_MAX_AFFECTED_QTY_MODE_ON => $this->__('Yes')], 'tooltip' => $this->__('Choose if you want to Revise Quantities on eBay only when certain Conditions are met.')]);
     $fieldset->addField('revise_update_qty_max_applied_value', 'text', ['container_id' => 'revise_update_qty_max_applied_value_tr', 'name' => 'synchronization[revise_update_qty_max_applied_value]', 'label' => $this->__('Revise When Less or Equal to'), 'value' => $formData['revise_update_qty_max_applied_value'], 'class' => 'M2ePro-validate-qty', 'required' => true, 'tooltip' => $this->__('Set the Quantity of Stock when Revise Rules should be triggered.
                 We recommend keeping this value relatively low, with an initial value of anything from 10 to 20.')]);
     $fieldset->addField('revise_update_qty_max_applied_value_line_tr', self::SEPARATOR, []);
     $fieldset->addField('revise_update_price', 'select', ['name' => 'synchronization[revise_update_price]', 'label' => $this->__('Price'), 'value' => $formData['revise_update_price'], 'values' => [Synchronization::REVISE_UPDATE_PRICE_NONE => $this->__('No'), Synchronization::REVISE_UPDATE_PRICE_YES => $this->__('Yes')], 'tooltip' => $this->__('Automatically Revise the eBay Item Price if there is a change to the Price
                 (or the Attribute used for Price) in Magento.')]);
     $fieldset->addField('revise_update_price_max_allowed_deviation_mode', 'select', ['container_id' => 'revise_update_price_max_allowed_deviation_mode_tr', 'name' => 'synchronization[revise_update_price_max_allowed_deviation_mode]', 'label' => $this->__('Conditional Revise'), 'value' => $formData['revise_update_price_max_allowed_deviation_mode'], 'values' => [Synchronization::REVISE_MAX_ALLOWED_PRICE_DEVIATION_MODE_OFF => $this->__('No'), Synchronization::REVISE_MAX_ALLOWED_PRICE_DEVIATION_MODE_ON => $this->__('Yes')], 'tooltip' => $this->__('Updates eBay Price only when the Condition you set below is met.')]);
     $preparedValues = [];
     $percentageStep = 0.5;
     for ($priceDeviationValue = 0.5; $priceDeviationValue <= 20; $priceDeviationValue += $percentageStep) {
         $preparedValues[] = ['label' => $priceDeviationValue . ' %', 'value' => $priceDeviationValue];
         $priceDeviationValue >= 5 && ($percentageStep = 1);
     }
     $fieldset->addField('revise_update_price_max_allowed_deviation', 'select', ['container_id' => 'revise_update_price_max_allowed_deviation_tr', 'name' => 'synchronization[revise_update_price_max_allowed_deviation]', 'label' => $this->__('Revise When Deviation More or Equal than'), 'value' => $formData['revise_update_price_max_allowed_deviation'], 'values' => $preparedValues, 'tooltip' => $this->__('
                 It is a Percent Value of maximum possible Deviation between Magento Price
                 (Price, Quantity and Format Policy Settings) and eBay Item Price, that can be ignored.<br/><br/>
                 <strong>For example</strong>, your Magento Price is 23.25$. According to
                 Selling Format Policy Settings Item Price is equal to Magento Price.
                 The "Revise When Deviation More or Equal than" Option is specified to 1%.<br/>
                 1) If Magento Price was changed to 23.26$, possible Deviation Value (0.23$) is
                 <strong>more</strong> than Price change (0.1$), so the Price
                 <strong>will not be Revised</strong> on eBay.<br/>
                 2) If Magento Price was changed to 23.5$, possible Deviation Value (0.23$) is
                 <strong>less</strong> than Price change (0.25$), so the Price <strong>will be Revised</strong>
                 on eBay.<br/><br/>
                 After successful Revise new Magento Price (in this case is 23.5$)
                 will be used for further Deviation count.
             ')]);
     $fieldset->addField('revise_update_price_line', self::SEPARATOR, []);
     $fieldset->addField('revise_update_title', 'select', ['name' => 'synchronization[revise_update_title]', 'label' => $this->__('Title'), 'value' => $formData['revise_update_title'], 'values' => [Synchronization::REVISE_UPDATE_TITLE_NONE => $this->__('No'), Synchronization::REVISE_UPDATE_TITLE_YES => $this->__('Yes')], 'tooltip' => $this->__('Automatically Revise the eBay Item Title if there is a change to the Title
                 (or the Attribute used for Title) in Magento.')]);
     $fieldset->addField('revise_update_sub_title', 'select', ['name' => 'synchronization[revise_update_sub_title]', 'label' => $this->__('Subtitle'), 'value' => $formData['revise_update_sub_title'], 'values' => [Synchronization::REVISE_UPDATE_SUB_TITLE_NONE => $this->__('No'), Synchronization::REVISE_UPDATE_SUB_TITLE_YES => $this->__('Yes')], 'tooltip' => $this->__('Automatically Revise the eBay Item Subtitle if there is a change to the Subtitle
                 (or the Attribute used for Subtitle) in Magento.')]);
     $fieldset->addField('revise_update_description', 'select', ['name' => 'synchronization[revise_update_description]', 'label' => $this->__('Description'), 'value' => $formData['revise_update_description'], 'values' => [Synchronization::REVISE_UPDATE_DESCRIPTION_NONE => $this->__('No'), Synchronization::REVISE_UPDATE_DESCRIPTION_YES => $this->__('Yes')], 'tooltip' => $this->__('Automatically Revise the eBay Item Description if there is a change to the Description
                 (or the Attribute used for Description) in Magento.')]);
     $fieldset->addField('revise_update_images', 'select', ['name' => 'synchronization[revise_update_images]', 'label' => $this->__('Images'), 'value' => $formData['revise_update_images'], 'values' => [Synchronization::REVISE_UPDATE_IMAGES_NONE => $this->__('No'), Synchronization::REVISE_UPDATE_IMAGES_YES => $this->__('Yes')], 'tooltip' => $this->__('Automatically Revise the eBay Item Gallery if there is a change to the Gallery
                 (or the Attribute used for gallery) in Magento.')]);
     $fieldset = $form->addFieldset('magento_block_ebay_template_synchronization_form_data_revise_templates', ['legend' => $this->__('Full Revise'), 'collapsable' => true]);
     $fieldset->addField('revise_change_selling_format_template', 'select', ['name' => 'synchronization[revise_change_selling_format_template]', 'label' => $this->__('Price, Quantity and Format'), 'value' => $formData['revise_change_selling_format_template'], 'values' => [\Ess\M2ePro\Model\Template\Synchronization::REVISE_CHANGE_SELLING_FORMAT_TEMPLATE_NONE => $this->__('No'), \Ess\M2ePro\Model\Template\Synchronization::REVISE_CHANGE_SELLING_FORMAT_TEMPLATE_YES => $this->__('Yes')], 'tooltip' => $this->__('Automatically Revise the eBay Item if there is a change to the Price,
                 Quantity and Format Policy in this M2E Pro Listing.')]);
     $fieldset->addField('revise_change_description_template', 'select', ['name' => 'synchronization[revise_change_description_template]', 'label' => $this->__('Description'), 'value' => $formData['revise_change_description_template'], 'values' => [Synchronization::REVISE_CHANGE_DESCRIPTION_TEMPLATE_NONE => $this->__('No'), Synchronization::REVISE_CHANGE_DESCRIPTION_TEMPLATE_YES => $this->__('Yes')], 'tooltip' => $this->__('Automatically Revise the eBay Item if there is a change to the
                 Description Policy in this M2E Pro Listing.')]);
     $fieldset->addField('revise_change_category_template', 'select', ['name' => 'synchronization[revise_change_category_template]', 'label' => $this->__('Category/Specifics'), 'value' => $formData['revise_change_category_template'], 'values' => [Synchronization::REVISE_CHANGE_CATEGORY_TEMPLATE_NONE => $this->__('No'), Synchronization::REVISE_CHANGE_CATEGORY_TEMPLATE_YES => $this->__('Yes')], 'tooltip' => $this->__('Automatically Revise the eBay Item if there is a change to the
                 Category/specifics made in Magento or M2E Pro.')]);
     $fieldset->addField('revise_change_payment_template', 'select', ['name' => 'synchronization[revise_change_payment_template]', 'label' => $this->__('Payment'), 'value' => $formData['revise_change_payment_template'], 'values' => [Synchronization::REVISE_CHANGE_PAYMENT_TEMPLATE_NONE => $this->__('No'), Synchronization::REVISE_CHANGE_PAYMENT_TEMPLATE_YES => $this->__('Yes')], 'tooltip' => $this->__('Automatically Revise the eBay Item if there
                 is a change to the Payment Policy in this M2E Pro Listing.')]);
     $fieldset->addField('revise_change_shipping_template', 'select', ['name' => 'synchronization[revise_change_shipping_template]', 'label' => $this->__('Shipping'), 'value' => $formData['revise_change_shipping_template'], 'values' => [Synchronization::REVISE_CHANGE_SHIPPING_TEMPLATE_NONE => $this->__('No'), Synchronization::REVISE_CHANGE_SHIPPING_TEMPLATE_YES => $this->__('Yes')], 'tooltip' => $this->__('Automatically Revise the eBay Item if there is a change to
                 the Shipping Policy in this M2E Pro Listing.')]);
     $fieldset->addField('revise_change_return_policy_template', 'select', ['name' => 'synchronization[revise_change_return_policy_template]', 'label' => $this->__('Return'), 'value' => $formData['revise_change_return_policy_template'], 'values' => [Synchronization::REVISE_CHANGE_RETURN_TEMPLATE_NONE => $this->__('No'), Synchronization::REVISE_CHANGE_RETURN_TEMPLATE_YES => $this->__('Yes')], 'tooltip' => $this->__('Automatically Revise the eBay
                 Item if there is a change to the Return Policy in this M2E Pro Listing.')]);
     $form->addField('revise_qty_max_applied_value_confirmation_popup_template', self::CUSTOM_CONTAINER, ['text' => $this->__('
                 <br/>It is necessary to understand that Disabling this Option can <strong>negatively</strong>
                 influence on <strong>M2E Pro Performance</strong>.<br/><br/>
                 In case this Option is <strong>Disabled</strong>, M2E Pro will Revise the smallest changes
                 for high Quantity Values (e.g. from 515 to 514), that most likely has no practical effect.
                 It can be time-consuming and more important changes (e.g. from 1 to 0) for another Product can
                 be <strong>stayed in queue</strong> instead of immediate update. Also it can cause increase of
                 Order Import passivity up to 12 hours.<br/>
                 If you <strong>Enable</strong> "Conditional Revise" Option and "Revise When Less or Equal to"
                 Option is set to 5, M2E Pro will Revise your Products in realtime format only when Magento
                 Quantity will be less or equal 5. Revise will not be run until the Quantity Value is more than 5.
                 <br/><br/>
                 So M2E Pro <strong>does not recommend</strong> to Disable this Option and suggests to specify
                 for "Revise When Less or Equal to" Option Value 5 (The less value = less Unuseful Calls +
                 more Performance of M2E Pro).<br/>
                 You can always change this Option Value according to your needs.<br/><br/>
                 <strong>Note</strong>: For Sellers who synchronize Magento Inventory with Suppliers Inventory
                 by any Automatic Software this Option is <strong>critically required</strong>,
                 as usually Supplier\'s Quantity has Big Values and it is changed very often.
             '), 'style' => 'display: none;']);
     $form->addField('revise_price_max_max_allowed_deviation_confirmation_popup_template', self::CUSTOM_CONTAINER, ['text' => $this->__('
                 <br/>It is necessary to understand that Disabling this Option can <strong>negatively</strong>
                 influence on <strong>M2E Pro Performance</strong>.<br/><br/>
                 In case this Option is <strong>Disabled</strong>, M2E Pro will Revise the smallest changes for
                 Price Values (e.g. from 25.25$ to 25.26$), that most likely has no practical effect.
                 It can be time-consuming and more important changes (e.g. from 1$ to 50$) for another Product
                 can be <strong>stayed in queue</strong> instead of immediate update.
                 Also it can cause increase of Order Import passivity up to 12 hours.<br/>
                 If you <strong>Enable</strong> "Conditional Revise" Option and "Revise When Deviation More or
                 Equal than" set to 3%, M2E Pro will Revise your Products in realtime format only when
                 Price change will be more than 3% from Starting Price.<br/><br/>
                 So M2E Pro <strong>does not recommend</strong> to Disable this Option (The more value = less
                 Unusefull Calls + more Performance of M2E Pro).<br/>
                 You can always change this Option Value according to your needs.<br/><br/>
                 <strong>Note</strong>: For Sellers who synchronize Magento Inventory with Suppliers
                 Inventory by any Automatic Software this Option is <strong>critically required</strong>,
                 as Supplier\'s Price Values are changed very often.
             '), 'style' => 'display: none;']);
     $this->setForm($form);
     return parent::_prepareForm();
 }