You are here:  » ean number = 0 change to N/A

Support Forum



ean number = 0 change to N/A

Submitted by wilkins on Fri, 2012-02-24 08:53 in

Hi

I am redesigning our sites to include ean numbers in the description, done all the formatting, however there are a lot of companies still not putting ean numbers in and this shows up as 0, is there any way of changing this when importing to something like N/A.

Brent

Submitted by support on Fri, 2012-02-24 09:06

Hi Brent,

Sure - in includes/admin.php, the place to add this kind of import time processing is after the following code at line 343:

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

In this case, on the next line try adding the following code:

  if (!$importRecord["ean"]) $importRecord["ean"] = "N/A";

This sould handle both the empty case and 0... Don't forget to re-import all affected feeds after making the change...

Hope this helps!

Cheers,
David.
--
PriceTapestry.com

Submitted by wilkins on Fri, 2012-02-24 09:28

Thanks will try that, one other thing, I am changing the search to search description as well, does this have a significant effect on speed when searching as we use a large database.

Brent

Submitted by support on Fri, 2012-02-24 09:46

Hello Brent,

It will have an impact but if the majority of the queries on your site invoke a full text search (no words in the query includes/stopwords.php) then there should not be any noticeable difference.

You can test the performance of a basic search by using a query like "foo bar" which should not return any results but the time taken would be indicative of the maximum time taken for search a user is ever likely to encounter.

Cheers,
David.
--
PriceTapestry.com

Submitted by wilkins on Fri, 2012-02-24 15:49

hi

Tried the insert into admin.php, getting error

Parse error: syntax error, unexpected '='

Brent

Submitted by support on Fri, 2012-02-24 15:57

My apologies Brent, the replacement should have been:

  if (!$importRecord["ean"]) $importRecord["ean"] = "N/A";

(corrected above also)

Cheers,
David.
--
PriceTapestry.com