You are here:  » brand import not working

Support Forum



brand import not working

Submitted by speak2daryl on Sun, 2009-11-08 15:20 in

Hi,

For the product titles on my site I use the brand name and then the search and replace function to add the model number EG Brand: Nokia Model number: N97. this cuts out all the promotional text in the title.

The only problem is that it I am unable to use the `browse by brand` function because it will not allow me to use the same field twice when registering the feed, the import simply does not work.

Any idea's on how I can fix this?

Thanks

Daryl

Submitted by support on Mon, 2009-11-09 09:28

Hi Daryl,

In the current version, filters are applied the field itself rather than a copy of it; which makes it tricky to use the same field for more than one purpose - especially if using filters. This issue is addressed in the new distribution of Price Tapestry to be released tomorrow, so if you are starting a new site it may be worth holding on for that.

However, it can be resolved relatively easily using a new filter to empty a particular field and then copy in the values required. Firstly, add a new filter "Empty" to your includes/filter.php with the following code:

  $filter_names["Empty"] = "Empty";
  function filter_emptyConfigure($filter_data)
  {
    print "<p>There are no additional configuration parameters for this filter.</p>";
  }
  function filter_emptyValidate($filter_data)
  {
  }
  function filter_emptyExec($filter_data,$text)
  {
    return "";
  }

Next, revert to registering the title field as the main title, and the brand field as before. Then, add a new Empty filter to the title field (this will clear out the verbose title that you don't want to use), and then add a Text After filter to construct the value required from the brand and model number fields. Assuming that these are called BRAND and MODEL in the field list in the sample data; the Text After filter would contain:

%BRAND% %MODEL%

Hope this helps!

Cheers,
David.