Super Attribute Position on Product Page Magento 1 Planned maintenance scheduled April 17/18,...
How to do this path/lattice with tikz
What are 'alternative tunings' of a guitar and why would you use them? Doesn't it make it more difficult to play?
What happens to sewage if there is no river near by?
Single word antonym of "flightless"
How to bypass password on Windows XP account?
What is the longest distance a 13th-level monk can jump while attacking on the same turn?
Does surprise arrest existing movement?
Antler Helmet: Can it work?
How can players work together to take actions that are otherwise impossible?
What would be the ideal power source for a cybernetic eye?
Storing hydrofluoric acid before the invention of plastics
3 doors, three guards, one stone
Do I really need recursive chmod to restrict access to a folder?
What are the pros and cons of Aerospike nosecones?
Is there a concise way to say "all of the X, one of each"?
Are my PIs rude or am I just being too sensitive?
What are the motives behind Cersei's orders given to Bronn?
Is there a "higher Segal conjecture"?
Should I discuss the type of campaign with my players?
Letter Boxed validator
Did Kevin spill real chili?
What makes black pepper strong or mild?
Gastric acid as a weapon
Why constant symbols in a language?
Super Attribute Position on Product Page Magento 1
Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)
Announcing the arrival of Valued Associate #679: Cesar Manara
Unicorn Meta Zoo #1: Why another podcast?Magento 1.9.1 configurable product attribute sortingMagento configurable product with Multiple select option, not drop downRemove or unset super attribute from cart in magentoConfigurable Products Super product attribute prices don't add onSome product options remain disabled after the first selectionProgramitically created attribute displaying incorrect attribute optionsget Drop down option on product view page from a multipal select custom attributeI need custom sorting based on position and best sellerMagento 2 Create/Add new required attribute to current productsMagento get Configurable option sort by min pricemagento 1.9 how to get the associated products of a configurable sorted by super attribute position?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}
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
New contributor
add a comment |
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
New contributor
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
add a comment |
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
New contributor
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
magento-1.9 product-attribute
New contributor
New contributor
New contributor
asked 3 hours ago
roy philroy phil
513
513
New contributor
New contributor
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
add a comment |
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
add a comment |
2 Answers
2
active
oldest
votes
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
New contributor
that's great. please mark your answer as accepted
– magefms
1 hour ago
add a comment |
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.
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 inCatalog > 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
add a comment |
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.
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
Required, but never shown
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
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
New contributor
that's great. please mark your answer as accepted
– magefms
1 hour ago
add a comment |
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
New contributor
that's great. please mark your answer as accepted
– magefms
1 hour ago
add a comment |
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
New contributor
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
New contributor
New contributor
answered 1 hour ago
roy philroy phil
513
513
New contributor
New contributor
that's great. please mark your answer as accepted
– magefms
1 hour ago
add a comment |
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
add a comment |
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.
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 inCatalog > 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
add a comment |
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.
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 inCatalog > 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
add a comment |
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.
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.
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 inCatalog > 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
add a comment |
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 inCatalog > 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
add a comment |
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.
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.
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
Required, but never shown
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
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
Required, but never shown
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
Required, but never shown
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
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
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