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:
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
- store
- websites
- attribute_set
- status
- visibility
- qty
- is_in_stock
- price_type
- sku_type
- weight_type
- price_view
- shipment_type
Get Attribute Option Value:
$attributeValue
= Mage::getModel(
'catalog/product'
)
->load(
$_product
->getId())
->getAttributeText(
'my_attribute'
);
No comments:
Post a Comment