You are here:  » fixed value for shipping cost

Support Forum



fixed value for shipping cost

Submitted by john100 on Tue, 2013-02-19 16:01 in

Hi,

In one of my feeds, the shipping cost is missing. As it will take ages before the feed is modified, I would like to know an easy way to set a fixed value. Can it be done via the feed table in a specific field?

regards,
john

Submitted by support on Tue, 2013-02-19 16:19

Hi John,

I assume you have added `shipping` as a custom field as per the normal instructions here.

If there is a shipping field in the feed, but it is empty, as long as you still register that field as your custom Shipping field then you can use a Text After (or Text Before, it makes no difference!) filter to effectively replace the empty field with the actual value that you require.

If the feed does not have a shipping field at all, then it would need to be hard-coded, which is still simple to do. In includes/admin.php, look for the following comment at line 312:

  /* check product record for minimum required fields */

...and insert immediately before that line, the following new code:

  if ($admin_importFeed["filename"] == "filename.csv"
  {
    $importRecord["shipping"] = "1.23";
  }

Replace filename.csv as per your filename with missing shipping information, and 1.23 with the actual shipping price for all products in that feed as required, and that should do the trick!

Cheers,
David.
--
PriceTapestry.com