Default Category

SELECT DISTINCT `e`.`entity_id`, `e`.`type_id`, `e`.`attribute_set_id`, `cat_index`.`position` AS `cat_index_position`, `e`.`name`, `e`.`short_description`, `e`.`sku`, `e`.`price`, `e`.`special_price`, `e`.`special_from_date`, `e`.`special_to_date`, `e`.`small_image`, `e`.`thumbnail`, `e`.`news_from_date`, `e`.`news_to_date`, `e`.`status`, `e`.`url_key`, `e`.`required_options`, `e`.`image_label`, `e`.`small_image_label`, `e`.`thumbnail_label`, `e`.`msrp_enabled`, `e`.`msrp_display_actual_price_type`, `e`.`msrp`, `e`.`tax_class_id`, `e`.`price_type`, `e`.`weight_type`, `e`.`price_view`, `e`.`shipment_type`, `e`.`links_purchased_separately`, `e`.`links_exist`, `e`.`c2c_sku_nav`, `e`.`c2c_height_from_seat_pad`, `e`.`c2c_overall_length`, `e`.`c2c_colour`, `e`.`c2c_colour_value`, `e`.`table_width`, `e`.`table_width_value`, `e`.`table_length`, `e`.`table_length_value`, `e`.`style`, `e`.`style_value`, `e`.`bed_material`, `e`.`bed_material_value`, `e`.`bar_stool_height`, `e`.`bar_stool_height_value`, `e`.`bar_stool_seat_width`, `e`.`bar_stool_seat_width_value`, `e`.`estimated_delivery`, `e`.`comfort_grade`, `e`.`comfort_grade_value`, `e`.`mattress_type`, `e`.`mattress_type_value`, `e`.`mattress_depth`, `e`.`mattress_depth_value`, `e`.`mattresstype`, `e`.`firstswatchvalue`, `e`.`volume_weight`, `price_index`.`price`, `price_index`.`tax_class_id`, `price_index`.`final_price`, IF(price_index.tier_price IS NOT NULL, LEAST(price_index.min_price, price_index.tier_price), price_index.min_price) AS `minimal_price`, `price_index`.`min_price`, `price_index`.`max_price`, `price_index`.`tier_price`, `amlanding_cp`.`position`, `amlanding_cp`.`category_id`, IF(`e`.`type_id` = 'simple', `css1`.qty + position, sum(css2.qty) + position) AS `qty_position` FROM `mgju_catalog_product_flat_1` AS `e`
 INNER JOIN `mgju_catalog_category_product_index` AS `cat_index` ON cat_index.product_id=e.entity_id AND cat_index.store_id='1' AND cat_index.visibility IN(2, 4) AND cat_index.category_id = '2'
 INNER JOIN `mgju_catalog_product_index_price` AS `price_index` ON price_index.entity_id = e.entity_id AND price_index.website_id = '1' AND price_index.customer_group_id = 0
 INNER JOIN `mgju_catalog_category_product` AS `amlanding_cp` ON amlanding_cp.product_id = e.entity_id AND amlanding_cp.category_id IN ('1', '2', '9', '13', '21', '26', '32', '33', '37', '45', '48', '59', '69', '74', '81', '86', '93', '97', '98', '99', '10', '11', '12', '14', '15', '16', '17', '18', '19', '20', '22', '23', '24', '34', '35', '36', '38', '39', '40', '47', '49', '50', '51', '52', '53', '54', '55', '56', '57', '58', '60', '61', '62', '63', '64', '65', '66', '67', '70', '72', '75', '76', '77', '78', '79', '80', '82', '83', '84', '85', '87', '88', '89', '90', '91', '92', '94', '95', '96')
 LEFT JOIN `mgju_catalog_product_index_eav` AS `seo_colour_amlanding_idx5d067f54d1bc0` ON seo_colour_amlanding_idx5d067f54d1bc0.entity_id = e.entity_id AND seo_colour_amlanding_idx5d067f54d1bc0.attribute_id = '219' AND seo_colour_amlanding_idx5d067f54d1bc0.store_id = 1 AND `seo_colour_amlanding_idx5d067f54d1bc0`.`value`='454'
 LEFT JOIN `mgju_cataloginventory_stock_status` AS `css1` ON e.entity_id = css1.product_id and css1.stock_id =1 AND css1.website_id=1
 LEFT JOIN `mgju_catalog_product_super_link` AS `cpsl` ON cpsl.parent_id = e.entity_id
 LEFT JOIN `mgju_cataloginventory_stock_status` AS `css2` ON css2.product_id = cpsl.product_id and css1.stock_id =1 AND css1.website_id=1
 LEFT JOIN `mgju_catalog_product_entity_int` AS `cpei` ON cpei.entity_id = cpsl.product_id AND cpei.entity_type_id = 4 and cpei.attribute_id = 96 WHERE (e.status = 1) AND ((`seo_colour_amlanding_idx5d067f54d1bc0`.`value`='454')) AND ((cpei.value IS NULL or cpei.value=1)) GROUP BY `e`.`entity_id` ORDER BY `qty_position` DESC, `max_price` ASC LIMIT 24

SQLSTATE[23000]: Integrity constraint violation: 1052 Column 'position' in field list is ambiguous, query was: SELECT DISTINCT `e`.`entity_id`, `e`.`type_id`, `e`.`attribute_set_id`, `cat_index`.`position` AS `cat_index_position`, `e`.`name`, `e`.`short_description`, `e`.`sku`, `e`.`price`, `e`.`special_price`, `e`.`special_from_date`, `e`.`special_to_date`, `e`.`small_image`, `e`.`thumbnail`, `e`.`news_from_date`, `e`.`news_to_date`, `e`.`status`, `e`.`url_key`, `e`.`required_options`, `e`.`image_label`, `e`.`small_image_label`, `e`.`thumbnail_label`, `e`.`msrp_enabled`, `e`.`msrp_display_actual_price_type`, `e`.`msrp`, `e`.`tax_class_id`, `e`.`price_type`, `e`.`weight_type`, `e`.`price_view`, `e`.`shipment_type`, `e`.`links_purchased_separately`, `e`.`links_exist`, `e`.`c2c_sku_nav`, `e`.`c2c_height_from_seat_pad`, `e`.`c2c_overall_length`, `e`.`c2c_colour`, `e`.`c2c_colour_value`, `e`.`table_width`, `e`.`table_width_value`, `e`.`table_length`, `e`.`table_length_value`, `e`.`style`, `e`.`style_value`, `e`.`bed_material`, `e`.`bed_material_value`, `e`.`bar_stool_height`, `e`.`bar_stool_height_value`, `e`.`bar_stool_seat_width`, `e`.`bar_stool_seat_width_value`, `e`.`estimated_delivery`, `e`.`comfort_grade`, `e`.`comfort_grade_value`, `e`.`mattress_type`, `e`.`mattress_type_value`, `e`.`mattress_depth`, `e`.`mattress_depth_value`, `e`.`mattresstype`, `e`.`firstswatchvalue`, `e`.`volume_weight`, `price_index`.`price`, `price_index`.`tax_class_id`, `price_index`.`final_price`, IF(price_index.tier_price IS NOT NULL, LEAST(price_index.min_price, price_index.tier_price), price_index.min_price) AS `minimal_price`, `price_index`.`min_price`, `price_index`.`max_price`, `price_index`.`tier_price`, `amlanding_cp`.`position`, `amlanding_cp`.`category_id`, IF(`e`.`type_id` = 'simple', `css1`.qty + position, sum(css2.qty) + position) AS `qty_position` FROM `mgju_catalog_product_flat_1` AS `e`
 INNER JOIN `mgju_catalog_category_product_index` AS `cat_index` ON cat_index.product_id=e.entity_id AND cat_index.store_id='1' AND cat_index.visibility IN(2, 4) AND cat_index.category_id = '2'
 INNER JOIN `mgju_catalog_product_index_price` AS `price_index` ON price_index.entity_id = e.entity_id AND price_index.website_id = '1' AND price_index.customer_group_id = 0
 INNER JOIN `mgju_catalog_category_product` AS `amlanding_cp` ON amlanding_cp.product_id = e.entity_id AND amlanding_cp.category_id IN ('1', '2', '9', '13', '21', '26', '32', '33', '37', '45', '48', '59', '69', '74', '81', '86', '93', '97', '98', '99', '10', '11', '12', '14', '15', '16', '17', '18', '19', '20', '22', '23', '24', '34', '35', '36', '38', '39', '40', '47', '49', '50', '51', '52', '53', '54', '55', '56', '57', '58', '60', '61', '62', '63', '64', '65', '66', '67', '70', '72', '75', '76', '77', '78', '79', '80', '82', '83', '84', '85', '87', '88', '89', '90', '91', '92', '94', '95', '96')
 LEFT JOIN `mgju_catalog_product_index_eav` AS `seo_colour_amlanding_idx5d067f54d1bc0` ON seo_colour_amlanding_idx5d067f54d1bc0.entity_id = e.entity_id AND seo_colour_amlanding_idx5d067f54d1bc0.attribute_id = '219' AND seo_colour_amlanding_idx5d067f54d1bc0.store_id = 1 AND `seo_colour_amlanding_idx5d067f54d1bc0`.`value`='454'
 LEFT JOIN `mgju_cataloginventory_stock_status` AS `css1` ON e.entity_id = css1.product_id and css1.stock_id =1 AND css1.website_id=1
 LEFT JOIN `mgju_catalog_product_super_link` AS `cpsl` ON cpsl.parent_id = e.entity_id
 LEFT JOIN `mgju_cataloginventory_stock_status` AS `css2` ON css2.product_id = cpsl.product_id and css1.stock_id =1 AND css1.website_id=1
 LEFT JOIN `mgju_catalog_product_entity_int` AS `cpei` ON cpei.entity_id = cpsl.product_id AND cpei.entity_type_id = 4 and cpei.attribute_id = 96 WHERE (e.status = 1) AND ((`seo_colour_amlanding_idx5d067f54d1bc0`.`value`='454')) AND ((cpei.value IS NULL or cpei.value=1)) GROUP BY `e`.`entity_id` ORDER BY `qty_position` DESC, `max_price` ASC LIMIT 24

#0 /home/furnishyourhomec/public_html/lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)
#1 /home/furnishyourhomec/public_html/app/code/core/Zend/Db/Statement.php(291): Varien_Db_Statement_Pdo_Mysql->_execute(Array)
#2 /home/furnishyourhomec/public_html/lib/Zend/Db/Adapter/Abstract.php(480): Zend_Db_Statement->execute(Array)
#3 /home/furnishyourhomec/public_html/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('SELECT DISTINCT...', Array)
#4 /home/furnishyourhomec/public_html/lib/Varien/Db/Adapter/Pdo/Mysql.php(504): Zend_Db_Adapter_Pdo_Abstract->query('SELECT DISTINCT...', Array)
#5 /home/furnishyourhomec/public_html/lib/Zend/Db/Adapter/Abstract.php(737): Varien_Db_Adapter_Pdo_Mysql->query('SELECT DISTINCT...', Array)
#6 /home/furnishyourhomec/public_html/lib/Varien/Data/Collection/Db.php(740): Zend_Db_Adapter_Abstract->fetchAll('SELECT DISTINCT...', Array)
#7 /home/furnishyourhomec/public_html/app/code/core/Mage/Eav/Model/Entity/Collection/Abstract.php(1046): Varien_Data_Collection_Db->_fetchAll('SELECT DISTINCT...')
#8 /home/furnishyourhomec/public_html/app/code/core/Mage/Eav/Model/Entity/Collection/Abstract.php(871): Mage_Eav_Model_Entity_Collection_Abstract->_loadEntities(false, false)
#9 /home/furnishyourhomec/public_html/app/code/core/Mage/Review/Model/Observer.php(78): Mage_Eav_Model_Entity_Collection_Abstract->load()
#10 /home/furnishyourhomec/public_html/app/code/core/Mage/Core/Model/App.php(1358): Mage_Review_Model_Observer->catalogBlockProductCollectionBeforeToHtml(Object(Varien_Event_Observer))
#11 /home/furnishyourhomec/public_html/app/code/core/Mage/Core/Model/App.php(1331): Mage_Core_Model_App->_callObserverMethod(Object(Mage_Review_Model_Observer), 'catalogBlockPro...', Object(Varien_Event_Observer))
#12 /home/furnishyourhomec/public_html/app/Mage.php(448): Mage_Core_Model_App->dispatchEvent('catalog_block_p...', Array)
#13 /home/furnishyourhomec/public_html/app/code/core/Mage/Catalog/Block/Product/List.php(161): Mage::dispatchEvent('catalog_block_p...', Array)
#14 /home/furnishyourhomec/public_html/app/code/core/Mage/Core/Block/Abstract.php(922): Mage_Catalog_Block_Product_List->_beforeToHtml()
#15 /home/furnishyourhomec/public_html/app/code/core/Mage/Core/Block/Text/List.php(43): Mage_Core_Block_Abstract->toHtml()
#16 /home/furnishyourhomec/public_html/app/code/core/Mage/Core/Block/Abstract.php(923): Mage_Core_Block_Text_List->_toHtml()
#17 /home/furnishyourhomec/public_html/app/code/core/Mage/Core/Block/Text/List.php(43): Mage_Core_Block_Abstract->toHtml()
#18 /home/furnishyourhomec/public_html/app/code/core/Mage/Core/Block/Abstract.php(923): Mage_Core_Block_Text_List->_toHtml()
#19 /home/furnishyourhomec/public_html/app/code/core/Mage/Core/Block/Abstract.php(641): Mage_Core_Block_Abstract->toHtml()
#20 /home/furnishyourhomec/public_html/app/code/core/Mage/Core/Block/Abstract.php(585): Mage_Core_Block_Abstract->_getChildHtml('content', true)
#21 /home/furnishyourhomec/public_html/app/design/frontend/ultimo/furnishyourhome/template/page/2columns-left.phtml(58): Mage_Core_Block_Abstract->getChildHtml('content')
#22 /home/furnishyourhomec/public_html/app/code/core/Mage/Core/Block/Template.php(241): include('/home/furnishyo...')
#23 /home/furnishyourhomec/public_html/app/code/core/Mage/Core/Block/Template.php(272): Mage_Core_Block_Template->fetchView('frontend/ultimo...')
#24 /home/furnishyourhomec/public_html/app/code/core/Mage/Core/Block/Template.php(286): Mage_Core_Block_Template->renderView()
#25 /home/furnishyourhomec/public_html/app/code/core/Mage/Core/Block/Abstract.php(923): Mage_Core_Block_Template->_toHtml()
#26 /home/furnishyourhomec/public_html/app/code/core/Mage/Core/Model/Layout.php(555): Mage_Core_Block_Abstract->toHtml()
#27 /home/furnishyourhomec/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(390): Mage_Core_Model_Layout->getOutput()
#28 /home/furnishyourhomec/public_html/app/code/local/Amasty/Xlanding/controllers/PageController.php(157): Mage_Core_Controller_Varien_Action->renderLayout()
#29 /home/furnishyourhomec/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Amasty_Xlanding_PageController->viewAction()
#30 /home/furnishyourhomec/public_html/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(254): Mage_Core_Controller_Varien_Action->dispatch('view')
#31 /home/furnishyourhomec/public_html/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#32 /home/furnishyourhomec/public_html/app/code/core/Mage/Core/Model/App.php(365): Mage_Core_Controller_Varien_Front->dispatch()
#33 /home/furnishyourhomec/public_html/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#34 /home/furnishyourhomec/public_html/index.php(82): Mage::run('', 'store')
#35 {main}