Example #1
0
    public static function getFields()
    {
        $fields = array('id_product' => '', 'id_supplier' => '', 'id_manufacturer' => '', 'id_category_default' => '', 'id_shop_default' => '', 'id_tax_rules_group' => '', 'on_sale' => '', 'online_only' => '', 'ean13' => '', 'upc' => '', 'ecotax' => '', 'quantity' => '', 'minimal_quantity' => '', 'price' => '', 'wholesale_price' => '', 'unity' => '', 'unit_price_ratio' => '', 'additional_shipping_cost' => '', 'reference' => '', 'supplier_reference' => '', 'location' => '', 'width' => '', 'height' => '', 'depth' => '', 'weight' => '', 'out_of_stock' => '', 'quantity_discount' => '', 'customizable' => '', 'uploadable_files' => '', 'text_fields' => '', 'active' => '', 'redirect_type' => '', 'id_product_redirected' => '', 'available_for_order' => '', 'available_date' => '', 'condition' => '', 'show_price' => '', 'indexed' => '', 'visibility' => '', 'cache_is_pack' => '', 'cache_has_attachments' => '', 'is_virtual' => '', 'cache_default_attribute' => '', 'date_add' => '', 'date_upd' => '', 'advanced_stock_management' => '', 'pack_stock_type' => '', 'id_shop' => '', 'id_lang' => '', 'description' => '', 'description_short' => '', 'link_rewrite' => '', 'meta_description' => '', 'meta_keywords' => '', 'meta_title' => '', 'name' => '', 'available_now' => '', 'available_later' => '', 'manufacturer_name' => '', 'supplier_name' => '', 'allow_oosp' => '', 'id_product_attribute' => '', 'category' => '', 'link' => '', 'attribute_price' => '', 'price_tax_exc' => '', 'price_without_reduction' => '', 'reduction' => '', 'specific_prices' => '', 'quantity_all_versions' => '', 'id_image' => '', 'virtual' => '', 'pack' => '', 'nopackprice' => '', 'customization_required' => '', 'rate' => '', 'tax_name' => '', 'img_link' => '', 'category_full' => '');
        $id_lang = Cmsearch::getLangId();
        $sql = 'SELECT name
				FROM `' . _DB_PREFIX_ . 'feature_lang`
				WHERE `id_lang` = ' . (int) $id_lang;
        $features = Db::getInstance()->executeS($sql);
        foreach ($features as $feature) {
            $fields['f_' . $feature['name']] = '';
        }
        return $fields;
    }
Example #2
0
 public static function getColor($id_attribute)
 {
     $sql = 'SELECT name, color
     FROM `' . _DB_PREFIX_ . 'attribute`, `' . _DB_PREFIX_ . 'attribute_lang`
     WHERE `' . _DB_PREFIX_ . 'attribute`.id_attribute = `' . _DB_PREFIX_ . 'attribute_lang`.id_attribute
     AND id_lang = ' . Cmsearch::getLangId() . '
     AND `' . _DB_PREFIX_ . 'attribute`.id_attribute = ' . $id_attribute;
     $row = Db::getInstance()->executeS($sql);
     return $row[0];
 }