12/31/2010

Some Importent Code

Get Current Store Currency Symbol:
echo Mage::helper('core')->currency('123.23')

Get country name by country code:
$countryModel = Mage::getModel(‘directory/country’)->loadByCode(‘country_code’);
$countryName = $countryModel->getName();
Get Item Quantity & Cart Subtotal
$cart = Mage::getModel('checkout/cart')->getQuote()->getData();
$_item_quantity = (int)$cart['items_qty']; ?
$_cart_subtotal = Mage::helper('core')->currency(number_format(Mage::getSingleton('checkout/session')->getQuote()->getSubtotal(),2))





Get Urls:
Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_JS);
//http://magento.demo/js/
Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_LINK);
//http://magento.demo/index.php/
Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA);
//http://magento.demo/media/
Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_SKIN);
//http://magento.demo/skin/
Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB);
//http://magento.demo/

google map generator link:
http://www.map-generator.org/

HTML Hack on browser:
.color {color: #777;} /* for all browsers */
* html .color {color: #C39;} /* for IE6 */
*+html .color {color: #66F;} /* for IE7 */
.color {color: #0FC\0/;} /* for IE8, going last */



List of Mandatory Fields for Product Import
  1. store
  2. websites
  3. attribute_set
  4. status
  5. visibility
  6. qty
  7. is_in_stock
  8. price_type
  9. sku_type
  10. weight_type
  11. price_view
  12. shipment_type

Get Attribute Option Value:
$attributeValue = Mage::getModel('catalog/product')
                            ->load($_product->getId())
                            ->getAttributeText('my_attribute');


4/24/2010

Magento Tips

Speed Up Magento
--------------------------------------------------------------------------------

Developer Tool-Kit

http://www.magentocommerce.com/extension/2271/developer-toolbar
Key: magento-community/HM_DeveloperToolbar

--------------------------------------------------------------------------------

Print The Product Detail Page
http://ajmaltash.wordpress.com/2010/05/23/print-link-on-product-detail-page-magento-1-4-0-1/

--------------------------------------------------------------------------------

Upgrade Magento

magento-core/Mage_All_Latest

--------------------------------------------------------------------------------

Cheat-code for magento

http://honey-freetemplates4u.blogspot.com/2010/01/jm-slideshow-magento-extension.html

--------------------------------------------------------------------------------

Featured Product On Home Page

http://www.magentocommerce.com/extension/2513/featured-products
Key: magento-community/Inchoo_FeaturedProducts

Admin Code:
{{block type="featuredproducts/listing" template="inchoo/block_featured_products.phtml"}}

--------------------------------------------------------------------------------
Adding a static block in a page

{{block type="cms/block" block_id="home-page-promo"}}
{{block type="core/template" name="testblog" template="cms/default/right-block.phtml"}}

getLayout()->createBlock('cms/block')->setBlockId('identifier')->toHtml(); ?>

--------------------------------------------------------------------------------

Working with multiple stores

http://www.crucialwebhost.com/blog/how-to-setup-multiple-magento-stores/

--------------------------------------------------------------------------------

Multiple Shipping Rate

magento-community/Pw_Multipletablerates [beta]

--------------------------------------------------------------------------------

Wysiwyg Editor

magento-community/Fontis_Wysiwyg

--------------------------------------------------------------------------------

Module Creator

http://www.magentocommerce.com/wiki/custom_module_with_custom_database_table

--------------------------------------------------------------------------------

Tutorial: Creating a Magento Widget

http://www.magentocommerce.com/knowledge-base/entry/tutorial-creating-a-magento-widget-part-1

------------------------------------------------------------------------------


Some Common Problem on Magento

http://www.siteground.com/tutorials/magento/magento_issues.htm

------------------------------------------------------------------------------

Checking the site performance

http://tools.pingdom.com/




4/10/2010

Importent extension for magento

Multiple Shipping Rate:
magento-community/Pw_Multipletablerates [beta]

link: http://www.magentocommerce.com/magento-connect/Yarhajile/extension/728/multiple-tablerates


Delete Sample Orders:
http://www.magentocommerce.com/magento-connect/EMThemes.com/extension/4562/em_deleteorder