Forums › Forums › OroCommerce › How to create a family same as default_family
This topic contains 7 replies, has 3 voices, and was last updated by dnahrebecki 7 years ago.
Starting from March 1, 2020 the forum has been switched to the read-only mode. Please head to StackOverflow for support.
- CreatorTopic
- April 12, 2017 at 3:25 am #31634
Hello,
the frontend view of product page looks nice when using default_family…but when adding a new family with same attributes and structure changes the view completely.(Layout)
how to get the default view on other families?
Please AssistThanks
- CreatorTopic
- AuthorReplies
- April 13, 2017 at 3:11 am #31635
Hi, saqibbhat96.
Please, check that you have attribute groups with name ‘General’ and ‘Images’ in your product family.
They rendered in https://github.com/orocommerce/orocommerce/blob/master/src/Oro/Bundle/ProductBundle/Resources/views/layouts/blank/oro_product_frontend_product_view/layout.yml#L35-L46And please keep in mind that you should create new attribute group, renaming exists attribute group will not help.
April 16, 2017 at 8:31 pm #31636Hello, thanks for responding,
default family setting gives me this layout default front-end layout
but when i applied same setting for new family gives me layout
like this
please assit, i just want to have same default look for all my families(that is to have description, sku, name on right of the page…)thanks
April 18, 2017 at 1:13 pm #31637Hello @saqibbhat96
In order to render your custom Attribute Group you should provide layout block similar to:
https://github.com/orocommerce/orocommerce/blob/master/src/Oro/Bundle/ProductBundle/Resources/views/layouts/blank/oro_product_frontend_product_view/layout.yml#L35-L40In this example Attribute Group ‘general’ (we use code for identifying) is being rendered. Have a look at your link default family setting – you can see ‘general’ attribute group code there. However, in your custom family settings you have used ‘default_group’ which we don’t render by default (also ‘product_prices’ instead of ‘prices’).
To summarize: all attribute groups which are not rendered by ‘attribute_group’ are then rendered by https://github.com/orocrm/platform/blob/master/src/Oro/Bundle/EntityConfigBundle/Layout/Block/Type/AttributeGroupRestType.php#L53
April 18, 2017 at 11:16 pm #31638Hello @dnahrebecki
thanks for reaching out, I have to change the code to general and prices, to let render identify, but how can I achieve that. Is it possible to set when creating a new custom family?
please assist
thanksApril 19, 2017 at 4:40 am #31639Code for attribute group is being set from “Label” during Product family creation. Answering your question: yes, please set “General” and “Prices” as labels.
April 19, 2017 at 8:58 pm #31640Hello @dnahrebecki,
even though I out attribute group label as “General” it did not change the code to general?
code didnot change to general
please have a look
thanksApril 20, 2017 at 12:18 am #31641As @msulima wrote in previous post
And please keep in mind that you should create new attribute group, renaming exists attribute group will not help.
You need to remove this attribute groups (using “x” near group) and then add it again – “code” is generated from “label” only on creation.
- AuthorReplies
The forum ‘OroCommerce’ is closed to new topics and replies.