SHARE
TWEET

Untitled

a guest Jul 16th, 2019 65 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $products = $this->productFactory->create()
  2.      ->getCollection()
  3.      ->addStoreFilter(2)
  4.      ->addAttributeToFilter('custom_attribute', '123');
  5.      
  6. SELECT `e`.*, IF(at_custom_attribute.value_id > 0, at_custom_attribute.value, at_custom_attribute_default.value) AS `custom_attribute`
  7. FROM `catalog_product_entity` AS `e`
  8. INNER JOIN `catalog_product_website` AS `product_website` ON product_website.product_id = e.entity_id AND product_website.website_id = 2
  9. INNER JOIN `catalog_product_entity_varchar` AS `at_custom_attribute_default` ON (`at_custom_attribute_default`.`entity_id` = `e`.`entity_id`) AND (`at_custom_attribute_default`.`attribute_id` = '163') AND `at_custom_attribute_default`.`store_id` = 0
  10. LEFT JOIN `catalog_product_entity_varchar` AS `at_custom_attribute` ON (`at_custom_attribute`.`entity_id` = `e`.`entity_id`) AND (`at_custom_attribute`.`attribute_id` = '163') AND (`at_custom_attribute`.`store_id` = 2) WHERE (IF(at_custom_attribute.value_id > 0, at_custom_attribute.value, at_custom_attribute_default.value) = '63801')
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top