[PrestaShop] Copy product translations from one lang to others

This entry shows how to easily copy product translations from one lang to others by PHP script.

Make a backup of the database before running this script!


I ask you to review this article

Rating 5 Stars from 4 reviews

5 thoughts on “[PrestaShop] Copy product translations from one lang to others”

  1. Great! Thank You!

    Can You post somethig like this to copy products in multistore from one shop to another?

  2. Hello,
    Thanks for yourr script.
    ut it does not work at home without error messages.
    Here is my configuration:
    define (‘_ PRODUCTS_COUNT_’, 30000); // 30000 products
    define (‘_ COPY_FROM_’, 1); // 1 is French
    define (‘_ COPY_TO_’, ‘2,3,4,5,6,7’); // is ids of other active languages
    The script tells me it’s done but the sql updates do nothing …
    Thank you in advance for your help ­čÖé

    1. 1. The _ PRODUCTS_COUNT_ should be lower value , it’s not quantity of all products in your shop, but quantity which is updated during one refresh of the script.
      Please try define (‘_ PRODUCTS_COUNT_’, 1000);

      2. Did you correctly configured database access data?

      3. Try enabling error reporting to see error messages.
      In PHP configuration:
      error_reporting = E_ALL
      display_errors = On
      or on the top of this script:
      ini_set(‘display_errors’, ‘On’);

  3. Thank you for this info.
    1.I will put 1000 and redo the tests
    2.It’s ok for db configuration
    3.I will put the pieces of code to read the errors

    In any case, I will come back to give you more information.

Leave a Reply

Your email address will not be published. Required fields are marked *

3 + fifteen =