We have 2 store view: one "fr" and one "en".

We keep getting an undefined method on "addAttributeToSelect" but only for one store view.

I've used "var_dump" to display the result of this:

$_productCollection = Mage::getResourceModel('catalog/product_collection')
                            ->addAttributeToFilter('status', 1) // enabled
                            ->addAttributeToFilter('visibility', 4)

    var_dump($_productCollection); exit;

In french we get :

protected '_flatEnabled' => 
array (size=1)
  2 => boolean false

In english we get :

  protected '_flatEnabled' => 
array (size=1)
  1 => boolean true

I know that flat tables are enable for the whole website. Not per store view.

Any suggestion ?


  • Maybe the index is not built for that store? – SH- Nov 25 '15 at 22:10
  • How would I go about building the index for a specific store ? I usually run : php -f shell/indexer.php reindexall – Ebpo Nov 26 '15 at 13:26
  • That should do it. – SH- Nov 27 '15 at 14:56

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.