You are here:  » Custom description for product mapped by unique id (ean)


Custom description for product mapped by unique id (ean)

Submitted by IG on Mon, 2024-03-18 12:05 in

Hi David,

how can I add a custom description to a product that is mapped by unique id (ean)?

Best regards,

IG

Submitted by support on Mon, 2024-03-18 12:42

Hi,

You could create a new config file config.descriptions.php with your custom descriptions in the format $config_descriptions["EAN"] = "Description"; for example:

  $config_descriptions["123456789012"] = "Blue Widget";
  $config_descriptions["567890123456"] = "Green Widget";

Then edit includes/admin.php and at the very top of the script just after the opening PHP tag add:

  require("../config.descriptions.php");

Then look for the following code at line 344:

    if (!$importRecord["merchant"]) return;

...and REPLACE with:

    if (!$importRecord["merchant"]) return;
    global $config_descriptions;
    if (isset($config_descriptions[$importRecord["ean"]]))
    {
      $importRecord["description"] = $config_descriptions[$importRecord["ean"]];
    }

Cheers,
David.
--
PriceTapestry.com

Submitted by IG on Fri, 2024-03-29 09:51

Hi David,

It worked perfectly. Thank you very much for your ongoing support. Highly appreciated.

Best regards and Happy Easter!

IG