Mage :: application () & # 8594; getStore () & # 8594; getWebsiteId ();

Mage :: application () → getStore () → getWebsiteId (); does not work in some blocks (called from instatianted Model).

If I remember correctly, it works in the basket block, but does not work in the Items cart block.

I thought it was an interesting problem. I also noticed that Mage :: getModel ('client / session') -> GetCustomer () -> getGroupId ();

also does not work in the same situation.

It works from a template in a block named: Mage_Checkout_Block_Cart

But it does not work from within the block: OrganicInternet_SimpleConfigurableProducts_Checkout_Block_Cart_Item_Renderer which is distributed by Mage_Checkout_Block_Cart_Item_Renderer

Any thoughts?

+3
source share
1 answer

What version of magento?

, , -. Ive Mage:: app() → getStore() → getWebsite() → getId(); getWebsiteId , , , . , , .

, getModel, "singleton", magento Mage:: getSingleton ( "/" ).

, .

+1

All Articles