bnadauld Posted September 21, 2024 Share Posted September 21, 2024 I migrated my shop from ps 1.6.1.3 to ps 8.1 (using migration pro) and everything seemed to have worked, apart from this one thing - all the past orders show this warning and the wrong currency (see warning photo attachment). You can see in the attached screenshot the order was placed in peso but is now incorrectly showing in $. When i place a new test order, i have no problem at all (see order history photo attachment). It really annoying as all my customers will see that they have spent thousands of dollars instead of pesos. Do i need to edit a column in the db? How do i solve this? Thanks for you help Link to comment Share on other sites More sharing options...
ps8modules Posted September 22, 2024 Share Posted September 22, 2024 Hi. Check the id_curreny column in the ps_cart and ps_orders tables in the database. 1 Link to comment Share on other sites More sharing options...
bnadauld Posted September 22, 2024 Author Share Posted September 22, 2024 On 9/22/2024 at 12:59 AM, ps8modules said: Hi. Check the id_curreny column in the ps_cart and ps_orders tables in the database. Expand im in ps_orders now. I can see that the 'bad' ones are number '1' and the new orders that seem to be ok are number '2'. Do i just change them all to say '2'? Im v nervous to touch the db. i really appreciate your help 1 Link to comment Share on other sites More sharing options...
ps8modules Posted September 22, 2024 Share Posted September 22, 2024 Hi. As I already indicated, it is necessary to modify the id_currency in several tables related to the cart and the order. You can always back up the tables you will edit. 1 Link to comment Share on other sites More sharing options...
bnadauld Posted September 22, 2024 Author Share Posted September 22, 2024 I have all these table that have the id_currency column - do you know if i have to edit the values in all of them ps_cart ps_country ps_currency ps_currency_lang ps_currency_shop ps_layered_price_index ps_module_currency ps_order_payment ps_orders ps_product_supplier ps_specific_price ps_specific_price_rule ps_supply_order ps_supply_order_detail ps_warehouse Link to comment Share on other sites More sharing options...
ps8modules Posted September 22, 2024 Share Posted September 22, 2024 (edited) Have they only shopped in Pesos in the past? Yes: ps_cart ps_order_payment ps_orders ps_supply_order ps_supply_order_detail Hang in there for half an hour, I'll be at the computer and look at the tables: ps_specific_price ps_specific_price_rule Edited September 22, 2024 by ps8modules (see edit history) Link to comment Share on other sites More sharing options...
bnadauld Posted September 22, 2024 Author Share Posted September 22, 2024 (edited) nice one! thanks so i went in the db and ran this query: UPDATE ps_orders SET id_currency = 2 WHERE id_currency = 1; that sorted out the issue for all the people that paid in pesos. Great! but the customers that paid in $ Euros and gbp - now show the warning: Warning ₱4,100.51 paid instead of ₱64.87 Edited September 22, 2024 by bnadauld (see edit history) Link to comment Share on other sites More sharing options...
ps8modules Posted September 22, 2024 Share Posted September 22, 2024 The worst thing is that I don't know what currency and ID currency you had in the old version of Prestashop, what was the default currency and how it is now. Link to comment Share on other sites More sharing options...
bnadauld Posted September 22, 2024 Author Share Posted September 22, 2024 i can get it for you from my old 1.6 site - i have them both in dev now. i cant take the actual old site offline as its how we make money. www.pangasinanflowershop.com in my old shop the default was pesos and thats what i set in the new shop before the migration. When you compare the image of the old and new store i noticed that the id's are in a different order in the new store. so i went back and set my new store up with the currencies in the exact same order as the old and reran the migration - issue persisted. Hence the ask on here? Link to comment Share on other sites More sharing options...
ps8modules Posted September 22, 2024 Share Posted September 22, 2024 Unfortunately, I can't help you. It will be better to contact module support why this is happening. 1 Link to comment Share on other sites More sharing options...
bnadauld Posted September 22, 2024 Author Share Posted September 22, 2024 ok - i really appreciate your help anyway. thank you 1 Link to comment Share on other sites More sharing options...
bnadauld Posted September 22, 2024 Author Share Posted September 22, 2024 im not sure but i think i might have solved it: run this query on the db: SELECT o.id_order, o.reference, o.total_paid, o.id_currency AS order_currency, c.iso_code AS order_currency_code, p.amount AS paid_amount, p.id_currency AS payment_currency, c2.iso_code AS payment_currency_code FROM ps_orders o JOIN ps_order_payment p ON o.reference = p.order_reference JOIN ps_currency c ON o.id_currency = c.id_currency JOIN ps_currency c2 ON p.id_currency = c2.id_currency WHERE (o.total_paid != p.amount OR o.id_currency != p.id_currency); This then outputs you a list of all the 'bad' orders ie: id_order reference total_paid order_currency order_currency_code paid_amount payment_currency payment_currency_code 9 LYDQIPWTX 36.250000 2 PHP 36.250000 1 USD 112 RFSJSUCWL 34.020000 2 PHP 34.020000 3 EUR 114 KTTMYCXTG 54.400000 2 PHP 54.400000 1 USD 124 YFGXLYOLF 38.300000 2 PHP 38.300000 1 USD then run this query: UPDATE ps_orders SET id_currency = CASE WHEN id_order IN (LYDQIPWTX) THEN 1 -- USD WHEN id_order IN (RFSJSUCWL) THEN 3 -- EUR WHEN id_order IN (KTTMYCXTG) THEN 1 -- USD WHEN id_order IN (YFGXLYOLF) THEN 1 -- USD ELSE id_currency -- Retain existing currency if no match END WHERE id_order IN (LYDQIPWTX, RFSJSUCWL, KTTMYCXTG, YFGXLYOLF); Im checking them but they look good. Thanks gpt and ps8modules: Am i missing something here and I'm opening up a giant cat of worms later one?? 1 Link to comment Share on other sites More sharing options...
ps8modules Posted September 22, 2024 Share Posted September 22, 2024 (edited) I don't know anyone who has used a migration module and had no problems 😮💨 Turn on debug mode and go through everything in the administration and in the e-shop. There will be a lot more of those mistakes. Edited September 22, 2024 by ps8modules (see edit history) 1 Link to comment Share on other sites More sharing options...
bnadauld Posted September 22, 2024 Author Share Posted September 22, 2024 On 9/22/2024 at 8:12 AM, ps8modules said: I don't know anyone who has used a migration module and had no problems 😮💨 Expand hahaha - thanks - i feel less stupid now Appreciate your help! 1 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