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

Almost there. Just need a little push.. Magento storeid and product title
 
zshanthi
Member
 
Total Posts:  56
Joined:  2009-07-17
 

In the file

\\magento-1.4.2.0\\magento\\app\\code\\core\\Mage\\Catalog\\controllers\\ProductController.php

$product Mage::getModel(\'catalog/product\')
            ->
setStoreId(Mage::app()->getStore()->getId())
            ->
load($productId);

Now in this file

\\magento-1.4.2.0\\magento\\app\\code\\core\\Mage\\Catalog\\Model\\Product.php

The actual product details are retrieved

public function getName()
    
{
        
return $this->_getData(\'name\');
    
}

The above function returns the name/title of the product.

Please help me

Now this function getName() returns the CORRECT title for the CORRECT storeid ? How ?

Can anyone please point me to the actual function which finds the correct title for the correct storeid ?

Also one more thing for a particular storeid/productid how do I find out whether the product title is coming from default store or from the actual storeid ?

Shanthi

 
Magento Community Magento Community
Magento Community
Magento Community
 
zshanthi
Member
 
Total Posts:  56
Joined:  2009-07-17
 

can anyone tell me how or which part of the script determines which title/name to display for a product based on storeid ?

I.e a product can have a name/title for each storeid so which function is responsible for finding this out ?

 
Magento Community Magento Community
Magento Community
Magento Community
 
tzyganu
Mentor
 
Avatar
Total Posts:  2205
Joined:  2009-11-18
Bucharest, Romania
 

The part responsible for the title depending on the store view is

->setStoreId(Mage::app()->getStore()->getId())
You can check out how the Mage_Eav_Model_Entity_Abstract::load() method works (Sorry but I don’t know much about it).
 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top