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 (eg.amazon,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
Hi,
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'> </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);';
widget_selectArray("","existing_merchant",FALSE,"",$existing_merchants,12,"onchange='".$onChange."'");
}
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
or
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!
Cheers,
David.
--
PriceTapestry.com