Support

Account

Home Forums General Issues Using ACF with large product base in WooCommerce

Solving

Using ACF with large product base in WooCommerce

  • Hi All, I’m creating a WooCommerce site as a replacement site for one written in the Laravel framework that has some unusual requirements. The site sells sheet music, textbooks, musical instruments and accessories and for this reason I’ve had to create a large number of custom fields – 22 so far, there may be more. The biggest problem however is just the sheer amount of products. I’ve so far got 180,000 of them and I’ve seen a database with over 560,000. This gives me two problems, the first is searches but Lucene Solr has solved that for me. The second is getting the data in to WooCommerce and the ACF fields and later updating those fields. A short test on a dev box indicates uploading that amount of data will take 5-6 days so what’s the quickest way there is of doing that? Obviously the quickest route would be direct from an XML using SQL but the complexity of the product data and ACF structures make that more awkward than I’d like.

    Any suggestions here?

  • I would use WP All Import Pro (WPAI) and both the WC and ACF add ons

    Importing that amount of data is going to take a while.

    The first think I’d do it to chunk up the import and do several instead of trying to get it all done at once. I have successfully imported several thousand products into sites using these tools, but I’ve never done the number you’re looking at. I would think that the size of the file upload to begin the import would be a significant hurdle. Like I said, I would chunk it up, so many imports, and plan on spending some time working on it. Good thing about WPAI is that you can start an import running and go do other things, you just need to leave the browser window open.

  • It’s no problem chopping spreadsheets up into manageable chunks at least initially. Problems may occur though when trying to process updates from suppliers. I have over 300 of those and one gave me an update spreadsheet with over 250,000 rows. Naturally I won’t be trying to chop that up :-). I’ve really got to be able to automate that but i’ll test out howe it might wotk later. ISTR trying out WPAI but giving up on it. I’ll have another go.

  • WPAI has a feature that will do imports from a URL on a schedule. An xml file can be uploaded to a URL, or better yet, if the supplier provides a URL for the and XML feed of the updates then WPIA can be set up to run from that on either a fixed schedule or manually.

    Something I have done in the past was to provide a location where a client can upload a new export/spreadsheet. Then I set up a cron that ran once an hour to see if the date of the uploaded file had changed it would set the flag in WPAI to do the import. Then there was a second cron running, also every hour, that would start the import if the flag was set.

    No, I am not employed by WPAI, but when dealing with large complicated imports, especially when ACF is involved, it is the best tool for the job.

    If you want I can look to see if I still have some code for doing the cron thing I described above.

  • Ah, Yes, I remember now why I didn’t use WPAI. It doesn’t work. With the ACF add-on installed and activated it asks me to create a field group when I’ve already done that. It doesn’t see any new groups created either.

  • I don’t understand that, I’ve never had an issue. I would contact WPAI. It should see any field groups that you have attached to products…….

    … I just tested this. I have not used WPAI with WC in a very long time. But you are correct. I created a field group for products and then I tried doing an import and it tells me that I do not have any field groups associated with products. This is obviously a bug in WPAI and you should definitely submit a ticket to them.

  • I just did some more testing. I added a product and populated the fields in my test group. Now the ACF addon area of the import is detecting my field group

Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.