Hello,
I have added the field "postage" to import shipping costs. Unfortunately not every merchant has (or is able) to add the shipping cost to the feed. I can import a fixed shipping cost fee, with the "text before" filter.
For some shops that won't work, because they have a shipping cost fee based on the price of the product.
For instance:
0.00-50.00, shipping cost: 7.99
50.00-100.00, shipping cost: 3.99
100.00 and above, shipping cost: 0.00 (free).
Is is possible to have an import filter where i can set the shipping cost based on the (min/max)price of the product?
Thanks,
Marco.
Hello David,
Yes, i think that would work well. I don't really need the "prefix text", i just want to be able to add the "delivery cost" depending on the PRICE field to the field to which the filter has been added.
And it may overwrite everything else in that field. Sometimes there is no black field left to use for the "delevery cost", it that case i would be able to select any other field, and then add the filter.
Can this also work for other delevery cost plans?, for example only based on two ranges (0.00 - 39.99 = 3.99 euro and 40.00 + = 1.99 euro)
Thanks,
Marco.
Hallo David,
I did see that you posted my message but dit not leave a reply.
Did you have the chance to think about this filter?
I think it must be some sort of modification of the filter in this tread:
http://www.pricetapestry.com/node/2052
But instead if dropping the record, it must add a given value (delivery costs) to the selected field (postage).
I can't get it to work myself.
It would help me a lot.
Regards,
Marco.
Hello Marco,
Bear with me it's not the most straight forward of filters to write, i'll try and get something for you ASAP...
Cheers,
David.
Hello David,
I hope you are well. When do you think you can look at this?
Regards,
Marco.
Hi Marco,
Would implementing this as PHP code within the myRecordHandler function be a suitable option? I'm assuming that the objective is to create a value in a variable $delivery which you can subsequently use in the SQL to create the product record (beginning at line 258).
Immediately prior to that point in the code, the product price will be in the variable:
$record[$admin_importFeed["field_price"]]
As merchants may have different delivery cost formulas, you could create separate sections of code for each merchant, which would allow the rules to be programmed independently. For example:
if ($admin_importFeed["merchant"]=="Some Merchant")
{
$price = $record[$admin_importFeed["field_price"]];
if ($price < 50.00) { $delivery = "7.99"; }
elseif ($price < 100.00) { $delivery = "3.99"; }
else { $delivery = "0.00"; }
$record[$admin_importFeed["field_postage"]] = $delivery; // set postage field to $delivery
}
What do you think?
Cheers,
David.
Hallo David,
I did not think of this, but is is also a good solution.
Thanks,
Marco.
Hi Marco,
That's great - let me know if you need any help with the PHP code required for specific rules.
Cheers,
David.
Hello Marco,
Just to confirm, you want to be to add a filter that looks at the PRICE field, and then depending on the value, add another value to the end of the field to which the filter has been added?
Would configuring it something like this be easy for you to do:
Price Brackets:
0,50,100
Delivery Cost:
7.99,3.99,0.00
Prefix Text:
Delivery Cost:
Cheers,
David.