function getContent()
 {
     $is_one_dot_five = version_compare(_PS_VERSION_, '1.5', '>');
     // Smarty
     $template_vars = array('id_tab' => Tools::getValue('id_tab'), 'controller' => Tools::getValue('controller'), 'tab' => Tools::getValue('tab'), 'configure' => Tools::getValue('configure'), 'tab_module' => Tools::getValue('tab_module'), 'module_name' => Tools::getValue('module_name'), 'token' => Tools::getValue('token'), 'ebay_token' => Configuration::get('EBAY_SECURITY_TOKEN'), '_module_dir_' => _MODULE_DIR_, 'ebay_categories' => EbayCategoryConfiguration::getEbayCategories($this->ebay_profile->id), 'id_lang' => $this->context->cookie->id_lang, 'id_ebay_profile' => $this->ebay_profile->id, '_path' => $this->path, 'possible_attributes' => AttributeGroup::getAttributesGroups($this->context->cookie->id_lang), 'possible_features' => Feature::getFeatures($this->context->cookie->id_lang, true), 'date' => pSQL(date('Ymdhis')), 'conditions' => $this->_translatePSConditions(EbayCategoryConditionConfiguration::getPSConditions()), 'form_items_specifics' => EbaySynchronizer::getNbSynchronizableEbayCategoryCondition(), 'form_items_specifics_mixed' => EbaySynchronizer::getNbSynchronizableEbayCategoryConditionMixed(), 'isOneDotFive' => $is_one_dot_five);
     return $this->display('formItemsSpecifics.tpl', $template_vars);
 }
    /**
     *
     * Returns an array with the condition_type and corresponding ConditionID on eBay
     *
     */
    public function getConditionsValues($id_ebay_profile)
    {
        if (!isset($this->conditions_values[$id_ebay_profile])) {
            $sql = 'SELECT e.condition_type, e.id_condition_ref as condition_id
				FROM ' . _DB_PREFIX_ . 'ebay_category_condition_configuration e
				WHERE e.`id_ebay_profile` = ' . (int) $id_ebay_profile . ' 
				AND e.id_category_ref = ' . (int) $this->id_category_ref;
            $res = Db::getInstance()->executeS($sql);
            $ret = array('new' => null, 'used' => null, 'refurbished' => null);
            foreach ($res as $row) {
                $ret[EbayCategoryConditionConfiguration::getPSConditions($row['condition_type'])] = $row['condition_id'];
            }
            $this->conditions_values[$id_ebay_profile] = $ret;
        }
        return $this->conditions_values[$id_ebay_profile];
    }
Beispiel #3
0
 private function _displayFormItemsSpecifics()
 {
     // Smarty
     $template_vars = array('id_tab' => Tools::safeOutput(Tools::getValue('id_tab')), 'controller' => Tools::getValue('controller'), 'tab' => Tools::getValue('tab'), 'configure' => Tools::getValue('configure'), 'tab_module' => Tools::getValue('tab_module'), 'module_name' => Tools::getValue('module_name'), 'token' => Tools::getValue('token'), 'ebay_token' => Configuration::get('EBAY_SECURITY_TOKEN'), '_module_dir_' => _MODULE_DIR_, 'ebay_categories' => EbayCategoryConfiguration::getEbayCategories(), 'id_lang' => $this->context->cookie->id_lang, '_path' => $this->_path, 'possible_attributes' => AttributeGroup::getAttributesGroups($this->context->cookie->id_lang), 'possible_features' => Feature::getFeatures($this->context->cookie->id_lang, true), 'date' => pSQL(date('Ymdhis')), 'conditions' => $this->_translatePSConditions(EbayCategoryConditionConfiguration::getPSConditions()));
     $this->smarty->assign($template_vars);
     return $this->display(dirname(__FILE__), '/views/templates/hook/formItemsSpecifics.tpl');
 }