You are here:  » Allow Empty buy Url Show import


Allow Empty buy Url Show import

Submitted by keshavkshirsagar on Mon, 2016-08-29 07:18 in

Hello David

I am adding Offline merchant products
On product view Creating Inquiry Form , For that products

For that how I can remove validation for url if buy url is empty

Submitted by support on Mon, 2016-08-29 08:47

Hi,

The required fields check is at line 449 of includes/admin.php:

    if (!$importRecord["name"] || !$importRecord["buy_url"] || !$importRecord["price"]) return;

...so to remove the check for buy_url, REPLACE with:

    if (!$importRecord["name"] || !$importRecord["price"]) return;

Alternatively, to remove the check for buy_url but only for Slow Import, REPLACE with:

    global $progress;
    if (isset($progress))
    {
      if (!$importRecord["name"] || !$importRecord["price"]) return;
    }
    else
    {
       if (!$importRecord["name"] || !$importRecord["buy_url"] || !$importRecord["price"]) return;
    }

Cheers,
David.
--
PriceTapestry.com

Submitted by keshavkshirsagar on Wed, 2016-08-31 05:05

Thanks David.