Prevent Import Routine Processing Empty File

  • Posted:
  • Proposals: 0
  • Remote
  • #697336
  • Expired
  • 0


Experience Level: Intermediate
Hi Alexey,

This is a quick task and it would be great if you could help me with this as soon as possible.

We had never expected a supplier to produce a product import file with just a row of headings and no data. If a product doesn't appear in the file it has its stock and price zeroed which effectively takes it off sale. A problem at the supplier end has meant that all products in all the stores are off sale.

I've set this example up on

/home/sites/betafeed/Webstore_feed_empty.csv - you will see that it has a row of headings but no products.

/home/sites/dealershop/test2/betawebstore/beta-import-file-parameters.php has been updated to use the above file.

In beta-import-file.php the import routine currently does a check on how many columns it has found and complains if the number of columns is not the expected amount.

The import tells us how many rows were processed but I don't know if it does this at the end by incrementing a counter but ideally what I would like is that if the file contains now records as this does, rather than processing each product and zeroing it as it does at the moment it can detect that there are no records and basically write an error to the log file. 'No products found' and then finish.

I am presuming and hoping that this is really simple.

Can you help?


New Proposal

Create an account now and send a proposal now to get this job.

Sign up

Clarification Board Ask a Question

    There are no clarification messages.