Basically I installed one market place module in my website......that have a validation attribute...but which is not ...Product Listing,Product Listing,Layered Navigation...so when I use Flat Product ...its attributes and its value is not going in flat product tables...so due to not availability of attribute I can not validate my setting....

My attributes setting values..

class VES_VendorsProduct_Model_Source_Approval extends Mage_Eav_Model_Entity_Attribute_Source_Abstract
    const STATUS_NOT_SUBMITED   = 0;
    const STATUS_PENDING        = 1;
    const STATUS_APPROVED       = 2;
    const STATUS_UNAPPROVED     = 3;

    static public function getOptionArray()
        return array(
            self::STATUS_NOT_SUBMITED   => Mage::helper('vendors')->__('Not Submited'),
            self::STATUS_PENDING        => Mage::helper('vendors')->__('Pending'),
            self::STATUS_APPROVED       => Mage::helper('vendors')->__('Approved'),
            self::STATUS_UNAPPROVED     => Mage::helper('vendors')->__('Not Approved')

    public function getAllOptions()
        return array(
                'label' => Mage::helper('vendors')->__('Not Submited'),
                'value' =>  self::STATUS_NOT_SUBMITED
                'label' => Mage::helper('vendors')->__('Pending'),
                'value' =>  self::STATUS_PENDING
                'label' => Mage::helper('vendors')->__('Approved'),
                'value' =>  self::STATUS_APPROVED
                'label' => Mage::helper('vendors')->__('Not Approved'),
                'value' =>  self::STATUS_UNAPPROVED

My validation In List.php block

so problem is this ...the value of this is not avail in flat table....its working fine with eav...but not fine with flat tables.....so how can i solve this issue...how can i get attribute value by product id...with query..or any solution

setting of attribute.. ----------------------enter image description here


Only the attributes that are marked to be used in product listing are copyed to the flat tables. Mark it like this and reindex everything.

  • i did this ..but when i check by...echo "<pre>";print_r($_productCollection->toArray());...its not showing...
    – Deepak Rai
    Aug 21 '15 at 18:46
  • How can i get that attribute value by query by product id...from eav...also how can i get attribute id of that
    – Deepak Rai
    Aug 21 '15 at 18:59
  • Make sure you cleared the cache. If you marked the product "Used in product listing" it has to be in the flat table.
    – Marius
    Aug 21 '15 at 19:42
  • champ answer...
    – stephen
    Oct 6 '16 at 14:09
  • @Marius as I observed that the attribute "ts_dimensions_width" contains "Used in Product Listing" configured as "No" by default M2.3.1CE, but this attribute has been populated in the table "catalog_product_flat_1" is there any idea? please advise
    – Nagaraju K
    Jul 11 '19 at 14:16

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.