Super Attribute Position on Product Page Magento 1 Planned maintenance scheduled April 17/18,...
How can I make names more distinctive without making them longer?
If Jon Snow became King of the Seven Kingdoms what would his regnal number be?
Single word antonym of "flightless"
How do I stop a creek from eroding my steep embankment?
How does a Death Domain cleric's Touch of Death feature work with Touch-range spells delivered by familiars?
Why is black pepper both grey and black?
Why is "Consequences inflicted." not a sentence?
How to do this path/lattice with tikz
Can inflation occur in a positive-sum game currency system such as the Stack Exchange reputation system?
Why is "Captain Marvel" translated as male in Portugal?
List *all* the tuples!
What are the motives behind Cersei's orders given to Bronn?
What are the pros and cons of Aerospike nosecones?
Models of set theory where not every set can be linearly ordered
How much radiation do nuclear physics experiments expose researchers to nowadays?
If a contract sometimes uses the wrong name, is it still valid?
Is there a documented rationale why the House Ways and Means chairman can demand tax info?
Is the Standard Deduction better than Itemized when both are the same amount?
do i need a schengen visa for a direct flight to amsterdam?
How do I mention the quality of my school without bragging
Disable hyphenation for an entire paragraph
Does surprise arrest existing movement?
Determinant is linear as a function of each of the rows of the matrix.
How to deal with a team lead who never gives me credit?
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
362
362
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
2 hours ago
you can set it inCatalog > Attributes > Manage Attributes >
– magefms
2 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
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
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
362
362
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
2 hours ago
you can set it inCatalog > Attributes > Manage Attributes >
– magefms
2 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
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
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
2 hours ago
you can set it inCatalog > Attributes > Manage Attributes >
– magefms
2 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
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
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,6592528
2,6592528
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
2 hours ago
you can set it inCatalog > Attributes > Manage Attributes >
– magefms
2 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
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
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
2 hours ago
you can set it inCatalog > Attributes > Manage Attributes >
– magefms
2 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
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
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
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
2 hours ago
you can set it in
Catalog > Attributes > Manage Attributes >
– magefms
2 hours ago
you can set it in
Catalog > Attributes > Manage Attributes >
– magefms
2 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
2 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
2 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