Product field not filled in Shopware 6.5

42 views Asked by At

I added a own field by extending the product model. I also extended the templates, so the field is shown in the product edit detail view. If I enter some value into the field and save, it gets saved to the database.

The problem is, it wont show the data when I reload the page. The input field is always empty again.

<sw-number-field label="Import ID" 
                         numberType="int" 
                         v-model="product.importId">
</sw-number-field>

I can change the value by doing this:

Shopware.Component.override('sw-product-settings-form', {
    template,

    data: function () {
        return {
            product: {
                importId: "111111"
            }
        }
    }
});

How can I configure it, that it fetches the actual value from the database?

0

There are 0 answers