Magento Themes and Magento Extensions

Codeigniter Multiple File Upload function

Posted on January 29th, 2013 | Posted by admin

in magento An easy function to upload two image by a html form.

function save_images()
$html = '';
$config['upload_path'] = './uploads/';
$config['allowed_types'] = 'gif|jpg|png|JPEG|jpeg|PNG|GIF|JPG';
$this->load->library('upload', $config);
if (!$this->upload->do_upload('pic1'))
$html .= $this->upload->display_errors();
$html .='<br />File Not Uploaded';

How to Delete Cache in CS Cart based site

Posted on January 27th, 2013 | Posted by admin

CS cart based site uses a very strong kind of cache mechanism. If you are trying to change the magento theme in order to change the design of the site. Then it might be that  even after selecting a new theme from admin section you wouldn’t find that your new theme is being applied with your current website. This happens due to heavy caching

There are two ways to delete Cache from CS Cart:

Step 1:

Now the question comes How to Delete Cache in CS Cart Site

Just Delete “Cache” folder that available in “Var” folder.

Magento development and cache

Posted on January 25th, 2013 | Posted by admin

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 model as a singleton.

$cached = Mage::getSingleton('core/cache');

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

magento how to debug code

Posted on January 24th, 2013 | Posted by admin

Though this may not be an accurate method to find solutions to bugs in magento. But i thought of sharing my approach:
1. Use the Developer hints. Enable it bu going to System->Configuration->Advanced->Developer->Debug. After that you will have to change “Current Configuration Scope” to “Default Store View”. This can change if you have a custom store view. Set “Template path hints” and “Add Block names to hints”. This will show that template file and the corresponding block responsible for the view in the frontend. And helps in locating the files and fixing issues.
2. Sometimes you may want to see the logs of the exceptions or the errors occurring. So you can enable them from “Log Settings” on the same page as above. This is really helpful.
3. Please note that if you want to add custom logs, you can do that as well, by using this command.

Include a phtml page in CMS Page – Magento

Posted on January 22nd, 2013 | Posted by admin

Include a phtml page in CMS Page – Magento

{{block type=”core/template” name=”list-categories” template=”catalog/category/newPage.phtml”}}

Page 1 of 512345»