You are here:  » Uning value more than once


Uning value more than once

Submitted by lowndsy on Wed, 2006-05-10 15:17 in

I'm tring to use a value twice on my ink site. The deeplink for one of my merchants has some useful information which I want to clean up using filters and use in my description, but when I try to apply the filters the description entry doesn't show up in the dropdown. Any ideas?

Submitted by support on Wed, 2006-05-10 15:20

Hi,

The field select drop down on the filters page will only contain items that have had had a field registered against them; so it sounds like you might not have registered "deeplink" as the description field.

There is no problem doing this; you should be able to register "deeplink" against both the description and the buy URL fields in order to do what you describe...

Cheers,
David.

Submitted by lowndsy on Wed, 2006-05-10 15:26

Nope, definitely doesn't show up in filters when I register deeplink as more than one field - it just shows the buy URL. The product pages display as they should but I can't apply filters.
Same for if I try it with any other value like productname. I am using an older version of PT - dunno if that is an issue.

Submitted by lowndsy on Wed, 2006-05-10 15:41

Done a little experiment - registered description with deeplink and buy-url as a junk field, applied my filters and then re-registered the feed with description and buy-url both as deeplink - the filters have all changed to be pointed at buy-url now.
It's not dead important but it is annoying.

Submitted by support on Wed, 2006-05-10 16:04

That could explain it. You should be able to extract just the feeds_filters.php file from the current distribution. It contains the following code that ensures that the drop down contains an entry for each item that has been registered:

<?php
  $fields 
= array();
  if (
$feed["field_name"]) $fields[$feed["field_name"]] = "Product Name (".$feed["field_name"].")";
  if (
$feed["field_description"]) $fields[$feed["field_description"]] = "Product Description (".$feed["field_description"].")";
  if (
$feed["field_image_url"]) $fields[$feed["field_image_url"]] = "Image URL (".$feed["field_image_url"].")";
  if (
$feed["field_buy_url"]) $fields[$feed["field_buy_url"]] = "Buy URL (".$feed["field_buy_url"].")";
  if (
$feed["field_category"]) $fields[$feed["field_category"]] = "Category (".$feed["field_category"].")";
  if (
$feed["field_brand"]) $fields[$feed["field_brand"]] = "Brand (".$feed["field_brand"].")";
?>

Alternatively, if you could check in the version that you are running and if this code is there it will indicate a bug as you certainly should be able to select any registered field.

Cheers,
David.

Submitted by lowndsy on Thu, 2006-05-11 01:40

Swapping the code doesn't work, and neither does manually updating it with the above snippet - it is a very old version of the script from the early days so it probably just isn't compatible.
I'm just going to dump the DB into excel and edit it manually in this case - it's not like I have to do it every day. When I get time I'll update the site to the latest version and then it'll all sort itself.