SELECT |
0.704 ms |
1 |
SELECT `ec`.*, `eci`.`sName`, `eci`.`sDescription`, `eci`.`sMetaDescription`, `eci`.`sCustomTitle`, `eci`.`sUID`, `l`.`nUID` AS `nLanguageID`, `l`.`sCode` FROM `eshop3_categories` AS `ec`
INNER JOIN `eshop3_categories_i18n` AS `eci` ON ec.nUID = eci.nCategoryID AND eci.nDeleted = 0
LEFT JOIN `languages` AS `l` ON eci.nLangID = l.nUID WHERE (ec.nDeleted = 0) AND (ec.nPublished = 1) AND (eci.sUID = 'fabrics-by-weight-season') LIMIT 1 |
SELECT |
0.256 ms |
1 |
SELECT `ec`.*, `eci`.`sName`, `eci`.`sCustomTitle`, `eci`.`sUID`, `eci`.`sDescription`, `eci`.`sMetaDescription` FROM `eshop3_categories` AS `ec`
INNER JOIN `eshop3_categories_i18n` AS `eci` ON ec.nUID = eci.nCategoryID AND eci.nLangID = 1 AND eci.nDeleted = 0
LEFT JOIN `eshop3_categories` AS `pn` ON ec.nParentID = pn.nUID WHERE (ec.nDeleted = 0) AND (IFNULL(pn.nDeleted, 0) = 0) ORDER BY IFNULL(pn.nOrder, 0), `ec`.`nOrder` ASC |
SELECT |
562.767 ms |
1 |
SELECT `ec`.`nUID` AS `nCategoryID`, `eci`.`sName` AS `sCategoryName`, `eci`.`sUID` AS `sCategorySUID`, `ecu`.`sLocale`, `ecu`.`sSymbol`, `ep`.`nTextileID`, `ep`.`sThumbExtension`, `ep`.`sThumbExtensionVersion`, `ep`.`sHoverExtension`, `ep`.`sHoverExtensionVersion`, `ep`.`nInStock`, `ep`.`bIsAvailable`, `ep`.`bIsVotable`, `ep`.`nRequireMeasures`, `ep`.`nProductPartID`, `epi`.`nProductID` AS `nUID`, `epi`.`sName`, `epi`.`sUID`, `eprws`.`nOrder` AS `sRwSubtypeOrder`, `eprwsi`.`sTitle` AS `sRwTitle`, `ed`.`dEndPeriod` AS `dDiscountEnd`, `eprii`.`nPrice`, `eprii_jacket`.`nPrice` AS `nJacketPrice`, `eprii_vest`.`nPrice` AS `nVestPrice`, `eprii_pants`.`nPrice` AS `nPantsPrice`, `ecpvp_default`.`nProductVariationID` AS `nDefaultVariationID`, `epvi_default`.`sName` AS `sVariationName`, `eprii_default_variation`.`nPrice` AS `nDefaultVariationPrice`, `edd_default_variation`.`sFormula` AS `sDiscount`, `et`.`sOriginFlag` AS `sTextileOriginFlag`, `eti`.`sOrigin` AS `sTextileOrigin`, `eps`.`sBackgroundColor` AS `sStatusBackgroundColor`, `epsi`.`sName` AS `sStatusName`, IF(couponDiscountData.sFormula IS NULL, ecpn.sFormula, couponDiscountData.sFormula) AS `sProductCoupon`, `ecpn`.`sCategoryDescription` AS `sCouponDescription`, `ecpn`.`nShowCalculatedPrice` FROM `eshop3_categories` AS `ec`
INNER JOIN `language_locales` AS `ll` ON ll.nPublished = 1 AND ll.nDeleted = 0
INNER JOIN `eshop3_conn_currency_locales` AS `eccl` ON ll.nUID = eccl.nLanguageLocaleID AND eccl.nDeleted = 0
INNER JOIN `eshop3_currencies` AS `ecu` ON ecu.nUID = eccl.nCurrencyID AND ecu.nPublished = 1 AND ecu.nDeleted = 0
INNER JOIN `eshop3_categories_i18n` AS `eci` ON ec.nUID = eci.nCategoryID AND eci.nLangID = ll.nLanguageID AND eci.nDeleted = 0
INNER JOIN `eshop3_conn_product_categories` AS `ecpc` ON ecpc.nCategoryID = eci.nCategoryID AND ecpc.nDeleted = 0
INNER JOIN `eshop3_products` AS `ep` ON ep.nUID = ecpc.nProductID AND ep.nPublished = 1 AND ep.nNotListed = 0
INNER JOIN `eshop3_products_i18n` AS `epi` ON epi.nProductID = ep.nUID AND epi.nLangID = ll.nLanguageID AND epi.nDeleted = 0
LEFT JOIN `eshop3_product_rw_subtypes` AS `eprws` ON ep.nRwSubtypeID = eprws.nUID AND epi.nLangID = ll.nLanguageID AND epi.nDeleted = 0
LEFT JOIN `eshop3_product_rw_subtypes_i18n` AS `eprwsi` ON eprwsi.nProductRwSubtypeID = eprws.nUID AND epi.nLangID = ll.nLanguageID AND epi.nDeleted = 0
INNER JOIN `eshop3_conn_product_prices` AS `ecpp` ON ep.nUID = ecpp.nProductID AND ecpp.nDeleted = 0
LEFT JOIN `eshop3_discounts` AS `ed` ON ecpp.nDiscountID = ed.nUID AND UNIX_TIMESTAMP(ed.dEndPeriod) >= UNIX_TIMESTAMP() AND ed.nPublished = 1 AND ed.nDeleted = 0
INNER JOIN `eshop3_prices` AS `epri` ON ecpp.nPriceID = epri.nUID AND epri.nDeleted = 0
INNER JOIN `eshop3_prices_data` AS `eprii` ON eprii.nPriceID = epri.nUID AND eprii.nCurrencyID = ecu.nUID AND eprii.nDeleted = 0
LEFT JOIN `eshop3_prices` AS `epri_jacket` ON ep.nJacketPriceID = epri_jacket.nUID AND epri_jacket.nDeleted = 0
LEFT JOIN `eshop3_prices_data` AS `eprii_jacket` ON epri_jacket.nUID = eprii_jacket.nPriceID AND eprii_jacket.nCurrencyID = eprii.nCurrencyID AND eprii_jacket.nDeleted = 0
LEFT JOIN `eshop3_prices` AS `epri_vest` ON ep.nVestPriceID = epri_vest.nUID AND epri_vest.nDeleted = 0
LEFT JOIN `eshop3_prices_data` AS `eprii_vest` ON epri_vest.nUID = eprii_vest.nPriceID AND eprii_vest.nCurrencyID = eprii.nCurrencyID AND eprii_vest.nDeleted = 0
LEFT JOIN `eshop3_prices` AS `epri_pants` ON ep.nPantsPriceID = epri_pants.nUID AND epri_pants.nDeleted = 0
LEFT JOIN `eshop3_prices_data` AS `eprii_pants` ON epri_pants.nUID = eprii_pants.nPriceID AND eprii_pants.nCurrencyID = eprii.nCurrencyID AND eprii_pants.nDeleted = 0
LEFT JOIN `eshop3_conn_product_variations_prices` AS `ecpvp_default` ON ecpvp_default.nDefault = 1 AND ecpvp_default.nPriceID IS NOT NULL AND ecpvp_default.nProductID = ep.nUID AND ecpvp_default.nDeleted = 0
LEFT JOIN `eshop3_product_variations_i18n` AS `epvi_default` ON epvi_default.nProductVariationID = ecpvp_default.nProductVariationID
LEFT JOIN `eshop3_prices_data` AS `eprii_default_variation` ON eprii_default_variation.nPriceID = ecpvp_default.nPriceID AND eprii_default_variation.nCurrencyID = eprii.nCurrencyID AND eprii_default_variation.nDeleted = 0
LEFT JOIN `eshop3_discounts_data` AS `edd_default_variation` ON edd_default_variation.nDiscountID = ed.nUID AND edd_default_variation.nProductVariationID = ecpvp_default.nProductVariationID AND edd_default_variation.nCurrencyID = ecu.nUID AND edd_default_variation.nDeleted = 0
LEFT JOIN `eshop3_textiles` AS `et` ON ep.nTextileID = et.nUID and et.nDeleted = 0 AND et.nPublished = 1
LEFT JOIN `eshop3_textiles_i18n` AS `eti` ON et.nUID = eti.nTextileID AND eti.nLangID = ll.nLanguageID AND eti.nDeleted = 0
LEFT JOIN `eshop3_product_statuses` AS `eps` ON ep.nStatusFlags = eps.nUID and eps.nPublished = 1 AND eps.nDeleted = 0
LEFT JOIN `eshop3_product_statuses_i18n` AS `epsi` ON eps.nUID = epsi.nProductStatusID AND epsi.nLangID = ll.nLanguageID AND epsi.nDeleted = 0
LEFT JOIN `eshop3_conn_coupon_category_products` AS `ecccp` ON ecccp.nUID = (SELECT `ecccp2`.`nUID` FROM `eshop3_conn_coupon_category_products` AS `ecccp2`
INNER JOIN `eshop3_coupons` AS `ec2` ON ec2.nUID = ecccp2.nCouponID
AND ec2.dStartPeriod <= NOW()
AND ec2.dEndPeriod >= NOW()
AND ec2.nDeleted = 0
AND ec2.nPublished = 1
AND ec2.sCategoryDescription IS NOT NULL
AND ec2.nSecretSale = 0 WHERE (ecccp2.nProductID = ep.nUID) AND (ecccp2.nDeleted = 0) AND (ec2.nCurrencyID = ecu.nUID) AND (IF (
(SELECT
COUNT(*)
FROM
eshop3_conn_coupon_variations
WHERE
nCouponID = ecccp2.nCouponID
AND nDeleted = 0) > 0 AND ep.nRequireMeasures = 1, (SELECT COUNT(*) FROM `eshop3_conn_coupon_variations` AS `eccv`
INNER JOIN `eshop3_conn_product_variations_prices` AS `ecpvp` ON eccv.nVariationID = ecpvp.nProductVariationID
AND ecpvp.nDeleted = 0
AND ecpvp.nPriceID IS NOT NULL WHERE (ecpvp.nProductID = ep.nUID) AND (eccv.nCouponID = ecccp2.nCouponID) AND (eccv.nDeleted = 0)), 1) > 0) ORDER BY `ec2`.`dEndPeriod` DESC LIMIT 1)
LEFT JOIN `eshop3_coupons` AS `ecpn` ON ecccp.nCouponID = ecpn.nUID
LEFT JOIN `eshop3_discounts` AS `couponDiscount` ON ecpn.nDiscountID = couponDiscount.nUID
AND couponDiscount.nPublished = 1
AND couponDiscount.nDeleted = 0
LEFT JOIN `eshop3_discounts_data` AS `couponDiscountData` ON couponDiscount.nUID = couponDiscountData.nDiscountID
AND couponDiscountData.nCurrencyID = ecu.nUID
AND couponDiscountData.nProductVariationID = ecpvp_default.nProductVariationID
AND couponDiscountData.nDeleted = 0 WHERE (ll.nUID = 1) AND (ec.nUID IN (73, 75, 74, 76)) GROUP BY `ep`.`nUID` ORDER BY `ep`.`bIsOutOfStock` ASC, `ep`.`bIsAvailable` DESC, `ep`.`nOrderPublic` ASC LIMIT 200 |