Hi David,
I hope you're well. With reference to http://www.pricetapestry.com/node/2652 I'm trying to leave out prices that are 0.00 during import but I can't find the line where the code is supposed to be put in as my includes/admin.php has been modified. The only price related lines of code I can find are:
/* check product record for minimum required fields */
if (!$importRecord["name"] || !$importRecord["buy_url"] || !$importRecord["price"]) return;
and
/* decimalise price *
$importRecord["price"] = tapestry_decimalise($importRecord["price"]);
$importRecord["delivery_cost"] = tapestry_decimalise($importRecord["delivery_cost"]);
$importRecord["price"] = $importRecord["price"] + $importRecord["delivery_cost"];
Can you tell me how I can omit prices that are 0.00 during import. Thanks!
Hi Allan,
Add the code around the decimalise price section. If you want to include delivery cost in the calculation then it would be:
/* decimalise price *
$importRecord["price"] = tapestry_decimalise($importRecord["price"]);
$importRecord["delivery_cost"] = tapestry_decimalise($importRecord["delivery_cost"]);
$importRecord["price"] = $importRecord["price"] + $importRecord["delivery_cost"];
if ($importRecord["price"]=="0.00") return;
However if you want to ignore delivery cost for the purposes of excluding 0.00 products, use:
/* decimalise price *
$importRecord["price"] = tapestry_decimalise($importRecord["price"]);
if ($importRecord["price"]=="0.00") return;
$importRecord["delivery_cost"] = tapestry_decimalise($importRecord["delivery_cost"]);
$importRecord["price"] = $importRecord["price"] + $importRecord["delivery_cost"];
Cheers,
David.
--
PriceTapestry.com