Magento Forum

   
Use extra attributes ior price calculation in cart
 
davy
Jr. Member
 
Total Posts:  20
Joined:  2008-01-21
 

I have extra attributes price2,qty2, price3, qty3 for every product in the database. I overwrote the getTierPrice() method in Catalog/Model/Product/Type/price.php code to simulate the tier price based system. (I add the extra attributes to layout/catalog.xml layout/catalogsearch.xml)
This worked fine in Magento 1.0.
In Magento 1.1 however price will display incorrectly: the calculated price in the cart (and sidebar after refresh) is always the base price. I don’t manage to grab the new way price is calculated (where?).

What am I missing for version 1.1?

Any help is mostly appreciated.

 
Magento Community Magento Community
Magento Community
Magento Community
 
davy
Jr. Member
 
Total Posts:  20
Joined:  2008-01-21
 

I could narrow the problem to the custom attributes (which are not visible on the frontend) not being read. Where should I add them so that they will be taken into account when the price gets calculated for the cart?

 
Magento Community Magento Community
Magento Community
Magento Community
 
LindyKyaw
Sr. Member
 
Avatar
Total Posts:  138
Joined:  2008-01-02
Los Angeles
 

sounds like issue similar to this post
http://www.magentocommerce.com/boards/viewthread/1610/P30/#t49457
where you need to have addAttributeToSelect to the collection object

 
Magento Community Magento Community
Magento Community
Magento Community
 
davy
Jr. Member
 
Total Posts:  20
Joined:  2008-01-21
 

Thanks,

solution was indeed to add it to Sales/Model/Mysql4/quote/Item/Collection.php function _assignProducts

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top