You are here:  » Prevent import of feed

Support Forum



Prevent import of feed

Submitted by marco on Tue, 2008-07-29 18:45 in

Hello,

I am using PT with automatic feed import, which works great, except when feeds are incomplete.

Already implemented the "prevent of zero feed import", that covers feeds with no data.

Last weak, unfortunately, a feed with data was imported that only contained about 10% of the normal amount of products. Till today the problem is not solved yet by the affiliate company, so i was wondering if there could be a way to prevent the import of such a feed in the future.

Is it posible to have some sort of import filter, that prevents import, if the number of products in the new feed is less than, for example 20%, of the number of products in the old feed?

Regards,
Marco

Submitted by support on Wed, 2008-07-30 07:31

Hello Marco,

The issue here is that the number of products in the feed is not known until the import has completed - as parsing both CSV and XML format feeds is a serial process - each product is process sequentially.

Something may be possible with regards to comparing the feed file size against the number of products (divide file size by number of products giving you the bytes per product approx.) and then if this is less than 20% of the previous file size do not import - this would also need a mechanism for you to "reset" and tell the import process that an import is complete. Bear with me and i'll look into this for you...

Cheers,
David.