Jump to content

Edit History

El Patron

El Patron

On 12/30/2025 at 4:08 PM, cpuin said:

Meaning, this conversion ratio doesn't help me at all? If so, I understand.

Can you advice with the correct database query for divide to 1.95583 and round to second symbol after the comma, I want to change all prices.

Thank you a lot in advance!

Generic SQL: convert BGN → EUR (simple products)

Assumptions

  • Prices were originally entered in BGN
  • Default currency is now EUR
  • Table prefix is ps_ (change if different)
  • Conversion rate: 1 EUR = 1.95583 BGN
  • Rounded to 2 decimals
-- Convert base product prices from BGN to EUR
UPDATE ps_product
SET
  price = ROUND(price / 1.95583, 2),
  wholesale_price = ROUND(wholesale_price / 1.95583, 2);

-- Convert shop-scoped prices (used even in single-shop installs)
UPDATE ps_product_shop
SET
  price = ROUND(price / 1.95583, 2),
  wholesale_price = ROUND(wholesale_price / 1.95583, 2);

⚠️ Important
This SQL only updates simple product base prices.

If you use any of the following, additional SQL statements are required because prices are stored in other tables:

  • Product combinations / attributes (size, color, etc.)
  • Specific prices (sales, discounts)
  • Cart rules / vouchers with fixed amounts
  • Shipping prices stored in the database

• Make a full database backup first
• Test on staging if possible
• Put the shop in maintenance mode
• Do NOT modify historical orders

El Patron

El Patron

On 12/30/2025 at 4:08 PM, cpuin said:

Meaning, this conversion ratio doesn't help me at all? If so, I understand.

Can you advice with the correct database query for divide to 1.95583 and round to second symbol after the comma, I want to change all prices.

Thank you a lot in advance!

Generic SQL: convert BGN → EUR (simple products)

Assumptions

  • Prices were originally entered in BGN
  • Default currency is now EUR
  • Table prefix is ps_ (change if different)
  • Conversion rate: 1 EUR = 1.95583 BGN
  • Rounded to 2 decimals
-- Convert base product prices from BGN to EUR
UPDATE ps_product
SET
  price = ROUND(price / 1.95583, 2),
  wholesale_price = ROUND(wholesale_price / 1.95583, 2);

-- Convert shop-scoped prices (used even in single-shop installs)
UPDATE ps_product_shop
SET
  price = ROUND(price / 1.95583, 2),
  wholesale_price = ROUND(wholesale_price / 1.95583, 2);

You can copy/paste this explanation verbatim into the forum:

⚠️ Important
This SQL only updates simple product base prices.

If you use any of the following, additional SQL statements are required because prices are stored in other tables:

  • Product combinations / attributes (size, color, etc.)
  • Specific prices (sales, discounts)
  • Cart rules / vouchers with fixed amounts
  • Shipping prices stored in the database

• Make a full database backup first
• Test on staging if possible
• Put the shop in maintenance mode
• Do NOT modify historical orders

×
×
  • Create New...