¡@

Home 

php Programming Glossary: getsingleton

How to access Magento user's session from outside Magento?

http://stackoverflow.com/questions/1098871/how-to-access-magento-users-session-from-outside-magento

.' shop app Mage.php' umask 0 Mage app 'default' Mage getSingleton 'core session' array 'name' 'frontend' var_dump Mage getSingleton.. 'core session' array 'name' 'frontend' var_dump Mage getSingleton 'customer session' isLoggedIn I keep getting bool false returned...

Get Order Increment Id in Magento

http://stackoverflow.com/questions/2195743/get-order-increment-id-in-magento

but it is giving an error on the second line order Mage getSingleton 'sales order' getLastOrderId lastOrderId order getIncrementId.. on other pages so for those you'd need to use orderId Mage getSingleton 'checkout session' getLastRealOrderId share improve this answer..

Magento - Passing data between a controller and a block

http://stackoverflow.com/questions/4006183/magento-passing-data-between-a-controller-and-a-block

In the controller instantiate that object using the Mage getSingleton 'foo bar' Set values on the Model using the magic getter setters.. etc. In the Blocks instantiate the Model again with a Mage getSingleton 'foo bar' and read the values back. When you instantiate a Model.. the values back. When you instantiate a Model with Mage getSingleton ... Magento will instantiate the object as a singleton . So..

Current user in Magento?

http://stackoverflow.com/questions/416553/current-user-in-magento

if empty this _data 'welcome' if Mage app isInstalled Mage getSingleton 'customer session' isLoggedIn this _data 'welcome' this __.. isLoggedIn this _data 'welcome' this __ 'Welcome s ' Mage getSingleton 'customer session' getCustomer getName else this _data 'welcome'.. return this _data 'welcome' So it looks like Mage getSingleton 'customer session' getCustomer will get your current logged..

Programmatically add product to cart with price change

http://stackoverflow.com/questions/5104482/programmatically-add-product-to-cart-with-price-change

possible Here is the code to add product to cart cart Mage getSingleton 'checkout cart' try cart addProduct product array 'qty' 1 cart..

Adding attributes to customer entity

http://stackoverflow.com/questions/5961290/adding-attributes-to-customer-entity

'999' sort_order oAttribute Mage getSingleton 'eav config' getAttribute 'customer' 'your_attribute_code_here'..

Magento - Programatically added bundle product isn't showing up in frontend

http://stackoverflow.com/questions/6161128/magento-programatically-added-bundle-product-isnt-showing-up-in-frontend

1 stockItem setData 'is_in_stock' 1 stockItem save pi Mage getSingleton 'bundle price_index' pi addPriceIndexToProduct product pi save..

Load block outside Magento, and apply current template

http://stackoverflow.com/questions/6347384/load-block-outside-magento-and-apply-current-template

__FILE__ .' store app Mage.php' app Mage app session Mage getSingleton 'core session' array 'name' 'frontend' block app getLayout getBlockSingleton..

Programatically retrieve list of all shipping methods

http://stackoverflow.com/questions/9433627/programatically-retrieve-list-of-all-shipping-methods

though. public function getAllShippingMethods methods Mage getSingleton 'shipping config' getActiveCarriers options array foreach methods.. function toOptionArray isMultiSelect false methods Mage getSingleton 'shipping config' getActiveCarriers options array foreach methods..

Magento Request - Frontend or Backend?

http://stackoverflow.com/questions/9693020/magento-request-frontend-or-backend

request object if that helps. I considered checking Mage getSingleton 'admin session' getUser but I don't think that's a very reliable..

How to access Magento customer's session from outside Magento?

http://stackoverflow.com/questions/9982210/how-to-access-magento-customers-session-from-outside-magento

' abs path to Mage.php' umask 0 Mage app 'default' Mage getSingleton 'core session' array 'name' 'frontend' session Mage getSingleton.. 'core session' array 'name' 'frontend' session Mage getSingleton 'customer session' Zend_Debug dump session isLoggedIn I checked..