• Resolved acidonyx

    (@acidonyx)


    I have a fresh installation of latest WordPress and Woocommerce on localhost.

    I created a sample product that will be virtual and downloadable, with both Download Limit and Download expiry days left blank (unlimited).

    Then I exported it in csv and tried to make multiple similar products in downloaded csv with Microsoft Excel to make a batch csv import file.

    When I import, everything goes well except in all newly created products for some reason both Download Limit and Download expiry days set to 0 (zero). In my csv they are set the same way as in exported one : ‘-1 .

    I tried changing it to -1, and to ” and so on, but every time it imports as 0.

    I even tried to import the original unedited exported csv file made from existing product, yet got the same results.

    Is this a bug, or am I doing something wrong? Documentations doesn’t show what value should be included for unlimited case, only numericals for the cases of set limits.

Viewing 11 replies - 1 through 11 (of 11 total)
  • dougaitken

    (@dougaitken)

    Automattic Happiness Engineer

    Hi @acidonyx

    Are you using the core Importer/Exporter for this?

    If so, using the Product CSV Import Schema, you would set this to n/a.

    Let me know how you get on!

    Thanks,

    Thread Starter acidonyx

    (@acidonyx)

    @dougaitken

    Thanks for your reply, Doug!

    I do use core Importer/Exporter for this. I also found Product CSV Import Schema prior posting this.

    It was a little unclear what “set to n/a” means.

    I tried to set the column value to “n/a” – got 0 on import
    I tried to leave the column value blank – got 0 on import

    I just tried to delete both Download Limit and Download Expiry columns and it finally worked – got blank “unlimited” fields in imported product.

    But what should I do if I import multiple products at once with some having download_limit set and some don’t? Deleting the columns is no longer an option.

    The whole thing is very confusing:

    1) Documentation doesn’t make it clear that setting to “n/a” means deleting the column.
    2) Exporting existing product with blank values generates CSV with both columns presented and set to -1. Yet re-import same CSV sets both fields to 0.

    Is this an intended behavior?

    P.S: I contacted Woocommerce directly through the site and just received a reply that an issue was created on Github as a result – https://github.com/woocommerce/woocommerce/issues/18360

    • This reply was modified 7 years, 2 months ago by acidonyx.
    • This reply was modified 7 years, 2 months ago by acidonyx.
    dougaitken

    (@dougaitken)

    Automattic Happiness Engineer

    Hey @acidonyx

    Ah! That is interesting, sorry, I should have tested this thoroughly myself before replying to you initially.

    Looking at the GitHub issue this is tagged for inclusion in version 3.3 (which is scheduled for 30th January release) so hopefully, this won’t be a problem for too much longer.

    Thanks for making us aware of this, and I’ll mark this thread as resolved as the issue is live on GitHub.

    Thanks,

    I recently updated to 3.3 and was planning on updating all my products to unlimited downloads. I still cannot get it to work. N/A, blank columns, -1, etc. does not work. Any guidance to make the csv importer work to change the download limit to unlimited and expiry date to never?

    Thanks,

    Thread Starter acidonyx

    (@acidonyx)

    @tkaldridge

    I was waiting for them to fix it latest release, did 3.3 just came out?

    There is a workaround to make it work: in csv file that you are planning to import, delete both Download Limit and Download Expiry columns completely (including the headers). It will result in product having unlimited values in Download Limit and Download Expiry columns.

    I will test 3.3 some time later, and will reach the support again if needed to escalate this bug report so it will hopefully get fixed.

    Thanks, I will try this tonight.

    I’m hesitant to be too hopeful. My scenario is that I already built hundreds of products with values for the download limit and expiry date. I then export the csv file and would like to change the csv file to show unlimited and no expire date. If I delete the columns, I would think it would just not update that product property?

    Thanks

    Thread Starter acidonyx

    (@acidonyx)

    @tkaldridge

    You should try and see.

    For you situation, I would make a full backup of the site and DB first, or even better make a temporary copy of the site on local host and then try to:

    1) Export all existing products
    2) Edit CSV to delete both columns in question
    3) Import CSV back with the ‘merge’ option.

    If that will not work, I would next try this:

    1) Restore previous backup (if necessary)
    2) Export all existing products. I would pay attention to make sure all the listing info is exported including images info, etc.
    3) Edit CSV to delete both columns in question
    4) Delete all products you’ve exported from the store
    3) Import CSV back to recreate the products

    Let us know the results!

    I tried the first suggestion with no success. I am too nervous to delete my entire product library for the second option. I assume there is no value that we can enter into the CSV file to get unlimited and no expire date…

    Thread Starter acidonyx

    (@acidonyx)

    @tkaldridge

    Why don’t make a copy of your site locally and test it there first? This way there will be no risk involved;)

    Good luck!

    tkaldridge

    (@tkaldridge)

    Anyone know when this problem will be fixed? I saw on github that the code change appeared to be in 3.3.0 and was absint to intval. Not exactly sure that what the difference is between those to functions. Does that mean I can download to CSV and import with blanks or n/a to achieve unlimited download and no expiry date?

    Thanks!

    • This reply was modified 7 years ago by tkaldridge.

    I just added it to the issues on github again. The only thing I’ve found that works is @acidonyx second work around above: deleting all products first, then importing without those two columns. Not a great long term solution.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Problem setting Download Limit and Download expiry days for csv import’ is closed to new replies.