You are here:  » Description extra content

Support Forum



Description extra content

Submitted by mj_2000 on Fri, 2011-06-03 19:56 in

Hi,

I try to add extra content to description using date from XML fields:

<description>Lorem ipsum</description>
<property name="xxx">123</property>
<property name="yyy">345</property>
<property name="zzz">567</property>
<property name="www">999</property>

I want to obtain something like this:

Lorem ipsum
xxx: 123
yyy: 345
zzz: 567
www: 999

Is it possible? How can I do this?

Submitted by support on Sat, 2011-06-04 08:28

Hi mj,

It's straight forward to do but unfortunately more complex than can be added via filters, so it will require a little custom code within the import record handler function in includes/admin.php

In that file, look for the following code around line 292:

    if (!$merchant) return;

...and REPLACE that with:

    if (isset($record["PROPERTY"]))
    {
      $i = 0;
      $p = "";
      while(1)
      {
        if ($i) $p = "@".$i;
        if (!isset($record["PROPERTY".$p])) break;
        $propertyName = $record["PROPERTY".$p."-NAME"];
        $property = $record["PROPERTY".$p];
        $importRecord["description"] .= "<br />".$propertyName.": ".$property;
        $i++;
      }
    }
    if (!$merchant) return;

Hope this helps!

Cheers,
David.
--
PriceTapestry.com

Submitted by mj_2000 on Sat, 2011-06-04 17:15

Thanks David!