About sarg

Here at MageCorner I'm a software engineer - both frontend and backend. Experienced in Magento, CodeIgniter and PHP in general, well the whole LAMP stack. Have experience as a Project Manager and have also dabbled quite a bit in System Administration. Technology is my passion and I enjoy learning new technologies.

MySQL, PostgreSQL and SQLite data types comparisons

MySQL PostgreSQL SQLite int integer integer tinyint smallint integer smallint smallint integer mediumint integer integer bigint bigint integer bit bit integer int unsigned bigint integer smallint unsigned integer integer bigint unsigned numeric(20) integer   float real real double double precision real decimal decimal real numeric numeric real boolean boolean integer   date date text time time text datetime timestamp text … Continue reading

Magento cookies

Cookies in Magento are easy to work with. There may be a need to use cookies to pass data to or from Magento whether it is to identify users, track users or some other case. The Magento core has a cookie model to set, get and delete cookies.  So let’s get started with the code and some descriptions for usage. … Continue reading

Manual database calls

Connect and query Magento data Recently we had a need to incorporate a third party app into a Magento system. That got us thinking about using data between Magento and the app. To start, you should include the path to Magento. Specifically app/Mage.php file require(dirname(__FILE__) . ‘/app/Mage.php’); You will need to initialize the Magento application object. Mage::app(); We can now … Continue reading

List all payment methods in Magento

How to get a list with all available payment methods in Magento. If for any reason you need to a get a list with all payment methods in Magento, you can do it easily by using the payment config class (app/code/core/Mage/Payment/Model/Config.php). To get a list with all payments active and inactive: $allAvailablePaymentMethods = Mage::getModel(‘payment/config’)->getAllMethods(); To get a list with all … Continue reading

Bypass cart and go to checkout

Sometimes there is a need to bypass the Magento shopping cart and go straight to checkout. Maybe your products (or services) are such that most customers only buy one product so why not speed up checkout by bypassing the cart. Although Magento has an option in admin of whether to stay on product page or go to the shopping cart … Continue reading

MCorner Full Cache

Give Magento a boost with MCorner Full Cache extension. With the MCorner Full Cache extension, benefits on a magento ecommerce store are between 25% – 40%. Our full cache extension minimizes server requests and memory usage to decrease server loads. Increased site speed, increases visitors and SEO ranking. Look to adding APC cache with MCorner Full Cache and you will get … Continue reading

Magento APC cache

Many times we have heard how Magento is slow and bulky. Page load times are high. This in turn puts off customers and affects SEO values. By default Magento uses its file system to save cache. This can become restrictive on larger sites with all the reads and writes to the file system. One quick and easy way to speed … Continue reading

Magento development and cache

Magento can be setup to use the various cache methods. These include sqlite, memcached, apc, eaccelerator, database and file types. The Magento cache can be found through the Mage_Core_Model_Cache model. Let’s access the cache. $cached = Mage::app()->getCache(); The methods available to the object $cached are listed below: load($id) save($data, $id, $tags=array(), $lifeTime=null) remove($id) clean($tags=array()) flush() Saving data to cache To save … Continue reading

Magento Category and Product Order

Magento offers simple category and product ordering although this may not be obvious at first. I thought I might share this simple information. Category ordering To change the order of categories, from within the Admin, go to Catalog -> Manage Categories. Simply drag and drop the category or subcategory to the location you need it. Product ordering As products can … Continue reading