Magento Themes and Magento Extensions

How to call a custom variable inside a static block or an email template

Posted on September 9th, 2014 | Posted by admin

You have to use the following code:

{{customVar code=variable_code}}

and you replace the variable_code with your Variable Code.

Custom Variables is for email template, newsletter magento template, CMS page and static block only, you cannot use it in PHTML template.

Adding Custom Attributes to the Manage Products Admin Grid

Posted on March 7th, 2013 | Posted by admin

In magento: I was asked by a client if I could add a custom attribute to the admin manage products grid/list. They were spending a load of time clicking into each product just to see the attribute. Here is how I added it to the grid.

Copy app/code/core/Mage/Adminhtml/Block/Catalog/Product/Grid.php to

At around line 62 add the attribute you want to select to the collection:

Magento – Accessing Custom Product Attributes in the Cart/Checkout Area

Posted on February 9th, 2013 | Posted by admin

For some reason, I always tend to run into this problem and I forgot the solution I previously implemented. Sometimes, you Magento site will have custom product attributes that you’d like to be viewable from the cart/checkout areas. For performance reasons, the product available to the order/quote doesn’t contain all of the attributes.

Instead of querying the product new to retrieve the attributes, you can instead define what attributes you’d like to be loaded during the cart/checkout process within the a config.xml file. The structure will be as follows:

Delete Custom URL Rewrites in Magento

Posted on October 19th, 2012 | Posted by admin

If you have a lot of custom URL Rewrites on your Magento site and you want to delete them all in one click, then here is a nice small trick to get it done.

Goto phpmyadmin, select your database and then run this command,

DELETE FROM `core_url_rewrite` WHERE `core_url_rewrite`.`options` = 'RP';

How can we add in code a product to the cart with a custom option type file in Magento?

Posted on October 13th, 2012 | Posted by admin

I am adding the products into Magento is with custom option type file:

$cart = Mage::getModel('checkout/cart');
$pModel = Mage::getSingleton('catalog/product');
foreach($prodArray as $_prod){
  $products = explode("=",$_prod);
  $product_id = $products[0];
  $prod_qty = $products[1];
  $pModel = Mage::getModel('catalog/product')->load($product_id);
  try {
  catch (Exception $e) { continue; }
  echo  "<br>Product has been added to Cart of id: $product_id with Quantity: $prod_qty";
Page 1 of 212»