leifnel Posted February 1, 2017 Share Posted February 1, 2017 (I add products via the api from a xml-file from our supplier, which I process in php ) I have all categories from the supplier, but only some categories are associated with this multishop. However, on frontpage new products are shown regardless of if the product is in a category in this shop or not. Is it a configuration issue, or a bug/missing feature? select p.*, product_shop.*, stock.out_of_stock, IFNULL(stock.quantity, 0) as quantity, pl.`description`, pl.`description_short`, pl.`link_rewrite`, pl.`meta_description`, pl.`meta_keywords`, pl.`meta_title`, pl.`name`, pl.`available_now`, pl.`available_later`, image_shop.`id_image` id_image, il.`legend`, m.`name` AS manufacturer_name, product_shop.`date_add` > "2017-01-12" as new, product_attribute_shop.minimal_quantity AS product_attribute_minimal_quantity, IFNULL(product_attribute_shop.id_product_attribute,0) id_product_attribute from product p INNER JOIN product_shop product_shop ON (product_shop.id_product = p.id_product AND product_shop.id_shop = 1) LEFT JOIN `product_lang` `pl` ON p.`id_product` = pl.`id_product` AND pl.`id_lang` = 2 AND pl.id_shop = 1 LEFT JOIN `image_shop` `image_shop` ON image_shop.`id_product` = p.`id_product` AND image_shop.cover=1 AND image_shop.id_shop=1 LEFT JOIN `image_lang` `il` ON image_shop.`id_image` = il.`id_image` AND il.`id_lang` = 2 LEFT JOIN `manufacturer` `m` ON m.`id_manufacturer` = p.`id_manufacturer` LEFT JOIN `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=1 LEFT JOIN stock_available stock ON (stock.id_product = p.id_product AND stock.id_product_attribute = 0 AND stock.id_shop = 1 AND stock.id_shop_group = 0 ) where product_shop.`active` = 1 AND product_shop.`visibility` IN ("both", "catalog") AND product_shop.`date_add` > "2017-01-12" AND EXISTS(SELECT 1 FROM `category_product` cp JOIN `category_group` cg ON (cp.id_category = cg.id_category AND cg.`id_group` = 1) WHERE cp.`id_product` = p.`id_product`) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now