Super Attribute Position on Product Page Magento 1





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}







4















Hello Good Day to All



I have Attribute "Malakas","Mahina","Payat"



On a Product Page it will Show



Malakas
--Choose an Option--
Mahina
--Choose an Option--
Payat
--Choose an Option--


Is this a way to change the Postiton of Super Attribute so the Attribute "Payat" will be first ??



Payat
--Choose an Option--
Malakas
--Choose an Option--
Mahina
--Choose an Option--


I already try the Position and still not working on product view Page only the Left side bar is working for Postion



the Option Drag and Drop while Create product can be use but is there a way to make it default attribute



or is there a ways to change the code on the configurable Product Option so to use Attribute Position ?



Thank










share|improve this question







New contributor




roy phil is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





















  • you can check here magento.stackexchange.com/questions/45396/… this might help you

    – magefms
    3 hours ago











  • which specific magento 1.9 version you are using?

    – magefms
    3 hours ago











  • @magefm I'm using the latest one 1.9.4.0 it seems the link that you give for me is for the sorting of Attribute( the choose option )

    – roy phil
    3 hours ago




















4















Hello Good Day to All



I have Attribute "Malakas","Mahina","Payat"



On a Product Page it will Show



Malakas
--Choose an Option--
Mahina
--Choose an Option--
Payat
--Choose an Option--


Is this a way to change the Postiton of Super Attribute so the Attribute "Payat" will be first ??



Payat
--Choose an Option--
Malakas
--Choose an Option--
Mahina
--Choose an Option--


I already try the Position and still not working on product view Page only the Left side bar is working for Postion



the Option Drag and Drop while Create product can be use but is there a way to make it default attribute



or is there a ways to change the code on the configurable Product Option so to use Attribute Position ?



Thank










share|improve this question







New contributor




roy phil is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





















  • you can check here magento.stackexchange.com/questions/45396/… this might help you

    – magefms
    3 hours ago











  • which specific magento 1.9 version you are using?

    – magefms
    3 hours ago











  • @magefm I'm using the latest one 1.9.4.0 it seems the link that you give for me is for the sorting of Attribute( the choose option )

    – roy phil
    3 hours ago
















4












4








4








Hello Good Day to All



I have Attribute "Malakas","Mahina","Payat"



On a Product Page it will Show



Malakas
--Choose an Option--
Mahina
--Choose an Option--
Payat
--Choose an Option--


Is this a way to change the Postiton of Super Attribute so the Attribute "Payat" will be first ??



Payat
--Choose an Option--
Malakas
--Choose an Option--
Mahina
--Choose an Option--


I already try the Position and still not working on product view Page only the Left side bar is working for Postion



the Option Drag and Drop while Create product can be use but is there a way to make it default attribute



or is there a ways to change the code on the configurable Product Option so to use Attribute Position ?



Thank










share|improve this question







New contributor




roy phil is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.












Hello Good Day to All



I have Attribute "Malakas","Mahina","Payat"



On a Product Page it will Show



Malakas
--Choose an Option--
Mahina
--Choose an Option--
Payat
--Choose an Option--


Is this a way to change the Postiton of Super Attribute so the Attribute "Payat" will be first ??



Payat
--Choose an Option--
Malakas
--Choose an Option--
Mahina
--Choose an Option--


I already try the Position and still not working on product view Page only the Left side bar is working for Postion



the Option Drag and Drop while Create product can be use but is there a way to make it default attribute



or is there a ways to change the code on the configurable Product Option so to use Attribute Position ?



Thank







magento-1.9 product-attribute






share|improve this question







New contributor




roy phil is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question







New contributor




roy phil is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question






New contributor




roy phil is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked 3 hours ago









roy philroy phil

512




512




New contributor




roy phil is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





roy phil is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






roy phil is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.













  • you can check here magento.stackexchange.com/questions/45396/… this might help you

    – magefms
    3 hours ago











  • which specific magento 1.9 version you are using?

    – magefms
    3 hours ago











  • @magefm I'm using the latest one 1.9.4.0 it seems the link that you give for me is for the sorting of Attribute( the choose option )

    – roy phil
    3 hours ago





















  • you can check here magento.stackexchange.com/questions/45396/… this might help you

    – magefms
    3 hours ago











  • which specific magento 1.9 version you are using?

    – magefms
    3 hours ago











  • @magefm I'm using the latest one 1.9.4.0 it seems the link that you give for me is for the sorting of Attribute( the choose option )

    – roy phil
    3 hours ago



















you can check here magento.stackexchange.com/questions/45396/… this might help you

– magefms
3 hours ago





you can check here magento.stackexchange.com/questions/45396/… this might help you

– magefms
3 hours ago













which specific magento 1.9 version you are using?

– magefms
3 hours ago





which specific magento 1.9 version you are using?

– magefms
3 hours ago













@magefm I'm using the latest one 1.9.4.0 it seems the link that you give for me is for the sorting of Attribute( the choose option )

– roy phil
3 hours ago







@magefm I'm using the latest one 1.9.4.0 it seems the link that you give for me is for the sorting of Attribute( the choose option )

– roy phil
3 hours ago












2 Answers
2






active

oldest

votes


















3














I check the magento collection.php thank you @magefms



    /**
* Set order collection by Position
*
* @param string $dir
* @return Mage_Catalog_Model_Resource_Product_Type_Configurable_Attribute_Collection
*/
public function orderByPosition($dir = self::SORT_ORDER_ASC)
{
$this->setOrder('position ', $dir);
return $this;
}



Lucky for me my Attribute created at the same time so i achieve what i want
Ijust change



  public function orderByPosition($dir = self::SORT_ORDER_DESC)


thanks






share|improve this answer








New contributor




roy phil is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





















  • that's great. please mark your answer as accepted

    – magefms
    1 hour ago



















2














Try this fix:

Copy the file



app/code/core/Mage/Catalog/Model/Resource/Product/Type/Configurable/Attribute/Collection.php


to local folder



app/code/local/Mage/Catalog/Model/Resource/Product/Type/Configurable/Attribute/Collection.php  



Please add the following code in line 305




$sortOrder = 1;
foreach ($this->_items as $item) {
$productAttribute = $item->getProductAttribute();
if (!($productAttribute instanceof Mage_Eav_Model_Entity_Attribute_Abstract)) {
Continue;
}
$options = $productAttribute->getFrontend()->getSelectOptions();
foreach ($options as $option) {
if (!$option['value']) continue;
if (isset($values[$item->getId() . ':' . $option['value']])) {
$values[$item->getId() . ':' . $option['value']]['order'] = $sortOrder++;
}
}
}
usort($values, function($a, $b) {
return $a['order'] - $b['order'];
});


The code given should be placed above the code of Magento shown below:



foreach ($values as $data) {

$this->getItemById($data[‘product_super_attribute_id’])->addPrice($data);

}


After the above changes, clear the cache and check if it works.






share|improve this answer
























  • Hi magefms thank you for your help still the same the position of super attribute "Malakas","Mahina","Payat" still same is there a way the magento use position so if i save Payat - Position 1 and Malakas as postion 2 and Mahina for position 3 so i will show like this

    – roy phil
    3 hours ago











  • you can set it in Catalog > Attributes > Manage Attributes >

    – magefms
    3 hours ago











  • hi magefms thank you for your answer but i believe the position is only work at the left side filter not on the Product view page

    – roy phil
    3 hours ago











  • okay let me check later I m driving now

    – magefms
    2 hours ago











  • thank you take care

    – roy phil
    2 hours ago












Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "479"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});






roy phil is a new contributor. Be nice, and check out our Code of Conduct.










draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f270221%2fsuper-attribute-position-on-product-page-magento-1%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























2 Answers
2






active

oldest

votes








2 Answers
2






active

oldest

votes









active

oldest

votes






active

oldest

votes









3














I check the magento collection.php thank you @magefms



    /**
* Set order collection by Position
*
* @param string $dir
* @return Mage_Catalog_Model_Resource_Product_Type_Configurable_Attribute_Collection
*/
public function orderByPosition($dir = self::SORT_ORDER_ASC)
{
$this->setOrder('position ', $dir);
return $this;
}



Lucky for me my Attribute created at the same time so i achieve what i want
Ijust change



  public function orderByPosition($dir = self::SORT_ORDER_DESC)


thanks






share|improve this answer








New contributor




roy phil is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





















  • that's great. please mark your answer as accepted

    – magefms
    1 hour ago
















3














I check the magento collection.php thank you @magefms



    /**
* Set order collection by Position
*
* @param string $dir
* @return Mage_Catalog_Model_Resource_Product_Type_Configurable_Attribute_Collection
*/
public function orderByPosition($dir = self::SORT_ORDER_ASC)
{
$this->setOrder('position ', $dir);
return $this;
}



Lucky for me my Attribute created at the same time so i achieve what i want
Ijust change



  public function orderByPosition($dir = self::SORT_ORDER_DESC)


thanks






share|improve this answer








New contributor




roy phil is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





















  • that's great. please mark your answer as accepted

    – magefms
    1 hour ago














3












3








3







I check the magento collection.php thank you @magefms



    /**
* Set order collection by Position
*
* @param string $dir
* @return Mage_Catalog_Model_Resource_Product_Type_Configurable_Attribute_Collection
*/
public function orderByPosition($dir = self::SORT_ORDER_ASC)
{
$this->setOrder('position ', $dir);
return $this;
}



Lucky for me my Attribute created at the same time so i achieve what i want
Ijust change



  public function orderByPosition($dir = self::SORT_ORDER_DESC)


thanks






share|improve this answer








New contributor




roy phil is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.










I check the magento collection.php thank you @magefms



    /**
* Set order collection by Position
*
* @param string $dir
* @return Mage_Catalog_Model_Resource_Product_Type_Configurable_Attribute_Collection
*/
public function orderByPosition($dir = self::SORT_ORDER_ASC)
{
$this->setOrder('position ', $dir);
return $this;
}



Lucky for me my Attribute created at the same time so i achieve what i want
Ijust change



  public function orderByPosition($dir = self::SORT_ORDER_DESC)


thanks







share|improve this answer








New contributor




roy phil is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this answer



share|improve this answer






New contributor




roy phil is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









answered 1 hour ago









roy philroy phil

512




512




New contributor




roy phil is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





roy phil is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






roy phil is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.













  • that's great. please mark your answer as accepted

    – magefms
    1 hour ago



















  • that's great. please mark your answer as accepted

    – magefms
    1 hour ago

















that's great. please mark your answer as accepted

– magefms
1 hour ago





that's great. please mark your answer as accepted

– magefms
1 hour ago













2














Try this fix:

Copy the file



app/code/core/Mage/Catalog/Model/Resource/Product/Type/Configurable/Attribute/Collection.php


to local folder



app/code/local/Mage/Catalog/Model/Resource/Product/Type/Configurable/Attribute/Collection.php  



Please add the following code in line 305




$sortOrder = 1;
foreach ($this->_items as $item) {
$productAttribute = $item->getProductAttribute();
if (!($productAttribute instanceof Mage_Eav_Model_Entity_Attribute_Abstract)) {
Continue;
}
$options = $productAttribute->getFrontend()->getSelectOptions();
foreach ($options as $option) {
if (!$option['value']) continue;
if (isset($values[$item->getId() . ':' . $option['value']])) {
$values[$item->getId() . ':' . $option['value']]['order'] = $sortOrder++;
}
}
}
usort($values, function($a, $b) {
return $a['order'] - $b['order'];
});


The code given should be placed above the code of Magento shown below:



foreach ($values as $data) {

$this->getItemById($data[‘product_super_attribute_id’])->addPrice($data);

}


After the above changes, clear the cache and check if it works.






share|improve this answer
























  • Hi magefms thank you for your help still the same the position of super attribute "Malakas","Mahina","Payat" still same is there a way the magento use position so if i save Payat - Position 1 and Malakas as postion 2 and Mahina for position 3 so i will show like this

    – roy phil
    3 hours ago











  • you can set it in Catalog > Attributes > Manage Attributes >

    – magefms
    3 hours ago











  • hi magefms thank you for your answer but i believe the position is only work at the left side filter not on the Product view page

    – roy phil
    3 hours ago











  • okay let me check later I m driving now

    – magefms
    2 hours ago











  • thank you take care

    – roy phil
    2 hours ago
















2














Try this fix:

Copy the file



app/code/core/Mage/Catalog/Model/Resource/Product/Type/Configurable/Attribute/Collection.php


to local folder



app/code/local/Mage/Catalog/Model/Resource/Product/Type/Configurable/Attribute/Collection.php  



Please add the following code in line 305




$sortOrder = 1;
foreach ($this->_items as $item) {
$productAttribute = $item->getProductAttribute();
if (!($productAttribute instanceof Mage_Eav_Model_Entity_Attribute_Abstract)) {
Continue;
}
$options = $productAttribute->getFrontend()->getSelectOptions();
foreach ($options as $option) {
if (!$option['value']) continue;
if (isset($values[$item->getId() . ':' . $option['value']])) {
$values[$item->getId() . ':' . $option['value']]['order'] = $sortOrder++;
}
}
}
usort($values, function($a, $b) {
return $a['order'] - $b['order'];
});


The code given should be placed above the code of Magento shown below:



foreach ($values as $data) {

$this->getItemById($data[‘product_super_attribute_id’])->addPrice($data);

}


After the above changes, clear the cache and check if it works.






share|improve this answer
























  • Hi magefms thank you for your help still the same the position of super attribute "Malakas","Mahina","Payat" still same is there a way the magento use position so if i save Payat - Position 1 and Malakas as postion 2 and Mahina for position 3 so i will show like this

    – roy phil
    3 hours ago











  • you can set it in Catalog > Attributes > Manage Attributes >

    – magefms
    3 hours ago











  • hi magefms thank you for your answer but i believe the position is only work at the left side filter not on the Product view page

    – roy phil
    3 hours ago











  • okay let me check later I m driving now

    – magefms
    2 hours ago











  • thank you take care

    – roy phil
    2 hours ago














2












2








2







Try this fix:

Copy the file



app/code/core/Mage/Catalog/Model/Resource/Product/Type/Configurable/Attribute/Collection.php


to local folder



app/code/local/Mage/Catalog/Model/Resource/Product/Type/Configurable/Attribute/Collection.php  



Please add the following code in line 305




$sortOrder = 1;
foreach ($this->_items as $item) {
$productAttribute = $item->getProductAttribute();
if (!($productAttribute instanceof Mage_Eav_Model_Entity_Attribute_Abstract)) {
Continue;
}
$options = $productAttribute->getFrontend()->getSelectOptions();
foreach ($options as $option) {
if (!$option['value']) continue;
if (isset($values[$item->getId() . ':' . $option['value']])) {
$values[$item->getId() . ':' . $option['value']]['order'] = $sortOrder++;
}
}
}
usort($values, function($a, $b) {
return $a['order'] - $b['order'];
});


The code given should be placed above the code of Magento shown below:



foreach ($values as $data) {

$this->getItemById($data[‘product_super_attribute_id’])->addPrice($data);

}


After the above changes, clear the cache and check if it works.






share|improve this answer













Try this fix:

Copy the file



app/code/core/Mage/Catalog/Model/Resource/Product/Type/Configurable/Attribute/Collection.php


to local folder



app/code/local/Mage/Catalog/Model/Resource/Product/Type/Configurable/Attribute/Collection.php  



Please add the following code in line 305




$sortOrder = 1;
foreach ($this->_items as $item) {
$productAttribute = $item->getProductAttribute();
if (!($productAttribute instanceof Mage_Eav_Model_Entity_Attribute_Abstract)) {
Continue;
}
$options = $productAttribute->getFrontend()->getSelectOptions();
foreach ($options as $option) {
if (!$option['value']) continue;
if (isset($values[$item->getId() . ':' . $option['value']])) {
$values[$item->getId() . ':' . $option['value']]['order'] = $sortOrder++;
}
}
}
usort($values, function($a, $b) {
return $a['order'] - $b['order'];
});


The code given should be placed above the code of Magento shown below:



foreach ($values as $data) {

$this->getItemById($data[‘product_super_attribute_id’])->addPrice($data);

}


After the above changes, clear the cache and check if it works.







share|improve this answer












share|improve this answer



share|improve this answer










answered 3 hours ago









magefmsmagefms

2,6692528




2,6692528













  • Hi magefms thank you for your help still the same the position of super attribute "Malakas","Mahina","Payat" still same is there a way the magento use position so if i save Payat - Position 1 and Malakas as postion 2 and Mahina for position 3 so i will show like this

    – roy phil
    3 hours ago











  • you can set it in Catalog > Attributes > Manage Attributes >

    – magefms
    3 hours ago











  • hi magefms thank you for your answer but i believe the position is only work at the left side filter not on the Product view page

    – roy phil
    3 hours ago











  • okay let me check later I m driving now

    – magefms
    2 hours ago











  • thank you take care

    – roy phil
    2 hours ago



















  • Hi magefms thank you for your help still the same the position of super attribute "Malakas","Mahina","Payat" still same is there a way the magento use position so if i save Payat - Position 1 and Malakas as postion 2 and Mahina for position 3 so i will show like this

    – roy phil
    3 hours ago











  • you can set it in Catalog > Attributes > Manage Attributes >

    – magefms
    3 hours ago











  • hi magefms thank you for your answer but i believe the position is only work at the left side filter not on the Product view page

    – roy phil
    3 hours ago











  • okay let me check later I m driving now

    – magefms
    2 hours ago











  • thank you take care

    – roy phil
    2 hours ago

















Hi magefms thank you for your help still the same the position of super attribute "Malakas","Mahina","Payat" still same is there a way the magento use position so if i save Payat - Position 1 and Malakas as postion 2 and Mahina for position 3 so i will show like this

– roy phil
3 hours ago





Hi magefms thank you for your help still the same the position of super attribute "Malakas","Mahina","Payat" still same is there a way the magento use position so if i save Payat - Position 1 and Malakas as postion 2 and Mahina for position 3 so i will show like this

– roy phil
3 hours ago













you can set it in Catalog > Attributes > Manage Attributes >

– magefms
3 hours ago





you can set it in Catalog > Attributes > Manage Attributes >

– magefms
3 hours ago













hi magefms thank you for your answer but i believe the position is only work at the left side filter not on the Product view page

– roy phil
3 hours ago





hi magefms thank you for your answer but i believe the position is only work at the left side filter not on the Product view page

– roy phil
3 hours ago













okay let me check later I m driving now

– magefms
2 hours ago





okay let me check later I m driving now

– magefms
2 hours ago













thank you take care

– roy phil
2 hours ago





thank you take care

– roy phil
2 hours ago










roy phil is a new contributor. Be nice, and check out our Code of Conduct.










draft saved

draft discarded


















roy phil is a new contributor. Be nice, and check out our Code of Conduct.













roy phil is a new contributor. Be nice, and check out our Code of Conduct.












roy phil is a new contributor. Be nice, and check out our Code of Conduct.
















Thanks for contributing an answer to Magento Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f270221%2fsuper-attribute-position-on-product-page-magento-1%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Ponta tanko

Tantalo (mitologio)

Erzsébet Schaár