Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6055877
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T08:18:49+00:00 2026-05-23T08:18:49+00:00

I am looking to change the order in which a list is being brought

  • 0

I am looking to change the order in which a list is being brought together in our Magento cart.

We have the following coding:

public function getOptionList()
{
    $options = false;
    if (Mage::getStoreConfig('SCP_options/cart/show_custom_options')) {
        $options = parent::getOptionList();
    }

    if (Mage::getStoreConfig('SCP_options/cart/show_config_product_options')) {
        if ($this->getConfigurableProductParentId()) {
            $attributes = $this->getConfigurableProductParent()
                ->getTypeInstance()
                ->getUsedProductAttributes();
            foreach($attributes as $attribute) {
                $options[] = array(
                    'label' => $attribute->getFrontendLabel(),
                    'value' => $this->getProduct()->getAttributeText($attribute->getAttributeCode()),
                    'option_id' => $attribute->getId(),
                );
            }
        }
    }
    return $options;
}

Which displays the following: http://awesomescreenshot.com/053ffeie9

We are looking to swap the Attributes and Options over so the Attributes display at the top of the item.

In the coding we’ve established that the top if statement is for options and the bottom if statement is for the attributes, so theory being it should just be a case of swapping them over… unfortunately it doesn’t seem as simple as that.

If we swap them the attributes don’t show but the options do.

Would someone be able to recommend anything to try as we’re getting very frustrated trying to sort this.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T08:18:49+00:00Added an answer on May 23, 2026 at 8:18 am

    swap them and then use array_merge on the bottom half. When you swap them, the second part was just assigning options and wiping out the attributes part. This puts the two together instead of overwriting:

    if (Mage::getStoreConfig('SCP_options/cart/show_custom_options')) {
        $options = array_merge($options, parent::getOptionList();
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is the scenario: I have a list of about 5000 URLs which have
As some of you might have noticed, Android changed the order in which the
I have a list of widgets which needs to be sorted. I want to
I'm looking to change the hue of my background image (PNG) programmatically. How can
I am looking to change min-height attribute of textwidget class, to adjust the height
I am looking how to change a logo based on either class in the
I work with MEF and I am looking how to change the url of
I was looking at how to change the cursor over an HTML5 canvas when
I'm looking for a way to change a color's tone, knowing it's RGB composition,
I am looking for a way to change the value of the DisplayName attribute

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.