Nerijus.Zobernis Posted January 4, 2015 Share Posted January 4, 2015 (edited) Hi, i have changed main currency from Lithuania "litas" to "euras" with the simply php script <?php /* # Autorius: Dominykas Zazimka (Esnyper) # Data: 2015-01-01 # Versija: v1.1.0 # El. paštas: [email protected] */ require(dirname(__FILE__).'/config/config.inc.php'); $sql['product'] = Db::getInstance()->execute('UPDATE '._DB_PREFIX_.'product SET price = price*3.45280, wholesale_price = wholesale_price*3.45280, additional_shipping_cost = additional_shipping_cost*3.45280'); $sql['product_shop'] = Db::getInstance()->execute('UPDATE '._DB_PREFIX_.'product_shop SET price = price*3.45280, wholesale_price = wholesale_price*3.45280, additional_shipping_cost = additional_shipping_cost*3.45280'); $sql['product_attribute'] = Db::getInstance()->execute('UPDATE '._DB_PREFIX_.'product_attribute SET price = price*3.45280, wholesale_price = wholesale_price*3.45280, unit_price_impact = unit_price_impact*3.45280'); $sql['product_attribute_shop'] = Db::getInstance()->execute('UPDATE '._DB_PREFIX_.'product_attribute_shop SET price = price*3.45280, wholesale_price = wholesale_price*3.45280, unit_price_impact = unit_price_impact*3.45280'); $sql['specific_price'] = Db::getInstance()->execute('UPDATE '._DB_PREFIX_.'specific_price SET reduction = reduction*3.45280 WHERE reduction_type = "amount"'); $sql['specific_price2'] = Db::getInstance()->execute('UPDATE '._DB_PREFIX_.'specific_price SET price = price*3.45280'); $sql['range_price'] = Db::getInstance()->execute('UPDATE '._DB_PREFIX_.'range_price SET delimiter1 = delimiter1*3.45280, delimiter2 = delimiter2*3.45280'); $sql['range_price'] = Db::getInstance()->execute('UPDATE '._DB_PREFIX_.'range_price SET delimiter1 = delimiter1*3.45280, delimiter2 = delimiter2*3.45280'); $sql['delivery'] = Db::getInstance()->execute('UPDATE '._DB_PREFIX_.'delivery SET price = price*3.45280'); $pass = true; foreach ($sql as $v) { if ($v != 1) $pass = false; } if ($pass == true){ echo 'Kainų konvertavimas sėkmingai įvykdytas, nepamirškite pakeisti pagrindinės valiutos ir atnaujinti pristatymo kainų!'; } else { echo 'Įvyko klaida konvertuojant prekių kainas. Dėl detalesnės informacijos kreipkitės: [email protected]'; } //Ištriname failą, kad daugiau niekas jo nepanaudotų unlink(__FILE__); after that there are missing product in product page, for example http://makadamia.lt/12-sukneles#/page-4 or http://makadamia.lt/12-sukneles#/page-3 its showing blank page, but after refresh its going normally EDIT: oh, as see now, when going dirrect to link ir working fine, but if go to main cattegory page http://makadamia.lt/12-sukneles and then press on 3 or 4 pages, its doesn't works Edited January 4, 2015 by Nerijus.Zobernis (see edit history) Link to comment Share on other sites More sharing options...
Nerijus.Zobernis Posted January 4, 2015 Author Share Posted January 4, 2015 Solved by using http://emagicone.com/products/solutions-for-prestashop/ Was enough duplications all products , and delete old ones Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now