<?php
$useragent=$_SERVER['HTTP_USER_AGENT'];
if(preg_match('/android.+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|meego.+mobile|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i',$useragent)||preg_match('/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(di|rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i',substr($useragent,0,4)))
{
echo 'Mobile';
}
else
{
echo 'window';
}
//header('Location: '.$urls); ?>
Wednesday, 19 September 2012
Tuesday, 18 September 2012
Magento : Remove .html from category or product URL
Can you help me discover the solution to removing .html from Magento category URL?
How configure magento such that the category url does not have “.html” in the url?
If you want to remove .html from all Magento’s category URL then Follow the below steps
2. Delete “.html” from Product URL Suffix
How configure magento such that the category url does not have “.html” in the url?
If you want to remove .html from all Magento’s category URL then Follow the below steps
- Go to System -> Config -> Catalog -> Search Engine Optimizations tab
- Delete “.html” from Category URL Suffix.
- Go to System->Index Management
- Reindex “Catalog URL Rewrites”
- Refresh cache
2. Delete “.html” from Product URL Suffix
Twenty20 World Cup
Twenty20 World Cup
| Sep-2012 | |
| Tue 18 14:30 GMT, 19:30 local |
1st Match, Group C - Sri Lanka v Zimbabwe Mahinda Rajapaksa International Cricket Stadium, Hambantota |
| Wed 19 10:00 GMT, 15:30 local |
2nd Match, Group B - Australia v Ireland R.Premadasa Stadium, Colombo |
| Wed 19 14:00 GMT, 19:30 local |
3rd Match, Group A - India v Afghanistan R.Premadasa Stadium, Colombo |
| Thu 20 14:00 GMT, 19:30 local |
4th Match, Group C - South Africa v Zimbabwe Mahinda Rajapaksa International Cricket Stadium, Hambantota |
| Fri 21 10:00 GMT, 15:30 local |
5th Match, Group D - Bangladesh v New Zealand Pallekele International Cricket Stadium, Kandy |
| Fri 21 14:00 GMT, 19:30 local |
6th Match, Group A - England v Afghanistan R.Premadasa Stadium, Colombo |
| Sat 22 10:00 GMT, 15:30 local |
7th Match, Group C - Sri Lanka v South Africa Mahinda Rajapaksa International Cricket Stadium, Hambantota |
| Sat 22 14:00 GMT, 19:30 local |
8th Match, Group B - Australia v West Indies R.Premadasa Stadium, Colombo |
| Sun 23 10:00 GMT, 15:30 local |
9th Match, Group D - New Zealand v Pakistan Pallekele International Cricket Stadium, Kandy |
| Sun 23 14:00 GMT, 19:30 local |
10th Match, Group A - India v England R.Premadasa Stadium, Colombo |
| Mon 24 14:00 GMT, 19:30 local |
11th Match, Group B - West Indies v Ireland R.Premadasa Stadium, Colombo |
| Tue 25 14:00 GMT, 19:30 local |
12th Match, Group D - Pakistan v Bangladesh Pallekele International Cricket Stadium, Kandy |
| Thu 27 10:00 GMT, 15:30 local |
13th Match, Super Eights, Group 1 - C1 v D2 Pallekele International Cricket Stadium, Kandy |
| Thu 27 14:00 GMT, 19:30 local |
14th Match, Super Eights, Group 1 - A1 v B2 Pallekele International Cricket Stadium, Kandy |
| Fri 28 10:00 GMT, 15:30 local |
15th Match, Super Eights, Group 2 - D1 v C2 R.Premadasa Stadium, Colombo |
| Fri 28 14:00 GMT, 19:30 local |
16th Match, Super Eights, Group 2 - B1 v A2 R.Premadasa Stadium, Colombo |
| Sat 29 10:00 GMT, 15:30 local |
17th Match, Super Eights, Group 1 - C1 v B2 Pallekele International Cricket Stadium, Kandy |
| Sat 29 14:00 GMT, 19:30 local |
18th Match, Super Eights, Group 1 - B1 v C2 Pallekele International Cricket Stadium, Kandy |
| Sun 30 10:00 GMT, 15:30 local |
19th Match, Super Eights, Group 2 - D1 v A2 R.Premadasa Stadium, Colombo |
| Sun 30 14:00 GMT, 19:30 local |
20th Match, Super Eights, Group 2 - B2 v D2 R.Premadasa Stadium, Colombo |
| Oct-2012 | |
| Mon 01 10:00 GMT, 15:30 local |
21st Match, Super Eights, Group 1 - A1 v C1 Pallekele International Cricket Stadium, Kandy |
| Mon 01 14:00 GMT, 19:30 local |
22nd Match, Super Eights, Group 1 - B1 v D1 Pallekele International Cricket Stadium, Kandy |
| Tue 02 10:00 GMT, 15:30 local |
23rd Match, Super Eights, Group 2 - A2 v C2 R.Premadasa Stadium, Colombo |
| Tue 02 14:00 GMT, 19:30 local |
24th Match, Super Eights, Group 2 - A1 v D2 R.Premadasa Stadium, Colombo |
| Thu 04 14:00 GMT, 19:30 local |
1st Semi-Final - TBC v TBC R.Premadasa Stadium, Colombo |
| Fri 05 14:00 GMT, 19:30 local |
2nd Semi-Final - TBC v TBC R.Premadasa Stadium, Colombo |
| Sun 07 14:00 GMT, 19:30 local |
Final - TBC v TBC R.Premadasa Stadium, Colombo |
Magento – Move Currency converter to the Header
If you would like to move the currency switcher from the left
column to the header, you can use the following instructions to do so!
Open /app/design/frontend/default/default/layout/page.xml
Locate:
Change to:
Open /app/design/frontend/default/default/template/page/html/header.phtml
After:
Insert:
Save, Upload + Clear Cache
Make sure you have imported or manually entered your Currency Rates otherwise the switcher will not appear!
Its as simple as that!!
Open /app/design/frontend/default/default/layout/page.xml
Locate:
<block type="page/html_header" name="header" as="header">
Change to:
<block type="page/html_header" name="header" as="header"> <block type="directory/currency" name="currency" template="directory/currency.phtml"/>
Open /app/design/frontend/default/default/template/page/html/header.phtml
After:
<?php echo $this->getChildHtml('store_language') ?>
Insert:
<?php echo $this->getChildHtml('currency') ?>
Save, Upload + Clear Cache
Make sure you have imported or manually entered your Currency Rates otherwise the switcher will not appear!
Its as simple as that!!
How to create and assign customer groups in Magento?
Customer Groups:-
User can create and view customer groups from Magento admin panel. Admin can view all defined customer groups by clicking on ‘Customers->Customer Groups’. By default there are two customer groups defined in a fresh Magento installation.
Admin can create new customer groups from admin panel. Admin just have to click on ‘Customers->Customer Groups’. All defined customer groups will appear in a tabular format. The steps to create a customer group are given below:
Admin can view the customer groups assigned to customers by clicking on ‘Customers->Manage Customers’. All customer details will appear in a tabular format. Admin can view the customer group of each and every customer in ‘Group’ column.
Assign a customer to a specific Customer Group:-
Admin has the ability to assign a customer to a particular customer group. The required steps are given below:
User can create and view customer groups from Magento admin panel. Admin can view all defined customer groups by clicking on ‘Customers->Customer Groups’. By default there are two customer groups defined in a fresh Magento installation.
- General
- NOT LOGGED IN
Admin can create new customer groups from admin panel. Admin just have to click on ‘Customers->Customer Groups’. All defined customer groups will appear in a tabular format. The steps to create a customer group are given below:
- Click on ‘Add New Customer Group’ button.
- New Customer Group section appears.
- Enter new customer group name
- Select the ‘Tax Class’ from Tax Class drop down.
- Click on ‘Save Customer Group’ button.
- New Customer Group will appear on the top of the list along with an auto generated ID.
Admin can view the customer groups assigned to customers by clicking on ‘Customers->Manage Customers’. All customer details will appear in a tabular format. Admin can view the customer group of each and every customer in ‘Group’ column.
Assign a customer to a specific Customer Group:-
Admin has the ability to assign a customer to a particular customer group. The required steps are given below:
- Click on ‘Customers->Manage Customers’
- All registered customer details will appear in a tabular format
- Beside each customer detail there is a check box
- Select the check boxes beside customers which will be assigned to a particular customer group
- Click on ‘Actions’ drop down and select the action ‘Assign a customer group’
- Another drop down will appear listing all available customer groups
- Select the desired customer group
- Click on ‘Submit’ button
- All selected customers will be assigned to this new group
Tags: Magento Commerce, magento portal
Magento : Language pack
1. Germany German
http://www.magentocommerce.com/extension/413/magento-community-modules–german-germany-language-pack
Key : magento-community/Locale_Mage_community_de_DE
2. France and French:
www.magentocommerce.com/extension/414/magento-community-modules–french-france-language-pack
3.Spanish:
http://www.magentocommerce.com/extension/398/magento-community-modules–spanish-spain-language-pack
key: magento-community/Locale_Mage_community_es_ES
4.Portuguese:
http://www.magentocommerce.com/extension/388/magento-community-modules–portuguese-brazil-language-pack
Key : magento-community/Locale_Mage_community_pt_BR
5.Russian:
http://www.magentocommerce.com/extension/391/magento-community-modules–russian-russia-language-pack
key : magento-community/Locale_Mage_community_ru_RU
6.Japanese:
http://www.magentocommerce.com/extension/415/magento-community-modules–japanese-japan-language-pack
Key: magento-community/Locale_Mage_community_ja_JP
7.Italian:
http://www.magentocommerce.com/extension/377/magento-community-modules–italian-italy-language-pack
Key: magento-community/Locale_Mage_community_it_IT
8.Arabic (Saudi Arabia,In addition to Kuwait,Egyptian Arabic):
http://www.magentocommerce.com/extension/353/magento-community-modules–arabic-saudi-arabia-language-pack
key: magento-community/Locale_Mage_community_ar_SA
9.Traditional Chinese:
http://www.magentocommerce.com/extension/409/magento-community-modules–chinese-traditional-taiwan-language-pack
key: magento-community/Locale_Mage_community_zh_TW
10.Simplified Chinese:
http://www.magentocommerce.com/extension/359/magento-community-modules–chinese-simplified-china-language-pack
Key:magento-community/Locale_Mage_community_zh_CN
Or go to http://code.google.com/p/magento-cn/downloads/list下载
http://www.magentocommerce.com/extension/413/magento-community-modules–german-germany-language-pack
Key : magento-community/Locale_Mage_community_de_DE
2. France and French:
www.magentocommerce.com/extension/414/magento-community-modules–french-france-language-pack
3.Spanish:
http://www.magentocommerce.com/extension/398/magento-community-modules–spanish-spain-language-pack
key: magento-community/Locale_Mage_community_es_ES
4.Portuguese:
http://www.magentocommerce.com/extension/388/magento-community-modules–portuguese-brazil-language-pack
Key : magento-community/Locale_Mage_community_pt_BR
5.Russian:
http://www.magentocommerce.com/extension/391/magento-community-modules–russian-russia-language-pack
key : magento-community/Locale_Mage_community_ru_RU
6.Japanese:
http://www.magentocommerce.com/extension/415/magento-community-modules–japanese-japan-language-pack
Key: magento-community/Locale_Mage_community_ja_JP
7.Italian:
http://www.magentocommerce.com/extension/377/magento-community-modules–italian-italy-language-pack
Key: magento-community/Locale_Mage_community_it_IT
8.Arabic (Saudi Arabia,In addition to Kuwait,Egyptian Arabic):
http://www.magentocommerce.com/extension/353/magento-community-modules–arabic-saudi-arabia-language-pack
key: magento-community/Locale_Mage_community_ar_SA
9.Traditional Chinese:
http://www.magentocommerce.com/extension/409/magento-community-modules–chinese-traditional-taiwan-language-pack
key: magento-community/Locale_Mage_community_zh_TW
10.Simplified Chinese:
http://www.magentocommerce.com/extension/359/magento-community-modules–chinese-simplified-china-language-pack
Key:magento-community/Locale_Mage_community_zh_CN
Or go to http://code.google.com/p/magento-cn/downloads/list下载
Monday, 17 September 2012
How to get cart items total in header.phtml
<?php $cartQty = $this->getSummaryCount() ?>
<?php if ($cartQty>0): ?>
<?php if ($cartQty==1): ?>
<?php echo $this->__('<a class="cartgo" href="%s">(1 ITEM)</a>', $this->getUrl('checkout/cart')) ?>
<?php else: ?>
<?php echo $this->__('<a class="cartgo" href="%s">(%s ITEMS)</a>', $this->getUrl('checkout/cart')) ?>
<?php endif ?>
<?php endif ?>
magento site : Get all items information in cart
Get all items information in cart
Get total items and total quantity in cart
Get subtotal and grand total price of cart
// $items = Mage::getModel('checkout/cart')->getQuote()->getAllItems(); |
$items = Mage::getSingleton('checkout/session')->getQuote()->getAllItems(); |
foreach($items as $item) { |
echo 'ID: '.$item->getProductId().'<br />'; |
echo 'Name: '.$item->getName().'<br />'; |
echo 'Sku: '.$item->getSku().'<br />'; |
echo 'Quantity: '.$item->getQty().'<br />'; |
echo 'Price: '.$item->getPrice().'<br />'; |
echo "<br />"; |
} |
$totalItems = Mage::getModel('checkout/cart')->getQuote()->getItemsCount(); |
$totalQuantity = Mage::getModel('checkout/cart')->getQuote()->getItemsQty(); |
$subTotal = Mage::getModel('checkout/cart')->getQuote()->getSubtotal(); |
$grandTotal = Mage::getModel('checkout/cart')->getQuote()->getGrandTotal();
Friday, 14 September 2012
List of Indian States code for two digit codes
| State | Two-letter Code |
|---|---|
| Andhra Pradesh | AP |
| Arunachal Pradesh | AR |
| Assam | AS |
| Bihar | BR |
| Chhattisgarh | CG |
| Delhi | DL |
| Goa | GA |
| Gujarat | GJ |
| Haryana | HR |
| Himachal Pradesh | HP |
| Jammu & Kashmir | JK |
| Jharkhand | JS |
| Karnataka | KA |
| Kerala | KL |
| Madhya Pradesh | MP |
| Maharashtra | MH |
| Manipur | MN |
| Meghalaya | ML |
| Mizoram | MZ |
| Nagaland | NL |
| Orissa | OR |
| Punjab | PB |
| Rajasthan | RJ |
| Sikkim | SK |
| Tamil Nadu | TN |
| Tripura | TR |
| Uttarakhand (Formerly Uttaranchal) |
UK |
| Uttar Pradesh | UP |
| West Bengal | WB |
| Union Territory | Two-letter Code |
|---|---|
| Andaman & Nicobar | AN |
| Chandigarh | CH |
| Dadra and Nagar Haveli | DN |
| Daman & Diu | DD |
| Lakshadweep | LD |
| Pondicherry | PY |
Magento Country codes for table rate
Use Of Shipping Table Rate (csv file) :-
Here you have the 3 letter code:
AF - Afghanistan
AL - Albania
DZ - Algeria
AS - American Samoa
AD - Andorra
AO - Angola
AI - Anguilla
AQ - Antarctica
AG - Antigua and Barbuda
AR - Argentina
AM - Armenia
AW - Aruba
AU - Australia
AT - Austria
AZ - Azerbaijan
BS - Bahamas
BH - Bahrain
BD - Bangladesh
BB - Barbados
BY - Belarus
BE - Belgium
BZ - Belize
BJ - Benin
BM - Bermuda
BT - Bhutan
BO - Bolivia
BA - Bosnia and Herzegovina
BW - Botswana
BV - Bouvet Island
BR - Brazil
IO - British Indian Ocean Territory
VG - British Virgin Islands
BN - Brunei
BG - Bulgaria
BF - Burkina Faso
BI - Burundi
KH - Cambodia
CM - Cameroon
CA - Canada
CV - Cape Verde
KY - Cayman Islands
CF - Central African Republic
TD - Chad
CL - Chile
CN - China
CX - Christmas Island
CC - Cocos [Keeling] Islands
CO - Colombia
KM - Comoros
CG - Congo - Brazzaville
CD - Congo - Kinshasa
CK - Cook Islands
CR - Costa Rica
HR - Croatia
CU - Cuba
CY - Cyprus
CZ - Czech Republic
CI - Côte d’Ivoire
DK - Denmark
DJ - Djibouti
DM - Dominica
DO - Dominican Republic
EC - Ecuador
EG - Egypt
SV - El Salvador
GQ - Equatorial Guinea
ER - Eritrea
EE - Estonia
ET - Ethiopia
FK - Falkland Islands
FO - Faroe Islands
FJ - Fiji
FI - Finland
FR - France
GF - French Guiana
PF - French Polynesia
TF - French Southern Territories
GA - Gabon
GM - Gambia
GE - Georgia
DE - Germany
GH - Ghana
GI - Gibraltar
GR - Greece
GL - Greenland
GD - Grenada
GP - Guadeloupe
GU - Guam
GT - Guatemala
GG - Guernsey
GN - Guinea
GW - Guinea-Bissau
GY - Guyana
HT - Haiti
HM - Heard Island and McDonald Islands
HN - Honduras
HK - Hong Kong SAR China
HU - Hungary
IS - Iceland
IN - India
ID - Indonesia
IR - Iran
IQ - Iraq
IE - Ireland
IM - Isle of Man
IL - Israel
IT - Italy
JM - Jamaica
JP - Japan
JE - Jersey
JO - Jordan
KZ - Kazakhstan
KE - Kenya
KI - Kiribati
KW - Kuwait
KG - Kyrgyzstan
LA - Laos
LV - Latvia
LB - Lebanon
LS - Lesotho
LR - Liberia
LY - Libya
LI - Liechtenstein
LT - Lithuania
LU - Luxembourg
MO - Macau SAR China
MK - Macedonia
MG - Madagascar
MW - Malawi
MY - Malaysia
MV - Maldives
ML - Mali
MT - Malta
MH - Marshall Islands
MQ - Martinique
MR - Mauritania
MU - Mauritius
YT - Mayotte
MX - Mexico
FM - Micronesia
MD - Moldova
MC - Monaco
MN - Mongolia
ME - Montenegro
MS - Montserrat
MA - Morocco
MZ - Mozambique
MM - Myanmar [Burma]
NA - Namibia
NR - Nauru
NP - Nepal
NL - Netherlands
AN - Netherlands Antilles
NC - New Caledonia
NZ - New Zealand
NI - Nicaragua
NE - Niger
NG - Nigeria
NU - Niue
NF - Norfolk Island
KP - North Korea
MP - Northern Mariana Islands
NO - Norway
OM - Oman
PK - Pakistan
PW - Palau
PS - Palestinian Territories
PA - Panama
PG - Papua New Guinea
PY - Paraguay
PE - Peru
PH - Philippines
PN - Pitcairn Islands
PL - Poland
PT - Portugal
PR - Puerto Rico
QA - Qatar
RO - Romania
RU - Russia
RW - Rwanda
RE - Réunion
BL - Saint Barthélemy
SH - Saint Helena
KN - Saint Kitts and Nevis
LC - Saint Lucia
MF - Saint Martin
PM - Saint Pierre and Miquelon
VC - Saint Vincent and the Grenadines
WS - Samoa
SM - San Marino
SA - Saudi Arabia
SN - Senegal
RS - Serbia
SC - Seychelles
SL - Sierra Leone
SG - Singapore
SK - Slovakia
SI - Slovenia
SB - Solomon Islands
SO - Somalia
ZA - South Africa
GS - South Georgia and the South Sandwich Islands
KR - South Korea
ES - Spain
LK - Sri Lanka
SD - Sudan
SR - Suriname
SJ - Svalbard and Jan Mayen
SZ - Swaziland
SE - Sweden
CH - Switzerland
SY - Syria
ST - São Tomé and Príncipe
TW - Taiwan
TJ - Tajikistan
TZ - Tanzania
TH - Thailand
TL - Timor-Leste
TG - Togo
TK - Tokelau
TO - Tonga
TT - Trinidad and Tobago
TN - Tunisia
TR - Turkey
TM - Turkmenistan
TC - Turks and Caicos Islands
TV - Tuvalu
UM - U.S. Minor Outlying Islands
VI - U.S. Virgin Islands
UG - Uganda
UA - Ukraine
AE - United Arab Emirates
GB - United Kingdom
US - United States
UY - Uruguay
UZ - Uzbekistan
VU - Vanuatu
VA - Vatican City
VE - Venezuela
VN - Vietnam
WF - Wallis and Futuna
EH - Western Sahara
YE - Yemen
ZM - Zambia
ZW - Zimbabwe
AX - Åland Islands
AL - Albania
DZ - Algeria
AS - American Samoa
AD - Andorra
AO - Angola
AI - Anguilla
AQ - Antarctica
AG - Antigua and Barbuda
AR - Argentina
AM - Armenia
AW - Aruba
AU - Australia
AT - Austria
AZ - Azerbaijan
BS - Bahamas
BH - Bahrain
BD - Bangladesh
BB - Barbados
BY - Belarus
BE - Belgium
BZ - Belize
BJ - Benin
BM - Bermuda
BT - Bhutan
BO - Bolivia
BA - Bosnia and Herzegovina
BW - Botswana
BV - Bouvet Island
BR - Brazil
IO - British Indian Ocean Territory
VG - British Virgin Islands
BN - Brunei
BG - Bulgaria
BF - Burkina Faso
BI - Burundi
KH - Cambodia
CM - Cameroon
CA - Canada
CV - Cape Verde
KY - Cayman Islands
CF - Central African Republic
TD - Chad
CL - Chile
CN - China
CX - Christmas Island
CC - Cocos [Keeling] Islands
CO - Colombia
KM - Comoros
CG - Congo - Brazzaville
CD - Congo - Kinshasa
CK - Cook Islands
CR - Costa Rica
HR - Croatia
CU - Cuba
CY - Cyprus
CZ - Czech Republic
CI - Côte d’Ivoire
DK - Denmark
DJ - Djibouti
DM - Dominica
DO - Dominican Republic
EC - Ecuador
EG - Egypt
SV - El Salvador
GQ - Equatorial Guinea
ER - Eritrea
EE - Estonia
ET - Ethiopia
FK - Falkland Islands
FO - Faroe Islands
FJ - Fiji
FI - Finland
FR - France
GF - French Guiana
PF - French Polynesia
TF - French Southern Territories
GA - Gabon
GM - Gambia
GE - Georgia
DE - Germany
GH - Ghana
GI - Gibraltar
GR - Greece
GL - Greenland
GD - Grenada
GP - Guadeloupe
GU - Guam
GT - Guatemala
GG - Guernsey
GN - Guinea
GW - Guinea-Bissau
GY - Guyana
HT - Haiti
HM - Heard Island and McDonald Islands
HN - Honduras
HK - Hong Kong SAR China
HU - Hungary
IS - Iceland
IN - India
ID - Indonesia
IR - Iran
IQ - Iraq
IE - Ireland
IM - Isle of Man
IL - Israel
IT - Italy
JM - Jamaica
JP - Japan
JE - Jersey
JO - Jordan
KZ - Kazakhstan
KE - Kenya
KI - Kiribati
KW - Kuwait
KG - Kyrgyzstan
LA - Laos
LV - Latvia
LB - Lebanon
LS - Lesotho
LR - Liberia
LY - Libya
LI - Liechtenstein
LT - Lithuania
LU - Luxembourg
MO - Macau SAR China
MK - Macedonia
MG - Madagascar
MW - Malawi
MY - Malaysia
MV - Maldives
ML - Mali
MT - Malta
MH - Marshall Islands
MQ - Martinique
MR - Mauritania
MU - Mauritius
YT - Mayotte
MX - Mexico
FM - Micronesia
MD - Moldova
MC - Monaco
MN - Mongolia
ME - Montenegro
MS - Montserrat
MA - Morocco
MZ - Mozambique
MM - Myanmar [Burma]
NA - Namibia
NR - Nauru
NP - Nepal
NL - Netherlands
AN - Netherlands Antilles
NC - New Caledonia
NZ - New Zealand
NI - Nicaragua
NE - Niger
NG - Nigeria
NU - Niue
NF - Norfolk Island
KP - North Korea
MP - Northern Mariana Islands
NO - Norway
OM - Oman
PK - Pakistan
PW - Palau
PS - Palestinian Territories
PA - Panama
PG - Papua New Guinea
PY - Paraguay
PE - Peru
PH - Philippines
PN - Pitcairn Islands
PL - Poland
PT - Portugal
PR - Puerto Rico
QA - Qatar
RO - Romania
RU - Russia
RW - Rwanda
RE - Réunion
BL - Saint Barthélemy
SH - Saint Helena
KN - Saint Kitts and Nevis
LC - Saint Lucia
MF - Saint Martin
PM - Saint Pierre and Miquelon
VC - Saint Vincent and the Grenadines
WS - Samoa
SM - San Marino
SA - Saudi Arabia
SN - Senegal
RS - Serbia
SC - Seychelles
SL - Sierra Leone
SG - Singapore
SK - Slovakia
SI - Slovenia
SB - Solomon Islands
SO - Somalia
ZA - South Africa
GS - South Georgia and the South Sandwich Islands
KR - South Korea
ES - Spain
LK - Sri Lanka
SD - Sudan
SR - Suriname
SJ - Svalbard and Jan Mayen
SZ - Swaziland
SE - Sweden
CH - Switzerland
SY - Syria
ST - São Tomé and Príncipe
TW - Taiwan
TJ - Tajikistan
TZ - Tanzania
TH - Thailand
TL - Timor-Leste
TG - Togo
TK - Tokelau
TO - Tonga
TT - Trinidad and Tobago
TN - Tunisia
TR - Turkey
TM - Turkmenistan
TC - Turks and Caicos Islands
TV - Tuvalu
UM - U.S. Minor Outlying Islands
VI - U.S. Virgin Islands
UG - Uganda
UA - Ukraine
AE - United Arab Emirates
GB - United Kingdom
US - United States
UY - Uruguay
UZ - Uzbekistan
VU - Vanuatu
VA - Vatican City
VE - Venezuela
VN - Vietnam
WF - Wallis and Futuna
EH - Western Sahara
YE - Yemen
ZM - Zambia
ZW - Zimbabwe
AX - Åland Islands
2 and 3 letter relation
Maybe the 2 letters code is not working for you.Here you have the 3 letter code:
AA - AAA
AD - AND
AE - ARE
AF - AFG
AG - ATG
AI - AIA
AL - ALB
AM - ARM
AN - ANT
AO - AGO
AQ - ATA
AR - ARG
AS - ASM
AT - AUT
AU - AUS
AW - ABW
AX - ALA
AZ - AZE
BA - BIH
BB - BRB
BD - BGD
BE - BEL
BF - BFA
BG - BGR
BH - BHR
BI - BDI
BJ - BEN
BL - BLM
BM - BMU
BN - BRN
BO - BOL
BR - BRA
BS - BHS
BT - BTN
BU - BUR
BV - BVT
BW - BWA
BY - BLR
BZ - BLZ
CA - CAN
CC - CCK
CD - COD
CF - CAF
CG - COG
CH - CHE
CI - CIV
CK - COK
CL - CHL
CM - CMR
CN - CHN
CO - COL
CR - CRI
CS - SCG
CU - CUB
CV - CPV
CX - CXR
CY - CYP
CZ - CZE
DD - DDR
DE - DEU
DJ - DJI
DK - DNK
DM - DMA
DO - DOM
DZ - DZA
EC - ECU
EE - EST
EG - EGY
EH - ESH
ER - ERI
ES - ESP
ET - ETH
FI - FIN
FJ - FJI
FK - FLK
FM - FSM
FO - FRO
FR - FRA
FX - FXX
GA - GAB
GB - GBR
GD - GRD
GE - GEO
GF - GUF
GG - GGY
GH - GHA
GI - GIB
GL - GRL
GM - GMB
GN - GIN
GP - GLP
GQ - GNQ
GR - GRC
GS - SGS
GT - GTM
GU - GUM
GW - GNB
GY - GUY
HK - HKG
HM - HMD
HN - HND
HR - HRV
HT - HTI
HU - HUN
ID - IDN
IE - IRL
IL - ISR
IM - IMN
IN - IND
IO - IOT
IQ - IRQ
IR - IRN
IS - ISL
IT - ITA
JE - JEY
JM - JAM
JO - JOR
JP - JPN
KE - KEN
KG - KGZ
KH - KHM
KI - KIR
KM - COM
KN - KNA
KP - PRK
KR - KOR
KW - KWT
KY - CYM
KZ - KAZ
LA - LAO
LB - LBN
LC - LCA
LI - LIE
LK - LKA
LR - LBR
LS - LSO
LT - LTU
LU - LUX
LV - LVA
LY - LBY
MA - MAR
MC - MCO
MD - MDA
ME - MNE
MG - MDG
MF - MAF
MH - MHL
MK - MKD
ML - MLI
MM - MMR
MN - MNG
MO - MAC
MP - MNP
MQ - MTQ
MR - MRT
MS - MSR
MT - MLT
MU - MUS
MV - MDV
MW - MWI
MX - MEX
MY - MYS
MZ - MOZ
NA - NAM
NC - NCL
NE - NER
NF - NFK
NG - NGA
NI - NIC
NL - NLD
NO - NOR
NP - NPL
NR - NRU
NT - NTZ
NU - NIU
NZ - NZL
OM - OMN
PA - PAN
PE - PER
PF - PYF
PG - PNG
PH - PHL
PK - PAK
PL - POL
PM - SPM
PN - PCN
PR - PRI
PS - PSE
PT - PRT
PW - PLW
PY - PRY
QA - QAT
QM - QMM
QN - QNN
QO - QOO
QP - QPP
QQ - QQQ
QR - QRR
QS - QSS
QT - QTT
QU - QUU
QV - QVV
QW - QWW
QX - QXX
QY - QYY
QZ - QZZ
RE - REU
RO - ROU
RS - SRB
RU - RUS
RW - RWA
SA - SAU
SB - SLB
SC - SYC
SD - SDN
SE - SWE
SG - SGP
SH - SHN
SI - SVN
SJ - SJM
SK - SVK
SL - SLE
SM - SMR
SN - SEN
SO - SOM
SR - SUR
ST - STP
SU - SUN
SV - SLV
SY - SYR
SZ - SWZ
TC - TCA
TD - TCD
TF - ATF
TG - TGO
TH - THA
TJ - TJK
TK - TKL
TL - TLS
TM - TKM
TN - TUN
TO - TON
TP - TMP
TR - TUR
TT - TTO
TV - TUV
TW - TWN
TZ - TZA
UA - UKR
UG - UGA
UM - UMI
US - USA
UY - URY
UZ - UZB
VA - VAT
VC - VCT
VE - VEN
VG - VGB
VI - VIR
VN - VNM
VU - VUT
WF - WLF
WS - WSM
XA - XAA
XB - XBB
XC - XCC
XD - XDD
XE - XEE
XF - XFF
XG - XGG
XH - XHH
XI - XII
XJ - XJJ
XK - XKK
XL - XLL
XM - XMM
XN - XNN
XO - XOO
XP - XPP
XQ - XQQ
XR - XRR
XS - XSS
XT - XTT
XU - XUU
XV - XVV
XW - XWW
XX - XXX
XY - XYY
XZ - XZZ
YD - YMD
YE - YEM
YT - MYT
YU - YUG
ZA - ZAF
ZM - ZMB
ZR - ZAR
ZW - ZWE
ZZ - ZZZ
AD - AND
AE - ARE
AF - AFG
AG - ATG
AI - AIA
AL - ALB
AM - ARM
AN - ANT
AO - AGO
AQ - ATA
AR - ARG
AS - ASM
AT - AUT
AU - AUS
AW - ABW
AX - ALA
AZ - AZE
BA - BIH
BB - BRB
BD - BGD
BE - BEL
BF - BFA
BG - BGR
BH - BHR
BI - BDI
BJ - BEN
BL - BLM
BM - BMU
BN - BRN
BO - BOL
BR - BRA
BS - BHS
BT - BTN
BU - BUR
BV - BVT
BW - BWA
BY - BLR
BZ - BLZ
CA - CAN
CC - CCK
CD - COD
CF - CAF
CG - COG
CH - CHE
CI - CIV
CK - COK
CL - CHL
CM - CMR
CN - CHN
CO - COL
CR - CRI
CS - SCG
CU - CUB
CV - CPV
CX - CXR
CY - CYP
CZ - CZE
DD - DDR
DE - DEU
DJ - DJI
DK - DNK
DM - DMA
DO - DOM
DZ - DZA
EC - ECU
EE - EST
EG - EGY
EH - ESH
ER - ERI
ES - ESP
ET - ETH
FI - FIN
FJ - FJI
FK - FLK
FM - FSM
FO - FRO
FR - FRA
FX - FXX
GA - GAB
GB - GBR
GD - GRD
GE - GEO
GF - GUF
GG - GGY
GH - GHA
GI - GIB
GL - GRL
GM - GMB
GN - GIN
GP - GLP
GQ - GNQ
GR - GRC
GS - SGS
GT - GTM
GU - GUM
GW - GNB
GY - GUY
HK - HKG
HM - HMD
HN - HND
HR - HRV
HT - HTI
HU - HUN
ID - IDN
IE - IRL
IL - ISR
IM - IMN
IN - IND
IO - IOT
IQ - IRQ
IR - IRN
IS - ISL
IT - ITA
JE - JEY
JM - JAM
JO - JOR
JP - JPN
KE - KEN
KG - KGZ
KH - KHM
KI - KIR
KM - COM
KN - KNA
KP - PRK
KR - KOR
KW - KWT
KY - CYM
KZ - KAZ
LA - LAO
LB - LBN
LC - LCA
LI - LIE
LK - LKA
LR - LBR
LS - LSO
LT - LTU
LU - LUX
LV - LVA
LY - LBY
MA - MAR
MC - MCO
MD - MDA
ME - MNE
MG - MDG
MF - MAF
MH - MHL
MK - MKD
ML - MLI
MM - MMR
MN - MNG
MO - MAC
MP - MNP
MQ - MTQ
MR - MRT
MS - MSR
MT - MLT
MU - MUS
MV - MDV
MW - MWI
MX - MEX
MY - MYS
MZ - MOZ
NA - NAM
NC - NCL
NE - NER
NF - NFK
NG - NGA
NI - NIC
NL - NLD
NO - NOR
NP - NPL
NR - NRU
NT - NTZ
NU - NIU
NZ - NZL
OM - OMN
PA - PAN
PE - PER
PF - PYF
PG - PNG
PH - PHL
PK - PAK
PL - POL
PM - SPM
PN - PCN
PR - PRI
PS - PSE
PT - PRT
PW - PLW
PY - PRY
QA - QAT
QM - QMM
QN - QNN
QO - QOO
QP - QPP
QQ - QQQ
QR - QRR
QS - QSS
QT - QTT
QU - QUU
QV - QVV
QW - QWW
QX - QXX
QY - QYY
QZ - QZZ
RE - REU
RO - ROU
RS - SRB
RU - RUS
RW - RWA
SA - SAU
SB - SLB
SC - SYC
SD - SDN
SE - SWE
SG - SGP
SH - SHN
SI - SVN
SJ - SJM
SK - SVK
SL - SLE
SM - SMR
SN - SEN
SO - SOM
SR - SUR
ST - STP
SU - SUN
SV - SLV
SY - SYR
SZ - SWZ
TC - TCA
TD - TCD
TF - ATF
TG - TGO
TH - THA
TJ - TJK
TK - TKL
TL - TLS
TM - TKM
TN - TUN
TO - TON
TP - TMP
TR - TUR
TT - TTO
TV - TUV
TW - TWN
TZ - TZA
UA - UKR
UG - UGA
UM - UMI
US - USA
UY - URY
UZ - UZB
VA - VAT
VC - VCT
VE - VEN
VG - VGB
VI - VIR
VN - VNM
VU - VUT
WF - WLF
WS - WSM
XA - XAA
XB - XBB
XC - XCC
XD - XDD
XE - XEE
XF - XFF
XG - XGG
XH - XHH
XI - XII
XJ - XJJ
XK - XKK
XL - XLL
XM - XMM
XN - XNN
XO - XOO
XP - XPP
XQ - XQQ
XR - XRR
XS - XSS
XT - XTT
XU - XUU
XV - XVV
XW - XWW
XX - XXX
XY - XYY
XZ - XZZ
YD - YMD
YE - YEM
YT - MYT
YU - YUG
ZA - ZAF
ZM - ZMB
ZR - ZAR
ZW - ZWE
ZZ - ZZZ
Thursday, 13 September 2012
Hpw to Define Lenth of Product Name in Magento
<?php if(strlen($pname) > 28) {echo substr($pname,0,25);}else {echo $pname;}?>
How to change the newsletter validation message in magento?
your root folder\js\prototype\validation.js
follow the above file path and find the message on line no. 507. change it according to your requirement.
follow the above file path and find the message on line no. 507. change it according to your requirement.
Friday, 7 September 2012
How to display total cart quantity
<?php
if(Mage::getSingleton('checkout/session')->getQuote()->getItemsSummaryQty() > 0)
{ ?>
<?php echo 'Items ('. __(Mage::getSingleton('checkout/session')->getQuote()->getItemsSummaryQty()) .')'?>
<?php
}
else
{ ?>
Item (0)
<?php } ?>
if(Mage::getSingleton('checkout/session')->getQuote()->getItemsSummaryQty() > 0)
{ ?>
<?php echo 'Items ('. __(Mage::getSingleton('checkout/session')->getQuote()->getItemsSummaryQty()) .')'?>
<?php
}
else
{ ?>
Item (0)
<?php } ?>
Subscribe to:
Posts (Atom)