Magento Themes and Magento Extensions

Magento Clear Shopping Cart and Session

Share
Posted on March 4th, 2013 | Posted by admin

If you ever need to programmatically clear Magento’s shopping cart, use the snippet of code below. If you need to clear the user’s entire session, including the shopping cart, shipping information, billing information and chosen payment methods, please refer to the snippet further below.

Clear shopping cart

foreach( Mage::getSingleton('checkout/session')->getQuote()->getItemsCollection() as $item ){
    Mage::getSingleton('checkout/cart')->removeItem( $item->getId() )->save();
}

HOW TO ADD A ROBOTS.TXT FILE ONTO YOUR MAGENTO STORE

Share
Posted on March 2nd, 2013 | Posted by admin

HOW TO ADD A ROBOTS.TXT FILE ONTO YOUR MAGENTO STORE
A web robot or simply robot can be described as a program that starts a specific function on the web that too automatically. It doesn’t matter if it’s for search engine indexing or simply for HTML and link validation.

Two of the most common web robots are: – Googlebot & Bingbot.

A measure of data that is sent across the internet is termed as bandwidth; every time a person visits your website a portion of bandwidth is utilized. Same is the case with web-robots; every time a web-robot visits your website they in turn utilize a small part of bandwidth.

Page 6 of 6« First...«23456