Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Edit configurable product code
 
Mario B.
Jr. Member
 
Total Posts:  7
Joined:  2008-10-16
 

Is it possible, in configurable product to show the price of the simple product instead of the price obtained from the combination of single attibutes?
That’s because I can’t update (by a schedule script that take data from a data base whit the price of single product) the value of single attirbute price but I can do it for the simple product .
Thanks in advance.
Mario

 
Magento Community Magento Community
Magento Community
Magento Community
 
Brent W Peterson
Moderator
 
Avatar
Total Posts:  3217
Joined:  2009-02-26
Minneapolis MN
 

Here is a simple approach to what you want. I am doing this here

http://new.midwestsupplies.com/beer.html

public function _getLowPrice($productId)
    
{
        $pa 
= array();
        
$price 'No price available';
        
$val $this->_getLinkedProducts($productId);
        
        if(
count($val) > 0)
        
{
            
foreach    ($val as $item)
            
{
                $pa[] 
$this->_getPrice($item['product_id']);
            
}
            
            $price 
min($pa);            
        
}    
        
        
return $price;        
    
}
 
Magento Community Magento Community
Magento Community
Magento Community
 
Mario B.
Jr. Member
 
Total Posts:  7
Joined:  2008-10-16
 

Thanks for the help.
I like your approach: results in correctly.
But it does not work in the product page: http://new.midwestsupplies.com/black-malt-briess.html
My code is “dirty” but works fine (http://www.yachtpaints.it/antivegetativa-erodente-autolevigante-international-micron-extra.html) for these two attributes:
$colore = $_item->getAttributeText(’yp_colori’);
$confezione = $_item->getAttributeText(’yc_contenuto’);
Maybe some expert will write it better..

File Attachments
grouped.phtml  (File Size: 7KB - Downloads: 62)
 
Magento Community Magento Community
Magento Community
Magento Community
 
Brent W Peterson
Moderator
 
Avatar
Total Posts:  3217
Joined:  2009-02-26
Minneapolis MN
 

I wrote this as a custom module so it will work on any page.

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