';
print_r( $countryList);
exit('');
?>
```
## Create a Country Drop Down in the Frontend of Magento ##
```php
loadData()
->toOptionArray(false) ?>
0): ?>
```
## Return Product Attributes ##
```php
getThisattribute();
$_product->getAttributeText('thisattribute');
$_product->getResource()->getAttribute('thisattribute')->getFrontend()->getValue($_product);
$_product->getData('thisattribute');
// The following returns the option IDs for an attribute that is a multiple-select field:
$_product->getData('color'); // i.e. 456,499
// The following returns the attribute object, and instance of Mage_Catalog_Model_Resource_Eav_Attribute:
$_product->getResource()->getAttribute('color'); // instance of Mage_Catalog_Model_Resource_Eav_Attribute
// The following returns an array of the text values for the attribute:
$_product->getAttributeText('color') // Array([0]=>'red', [1]=>'green')
// The following returns the text for the attribute
if ($attr = $_product->getResource()->getAttribute('color')):
echo $attr->getFrontend()->getValue($_product); // will display: red, green
endif;
?>
```
## Format Price ##
```php
currency($_finalPrice,true,false);
}
?>
```
## Cart Data ##
```php
getQuote()->getData();
print_r($cart);
$cart = Mage::helper('checkout/cart')->getCart()->getItemsCount();
print_r($cart);
$session = Mage::getSingleton('checkout/session');
foreach ($session->getQuote()->getAllItems() as $item) {
echo $item->getName();
Zend_Debug::dump($item->debug());
}
?>
```
## Total items added in cart ##
```php
getQuote()->getItemsCount();
Mage::getSingleton('checkout/session')->getQuote()->getItemsCount();
?>
```
## Total Quantity added in cart ##
```php
getQuote()->getItemsQty();
Mage::getSingleton('checkout/session')->getQuote()->getItemsQty();
?>
```
## Sub Total for item added in cart ##
```php
getQuote()->getSubtotal();
Mage::getSingleton('checkout/session')->getQuote()->getSubtotal();
?>
```
## Grand total for item added in cart ##
```php
formatPrice(Mage::getModel('checkout/cart')->getQuote()->getGrandTotal());
Mage::helper('checkout')->formatPrice(Mage::getSingleton('checkout/session')->getQuote()->getGrandTotal());
?>
```
## Sub total of cart inkl tax without shipping ##
```php
getQuote();
$items = $quote->getAllItems();
foreach ($items as $item) {
$priceInclVat = $item->getRowTotalInclTax();
}
Mage::helper('checkout')->formatPrice($priceInclVat);
?>
```
## Get products id, name, price, quantity, etc. present in your cart ##
```php
getQuote()->getAllItems();
$items = Mage::getSingleton('checkout/session')->getQuote()->getAllItems();
foreach($items as $item) {
echo 'ID: '.$item->getProductId().'
```
## Show image using current skin path (CMS) ##
```html