OroCommerce Forums

Covering OroCommerce topics, including community updates and company announcements.

Forums Forums OroCommerce Creating product attribute programmatically

This topic contains 2 replies, has 1 voice, and was last updated by  mlozynskyy 6 years, 9 months ago.

Starting from March 1, 2020 the forum has been switched to the read-only mode. Please head to StackOverflow for support.

  • Creator
    Topic
  • #31795

    mlozynskyy
    Participant

    Hello,
    How can I create product attribute programmatically. Below is my template of code:

    That code add attribute to Products->Product Attribute, but when I created my new Product based on new Family, I’ve got an error:

    Maybe I forgot to add something?! Could You help me?
    Thanks.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Author
    Replies
  • #31796

    mlozynskyy
    Participant

    The attribute has added successfully to the table: “oro_entity_config_field“,
    but there is no data in oro_entity_config, in “data” column for class_name “Oro\Bundle\ProductBundle\Entity\Product”

    #31797

    mlozynskyy
    Participant

    It is possible to create product attribute via install script (Schema). And after assign it to Group and Family:

    And add product to Family:

Viewing 2 replies - 1 through 2 (of 2 total)

The forum ‘OroCommerce’ is closed to new topics and replies.

Back to top