Magento PHP Joomla Wordpress MySQL Jquery Ajax HTML CSS Blog

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...

PHP: Easily send email with PHPMailer 1

PHP: Easily send email with PHPMailer

PHP Mailer is a PHP class for PHP that provides a package of functions to send email. It is an efficient way to send e-mail within PHP. The following are some features of PHPMailer:-...

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 – 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...