What is the purpose of set_order in Magento2?
Clash Royale CLAN TAG#URR8PPP
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty margin-bottom:0;
up vote
1
down vote
favorite
I'm trying to add a new attribute set and I have this data:
$data = [
'attribute_set_name' => 'Sample attribute set',
'entity_type_id' => $entityTypeId,
'sort_order' => 200,
];
Could someone explain what the sort_order
means here? I just started to learn Magento 2, so it's a little confusing.
magento2
add a comment |Â
up vote
1
down vote
favorite
I'm trying to add a new attribute set and I have this data:
$data = [
'attribute_set_name' => 'Sample attribute set',
'entity_type_id' => $entityTypeId,
'sort_order' => 200,
];
Could someone explain what the sort_order
means here? I just started to learn Magento 2, so it's a little confusing.
magento2
add a comment |Â
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I'm trying to add a new attribute set and I have this data:
$data = [
'attribute_set_name' => 'Sample attribute set',
'entity_type_id' => $entityTypeId,
'sort_order' => 200,
];
Could someone explain what the sort_order
means here? I just started to learn Magento 2, so it's a little confusing.
magento2
I'm trying to add a new attribute set and I have this data:
$data = [
'attribute_set_name' => 'Sample attribute set',
'entity_type_id' => $entityTypeId,
'sort_order' => 200,
];
Could someone explain what the sort_order
means here? I just started to learn Magento 2, so it's a little confusing.
magento2
asked Aug 10 at 7:25
HELPME
497
497
add a comment |Â
add a comment |Â
2 Answers
2
active
oldest
votes
up vote
2
down vote
accepted
Basically this sort_order
is a field where you put a number in order to sort the object or xml fields.
You can define ascendent or descendent but most of the places I've seen are ascendent.
EDITED:
These are 4 fields that we created with the layout. Have a look at the code and see one of the parameters is sort_order.
<group id="customer">
<field id="permission_info" translate="label" type="select" sortOrder="100"
showInDefault="1" showInWebsite="1" showInStore="1">
<label>Allow edit customer data</label>
<source_model>MagentoConfigModelConfigSourceYesno</source_model>
</field>
<field id="permission_freetext" translate="label" type="select" sortOrder="110"
showInDefault="1" showInWebsite="1" showInStore="1">
<label>Show free text field</label>
<source_model>MagentoConfigModelConfigSourceYesno</source_model>
</field>
<field id="permission_payment" translate="label" type="select" sortOrder="120"
showInDefault="1" showInWebsite="1" showInStore="1">
<label>Allow edit condition and payment method</label>
<source_model>MagentoConfigModelConfigSourceYesno</source_model>
</field>
<field id="permission_bank" translate="label" type="select" sortOrder="130"
showInDefault="1" showInWebsite="1" showInStore="1">
<label>Allow edit bank data and payment days</label>
<source_model>MagentoConfigModelConfigSourceYesno</source_model>
</field>
</group>
If I change the values of the field with the id="permission_bank" and I put in the sort_order parameter a value between 101 and 109, this field will go between Allow edit customer data and Show free text field:
It's just a tool to sort.
I still didn't quite get it...
â HELPME
Aug 10 at 8:16
Have a look again, I edited a bit. :D
â Raül
Aug 10 at 8:43
add a comment |Â
up vote
0
down vote
sort_order
is added to tell the system where you want to display the field in the form.
Higher the sort_order
lower it will be displayed in the form.
add a comment |Â
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
2
down vote
accepted
Basically this sort_order
is a field where you put a number in order to sort the object or xml fields.
You can define ascendent or descendent but most of the places I've seen are ascendent.
EDITED:
These are 4 fields that we created with the layout. Have a look at the code and see one of the parameters is sort_order.
<group id="customer">
<field id="permission_info" translate="label" type="select" sortOrder="100"
showInDefault="1" showInWebsite="1" showInStore="1">
<label>Allow edit customer data</label>
<source_model>MagentoConfigModelConfigSourceYesno</source_model>
</field>
<field id="permission_freetext" translate="label" type="select" sortOrder="110"
showInDefault="1" showInWebsite="1" showInStore="1">
<label>Show free text field</label>
<source_model>MagentoConfigModelConfigSourceYesno</source_model>
</field>
<field id="permission_payment" translate="label" type="select" sortOrder="120"
showInDefault="1" showInWebsite="1" showInStore="1">
<label>Allow edit condition and payment method</label>
<source_model>MagentoConfigModelConfigSourceYesno</source_model>
</field>
<field id="permission_bank" translate="label" type="select" sortOrder="130"
showInDefault="1" showInWebsite="1" showInStore="1">
<label>Allow edit bank data and payment days</label>
<source_model>MagentoConfigModelConfigSourceYesno</source_model>
</field>
</group>
If I change the values of the field with the id="permission_bank" and I put in the sort_order parameter a value between 101 and 109, this field will go between Allow edit customer data and Show free text field:
It's just a tool to sort.
I still didn't quite get it...
â HELPME
Aug 10 at 8:16
Have a look again, I edited a bit. :D
â Raül
Aug 10 at 8:43
add a comment |Â
up vote
2
down vote
accepted
Basically this sort_order
is a field where you put a number in order to sort the object or xml fields.
You can define ascendent or descendent but most of the places I've seen are ascendent.
EDITED:
These are 4 fields that we created with the layout. Have a look at the code and see one of the parameters is sort_order.
<group id="customer">
<field id="permission_info" translate="label" type="select" sortOrder="100"
showInDefault="1" showInWebsite="1" showInStore="1">
<label>Allow edit customer data</label>
<source_model>MagentoConfigModelConfigSourceYesno</source_model>
</field>
<field id="permission_freetext" translate="label" type="select" sortOrder="110"
showInDefault="1" showInWebsite="1" showInStore="1">
<label>Show free text field</label>
<source_model>MagentoConfigModelConfigSourceYesno</source_model>
</field>
<field id="permission_payment" translate="label" type="select" sortOrder="120"
showInDefault="1" showInWebsite="1" showInStore="1">
<label>Allow edit condition and payment method</label>
<source_model>MagentoConfigModelConfigSourceYesno</source_model>
</field>
<field id="permission_bank" translate="label" type="select" sortOrder="130"
showInDefault="1" showInWebsite="1" showInStore="1">
<label>Allow edit bank data and payment days</label>
<source_model>MagentoConfigModelConfigSourceYesno</source_model>
</field>
</group>
If I change the values of the field with the id="permission_bank" and I put in the sort_order parameter a value between 101 and 109, this field will go between Allow edit customer data and Show free text field:
It's just a tool to sort.
I still didn't quite get it...
â HELPME
Aug 10 at 8:16
Have a look again, I edited a bit. :D
â Raül
Aug 10 at 8:43
add a comment |Â
up vote
2
down vote
accepted
up vote
2
down vote
accepted
Basically this sort_order
is a field where you put a number in order to sort the object or xml fields.
You can define ascendent or descendent but most of the places I've seen are ascendent.
EDITED:
These are 4 fields that we created with the layout. Have a look at the code and see one of the parameters is sort_order.
<group id="customer">
<field id="permission_info" translate="label" type="select" sortOrder="100"
showInDefault="1" showInWebsite="1" showInStore="1">
<label>Allow edit customer data</label>
<source_model>MagentoConfigModelConfigSourceYesno</source_model>
</field>
<field id="permission_freetext" translate="label" type="select" sortOrder="110"
showInDefault="1" showInWebsite="1" showInStore="1">
<label>Show free text field</label>
<source_model>MagentoConfigModelConfigSourceYesno</source_model>
</field>
<field id="permission_payment" translate="label" type="select" sortOrder="120"
showInDefault="1" showInWebsite="1" showInStore="1">
<label>Allow edit condition and payment method</label>
<source_model>MagentoConfigModelConfigSourceYesno</source_model>
</field>
<field id="permission_bank" translate="label" type="select" sortOrder="130"
showInDefault="1" showInWebsite="1" showInStore="1">
<label>Allow edit bank data and payment days</label>
<source_model>MagentoConfigModelConfigSourceYesno</source_model>
</field>
</group>
If I change the values of the field with the id="permission_bank" and I put in the sort_order parameter a value between 101 and 109, this field will go between Allow edit customer data and Show free text field:
It's just a tool to sort.
Basically this sort_order
is a field where you put a number in order to sort the object or xml fields.
You can define ascendent or descendent but most of the places I've seen are ascendent.
EDITED:
These are 4 fields that we created with the layout. Have a look at the code and see one of the parameters is sort_order.
<group id="customer">
<field id="permission_info" translate="label" type="select" sortOrder="100"
showInDefault="1" showInWebsite="1" showInStore="1">
<label>Allow edit customer data</label>
<source_model>MagentoConfigModelConfigSourceYesno</source_model>
</field>
<field id="permission_freetext" translate="label" type="select" sortOrder="110"
showInDefault="1" showInWebsite="1" showInStore="1">
<label>Show free text field</label>
<source_model>MagentoConfigModelConfigSourceYesno</source_model>
</field>
<field id="permission_payment" translate="label" type="select" sortOrder="120"
showInDefault="1" showInWebsite="1" showInStore="1">
<label>Allow edit condition and payment method</label>
<source_model>MagentoConfigModelConfigSourceYesno</source_model>
</field>
<field id="permission_bank" translate="label" type="select" sortOrder="130"
showInDefault="1" showInWebsite="1" showInStore="1">
<label>Allow edit bank data and payment days</label>
<source_model>MagentoConfigModelConfigSourceYesno</source_model>
</field>
</group>
If I change the values of the field with the id="permission_bank" and I put in the sort_order parameter a value between 101 and 109, this field will go between Allow edit customer data and Show free text field:
It's just a tool to sort.
edited Aug 10 at 8:43
answered Aug 10 at 7:38
Raül
42413
42413
I still didn't quite get it...
â HELPME
Aug 10 at 8:16
Have a look again, I edited a bit. :D
â Raül
Aug 10 at 8:43
add a comment |Â
I still didn't quite get it...
â HELPME
Aug 10 at 8:16
Have a look again, I edited a bit. :D
â Raül
Aug 10 at 8:43
I still didn't quite get it...
â HELPME
Aug 10 at 8:16
I still didn't quite get it...
â HELPME
Aug 10 at 8:16
Have a look again, I edited a bit. :D
â Raül
Aug 10 at 8:43
Have a look again, I edited a bit. :D
â Raül
Aug 10 at 8:43
add a comment |Â
up vote
0
down vote
sort_order
is added to tell the system where you want to display the field in the form.
Higher the sort_order
lower it will be displayed in the form.
add a comment |Â
up vote
0
down vote
sort_order
is added to tell the system where you want to display the field in the form.
Higher the sort_order
lower it will be displayed in the form.
add a comment |Â
up vote
0
down vote
up vote
0
down vote
sort_order
is added to tell the system where you want to display the field in the form.
Higher the sort_order
lower it will be displayed in the form.
sort_order
is added to tell the system where you want to display the field in the form.
Higher the sort_order
lower it will be displayed in the form.
answered Aug 10 at 9:11
Anshu Mishra
4,43032350
4,43032350
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f237924%2fwhat-is-the-purpose-of-set-order-in-magento2%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password