Jump to content

Payment warning on all orders after migration (migration pro)


bnadauld

Recommended Posts

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

payment warning.png

customer history.jpg

Link to comment
Share on other sites

  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

sqldump.jpg

  • Like 1
Link to comment
Share on other sites

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

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

error_new.jpg

Edited by bnadauld (see edit history)
Link to comment
Share on other sites

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?
 

error_new2.jpg

Link to comment
Share on other sites

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??

  • Like 1
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...