Category: Magento

0

Magento: Get real IP address behind a proxy

Get real IP address if your server or customer is behind a proxy network. Magento have function Mage::helper(‘core/http’)->getRemoteAddr(); to get client IP address, but it gives proxy IP address instead of real IP if...

How do I get a barcode in Magento email template 0

How do I get a barcode in Magento email template

I found this out while scouring the net on my quest for all my other recent problems. Zend has a built in barcode generation class, Zend_Barcode. Then googling php image output, I put together...

Magento: Include Layered Navigation In A CMS Page 4

Magento: Include Layered Navigation In A CMS Page

To add Magento’s layered navigation to a CMS page where you’re showing items simply edit your CMS page in the admin – under the “Design” tab put this code: This will show the layered...

Override Magento Core Files – Simplest Way 0

Override Magento Core Files – Simplest Way

There are several methods used for overriding magento core files. Here I’m going to explain one of simplest method to override core files in magento. In this method to override magento core files, you...

0

Magento: Clear / Delete Shopping Cart Items of Single or All Customers

Here is the code to delete all shopping cart items of currently logged in single customer:- $cart = Mage::getSingleton(‘checkout/cart’); $quoteItems = Mage::getSingleton(‘checkout/session’) ->getQuote() ->getItemsCollection(); foreach( $quoteItems as $item ){ $cart->removeItem( $item->getId() ); } $cart->save();...

Magento – get custom layout update of CMS Page 0

Magento – get custom layout update of CMS Page

Magento offers Custom Layout Update in the CMS page, that allows to add or remove any dynamic or static block in the CMS page. For example on the Home page we display featured products...

Magento – Change default order by in category list 0

Magento – Change default order by in category list

Magento category listing is ordered by ascending by default installation. Under the attribute settings, we can easily manage the element listing used to sort the products, but changing the sort order to descending requires...

Magento – enable admin template path hints 0

Magento – enable admin template path hints

Path hints is a very useful tool for Magento Theming as it let us know where exactly we have to go. It’s easy for front-end to enable the path hints and locate the template...

Magento – Database Queries 0

Magento – Database Queries

Magento is a complete and awesome MVC application. It’s fully moduler and easy to extend its features and functionality. All the CRUD operations are performed using the modules, model classes. But many a time...

Display product’s rating beyond the review page – Magento 0

Display product’s rating beyond the review page – Magento

Sometimes there is a need for showing star ratings outside the products review page. Reviews are another one of numerous excellent features in Magento. Usage of reviews can increase visitors’ trust in your brand,...

Magento – Filter order grid by multiple ID’s 0

Magento – Filter order grid by multiple ID’s

We all know how great Magento grids can be – there is no alternative when it comes to displaying data in a efficient manner. This can be useful if you have a number of...

Programmatically creating a simple Magento product 0

Programmatically creating a simple Magento product

I’ve spent the last few weeks to create a simple magento product programmatically and finally get solution for this. I am creating a simple product programmatically in Magento Store. There is nothing much to...