You are here:  » Add Select Field For merchant

Active Forum Topics

Add Select Field For merchant

Submitted by keshavkshirsagar on Thu, 2015-09-10 12:05 in

Hello David

How to Add Select Field For merchant in feeds_register_step2.php

Because I have up to 30 merchant list & I want to show it in select field to register feeds

in place of input type text of merchant filed

Because operates types different names for same merchants (,Amazon,AmaZon)
which affecting front end to display merchant logo because logo will display when marchant name and merchant logo file name should be same (Representative) And also it showing 3 diffract merchant for amazon

Submitted by support on Thu, 2015-09-10 13:50


Sure - if I've understood correctly, apologies if not, if you edit admin/feeds_register_step2.php and look for the following code at line 257:

  field_custom("Merchant Name","merchant",TRUE);

...and REPLACE with:

  field_custom("Merchant Name","merchant",TRUE);
  print "<div class='row collapse'>";
  print "<div class='medium-6 columns'>&nbsp;</div>";
  print "<div class='medium-6 columns'>";
  $sql = "SELECT DISTINCT(merchant) FROM `".$config_databaseTablePrefix."products` ORDER BY merchant";
  if (database_querySelect($sql,$rows))
    $existing_merchants[""] = "or existing merchant...";
    foreach($rows as $row)
      $existing_merchants[$row["merchant"]] = $row["merchant"];
    $onChange = 'JavaScript:$("#merchant").val(this.value);';
  print "</div>";
  print "</div>";

This will then give you 3 options on Feed Registration Step 2:

1 - Enter a merchant name manually

2 - Select a field from the feed that contains the merchant name


3 - Select an existing merchant name from the database

The new 3rd option simply triggers a jQuery expression that populates the manually entered merchant name box with the selected merchant.

Hope this helps!


Submitted by keshavkshirsagar on Fri, 2015-09-11 08:22

Thanks David