product_flat table not getting filled correctly



  • Hi guys,

    I'm having a problem when adding/updating a product.

    In the admin when I look at the products-list, some fields are not getting filled in correctly.
    Productnumber, name, price, status, .... are not getting filled in the table.
    SKU en quantity is getting filled in correctly.

    If I edit the product, the fields are filled correctly. It's just in the overview table it isn't showing correctly.

    Looking at the database, it seems the product_attribute_values table is getting filled correctly. But looking at the product_flat table, only the locale, channel, product_id, min_price and max_price are filled. The rest of the fields stay empty.

    I've added screenshots.
    I'm hoping you guys can point me in the right direction to solve this!

    a0bfbe5a-c9dc-4927-8ed3-153a0c5dc927-image.png

    d14fd9b7-0e4a-4039-b411-91edc37823c1-image.png



  • Hi,

    In the admin section, when you create a product only three fields need to be filled up first.

    Then it will redirect to the product edit page where you need to save all the details.



  • @devansh-webkul
    Hi, thanks for your response!

    I am aware of this, but still the product_flat table is not being filled.

    This is what happens when I create a new product:

    • A row is added to products table
    • The product_categories pivot table is filled correctly
    • For each attribute, a new row is created in product_attribute_values table with the correct values.
    • A new row is made in product_flat. However, here is where it goes wrong I think. Almost every field is empty.

    I currently have one product added. I have added screenshots of the product_attribute_values table and the product_flat table.
    I would expect the columns in product_flat to be filled according to the values in product_attribute_values.

    If my comment is not clear or you need additional info, let me know!

    product_attribute_values
    910414c1-0a58-4e31-ba53-78381f24a18f-image.png

    product_flat
    2ba780c3-6128-4302-a2ec-e6b08524d7fc-image.png



  • I have been searching for hours, but I finally found the solution to my problem.

    I use a different database connection, and I did not set the correct connection in /Webkul/Product/src/Listeners/ProductFlat.php.

    @devansh-webkul, thank you very much for your help!


Log in to reply