Unknown column 'categpos' in 'order clause'<br /><br /><pre>
SELECT
p.*, product_shop.*, stock.out_of_stock, IFNULL(stock.quantity, 0) as quantity, pl.`description`, pl.`description_short`, pl.`available_now`, pl.`available_later`,
IFNULL(product_attribute_shop.id_product_attribute, 0) id_product_attribute,
pl.`link_rewrite`, pl.`meta_description`, pl.`meta_keywords`, pl.`meta_title`,
pl.`name`, image_shop.`id_image` id_image, il.`legend`, m.`name` AS manufacturer_name,
DATEDIFF(
p.`date_add`,
DATE_SUB(
"2024-03-19 00:00:00",
INTERVAL 20 DAY
)
) > 0 AS new
FROM `ps_product` p
INNER JOIN ps_product_shop product_shop
ON (product_shop.id_product = p.id_product AND product_shop.id_shop = 5)
LEFT JOIN `ps_product_attribute_shop` product_attribute_shop
ON (p.`id_product` = product_attribute_shop.`id_product` AND product_attribute_shop.`default_on` = 1 AND product_attribute_shop.id_shop=5)
LEFT JOIN ps_stock_available stock
ON (stock.id_product = `p`.id_product AND stock.id_product_attribute = 0 AND stock.id_shop = 5 AND stock.id_shop_group = 0 )
LEFT JOIN `ps_product_lang` pl ON (
p.`id_product` = pl.`id_product`
AND pl.`id_lang` = 1 AND pl.id_shop = 5
)
LEFT JOIN `ps_image_shop` image_shop
ON (image_shop.`id_product` = p.`id_product` AND image_shop.cover=1 AND image_shop.id_shop=5)
LEFT JOIN `ps_image_lang` il ON (image_shop.`id_image` = il.`id_image` AND il.`id_lang` = 1)
LEFT JOIN `ps_manufacturer` m ON (m.`id_manufacturer` = p.`id_manufacturer`)
WHERE product_shop.`active` = 1
AND product_shop.`show_price` = 1
AND product_shop.`visibility` IN ("both", "catalog")
AND p.`id_product` IN (0, 0, 8264, 8264, 8168, 8168, 8045, 8045, 8086, 8086, 8087, 8087, 8088, 8088, 8089, 8089, 8170, 8170, 8171, 8171, 8172, 8172, 8173, 8173, 8174, 8174, 8060, 8060, 8150, 8150, 8148, 8148, 8274, 8274, 8280, 8280, 8293, 8293, 8294, 8294, 8295, 8295, 8296, 8296, 8299, 8299, 8300, 8300, 8303, 8303, 8302, 8302, 8301, 8301, 8298, 8298, 8309, 8309, 3658, 3658, 3659, 3659, 8281, 8281, 8290, 8290, 8283, 8283, 8289, 8289, 8291, 8291, 8292, 8292, 8326, 8326, 8325, 8325, 8327, 8327, 8328, 8328, 8324, 8324, 8331, 8331, 8335, 8335, 8336, 8336, 8337, 8337, 8287, 8287, 8284, 8284, 8340, 8340, 8113, 8113, 8330, 8330, 7576, 7576, 2259, 2259, 8227, 8227, 8226, 8226, 2388, 2388, 8314, 8314, 8234, 8234, 2198, 2198, 2199, 2199, 2197, 2197, 8239, 8239, 8279, 8279, 8241, 8241, 8286, 8286, 8240, 8240, 8164, 8164, 8238, 8238, 8066, 8066, 8319, 8319, 8320, 8320, 8321, 8321, 8322, 8322, 8308, 8308, 8272, 8272, 8186, 8186, 8184, 8184, 2285, 2285, 7578, 7578, 8073, 8073, 8134, 8134, 8133, 8133, 8282, 8282, 8288, 8288, 8232, 8232, 7581, 7581, 8233, 8233, 8131, 8131, 8317, 8317, 8329, 8329, 2177, 2177, 2154, 2154, 2157, 2157, 2161, 2161, 8051, 8051, 2180, 2180, 2184, 2184, 2173, 2173, 8263, 8263, 3231, 3231, 8050, 8050, 7579, 7579, 8102, 8102, 7584, 7584, 7583, 7583, 7588, 7588, 7585, 7585, 8103, 8103, 7587, 7587, 8101, 8101, 7586, 7586, 8104, 8104, 8128, 8128, 8235, 8235, 8253, 8253, 8129, 8129, 8254, 8254, 8255, 8255, 8077, 8077, 8080, 8080, 8075, 8075, 2205, 2205, 8078, 8078, 8076, 8076, 8079, 8079, 8119, 8119, 8118, 8118, 8120, 8120, 8127, 8127, 2222, 2222, 2223, 2223, 8243, 8243, 8244, 8244, 8245, 8245, 8246, 8246, 8247, 8247, 8248, 8248, 8110, 8110, 8111, 8111, 8237, 8237, 8339, 8339, 2234, 2234, 3582, 3582, 8160, 8160, 6284, 6284, 8159, 8159, 8161, 8161, 7582, 7582, 8044, 8044, 8047, 8047, 8046, 8046, 7591, 7591, 8074, 8074, 8230, 8230, 8231, 8231, 8312, 8312, 2264, 2264, 2266, 2266, 2274, 2274, 2275, 2275, 2277, 2277, 2279, 2279, 8055, 8055, 8056, 8056, 8156, 8156, 8242, 8242, 8252, 8252, 8315, 8315, 2295, 2295, 2249, 2249, 2344, 2344, 8084, 8084, 8085, 8085, 8082, 8082, 8081, 8081, 2152, 2152, 2175, 2175, 2153, 2153, 2176, 2176, 2155, 2155, 2156, 2156, 2178, 2178, 2158, 2158, 2179, 2179, 2181, 2181, 2182, 2182, 2159, 2159, 2183, 2183, 2160, 2160, 2185, 2185, 2162, 2162, 2186, 2186, 2163, 2163, 2187, 2187, 2164, 2164, 8140, 8140, 8090, 8090, 8098, 8098, 8115, 8115, 8142, 8142, 8116, 8116, 8117, 8117, 8099, 8099, 8136, 8136, 8100, 8100, 8137, 8137, 8138, 8138, 8092, 8092, 8275, 8275, 8276, 8276, 2194, 2194, 2195, 2195, 8277, 8277, 2196, 2196, 2200, 2200, 2209, 2209, 2204, 2204, 2201, 2201, 2202, 2202, 3592, 3592, 2203, 2203, 2208, 2208, 2358, 2358, 8057, 8057, 8106, 8106, 6430, 6430, 8107, 8107, 8108, 8108, 8109, 8109, 2206, 2206, 2207, 2207, 3927, 3927, 3233, 3233, 8105, 8105, 2210, 2210, 2211, 2211, 2212, 2212, 2216, 2216, 2217, 2217, 2213, 2213, 2218, 2218, 2214, 2214, 2215, 2215, 2219, 2219, 2220, 2220, 7574, 7574, 2221, 2221, 8036, 8036, 2224, 2224, 2225, 2225, 8052, 8052, 2309, 2309, 8144, 8144, 2310, 2310, 8143, 8143, 8236, 8236, 3238, 3238, 2244, 2244, 2233, 2233, 2349, 2349, 2350, 2350, 3627, 3627, 2351, 2351, 2352, 2352, 8169, 8169, 2245, 2245, 2353, 2353, 2354, 2354, 2235, 2235, 2360, 2360, 2361, 2361, 2239, 2239, 3626, 3626, 4173, 4173, 2241, 2241, 8125, 8125, 2243, 2243, 2356, 2356, 2231, 2231, 7589, 7589, 2230, 2230, 7590, 7590, 8053, 8053, 8054, 8054, 8249, 8249, 8250, 8250, 8251, 8251, 8258, 8258, 8278, 8278, 7356, 7356, 8305, 8305, 8306, 8306, 8316, 8316, 2232, 2232, 2227, 2227, 2228, 2228, 2229, 2229, 8096, 8096, 2262, 2262, 2252, 2252, 2253, 2253, 2255, 2255, 2254, 2254, 2265, 2265, 2267, 2267, 2381, 2381, 2382, 2382, 2383, 2383, 2384, 2384, 2268, 2268, 2385, 2385, 2386, 2386, 2271, 2271, 3656, 3656, 3657, 3657, 8034, 8034, 8058, 8058, 5008, 5008, 5385, 5385, 2276, 2276, 2278, 2278, 8062, 8062, 2280, 2280, 2281, 2281, 8061, 8061, 8063, 8063, 8064, 8064, 8175, 8175, 8176, 8176, 8177, 8177, 8178, 8178, 8179, 8179, 8180, 8180, 8216, 8216, 5010, 5010, 8217, 8217, 8218, 8218, 8219, 8219, 2286, 2286, 8220, 8220, 2287, 2287, 8221, 8221, 2288, 2288, 2289, 2289, 2290, 2290, 8225, 8225, 2291, 2291, 8228, 8228, 8229, 8229, 2293, 2293, 7577, 7577, 7575, 7575, 8094, 8094, 8095, 8095, 2172, 2172, 8270, 8270, 8271, 8271, 8304, 8304, 8123, 8123, 8124, 8124, 8121, 8121, 8122, 8122, 8187, 8187, 6429, 6429, 2359, 2359)
AND EXISTS(SELECT 1 FROM `ps_category_product` cp
JOIN `ps_category_group` cg ON (cp.id_category = cg.id_category AND cg.`id_group` =1)
WHERE cp.`id_product` = p.`id_product`)
ORDER BY categpos asc
LIMIT 0, 1000</pre>
at line 769 in file classes/db/Db.php
764. if ($webservice_call && $errno) {
765. $dbg = debug_backtrace();
766. WebserviceRequest::getInstance()->setError(500, '[SQL Error] ' . $this->getMsgError() . '. From ' . (isset($dbg[3]['class']) ? $dbg[3]['class'] : '') . '->' . $dbg[3]['function'] . '() Query was : ' . $sql, 97);
767. } elseif (_PS_DEBUG_SQL_ && $errno && !defined('PS_INSTALLATION_IN_PROGRESS')) {
768. if ($sql) {
769. throw new PrestaShopDatabaseException($this->getMsgError() . '<br /><br /><pre>' . $sql . '</pre>');
770. }
771.
772. throw new PrestaShopDatabaseException($this->getMsgError());
773. }
774. }
380. $this->result = $this->_query($sql);
381. }
382. }
383.
384. if (_PS_DEBUG_SQL_) {
385. $this->displayError($sql);
386. }
387.
388. return $this->result;
389. }
390.
Argument [0] SELECT p.*, product_shop.*, stock.out_of_stock, IFNULL(stock.quantity, 0) as quantity, pl.`description`, pl.`description_short`, pl.`available_now`, pl.`available_later`, IFNULL(product_attribute_shop.id_product_attribute, 0) id_product_attribute, pl.`link_rewrite`, pl.`meta_description`, pl.`meta_keywords`, pl.`meta_title`, pl.`name`, image_shop.`id_image` id_image, il.`legend`, m.`name` AS manufacturer_name, DATEDIFF( p.`date_add`, DATE_SUB( "2024-03-19 00:00:00", INTERVAL 20 DAY ) ) > 0 AS new FROM `ps_product` p INNER JOIN ps_product_shop product_shop ON (product_shop.id_product = p.id_product AND product_shop.id_shop = 5) LEFT JOIN `ps_product_attribute_shop` product_attribute_shop ON (p.`id_product` = product_attribute_shop.`id_product` AND product_attribute_shop.`default_on` = 1 AND product_attribute_shop.id_shop=5) LEFT JOIN ps_stock_available stock ON (stock.id_product = `p`.id_product AND stock.id_product_attribute = 0 AND stock.id_shop = 5 AND stock.id_shop_group = 0 ) LEFT JOIN `ps_product_lang` pl ON ( p.`id_product` = pl.`id_product` AND pl.`id_lang` = 1 AND pl.id_shop = 5 ) LEFT JOIN `ps_image_shop` image_shop ON (image_shop.`id_product` = p.`id_product` AND image_shop.cover=1 AND image_shop.id_shop=5) LEFT JOIN `ps_image_lang` il ON (image_shop.`id_image` = il.`id_image` AND il.`id_lang` = 1) LEFT JOIN `ps_manufacturer` m ON (m.`id_manufacturer` = p.`id_manufacturer`) WHERE product_shop.`active` = 1 AND product_shop.`show_price` = 1 AND product_shop.`visibility` IN ("both", "catalog") AND p.`id_product` IN (0, 0, 8264, 8264, 8168, 8168, 8045, 8045, 8086, 8086, 8087, 8087, 8088, 8088, 8089, 8089, 8170, 8170, 8171, 8171, 8172, 8172, 8173, 8173, 8174, 8174, 8060, 8060, 8150, 8150, 8148, 8148, 8274, 8274, 8280, 8280, 8293, 8293, 8294, 8294, 8295, 8295, 8296, 8296, 8299, 8299, 8300, 8300, 8303, 8303, 8302, 8302, 8301, 8301, 8298, 8298, 8309, 8309, 3658, 3658, 3659, 3659, 8281, 8281, 8290, 8290, 8283, 8283, 8289, 8289, 8291, 8291, 8292, 8292, 8326, 8326, 8325, 8325, 8327, 8327, 8328, 8328, 8324, 8324, 8331, 8331, 8335, 8335, 8336, 8336, 8337, 8337, 8287, 8287, 8284, 8284, 8340, 8340, 8113, 8113, 8330, 8330, 7576, 7576, 2259, 2259, 8227, 8227, 8226, 8226, 2388, 2388, 8314, 8314, 8234, 8234, 2198, 2198, 2199, 2199, 2197, 2197, 8239, 8239, 8279, 8279, 8241, 8241, 8286, 8286, 8240, 8240, 8164, 8164, 8238, 8238, 8066, 8066, 8319, 8319, 8320, 8320, 8321, 8321, 8322, 8322, 8308, 8308, 8272, 8272, 8186, 8186, 8184, 8184, 2285, 2285, 7578, 7578, 8073, 8073, 8134, 8134, 8133, 8133, 8282, 8282, 8288, 8288, 8232, 8232, 7581, 7581, 8233, 8233, 8131, 8131, 8317, 8317, 8329, 8329, 2177, 2177, 2154, 2154, 2157, 2157, 2161, 2161, 8051, 8051, 2180, 2180, 2184, 2184, 2173, 2173, 8263, 8263, 3231, 3231, 8050, 8050, 7579, 7579, 8102, 8102, 7584, 7584, 7583, 7583, 7588, 7588, 7585, 7585, 8103, 8103, 7587, 7587, 8101, 8101, 7586, 7586, 8104, 8104, 8128, 8128, 8235, 8235, 8253, 8253, 8129, 8129, 8254, 8254, 8255, 8255, 8077, 8077, 8080, 8080, 8075, 8075, 2205, 2205, 8078, 8078, 8076, 8076, 8079, 8079, 8119, 8119, 8118, 8118, 8120, 8120, 8127, 8127, 2222, 2222, 2223, 2223, 8243, 8243, 8244, 8244, 8245, 8245, 8246, 8246, 8247, 8247, 8248, 8248, 8110, 8110, 8111, 8111, 8237, 8237, 8339, 8339, 2234, 2234, 3582, 3582, 8160, 8160, 6284, 6284, 8159, 8159, 8161, 8161, 7582, 7582, 8044, 8044, 8047, 8047, 8046, 8046, 7591, 7591, 8074, 8074, 8230, 8230, 8231, 8231, 8312, 8312, 2264, 2264, 2266, 2266, 2274, 2274, 2275, 2275, 2277, 2277, 2279, 2279, 8055, 8055, 8056, 8056, 8156, 8156, 8242, 8242, 8252, 8252, 8315, 8315, 2295, 2295, 2249, 2249, 2344, 2344, 8084, 8084, 8085, 8085, 8082, 8082, 8081, 8081, 2152, 2152, 2175, 2175, 2153, 2153, 2176, 2176, 2155, 2155, 2156, 2156, 2178, 2178, 2158, 2158, 2179, 2179, 2181, 2181, 2182, 2182, 2159, 2159, 2183, 2183, 2160, 2160, 2185, 2185, 2162, 2162, 2186, 2186, 2163, 2163, 2187, 2187, 2164, 2164, 8140, 8140, 8090, 8090, 8098, 8098, 8115, 8115, 8142, 8142, 8116, 8116, 8117, 8117, 8099, 8099, 8136, 8136, 8100, 8100, 8137, 8137, 8138, 8138, 8092, 8092, 8275, 8275, 8276, 8276, 2194, 2194, 2195, 2195, 8277, 8277, 2196, 2196, 2200, 2200, 2209, 2209, 2204, 2204, 2201, 2201, 2202, 2202, 3592, 3592, 2203, 2203, 2208, 2208, 2358, 2358, 8057, 8057, 8106, 8106, 6430, 6430, 8107, 8107, 8108, 8108, 8109, 8109, 2206, 2206, 2207, 2207, 3927, 3927, 3233, 3233, 8105, 8105, 2210, 2210, 2211, 2211, 2212, 2212, 2216, 2216, 2217, 2217, 2213, 2213, 2218, 2218, 2214, 2214, 2215, 2215, 2219, 2219, 2220, 2220, 7574, 7574, 2221, 2221, 8036, 8036, 2224, 2224, 2225, 2225, 8052, 8052, 2309, 2309, 8144, 8144, 2310, 2310, 8143, 8143, 8236, 8236, 3238, 3238, 2244, 2244, 2233, 2233, 2349, 2349, 2350, 2350, 3627, 3627, 2351, 2351, 2352, 2352, 8169, 8169, 2245, 2245, 2353, 2353, 2354, 2354, 2235, 2235, 2360, 2360, 2361, 2361, 2239, 2239, 3626, 3626, 4173, 4173, 2241, 2241, 8125, 8125, 2243, 2243, 2356, 2356, 2231, 2231, 7589, 7589, 2230, 2230, 7590, 7590, 8053, 8053, 8054, 8054, 8249, 8249, 8250, 8250, 8251, 8251, 8258, 8258, 8278, 8278, 7356, 7356, 8305, 8305, 8306, 8306, 8316, 8316, 2232, 2232, 2227, 2227, 2228, 2228, 2229, 2229, 8096, 8096, 2262, 2262, 2252, 2252, 2253, 2253, 2255, 2255, 2254, 2254, 2265, 2265, 2267, 2267, 2381, 2381, 2382, 2382, 2383, 2383, 2384, 2384, 2268, 2268, 2385, 2385, 2386, 2386, 2271, 2271, 3656, 3656, 3657, 3657, 8034, 8034, 8058, 8058, 5008, 5008, 5385, 5385, 2276, 2276, 2278, 2278, 8062, 8062, 2280, 2280, 2281, 2281, 8061, 8061, 8063, 8063, 8064, 8064, 8175, 8175, 8176, 8176, 8177, 8177, 8178, 8178, 8179, 8179, 8180, 8180, 8216, 8216, 5010, 5010, 8217, 8217, 8218, 8218, 8219, 8219, 2286, 2286, 8220, 8220, 2287, 2287, 8221, 8221, 2288, 2288, 2289, 2289, 2290, 2290, 8225, 8225, 2291, 2291, 8228, 8228, 8229, 8229, 2293, 2293, 7577, 7577, 7575, 7575, 8094, 8094, 8095, 8095, 2172, 2172, 8270, 8270, 8271, 8271, 8304, 8304, 8123, 8123, 8124, 8124, 8121, 8121, 8122, 8122, 8187, 8187, 6429, 6429, 2359, 2359) AND EXISTS(SELECT 1 FROM `ps_category_product` cp JOIN `ps_category_group` cg ON (cp.id_category = cg.id_category AND cg.`id_group` =1) WHERE cp.`id_product` = p.`id_product`) ORDER BY categpos asc LIMIT 0, 1000
608. }
609.
610. return $this->execute($sql, $use_cache);
611. }
612.
613. $this->result = $this->query($sql);
614.
615. if (!$this->result) {
616. $result = false;
617. } else {
618. if (!$array) {
Argument [0] SELECT p.*, product_shop.*, stock.out_of_stock, IFNULL(stock.quantity, 0) as quantity, pl.`description`, pl.`description_short`, pl.`available_now`, pl.`available_later`, IFNULL(product_attribute_shop.id_product_attribute, 0) id_product_attribute, pl.`link_rewrite`, pl.`meta_description`, pl.`meta_keywords`, pl.`meta_title`, pl.`name`, image_shop.`id_image` id_image, il.`legend`, m.`name` AS manufacturer_name, DATEDIFF( p.`date_add`, DATE_SUB( "2024-03-19 00:00:00", INTERVAL 20 DAY ) ) > 0 AS new FROM `ps_product` p INNER JOIN ps_product_shop product_shop ON (product_shop.id_product = p.id_product AND product_shop.id_shop = 5) LEFT JOIN `ps_product_attribute_shop` product_attribute_shop ON (p.`id_product` = product_attribute_shop.`id_product` AND product_attribute_shop.`default_on` = 1 AND product_attribute_shop.id_shop=5) LEFT JOIN ps_stock_available stock ON (stock.id_product = `p`.id_product AND stock.id_product_attribute = 0 AND stock.id_shop = 5 AND stock.id_shop_group = 0 ) LEFT JOIN `ps_product_lang` pl ON ( p.`id_product` = pl.`id_product` AND pl.`id_lang` = 1 AND pl.id_shop = 5 ) LEFT JOIN `ps_image_shop` image_shop ON (image_shop.`id_product` = p.`id_product` AND image_shop.cover=1 AND image_shop.id_shop=5) LEFT JOIN `ps_image_lang` il ON (image_shop.`id_image` = il.`id_image` AND il.`id_lang` = 1) LEFT JOIN `ps_manufacturer` m ON (m.`id_manufacturer` = p.`id_manufacturer`) WHERE product_shop.`active` = 1 AND product_shop.`show_price` = 1 AND product_shop.`visibility` IN ("both", "catalog") AND p.`id_product` IN (0, 0, 8264, 8264, 8168, 8168, 8045, 8045, 8086, 8086, 8087, 8087, 8088, 8088, 8089, 8089, 8170, 8170, 8171, 8171, 8172, 8172, 8173, 8173, 8174, 8174, 8060, 8060, 8150, 8150, 8148, 8148, 8274, 8274, 8280, 8280, 8293, 8293, 8294, 8294, 8295, 8295, 8296, 8296, 8299, 8299, 8300, 8300, 8303, 8303, 8302, 8302, 8301, 8301, 8298, 8298, 8309, 8309, 3658, 3658, 3659, 3659, 8281, 8281, 8290, 8290, 8283, 8283, 8289, 8289, 8291, 8291, 8292, 8292, 8326, 8326, 8325, 8325, 8327, 8327, 8328, 8328, 8324, 8324, 8331, 8331, 8335, 8335, 8336, 8336, 8337, 8337, 8287, 8287, 8284, 8284, 8340, 8340, 8113, 8113, 8330, 8330, 7576, 7576, 2259, 2259, 8227, 8227, 8226, 8226, 2388, 2388, 8314, 8314, 8234, 8234, 2198, 2198, 2199, 2199, 2197, 2197, 8239, 8239, 8279, 8279, 8241, 8241, 8286, 8286, 8240, 8240, 8164, 8164, 8238, 8238, 8066, 8066, 8319, 8319, 8320, 8320, 8321, 8321, 8322, 8322, 8308, 8308, 8272, 8272, 8186, 8186, 8184, 8184, 2285, 2285, 7578, 7578, 8073, 8073, 8134, 8134, 8133, 8133, 8282, 8282, 8288, 8288, 8232, 8232, 7581, 7581, 8233, 8233, 8131, 8131, 8317, 8317, 8329, 8329, 2177, 2177, 2154, 2154, 2157, 2157, 2161, 2161, 8051, 8051, 2180, 2180, 2184, 2184, 2173, 2173, 8263, 8263, 3231, 3231, 8050, 8050, 7579, 7579, 8102, 8102, 7584, 7584, 7583, 7583, 7588, 7588, 7585, 7585, 8103, 8103, 7587, 7587, 8101, 8101, 7586, 7586, 8104, 8104, 8128, 8128, 8235, 8235, 8253, 8253, 8129, 8129, 8254, 8254, 8255, 8255, 8077, 8077, 8080, 8080, 8075, 8075, 2205, 2205, 8078, 8078, 8076, 8076, 8079, 8079, 8119, 8119, 8118, 8118, 8120, 8120, 8127, 8127, 2222, 2222, 2223, 2223, 8243, 8243, 8244, 8244, 8245, 8245, 8246, 8246, 8247, 8247, 8248, 8248, 8110, 8110, 8111, 8111, 8237, 8237, 8339, 8339, 2234, 2234, 3582, 3582, 8160, 8160, 6284, 6284, 8159, 8159, 8161, 8161, 7582, 7582, 8044, 8044, 8047, 8047, 8046, 8046, 7591, 7591, 8074, 8074, 8230, 8230, 8231, 8231, 8312, 8312, 2264, 2264, 2266, 2266, 2274, 2274, 2275, 2275, 2277, 2277, 2279, 2279, 8055, 8055, 8056, 8056, 8156, 8156, 8242, 8242, 8252, 8252, 8315, 8315, 2295, 2295, 2249, 2249, 2344, 2344, 8084, 8084, 8085, 8085, 8082, 8082, 8081, 8081, 2152, 2152, 2175, 2175, 2153, 2153, 2176, 2176, 2155, 2155, 2156, 2156, 2178, 2178, 2158, 2158, 2179, 2179, 2181, 2181, 2182, 2182, 2159, 2159, 2183, 2183, 2160, 2160, 2185, 2185, 2162, 2162, 2186, 2186, 2163, 2163, 2187, 2187, 2164, 2164, 8140, 8140, 8090, 8090, 8098, 8098, 8115, 8115, 8142, 8142, 8116, 8116, 8117, 8117, 8099, 8099, 8136, 8136, 8100, 8100, 8137, 8137, 8138, 8138, 8092, 8092, 8275, 8275, 8276, 8276, 2194, 2194, 2195, 2195, 8277, 8277, 2196, 2196, 2200, 2200, 2209, 2209, 2204, 2204, 2201, 2201, 2202, 2202, 3592, 3592, 2203, 2203, 2208, 2208, 2358, 2358, 8057, 8057, 8106, 8106, 6430, 6430, 8107, 8107, 8108, 8108, 8109, 8109, 2206, 2206, 2207, 2207, 3927, 3927, 3233, 3233, 8105, 8105, 2210, 2210, 2211, 2211, 2212, 2212, 2216, 2216, 2217, 2217, 2213, 2213, 2218, 2218, 2214, 2214, 2215, 2215, 2219, 2219, 2220, 2220, 7574, 7574, 2221, 2221, 8036, 8036, 2224, 2224, 2225, 2225, 8052, 8052, 2309, 2309, 8144, 8144, 2310, 2310, 8143, 8143, 8236, 8236, 3238, 3238, 2244, 2244, 2233, 2233, 2349, 2349, 2350, 2350, 3627, 3627, 2351, 2351, 2352, 2352, 8169, 8169, 2245, 2245, 2353, 2353, 2354, 2354, 2235, 2235, 2360, 2360, 2361, 2361, 2239, 2239, 3626, 3626, 4173, 4173, 2241, 2241, 8125, 8125, 2243, 2243, 2356, 2356, 2231, 2231, 7589, 7589, 2230, 2230, 7590, 7590, 8053, 8053, 8054, 8054, 8249, 8249, 8250, 8250, 8251, 8251, 8258, 8258, 8278, 8278, 7356, 7356, 8305, 8305, 8306, 8306, 8316, 8316, 2232, 2232, 2227, 2227, 2228, 2228, 2229, 2229, 8096, 8096, 2262, 2262, 2252, 2252, 2253, 2253, 2255, 2255, 2254, 2254, 2265, 2265, 2267, 2267, 2381, 2381, 2382, 2382, 2383, 2383, 2384, 2384, 2268, 2268, 2385, 2385, 2386, 2386, 2271, 2271, 3656, 3656, 3657, 3657, 8034, 8034, 8058, 8058, 5008, 5008, 5385, 5385, 2276, 2276, 2278, 2278, 8062, 8062, 2280, 2280, 2281, 2281, 8061, 8061, 8063, 8063, 8064, 8064, 8175, 8175, 8176, 8176, 8177, 8177, 8178, 8178, 8179, 8179, 8180, 8180, 8216, 8216, 5010, 5010, 8217, 8217, 8218, 8218, 8219, 8219, 2286, 2286, 8220, 8220, 2287, 2287, 8221, 8221, 2288, 2288, 2289, 2289, 2290, 2290, 8225, 8225, 2291, 2291, 8228, 8228, 8229, 8229, 2293, 2293, 7577, 7577, 7575, 7575, 8094, 8094, 8095, 8095, 2172, 2172, 8270, 8270, 8271, 8271, 8304, 8304, 8123, 8123, 8124, 8124, 8121, 8121, 8122, 8122, 8187, 8187, 6429, 6429, 2359, 2359) AND EXISTS(SELECT 1 FROM `ps_category_product` cp JOIN `ps_category_group` cg ON (cp.id_category = cg.id_category AND cg.`id_group` =1) WHERE cp.`id_product` = p.`id_product`) ORDER BY categpos asc LIMIT 0, 1000
3351. $sql .= '
3352. ORDER BY ' . (isset($order_by_prefix) ? pSQL($order_by_prefix) . '.' : '') . pSQL($order_by) . ' ' . pSQL($order_way) . '
3353. LIMIT ' . (int) (($page_number - 1) * $nb_products) . ', ' . (int) $nb_products;
3354. }
3355.
3356. $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql);
3357.
3358. if (!$result) {
3359. return false;
3360. }
3361.
Argument [0] SELECT p.*, product_shop.*, stock.out_of_stock, IFNULL(stock.quantity, 0) as quantity, pl.`description`, pl.`description_short`, pl.`available_now`, pl.`available_later`, IFNULL(product_attribute_shop.id_product_attribute, 0) id_product_attribute, pl.`link_rewrite`, pl.`meta_description`, pl.`meta_keywords`, pl.`meta_title`, pl.`name`, image_shop.`id_image` id_image, il.`legend`, m.`name` AS manufacturer_name, DATEDIFF( p.`date_add`, DATE_SUB( "2024-03-19 00:00:00", INTERVAL 20 DAY ) ) > 0 AS new FROM `ps_product` p INNER JOIN ps_product_shop product_shop ON (product_shop.id_product = p.id_product AND product_shop.id_shop = 5) LEFT JOIN `ps_product_attribute_shop` product_attribute_shop ON (p.`id_product` = product_attribute_shop.`id_product` AND product_attribute_shop.`default_on` = 1 AND product_attribute_shop.id_shop=5) LEFT JOIN ps_stock_available stock ON (stock.id_product = `p`.id_product AND stock.id_product_attribute = 0 AND stock.id_shop = 5 AND stock.id_shop_group = 0 ) LEFT JOIN `ps_product_lang` pl ON ( p.`id_product` = pl.`id_product` AND pl.`id_lang` = 1 AND pl.id_shop = 5 ) LEFT JOIN `ps_image_shop` image_shop ON (image_shop.`id_product` = p.`id_product` AND image_shop.cover=1 AND image_shop.id_shop=5) LEFT JOIN `ps_image_lang` il ON (image_shop.`id_image` = il.`id_image` AND il.`id_lang` = 1) LEFT JOIN `ps_manufacturer` m ON (m.`id_manufacturer` = p.`id_manufacturer`) WHERE product_shop.`active` = 1 AND product_shop.`show_price` = 1 AND product_shop.`visibility` IN ("both", "catalog") AND p.`id_product` IN (0, 0, 8264, 8264, 8168, 8168, 8045, 8045, 8086, 8086, 8087, 8087, 8088, 8088, 8089, 8089, 8170, 8170, 8171, 8171, 8172, 8172, 8173, 8173, 8174, 8174, 8060, 8060, 8150, 8150, 8148, 8148, 8274, 8274, 8280, 8280, 8293, 8293, 8294, 8294, 8295, 8295, 8296, 8296, 8299, 8299, 8300, 8300, 8303, 8303, 8302, 8302, 8301, 8301, 8298, 8298, 8309, 8309, 3658, 3658, 3659, 3659, 8281, 8281, 8290, 8290, 8283, 8283, 8289, 8289, 8291, 8291, 8292, 8292, 8326, 8326, 8325, 8325, 8327, 8327, 8328, 8328, 8324, 8324, 8331, 8331, 8335, 8335, 8336, 8336, 8337, 8337, 8287, 8287, 8284, 8284, 8340, 8340, 8113, 8113, 8330, 8330, 7576, 7576, 2259, 2259, 8227, 8227, 8226, 8226, 2388, 2388, 8314, 8314, 8234, 8234, 2198, 2198, 2199, 2199, 2197, 2197, 8239, 8239, 8279, 8279, 8241, 8241, 8286, 8286, 8240, 8240, 8164, 8164, 8238, 8238, 8066, 8066, 8319, 8319, 8320, 8320, 8321, 8321, 8322, 8322, 8308, 8308, 8272, 8272, 8186, 8186, 8184, 8184, 2285, 2285, 7578, 7578, 8073, 8073, 8134, 8134, 8133, 8133, 8282, 8282, 8288, 8288, 8232, 8232, 7581, 7581, 8233, 8233, 8131, 8131, 8317, 8317, 8329, 8329, 2177, 2177, 2154, 2154, 2157, 2157, 2161, 2161, 8051, 8051, 2180, 2180, 2184, 2184, 2173, 2173, 8263, 8263, 3231, 3231, 8050, 8050, 7579, 7579, 8102, 8102, 7584, 7584, 7583, 7583, 7588, 7588, 7585, 7585, 8103, 8103, 7587, 7587, 8101, 8101, 7586, 7586, 8104, 8104, 8128, 8128, 8235, 8235, 8253, 8253, 8129, 8129, 8254, 8254, 8255, 8255, 8077, 8077, 8080, 8080, 8075, 8075, 2205, 2205, 8078, 8078, 8076, 8076, 8079, 8079, 8119, 8119, 8118, 8118, 8120, 8120, 8127, 8127, 2222, 2222, 2223, 2223, 8243, 8243, 8244, 8244, 8245, 8245, 8246, 8246, 8247, 8247, 8248, 8248, 8110, 8110, 8111, 8111, 8237, 8237, 8339, 8339, 2234, 2234, 3582, 3582, 8160, 8160, 6284, 6284, 8159, 8159, 8161, 8161, 7582, 7582, 8044, 8044, 8047, 8047, 8046, 8046, 7591, 7591, 8074, 8074, 8230, 8230, 8231, 8231, 8312, 8312, 2264, 2264, 2266, 2266, 2274, 2274, 2275, 2275, 2277, 2277, 2279, 2279, 8055, 8055, 8056, 8056, 8156, 8156, 8242, 8242, 8252, 8252, 8315, 8315, 2295, 2295, 2249, 2249, 2344, 2344, 8084, 8084, 8085, 8085, 8082, 8082, 8081, 8081, 2152, 2152, 2175, 2175, 2153, 2153, 2176, 2176, 2155, 2155, 2156, 2156, 2178, 2178, 2158, 2158, 2179, 2179, 2181, 2181, 2182, 2182, 2159, 2159, 2183, 2183, 2160, 2160, 2185, 2185, 2162, 2162, 2186, 2186, 2163, 2163, 2187, 2187, 2164, 2164, 8140, 8140, 8090, 8090, 8098, 8098, 8115, 8115, 8142, 8142, 8116, 8116, 8117, 8117, 8099, 8099, 8136, 8136, 8100, 8100, 8137, 8137, 8138, 8138, 8092, 8092, 8275, 8275, 8276, 8276, 2194, 2194, 2195, 2195, 8277, 8277, 2196, 2196, 2200, 2200, 2209, 2209, 2204, 2204, 2201, 2201, 2202, 2202, 3592, 3592, 2203, 2203, 2208, 2208, 2358, 2358, 8057, 8057, 8106, 8106, 6430, 6430, 8107, 8107, 8108, 8108, 8109, 8109, 2206, 2206, 2207, 2207, 3927, 3927, 3233, 3233, 8105, 8105, 2210, 2210, 2211, 2211, 2212, 2212, 2216, 2216, 2217, 2217, 2213, 2213, 2218, 2218, 2214, 2214, 2215, 2215, 2219, 2219, 2220, 2220, 7574, 7574, 2221, 2221, 8036, 8036, 2224, 2224, 2225, 2225, 8052, 8052, 2309, 2309, 8144, 8144, 2310, 2310, 8143, 8143, 8236, 8236, 3238, 3238, 2244, 2244, 2233, 2233, 2349, 2349, 2350, 2350, 3627, 3627, 2351, 2351, 2352, 2352, 8169, 8169, 2245, 2245, 2353, 2353, 2354, 2354, 2235, 2235, 2360, 2360, 2361, 2361, 2239, 2239, 3626, 3626, 4173, 4173, 2241, 2241, 8125, 8125, 2243, 2243, 2356, 2356, 2231, 2231, 7589, 7589, 2230, 2230, 7590, 7590, 8053, 8053, 8054, 8054, 8249, 8249, 8250, 8250, 8251, 8251, 8258, 8258, 8278, 8278, 7356, 7356, 8305, 8305, 8306, 8306, 8316, 8316, 2232, 2232, 2227, 2227, 2228, 2228, 2229, 2229, 8096, 8096, 2262, 2262, 2252, 2252, 2253, 2253, 2255, 2255, 2254, 2254, 2265, 2265, 2267, 2267, 2381, 2381, 2382, 2382, 2383, 2383, 2384, 2384, 2268, 2268, 2385, 2385, 2386, 2386, 2271, 2271, 3656, 3656, 3657, 3657, 8034, 8034, 8058, 8058, 5008, 5008, 5385, 5385, 2276, 2276, 2278, 2278, 8062, 8062, 2280, 2280, 2281, 2281, 8061, 8061, 8063, 8063, 8064, 8064, 8175, 8175, 8176, 8176, 8177, 8177, 8178, 8178, 8179, 8179, 8180, 8180, 8216, 8216, 5010, 5010, 8217, 8217, 8218, 8218, 8219, 8219, 2286, 2286, 8220, 8220, 2287, 2287, 8221, 8221, 2288, 2288, 2289, 2289, 2290, 2290, 8225, 8225, 2291, 2291, 8228, 8228, 8229, 8229, 2293, 2293, 7577, 7577, 7575, 7575, 8094, 8094, 8095, 8095, 2172, 2172, 8270, 8270, 8271, 8271, 8304, 8304, 8123, 8123, 8124, 8124, 8121, 8121, 8122, 8122, 8187, 8187, 6429, 6429, 2359, 2359) AND EXISTS(SELECT 1 FROM `ps_category_product` cp JOIN `ps_category_group` cg ON (cp.id_category = cg.id_category AND cg.`id_group` =1) WHERE cp.`id_product` = p.`id_product`) ORDER BY categpos asc LIMIT 0, 1000
73. $context->getIdLang(),
74. $query->getPage(),
75. $query->getResultsPerPage(),
76. $type !== 'products',
77. $query->getSortOrder()->toLegacyOrderBy(),
78. $query->getSortOrder()->toLegacyOrderWay()
79. );
80. }
81.
82. /**
83. * {@inheritdoc}
Argument [0] 1 Argument [1] 1 Argument [2] 1000 Argument [3] Argument [4] categpos Argument [5] asc
84. */
85. public function runQuery(
86. ProductSearchContext $context,
87. ProductSearchQuery $query
88. ) {
89. if (!$products = $this->getProductsOrCount($context, $query, 'products')) {
90. $products = [];
91. }
92. $count = $this->getProductsOrCount($context, $query, 'count');
93.
94. $result = new ProductSearchResult();
Argument [0] PrestaShop\PrestaShop\Core\Product\Search\ProductSearchContext Object ( [idShop:PrestaShop\PrestaShop\Core\Product\Search\ProductSearchContext:private] => 5 [idLang:PrestaShop\PrestaShop\Core\Product\Search\ProductSearchContext:private] => 1 [idCurrency:PrestaShop\PrestaShop\Core\Product\Search\ProductSearchContext:private] => 1 [idCustomer:PrestaShop\PrestaShop\Core\Product\Search\ProductSearchContext:private] => ) Argument [1] PrestaShop\PrestaShop\Core\Product\Search\ProductSearchQuery Object ( [queryType:PrestaShop\PrestaShop\Core\Product\Search\ProductSearchQuery:private] => prices-drop [idCategory:PrestaShop\PrestaShop\Core\Product\Search\ProductSearchQuery:private] => [idManufacturer:PrestaShop\PrestaShop\Core\Product\Search\ProductSearchQuery:private] => [idSupplier:PrestaShop\PrestaShop\Core\Product\Search\ProductSearchQuery:private] => [searchString:PrestaShop\PrestaShop\Core\Product\Search\ProductSearchQuery:private] => [searchTag:PrestaShop\PrestaShop\Core\Product\Search\ProductSearchQuery:private] => [encodedFacets:PrestaShop\PrestaShop\Core\Product\Search\ProductSearchQuery:private] => [resultsPerPage:PrestaShop\PrestaShop\Core\Product\Search\ProductSearchQuery:private] => 1000 [page:PrestaShop\PrestaShop\Core\Product\Search\ProductSearchQuery:private] => 1 [sortOrder:PrestaShop\PrestaShop\Core\Product\Search\ProductSearchQuery:private] => PrestaShop\PrestaShop\Core\Product\Search\SortOrder Object ( [entity:PrestaShop\PrestaShop\Core\Product\Search\SortOrder:private] => product [field:PrestaShop\PrestaShop\Core\Product\Search\SortOrder:private] => categpos [direction:PrestaShop\PrestaShop\Core\Product\Search\SortOrder:private] => asc [label:PrestaShop\PrestaShop\Core\Product\Search\SortOrder:private] => ) ) Argument [2] products
129. // We're ready to run the actual query!
130.
131. /** @var ProductSearchResult $result */
132. $result = $provider->runQuery(
133. $context,
134. $query
135. );
136.
137. if (Configuration::get('PS_CATALOG_MODE') && !Configuration::get('PS_CATALOG_MODE_WITH_PRICES')) {
138. $this->disablePriceControls($result);
139. }
Argument [0] PrestaShop\PrestaShop\Core\Product\Search\ProductSearchContext Object ( [idShop:PrestaShop\PrestaShop\Core\Product\Search\ProductSearchContext:private] => 5 [idLang:PrestaShop\PrestaShop\Core\Product\Search\ProductSearchContext:private] => 1 [idCurrency:PrestaShop\PrestaShop\Core\Product\Search\ProductSearchContext:private] => 1 [idCustomer:PrestaShop\PrestaShop\Core\Product\Search\ProductSearchContext:private] => ) Argument [1] PrestaShop\PrestaShop\Core\Product\Search\ProductSearchQuery Object ( [queryType:PrestaShop\PrestaShop\Core\Product\Search\ProductSearchQuery:private] => prices-drop [idCategory:PrestaShop\PrestaShop\Core\Product\Search\ProductSearchQuery:private] => [idManufacturer:PrestaShop\PrestaShop\Core\Product\Search\ProductSearchQuery:private] => [idSupplier:PrestaShop\PrestaShop\Core\Product\Search\ProductSearchQuery:private] => [searchString:PrestaShop\PrestaShop\Core\Product\Search\ProductSearchQuery:private] => [searchTag:PrestaShop\PrestaShop\Core\Product\Search\ProductSearchQuery:private] => [encodedFacets:PrestaShop\PrestaShop\Core\Product\Search\ProductSearchQuery:private] => [resultsPerPage:PrestaShop\PrestaShop\Core\Product\Search\ProductSearchQuery:private] => 1000 [page:PrestaShop\PrestaShop\Core\Product\Search\ProductSearchQuery:private] => 1 [sortOrder:PrestaShop\PrestaShop\Core\Product\Search\ProductSearchQuery:private] => PrestaShop\PrestaShop\Core\Product\Search\SortOrder Object ( [entity:PrestaShop\PrestaShop\Core\Product\Search\SortOrder:private] => product [field:PrestaShop\PrestaShop\Core\Product\Search\SortOrder:private] => categpos [direction:PrestaShop\PrestaShop\Core\Product\Search\SortOrder:private] => asc [label:PrestaShop\PrestaShop\Core\Product\Search\SortOrder:private] => ) )
584. header('Content-Type: application/json');
585. $this->ajaxRender(json_encode($this->getAjaxProductSearchVariables()));
586.
587. return;
588. } else {
589. $variables = $this->getProductSearchVariables();
590. $this->context->smarty->assign([
591. 'listing' => $variables,
592. ]);
593. $this->setTemplate($template, $params, $locale);
594. }
16. * version: 7.0.2
17. */
18. protected function doProductSearch($template, $params = array(), $locale = null)
19. {
20. if (!Tools::getIsset('page_cache_dynamics_mods')) {
21. return parent::doProductSearch($template, $params, $locale);
22. }
23. }
24.
25. /**
26. * This method is the heart of the search provider delegation
Argument [0] catalog/listing/prices-drop Argument [1] Array ( [entity] => prices-drop ) Argument [2]
36. */
37. public function initContent()
38. {
39. parent::initContent();
40.
41. $this->doProductSearch('catalog/listing/prices-drop', ['entity' => 'prices-drop']);
42. }
43.
44. protected function getProductSearchQuery()
45. {
46. $query = new ProductSearchQuery();
Argument [0] catalog/listing/prices-drop Argument [1] Array ( [entity] => prices-drop )
301. if (!$this->content_only && ($this->display_header || (isset($this->className) && $this->className))) {
302. $this->initHeader();
303. }
304.
305. if ($this->viewAccess()) {
306. $this->initContent();
307. } else {
308. $this->errors[] = $this->trans('Access denied.', [], 'Admin.Notifications.Error');
309. }
310.
311. if (!$this->content_only && ($this->display_footer || (isset($this->className) && $this->className))) {
513. if (isset($params_hook_action_dispatcher)) {
514. Hook::exec('actionDispatcher', $params_hook_action_dispatcher);
515. }
516.
517. // Running controller
518. $controller->run();
519.
520. // Execute hook dispatcher after
521. if (isset($params_hook_action_dispatcher)) {
522. Hook::exec('actionDispatcherAfter', $params_hook_action_dispatcher);
523. }
23. * @copyright Since 2007 PrestaShop SA and Contributors
24. * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
25. */
26.
27. require dirname(__FILE__).'/config/config.inc.php';
28. Dispatcher::getInstance()->dispatch();