You are here:  » New Distribution

Support Forum



New Distribution

Submitted by alecs on Tue, 2011-07-12 08:18 in

Hi David,

the new distribution is the best thing since the invention of the wheel ;-), and im very exiting for the wp plugin !
greate job ! great support !

but there are two features iam missing for a better handling.

1) why there is no "edit" link/feature on the feed registration list in the merchant rows, to load the
feedsettings again for finetuning ?

2) iam missing a very important filter. a replace with [text/image] ... if blank.
example ... some merchants doesnt deliver shipping costs or other informations in their feeds ... the colls are often there but empty. with such a filter it would be possible to display an alternate text or image if fields are blank.

maybe its possible with the existing filters but i could not figure it out.

----------------------------
thanks
alecs

Submitted by support on Tue, 2011-07-12 09:46

Hello Alecs,

Thank you for your comments. You'll find a mod on this page to pre-populate Feed Registration Step 2.

A Replace If Empty filter could be implemented as a simply modification to the existing Search and Replace filter. The current version is at lines 16-50 of includes/filter.php, REPLACE with:

  /*************************************************/
  /* searchReplace */
  /*************************************************/
  $filter_names["searchReplace"] = "Search and Replace";
  function filter_searchReplaceConfigure($filter_data)
  {
    print "Search:<br />";
    print "<input type='text' name='search' value='".widget_safe($filter_data["search"])."' />";
    widget_errorGet("search");
    print "<br /><br />";
    print "Replace:<br />";
    print "<input type='text' name='replace' value='".widget_safe($filter_data["replace"])."' />";
    widget_errorGet("replace");
  }
  function filter_searchReplaceValidate($filter_data)
  {
  }
  function filter_searchReplaceExec($filter_data,$text)
  {
    if (($filter_data["search"]=="") && ($text==""))
    {
      return $filter_data["replace"];
    }
    else
    {
      return trim(str_replace($filter_data["search"],$filter_data["replace"],$text));
    }
  }

So the Search box can now be left empty, and then if the field against which the filter is applied is also empty it will be replaced with the Replace text...

Cheers,
David.
--
PriceTapestry.com

Submitted by alecs on Wed, 2011-07-13 05:00

works well ... thank you !!!!!

cheers
alecs