You are here:  » Update feed registration


Update feed registration

Submitted by wdekreij on Tue, 2011-03-22 23:57 in

Hi all,

Right now, when I want to change a field (e.g. use another row in the CSV for a certain field), I have to click "Register" in /admin/ and enter all details over again. The problem is, that I sometimes don't remember which CSV-row I used for a certain field (in some niches it's not that obvious).

Therefore, I would like to have the option to "Update the register" for all feeds that are already registered, where all settings are already selected as they where, so it's easy to make changes.

Any thoughts on doing this?

Kind regards,

Wilco

Submitted by support on Wed, 2011-03-23 09:27

Hi Wilco,

Sure, here's a handy mod to pre-load the registration form on Feed Registration Step 2 with existing settings for a feed. In admin/feeds_register_step2.php, look for the following code:

  require("admin_header.php");

...and REPLACE that with:

  else
  {
    $sql = "SELECT * FROM `".$config_databaseTablePrefix."feeds` WHERE filename = '".database_safe($_GET["filename"])."'";
    if (database_querySelect($sql,$feeds))
    {
      $feed = $feeds[0];
      $_POST["merchant"] = $feed["merchant"];
      $_POST["field_merchant"] = $feed["field_merchant"];
      $_POST["user_category"] = $feed["user_category"];
      $_POST["user_brand"] = $feed["user_brand"];
      foreach($config_fieldSet as $k => $v)
      {
        $_POST["field_".$k] = $feed["field_".$k];
      }
    }
  }
  require("admin_header.php");

Hope this helps!

Cheers,
David.
--
PriceTapestry.com

Submitted by wdekreij on Thu, 2011-03-24 23:52

Awesome, thank you!

Submitted by RoyH on Tue, 2019-11-05 16:56

Is there a way to make this work in version 18/06A?
I tried it but it gives an 500 server error.

Submitted by support on Tue, 2019-11-05 17:09

Hi,

Please see this comment for this modification for later distributions...

Cheers,
David.
--
PriceTapestry.com