Temple St Clair Logo
Search
Temple St. Clair
Locations
Shopping Bag


Scroll Up


					SELECT
						NavisionProductInfo.id, NavisionProductInfo.web_name, NavisionProductInfo.price_retail, NavisionProductInfo.group_id,
						WebProductSort.sort_weight, WebProductSort.web_product_image_id,
						WebProductImage.id, WebProductImage.navision_product_info_id, WebProductImage.name,
						WebProduct.sort_weight, WebProduct.status, WebProduct.exclusive,
						IFNULL(NavisionProductInfo.group_id,UUID()) as group_id,
						NavisionProductGroup.total_products, NavisionProductGroup.min_price, NavisionProductGroup.max_price, NavisionProductGroup.web_name, NavisionProductGroup.web_product_image_id, NavisionProductGroup.type,
						NavisionClassification.web_sort_weight, NavisionCollection.web_sort_weight, NavisionProductInfo.id,
						WebProductGroupImage.`navision_product_info_id`,
						WebProductSortImage.`navision_product_info_id`
					FROM
						navision_product_infos NavisionProductInfo
							LEFT JOIN web_products WebProduct on NavisionProductInfo.id=WebProduct.navision_product_info_id
							LEFT JOIN web_product_images WebProductImage on NavisionProductInfo.id=WebProductImage.navision_product_info_id AND WebProductImage.primary="YES"
							LEFT JOIN navision_product_groups NavisionProductGroup ON NavisionProductInfo.group_id=NavisionProductGroup.navision_product_info_id
								LEFT JOIN web_product_images WebProductGroupImage ON NavisionProductGroup.web_product_image_id=WebProductGroupImage.id
							LEFT JOIN navision_collections NavisionCollection on NavisionProductInfo.collection_1=NavisionCollection.name
							LEFT JOIN navision_classifications NavisionClassification on NavisionProductInfo.classification=NavisionClassification.name
							LEFT JOIN web_product_sorts WebProductSort on NavisionProductInfo.group_id=WebProductSort.navision_product_info_id AND WebProductSort.navision_classification_id=40
								LEFT JOIN web_product_images WebProductSortImage ON WebProductSort.web_product_image_id=WebProductSortImage.id
					WHERE
						(NavisionProductInfo.status='ACTIVECORE' or NavisionProductInfo.status='ACTIVESPEC' or NavisionProductInfo.status='NEWCOLL') and NavisionProductInfo.number_in_stock>0 and NavisionProductInfo.price_retail>0 and (  NavisionProductInfo.classification='AMULETS')
					GROUP BY
						group_id
					ORDER BY 
						WebProduct.sort_weight DESC
					LIMIT
						150