Super Attribute Position on Product Page Magento 1 Planned maintenance scheduled April 17/18,...
3 doors, three guards, one stone
Why did the IBM 650 use bi-quinary?
What do you call a plan that's an alternative plan in case your initial plan fails?
Why is there no army of Iron-Mans in the MCU?
Disable hyphenation for an entire paragraph
What are the pros and cons of Aerospike nosecones?
Letter Boxed validator
Why don't the Weasley twins use magic outside of school if the Trace can only find the location of spells cast?
How to deal with a team lead who never gives me credit?
Can inflation occur in a positive-sum game currency system such as the Stack Exchange reputation system?
Proof involving the spectral radius and the Jordan canonical form
How to find all the available tools in macOS terminal?
Right-skewed distribution with mean equals to mode?
How can players work together to take actions that are otherwise impossible?
Why is "Captain Marvel" translated as male in Portugal?
Using et al. for a last / senior author rather than for a first author
Stars Make Stars
How to motivate offshore teams and trust them to deliver?
Is it ethical to give a final exam after the professor has quit before teaching the remaining chapters of the course?
What is the longest distance a 13th-level monk can jump while attacking on the same turn?
Do you forfeit tax refunds/credits if you aren't required to and don't file by April 15?
What is the musical term for a note that continously plays through a melody?
How to bypass password on Windows XP account?
Why does Python start at index -1 when indexing a list from the end?
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
5 hours ago
which specific magento 1.9 version you are using?
– magefms
5 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
4 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 5 hours ago
roy philroy phil
563
563
New contributor
New contributor
you can check here magento.stackexchange.com/questions/45396/… this might help you
– magefms
5 hours ago
which specific magento 1.9 version you are using?
– magefms
5 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
4 hours ago
add a comment |
you can check here magento.stackexchange.com/questions/45396/… this might help you
– magefms
5 hours ago
which specific magento 1.9 version you are using?
– magefms
5 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
4 hours ago
you can check here magento.stackexchange.com/questions/45396/… this might help you
– magefms
5 hours ago
you can check here magento.stackexchange.com/questions/45396/… this might help you
– magefms
5 hours ago
which specific magento 1.9 version you are using?
– magefms
5 hours ago
which specific magento 1.9 version you are using?
– magefms
5 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
4 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
4 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
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
4 hours ago
you can set it inCatalog > Attributes > Manage Attributes >
– magefms
4 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
4 hours ago
okay let me check later I m driving now
– magefms
4 hours ago
thank you take care
– roy phil
4 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
2 hours 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
2 hours 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 2 hours ago
roy philroy phil
563
563
New contributor
New contributor
that's great. please mark your answer as accepted
– magefms
2 hours ago
add a comment |
that's great. please mark your answer as accepted
– magefms
2 hours ago
that's great. please mark your answer as accepted
– magefms
2 hours ago
that's great. please mark your answer as accepted
– magefms
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
4 hours ago
you can set it inCatalog > Attributes > Manage Attributes >
– magefms
4 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
4 hours ago
okay let me check later I m driving now
– magefms
4 hours ago
thank you take care
– roy phil
4 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
4 hours ago
you can set it inCatalog > Attributes > Manage Attributes >
– magefms
4 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
4 hours ago
okay let me check later I m driving now
– magefms
4 hours ago
thank you take care
– roy phil
4 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 4 hours ago
magefmsmagefms
2,6842528
2,6842528
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
4 hours ago
you can set it inCatalog > Attributes > Manage Attributes >
– magefms
4 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
4 hours ago
okay let me check later I m driving now
– magefms
4 hours ago
thank you take care
– roy phil
4 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
4 hours ago
you can set it inCatalog > Attributes > Manage Attributes >
– magefms
4 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
4 hours ago
okay let me check later I m driving now
– magefms
4 hours ago
thank you take care
– roy phil
4 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
4 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
4 hours ago
you can set it in
Catalog > Attributes > Manage Attributes >
– magefms
4 hours ago
you can set it in
Catalog > Attributes > Manage Attributes >
– magefms
4 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
4 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
4 hours ago
okay let me check later I m driving now
– magefms
4 hours ago
okay let me check later I m driving now
– magefms
4 hours ago
thank you take care
– roy phil
4 hours ago
thank you take care
– roy phil
4 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
5 hours ago
which specific magento 1.9 version you are using?
– magefms
5 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
4 hours ago