Skip to main content
added 68 characters in body
Source Link
Neklo.com
  • 2.4k
  • 1
  • 12
  • 19

Load product in foreach is a bad idea, though working.

Better way:

in config.xml

<global>
    <sales>
        <quote>
            <item>
                <product_attributes>
                    <dp_width/>
                    <dp_height/>
                    <dp_length/>
                </product_attributes>
            </item>
        </quote>
    </sales>
</global>

And...

$item->getProduct()->getAttributeText('dp_width');

Load product in foreach is a bad idea, though working.

Better way:

in config.xml

<global>
    <sales>
        <quote>
            <item>
                <product_attributes>
                    <dp_width/>
                    <dp_height/>
                    <dp_length/>
                </product_attributes>
            </item>
        </quote>
    </sales>
</global>

Load product in foreach is a bad idea, though working.

Better way:

in config.xml

<global>
    <sales>
        <quote>
            <item>
                <product_attributes>
                    <dp_width/>
                    <dp_height/>
                    <dp_length/>
                </product_attributes>
            </item>
        </quote>
    </sales>
</global>

And...

$item->getProduct()->getAttributeText('dp_width');
Source Link
Neklo.com
  • 2.4k
  • 1
  • 12
  • 19

Load product in foreach is a bad idea, though working.

Better way:

in config.xml

<global>
    <sales>
        <quote>
            <item>
                <product_attributes>
                    <dp_width/>
                    <dp_height/>
                    <dp_length/>
                </product_attributes>
            </item>
        </quote>
    </sales>
</global>