Get product attribute in checkout page in Magento 1.9

There are several ways to do it but this is the best one.

Add your attribute in app/etc/configs.xml:

<global>  
  <sales>
    <quote>
      <item>
        <product_attributes>
          <attribute_name/> <!-- Here your attribute name -->
        </product_attributes>
      </item>
    </quote>
  </sales>
</global>

Remember to clear the cache.

Now you can get the attribute from checkout page with this:

 <?php $productAttribute = $item->getProduct()->getAttributeText('attribute_name'); ?>

Categories

Category BootstrapCategory CoffeescriptCategory DrupalCategory GravCategory HTMLCategory JavascriptCategory JoomlaCategory jQueryCategory LaravelCategory MagentoCategory PHPCategory SharePointCategory SpringCategory ThymeleafCategory WordPressCategory Workflow

Comments

Developed and designed by Netgloo
© 2019 Netgloo