Category Archives: Prestashop

Prestashop currency ISO codes

AFGHANISTAN Afghani AFN 971 2
ÅLAND ISLANDS Euro EUR 978 2
ALBANIA Lek ALL 008 2
ALGERIA Algerian Dinar DZD 012 2
AMERICAN SAMOA US Dollar USD 840 2
ANDORRA Euro EUR 978 2
ANGOLA Kwanza AOA 973 2
ANGUILLA East Caribbean Dollar XCD 951 2
ANTARCTICA No universal currency


ANTIGUA AND BARBUDA East Caribbean Dollar XCD 951 2
ARGENTINA Argentine Peso ARS 032 2
ARMENIA Armenian Dram AMD 051 2
ARUBA Aruban Florin AWG 533 2
AUSTRALIA Australian Dollar AUD 036 2
AUSTRIA Euro EUR 978 2
AZERBAIJAN Azerbaijanian Manat AZN 944 2
BAHAMAS Bahamian Dollar BSD 044 2
BAHRAIN Bahraini Dinar BHD 048 3
BANGLADESH Taka BDT 050 2
BARBADOS Barbados Dollar BBD 052 2
BELARUS Belarussian Ruble BYR 974 0
BELGIUM Euro EUR 978 2
BELIZE Belize Dollar BZD 084 2
BENIN CFA Franc BCEAO XOF 952 0
BERMUDA Bermudian Dollar BMD 060 2
BHUTAN Ngultrum BTN 064 2
BHUTAN Indian Rupee INR 356 2
BOLIVIA, PLURINATIONAL STATE OF Boliviano BOB 068 2
BOLIVIA, PLURINATIONAL STATE OF Mvdol BOV 984 2
BONAIRE, SINT EUSTATIUS AND SABA US Dollar USD 840 2
BOSNIA AND HERZEGOVINA Convertible Mark BAM 977 2
BOTSWANA Pula BWP 072 2
BOUVET ISLAND Norwegian Krone NOK 578 2
BRAZIL Brazilian Real BRL 986 2
BRITISH INDIAN OCEAN TERRITORY US Dollar USD 840 2
BRUNEI DARUSSALAM Brunei Dollar BND 096 2
BULGARIA Bulgarian Lev BGN 975 2
BURKINA FASO CFA Franc BCEAO XOF 952 0
BURUNDI Burundi Franc BIF 108 0
CAMBODIA Riel KHR 116 2
CAMEROON CFA Franc BEAC XAF 950 0
CANADA Canadian Dollar CAD 124 2
CAPE VERDE Cape Verde Escudo CVE 132 2
CAYMAN ISLANDS Cayman Islands Dollar KYD 136 2
CENTRAL AFRICAN REPUBLIC CFA Franc BEAC XAF 950 0
CHAD CFA Franc BEAC XAF 950 0
CHILE Unidades de fomento CLF 990 0
CHILE Chilean Peso CLP 152 0
CHINA Yuan Renminbi CNY 156 2
CHRISTMAS ISLAND Australian Dollar AUD 036 2
COCOS (KEELING) ISLANDS Australian Dollar AUD 036 2
COLOMBIA Colombian Peso COP 170 2
COLOMBIA Unidad de Valor Real COU 970 2
COMOROS Comoro Franc KMF 174 0
CONGO CFA Franc BEAC XAF 950 0
CONGO, THE DEMOCRATIC REPUBLIC OF Congolese Franc CDF 976 2
COOK ISLANDS New Zealand Dollar NZD 554 2
COSTA RICA Costa Rican Colon CRC 188 2
CÔTE D’IVOIRE CFA Franc BCEAO XOF 952 0
CROATIA Croatian Kuna HRK 191 2
CUBA Peso Convertible CUC 931 2
CUBA Cuban Peso CUP 192 2
CURAÇAO Netherlands Antillean Guilder ANG 532 2
CYPRUS Euro EUR 978 2
CZECH REPUBLIC Czech Koruna CZK 203 2
DENMARK Danish Krone DKK 208 2
DJIBOUTI Djibouti Franc DJF 262 0
DOMINICA East Caribbean Dollar XCD 951 2
DOMINICAN REPUBLIC Dominican Peso DOP 214 2
ECUADOR US Dollar USD 840 2
EGYPT Egyptian Pound EGP 818 2
EL SALVADOR El Salvador Colon SVC 222 2
EL SALVADOR US Dollar USD 840 2
EQUATORIAL GUINEA CFA Franc BEAC XAF 950 0
ERITREA Nakfa ERN 232 2
ESTONIA Euro EUR 978 2
ETHIOPIA Ethiopian Birr ETB 230 2
EUROPEAN UNION Euro EUR 978 2
FALKLAND ISLANDS (MALVINAS) Falkland Islands Pound FKP 238 2
FAROE ISLANDS Danish Krone DKK 208 2
FIJI Fiji Dollar FJD 242 2
FINLAND Euro EUR 978 2
FRANCE Euro EUR 978 2
FRENCH GUIANA Euro EUR 978 2
FRENCH POLYNESIA CFP Franc XPF 953 0
FRENCH SOUTHERN TERRITORIES Euro EUR 978 2
GABON CFA Franc BEAC XAF 950 0
GAMBIA Dalasi GMD 270 2
GEORGIA Lari GEL 981 2
GERMANY Euro EUR 978 2
GHANA Ghana Cedi GHS 936 2
GIBRALTAR Gibraltar Pound GIP 292 2
GREECE Euro EUR 978 2
GREENLAND Danish Krone DKK 208 2
GRENADA East Caribbean Dollar XCD 951 2
GUADELOUPE Euro EUR 978 2
GUAM US Dollar USD 840 2
GUATEMALA Quetzal GTQ 320 2
GUERNSEY Pound Sterling GBP 826 2
GUINEA Guinea Franc GNF 324 0
GUINEA-BISSAU CFA Franc BCEAO XOF 952 0
GUYANA Guyana Dollar GYD 328 2
HAITI Gourde HTG 332 2
HAITI US Dollar USD 840 2
HEARD ISLAND AND McDONALD ISLANDS Australian Dollar AUD 036 2
HOLY SEE (VATICAN CITY STATE) Euro EUR 978 2
HONDURAS Lempira HNL 340 2
HONG KONG Hong Kong Dollar HKD 344 2
HUNGARY Forint HUF 348 2
ICELAND Iceland Krona ISK 352 0
INDIA Indian Rupee INR 356 2
INDONESIA Rupiah IDR 360 2
INTERNATIONAL MONETARY FUND (IMF)  SDR (Special Drawing Right) XDR 960 N.A.
IRAN, ISLAMIC REPUBLIC OF Iranian Rial IRR 364 2
IRAQ Iraqi Dinar IQD 368 3
IRELAND Euro EUR 978 2
ISLE OF MAN Pound Sterling GBP 826 2
ISRAEL New Israeli Sheqel ILS 376 2
ITALY Euro EUR 978 2
JAMAICA Jamaican Dollar JMD 388 2
JAPAN Yen JPY 392 0
JERSEY Pound Sterling GBP 826 2
JORDAN Jordanian Dinar JOD 400 3
KAZAKHSTAN Tenge KZT 398 2
KENYA Kenyan Shilling KES 404 2
KIRIBATI Australian Dollar AUD 036 2
KOREA, DEMOCRATIC PEOPLE’S REPUBLIC OF North Korean Won KPW 408 2
KOREA, REPUBLIC OF Won KRW 410 0
KUWAIT Kuwaiti Dinar KWD 414 3
KYRGYZSTAN Som KGS 417 2
LAO PEOPLE’S DEMOCRATIC REPUBLIC Kip LAK 418 2
LATVIA Latvian Lats LVL 428 2
LEBANON Lebanese Pound LBP 422 2
LESOTHO Loti LSL 426 2
LESOTHO Rand ZAR 710 2
LIBERIA Liberian Dollar LRD 430 2
LIBYA Libyan Dinar LYD 434 3
LIECHTENSTEIN Swiss Franc CHF 756 2
LITHUANIA Lithuanian Litas LTL 440 2
LUXEMBOURG Euro EUR 978 2
MACAO Pataca MOP 446 2
MACEDONIA, THE FORMER YUGOSLAV REPUBLIC OF Denar MKD 807 2
MADAGASCAR Malagasy Ariary MGA 969 2
MALAWI Kwacha MWK 454 2
MALAYSIA Malaysian Ringgit MYR 458 2
MALDIVES Rufiyaa MVR 462 2
MALI CFA Franc BCEAO XOF 952 0
MALTA Euro EUR 978 2
MARSHALL ISLANDS US Dollar USD 840 2
MARTINIQUE Euro EUR 978 2
MAURITANIA Ouguiya MRO 478 2
MAURITIUS Mauritius Rupee MUR 480 2
MAYOTTE Euro EUR 978 2
MEMBER COUNTRIES OF THE AFRICAN DEVELOPMENT BANK GROUP ADB Unit of Account XUA 965 N.A.
MEXICO Mexican Peso MXN 484 2
MEXICO Mexican Unidad de Inversion (UDI) MXV 979 2
MICRONESIA, FEDERATED STATES OF US Dollar USD 840 2
MOLDOVA, REPUBLIC OF Moldovan Leu MDL 498 2
MONACO Euro EUR 978 2
MONGOLIA Tugrik MNT 496 2
MONTENEGRO Euro EUR 978 2
MONTSERRAT East Caribbean Dollar XCD 951 2
MOROCCO Moroccan Dirham MAD 504 2
MOZAMBIQUE Mozambique Metical MZN 943 2
MYANMAR Kyat MMK 104 2
NAMIBIA Namibia Dollar NAD 516 2
NAMIBIA Rand ZAR 710 2
NAURU Australian Dollar AUD 036 2
NEPAL Nepalese Rupee NPR 524 2
NETHERLANDS Euro EUR 978 2
NEW CALEDONIA CFP Franc XPF 953 0
NEW ZEALAND New Zealand Dollar NZD 554 2
NICARAGUA Cordoba Oro NIO 558 2
NIGER CFA Franc BCEAO XOF 952 0
NIGERIA Naira NGN 566 2
NIUE New Zealand Dollar NZD 554 2
NORFOLK ISLAND Australian Dollar AUD 036 2
NORTHERN MARIANA ISLANDS US Dollar USD 840 2
NORWAY Norwegian Krone NOK 578 2
OMAN Rial Omani OMR 512 3
PAKISTAN Pakistan Rupee PKR 586 2
PALAU US Dollar USD 840 2
PALESTINIAN TERRITORY, OCCUPIED No universal currency


PANAMA Balboa PAB 590 2
PANAMA US Dollar USD 840 2
PAPUA NEW GUINEA Kina PGK 598 2
PARAGUAY Guarani PYG 600 0
PERU Nuevo Sol PEN 604 2
PHILIPPINES Philippine Peso PHP 608 2
PITCAIRN New Zealand Dollar NZD 554 2
POLAND Zloty PLN 985 2
PORTUGAL Euro EUR 978 2
PUERTO RICO US Dollar USD 840 2
QATAR Qatari Rial QAR 634 2
RÉUNION Euro EUR 978 2
ROMANIA New Romanian Leu RON 946 2
RUSSIAN FEDERATION Russian Ruble RUB 643 2
RWANDA Rwanda Franc RWF 646 0
SAINT BARTHÉLEMY Euro EUR 978 2
SAINT HELENA, ASCENSION AND TRISTAN DA CUNHA Saint Helena Pound SHP 654 2
SAINT KITTS AND NEVIS East Caribbean Dollar XCD 951 2
SAINT LUCIA East Caribbean Dollar XCD 951 2
SAINT MARTIN (FRENCH PART) Euro EUR 978 2
SAINT PIERRE AND MIQUELON Euro EUR 978 2
SAINT VINCENT AND THE GRENADINES East Caribbean Dollar XCD 951 2
SAMOA Tala WST 882 2
SAN MARINO Euro EUR 978 2
SAO TOME AND PRINCIPE Dobra STD 678 2
SAUDI ARABIA Saudi Riyal SAR 682 2
SENEGAL CFA Franc BCEAO XOF 952 0
SERBIA Serbian Dinar RSD 941 2
SEYCHELLES Seychelles Rupee SCR 690 2
SIERRA LEONE Leone SLL 694 2
SINGAPORE Singapore Dollar SGD 702 2
SINT MAARTEN (DUTCH PART) Netherlands Antillean Guilder ANG 532 2
SISTEMA UNITARIO DE COMPENSACION REGIONAL DE PAGOS “SUCRE” Sucre XSU 994 N.A.
SLOVAKIA Euro EUR 978 2
SLOVENIA Euro EUR 978 2
SOLOMON ISLANDS Solomon Islands Dollar SBD 090 2
SOMALIA Somali Shilling SOS 706 2
SOUTH AFRICA Rand ZAR 710 2
SOUTH GEORGIA AND THE SOUTH SANDWICH ISLANDS No universal currency


SOUTH SUDAN South Sudanese Pound SSP 728 2
SPAIN Euro EUR 978 2
SRI LANKA Sri Lanka Rupee LKR 144 2
SUDAN Sudanese Pound SDG 938 2
SURINAME Surinam Dollar SRD 968 2
SVALBARD AND JAN MAYEN Norwegian Krone NOK 578 2
SWAZILAND Lilangeni SZL 748 2
SWEDEN Swedish Krona SEK 752 2
SWITZERLAND WIR Euro CHE 947 2
SWITZERLAND Swiss Franc CHF 756 2
SWITZERLAND WIR Franc CHW 948 2
SYRIAN ARAB REPUBLIC Syrian Pound SYP 760 2
TAIWAN, PROVINCE OF CHINA New Taiwan Dollar TWD 901 2
TAJIKISTAN Somoni TJS 972 2
TANZANIA, UNITED REPUBLIC OF Tanzanian Shilling TZS 834 2
THAILAND Baht THB 764 2
TIMOR-LESTE US Dollar USD 840 2
TOGO CFA Franc BCEAO XOF 952 0
TOKELAU New Zealand Dollar NZD 554 2
TONGA Pa’anga TOP 776 2
TRINIDAD AND TOBAGO Trinidad and Tobago Dollar TTD 780 2
TUNISIA Tunisian Dinar TND 788 3
TURKEY Turkish Lira TRY 949 2
TURKMENISTAN Turkmenistan New Manat TMT 934 2
TURKS AND CAICOS ISLANDS US Dollar USD 840 2
TUVALU Australian Dollar AUD 036 2
UGANDA Uganda Shilling UGX 800 2
UKRAINE Hryvnia UAH 980 2
UNITED ARAB EMIRATES UAE Dirham AED 784 2
UNITED KINGDOM Pound Sterling GBP 826 2
UNITED STATES US Dollar USD 840 2
UNITED STATES US Dollar (Next day) USN 997 2
UNITED STATES US Dollar (Same day) USS 998 2
UNITED STATES MINOR OUTLYING ISLANDS US Dollar USD 840 2
URUGUAY Uruguay Peso en Unidades Indexadas (URUIURUI) UYI 940 0
URUGUAY Peso Uruguayo UYU 858 2
UZBEKISTAN Uzbekistan Sum UZS 860 2
VANUATU Vatu VUV 548 0
Vatican City State (HOLY SEE) Euro EUR 978 2
VENEZUELA, BOLIVARIAN REPUBLIC OF Bolivar Fuerte VEF 937 2
VIET NAM Dong VND 704 0
VIRGIN ISLANDS (BRITISH) US Dollar USD 840 2
VIRGIN ISLANDS (US) US Dollar USD 840 2
WALLIS AND FUTUNA CFP Franc XPF 953 0
WESTERN SAHARA Moroccan Dirham MAD 504 2
YEMEN Yemeni Rial YER 886 2
ZAMBIA Zambian Kwacha ZMK 894 2
ZIMBABWE Zimbabwe Dollar ZWL 932 2
ZZ01_Bond Markets Unit European_EURCO Bond Markets Unit European Composite Unit (EURCO) XBA 955 N.A.
ZZ02_Bond Markets Unit European_EMU-6 Bond Markets Unit European Monetary Unit (E.M.U.-6) XBB 956 N.A.
ZZ03_Bond Markets Unit European_EUA-9 Bond Markets Unit European Unit of Account 9 (E.U.A.-9) XBC 957 N.A.
ZZ04_Bond Markets Unit European_EUA-17 Bond Markets Unit European Unit of Account 17 (E.U.A.-17) XBD 958 N.A.
ZZ05_UIC-Franc UIC-Franc XFU Nil N.A.
ZZ06_Testing_Code Codes specifically reserved for testing purposes XTS 963 N.A.
ZZ07_No_Currency The codes assigned for transactions where no currency is involved XXX 999 N.A.
ZZ08_Gold Gold XAU 959 N.A.
ZZ09_Palladium Palladium XPD 964 N.A.
ZZ10_Platinum Platinum XPT 962 N.A.
ZZ11_Silver Silver XAG 961 N.A.

Matrice – Prestashop 1.4.3 – Undefined variable: nb_products FIX

I am rebuilding one of our webshops and run into this nasty error when clicking on the home category from the TOP navigation menu.

Notice: Undefined variable: nb_products in /var/www/html/shopname/tools/smarty/sysplugins/smarty_internal_data.php on line 291 There are no products.

We are using the Matrice theme which is truly amazing however there seems to be an issue here with it. If you run into the same as a quick fix just change the following in the category.tpl:

 

{if $nb_products == 0}{l s=’There are no products.’}

{else}

{if $nb_products == 1}{l s=’There is’}{else}{l s=’There are’}{/if} 
{$nb_products} 
{if $nb_products == 1}{l s=’product.’}{else}{l s=’products.’}{/if}

{/if}

 

to

<!–

{if $nb_products == 0}{l s=’There are no products.’}

{else}

–>

{if $nb_products == 1}{l s=’There is’}{else}{l s=’There are’}{/if}&#160;
{$nb_products}&#160;
{if $nb_products == 1}{l s=’product.’}{else}{l s=’products.’}{/if}
<!–

{/if}

–>

Make sure that you are changing the Matrice theme not the default one 🙂

Setting “In-stock first” as default option on products pages – Prestashop 1.4

There is no option like that in Back Office  -> Preferences -> Products. The relevant admin tabs code shows ( AdminPPreferences.php) :

array(‘id’ => ‘0’, ‘name’ => $this->l(‘Product name’)),
array(‘id’ => ‘1’, ‘name’ => $this->l(‘Product price’)),
array(‘id’ => ‘2’, ‘name’ => $this->l(‘Product added date’)),
array(‘id’ => ‘4’, ‘name’ => $this->l(‘Position inside category’)),
array(‘id’ => ‘5’, ‘name’ => $this->l(‘Manufacturer’)),
array(‘id’ => ‘3’, ‘name’ => $this->l(‘Product modified date’))

which is missing option “6” that stands for the “In-stock first” option.

Simply modify the following two database configuration options:

Change the PS_CONFIGURATION table PS_PRODUCTS_ORDER_BY option to “6”

Change the PS_CONFIGURATION table PS_PRODUCTS_ORDER_WAY option to “1”

That’s it

Google Base Feed partly uploads – Prestashop

I am using www.ecartservices.net’s Google Base feed generator. I ran into a problem last week. I have over 5000 products in one of my store. The feed was generated fine however when I am uploading to Google Base only loads about 1000 of them. I was trying to find out what went wrong but I couldn’t figure out what order the products were uploaded to see what’s wrong with the feed file. I have just figured out that the feed generator assigns an id to every product and Google Base indexes the products in that order. So if you have the same problem find out what part of the feed file is corrupted follow these steps:

Check how many products have been uploaded successfully using Google Merchant Center’s “feed” option:

In my case 1009 products are indexed correctly. To find out what went wrong open your generated XML feed and find the relevant id.

<item>
<title>CAESARS by Caesars</title>
<g:brand>Caesars</g:brand>
<g:condition>new</g:condition>
<description><![CDATA[Gift Set — 3.3 oz Eau De Cologne Spray + 3.3 oz Body Cream + 3.3 oz Body Wash]]></description>
<g:expiration_date>2010-10-22</g:expiration_date>
<g:id>pcen-1009</g:id>
<guid>pcen-1009</guid>
<g:image_link>http://www.megaperfumeshop.com/img/p/1009-1009-large.jpg</g:image_link>
<link>http://www.megaperfumeshop.com/1009-caesars-by-caesars.html</link>
<g:price>38.4</g:price>
<g:product_type>Brands A-Z &gt; Caesars</g:product_type>
</item>

Then see the next product:

<item>
<title>caf&iuml;&iquest;&frac12; by Cofinluxe</title>
<g:brand>Cofinluxe</g:brand>
<g:condition>new</g:condition>
<description><![CDATA[Parfum De Toilette Spray 3 oz]]></description>
<g:expiration_date>2010-10-22</g:expiration_date>
<g:id>pcen-1010</g:id>
<guid>pcen-1010</guid>
<g:image_link>http://www.megaperfumeshop.com/img/p/1010-1010-large.jpg</g:image_link>
<link>http://www.megaperfumeshop.com/1010-caf-by-cofinluxe.html</link>
<g:price>16.64</g:price>
<g:product_type>Brands A-Z &gt; Cofinluxe</g:product_type>
</item>

The junk characters in the product name cause the feed import to stop and not to load products any further. Simply remove the defected products and upload the feed again. So this wasn’t the problem of the feed generator but it was a problem with the data quality. Good stuff that it can easily be fixed.