I am working on product collection query which is filtered from different root categories. My products are coming correctly but my product name is coming from admin section not from store section.


->addAttributeToFilter('status', 1)
->addAttributeToFilter('name', array('like' => '%'.$search_product.'%'));

$conditions = array();
foreach ($category_filters_ids as $categoryId) { if (is_numeric($categoryId)) { $conditions[] = "{{table}}.category_id = $categoryId"; } }

$collection->distinct(true) ->joinField('category_id', 'catalog/category_product', null, 'product_id = entity_id', implode(" OR ", $conditions), 'inner');

  • have you tried the code on frontend or a sciprt – Amit Bera Oct 13 '15 at 9:51
  • In my script.... – Mathew Oct 13 '15 at 9:53
  • please show your sciprt code and how have includer mage.php and call the magento store – Amit Bera Oct 13 '15 at 9:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.