search
top

Magento Set Admin Store

There are times when we need to use the admin access to execute tasks. For example you want to call admin URLs etc. There is a simple way to do that, you need to change the current store to admin...
read more

Get all product attributes in Magento

Hello All, I am writing here a simple but important code snippet for getting all the existing product attributes $attributes = Mage::getSingleton('catalog/config')->getProductAttributes(); echo...
read more

Get creditcard type in Magento

Hello All, I am writing here a script snippet for getting the credit card type used in the order $order_id = 100; //order id goes here $_order = Mage::getModel('sales/order')->load($order_id);...
read more

Get customer order count in Magento

Hello All, I am writing here a script snippet for getting the orders count for given customer < ?php $customer_id = 5; $_orders = Mage::getModel('sales/order')->getCollection()->addFieldToFilter('customer_id',$customer_id);...
read more

Product Quantities Ordered in Magento

I am explaining here the way to display the total quantities ordered in the Product view page. I have used Magento version 1.7.0.2 1) Block file Create a file app/code/local/Mage/Catalog/Block/Product/View/Quantity.php...
read more

Directory paths in Magento

Hello All, I am writing here the code to get various base directory paths, which might be useful. Assuming the directory is named ‘magento’ where your site is present and its the...
read more

Order State and Status in Magento

Many of you might have come across the requirement, where they needed to change the order status dynamically. Difference between order state and status State is used by Magento to tell if the...
read more

First and Last collection item in Magento

We the Magento developers work mostly with data collections. For accessing the data we use ‘foreach’ to iterate over collection. $product_collection = Mage::getModel('catalog/product') ...
read more

« Previous Entries Next Entries »

top