Support forum login

©2006-2008 IAAI Software

Contact Us

brand with &

Submitted by affolable on Sun, 2006-05-21 10:26.

Hello,
I have some brand name product with & like D&G
there is a solution to have D&G in the database ? now I have DampG
Thx,
Jean-Christophe

Submitted by dmorison on Sun, 2006-05-21 12:34.

Hi Jean-Christophe,

It is a concious design decision within Price Tapestry to aggressively strip out any characters which are known to cause problems within a web environment - including the ampersand.

In this instance, the best thing to do would be to create a search and replace filter on the brand field for this feed, search for "&" and replace with either blank, or " and " to give "D and G".

However, if you want to try and make it work, the first thing to do would be to remove the normalisation from the brand field during import. To do this, remove (comment out) the following code from includes/admin.php

<?php
    
if ($admin_importFeed["field_brand"])
    {
      
$record[$admin_importFeed["field_brand"]] = tapestry_normalise($record[$admin_importFeed["field_brand"]]);
    }
?>

Then, at the top of search.php you will need to permit the & character in the query by changing:

$q = (isset($_GET["q"])?tapestry_normalise($_GET["q"],":\."):"");

to:

$q = (isset($_GET["q"])?tapestry_normalise($_GET["q"],"&:\."):"");

This should work, but it is quite likely that there will be other problems that arrise as a result - I would advise against it...

Cheers,
David.

Submitted by affolable on Sun, 2006-05-21 14:52.

Hello Dave,
I understand the problem with the &, I decide to change all D&G to Dolce Gabbana and now it's OK

Thx for your help
Jean-Christophe