You are here:  » Combines several fields or/and additional fields


Combines several fields or/and additional fields

Submitted by jimpoo on Sun, 2006-07-30 06:57 in

Hi David,

I'm building a magazine comparison site, each row of the datafeed contains fields 'magazine name', 'price' and 'issues', for example:

time magazine, 29.99, 56
time magazine, 16.00, 28

Currently, your scripts will treat the same 'magazine name' as duplicated records and just keeps one, is it able to import all the rows even the product name are the same?
And how do I import the additional fields like the 'issues' so that I can
display it?
Like this page: http://www.5starmags.com/1131_News/Time-Magazine.htm

I guess I need to modify the codes. Please advise.

Best Regards,
Jimpoo

Submitted by support on Sun, 2006-07-30 11:47

Hi,

You can do this quite nicely with the "Text After" filter. Register the magazine name as the product name (as normal); and then create a new filter on the feed using a "Text After" and select the product name field to use.

Then, in the text box on the filter configuration feed, you could do something like this:

" (%ISSUES% Issues)"
(without the quotes - but notice the leading SPACE!)

This is using the field value replacement placeholders; so in your case, you would replace the ISSUES in %ISSUES% with whatever the field name is for the issues field - it's what appears in the left hand column in the sample data displayed below the feed registration page.

Once you've created the filter, import the feed again and they will all be treated as different products, with names like:

Time Magazine (56 Issues)
Time Magazine (28 Issues)

Hope this helps!
David.

Submitted by jimpoo on Sun, 2006-07-30 14:48

Hi David,

This solution is good, but the other problem is, let's say make a search 'time magazine', it comes out two records, then click the 'Time Magazine (56 Issues)' one, it is pointing to '/products.php?q=Time+(56+Issues)',
but actually, the products.php won't show the result, instead, it shows like this:

Price search results for Time Magazine 56 Issues (product not found)

Because the keyword 'Time Magazine (56 Issues)' was changed to 'Time Magazine 56 Issues', I'm thinking, why not change the link to this:
'/products.php?q=id' ?

Jimpoo

Submitted by support on Sun, 2006-07-30 16:29

Ah yes - sorry about that - the brackets are not a valid character in the product name, but the way the code works the user filters are applied after invalid characters are removed.

It should work fine if you remove the brackets, resulting in product name like "Time Magazine 56 Issues".

Hope this helps,
Regards,
David.