Support is offline. We are back Monday 23 November, 09:00.

Having trouble using the Breakdesigns plugin to import #65210

Resolved Locked eclipse opened this topic Wednesday, 16 December 2020 · 32 replies
Author

Hi,
I’m using Joomla 3.9.23, Virtuemart 3.8.6, with Breakdesigns Custom Fields for All 4.1.1 ands Stockable Custom Fields 1.5.1
I’ve installed CSVI 7.19.0 and the CSVI Breakdesigns plugin 7.19.0.
I’m testing with a blank Joomla installation, and following your documentation for the Breakdesigns plugin. Our products usually have 2 custom fields for all fields within a stockable custom fields, so I was testing Option 6: Stockable Custom fields with String and Custom fields for all custom fields.
I followed the documentation and create one string custom field, one Custom field for all custom field, and then add them to a Stockable custom field. I create the Import template, and run it with the supplied demo content. The example Parent Product is imported, along with the 2 child product variations, and 3 products show in my Product List in Virtuemart (1 parent and 2 children). However, when preview the Parent product in the front of the website, only one variation/child product is showing. If I edit the parent product, there are 2 child products showing in the CHILD PRODUCTS tab, but only some of the first variation is showing in the CUSTOM FIELDS tab.
I have repeated the examples for Options 5, 6 and 7 in the Breakdesigns plugin documentation on your site, but I get similar results. The child products are imported so they show in the Virtuemart Products List, but when editing the parent product, the child products show in the Child Products tab, but in the custom fields tab, there is only a partial first variation entry.
I cannot seem to get the import to completely add the new products to the custom fields in the Parent Product, no matter what examples I try.
I also setup a parent product with 5 children as an example, and then tried to export it. I cannot find a field for CUSTOM_MULTIPLE when mapping fields for the export file, and so I cannot try to backwards engineer the correct import code either.
Maybe I am not understanding how the custom_multiple field works, or maybe I am doing something wrong. I have attached a screenshot of my Parent Product child product tab, and custom field tab, and also the import log.
Any help would be very appreciated, as we are hoping to use this to import larger number of child product variations. When editing a parent product with over 100 child products, the page becomes unstable to continue to edit.
Thanks,
Aaron

Support

Hello Aaron,
Please also post screenshots on how you have custom fields set in VirtueMart custom fields page. Also checking the debug log there are no entries for custom fields for all table queries in it which means custom fields for all values are not processed at all. You said you have Breakdesigns custom fields for all extension installed. Is it enabled? Check if all the necessary plugins are enabled from Joomla plugin manager.

I also setup a parent product with 5 children as an example, and then tried to export it. I cannot find a field for CUSTOM_MULTIPLE when mapping fields for the export file, and so I cannot try to backwards engineer the correct import code either.

custom_multiple field is supported only in import and so it is not available for export.

Kind regards,

Tharuna

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory

Author

Hi Tharuna,

Thank you for the quick response, though it is late here so I apologise if I do not respond quickly after this.
I have checked the Custom Fields for All and Stockable Custom Fields plugins are enabled.
I setup my custom fields as per your documentation, please see my screenshots.
I usually make the Cart Attribute and Cart Input to No otherwise they show twice on the product details page - but this might be because I am just testing with a blank install too, or it might not matter.
Also attached is the demo import code I used that was copied from the documentation for Option 6.
I have setup a Super Admin user if you would like to take a look.. Thanks for your help!

Edit: I understand about the custom_multiple not being available by export - but is there any way of exporting some demo stockable custom fields so I can use that same format to re-import them - or you need the custom_multiple field I guess to do imports?

Support

Hello Aaron,
I was able to see the issue on your site with the import. I found two things

  1. The default value set for custom fields for all and stockable custom field custom fields are empty. RO CSVI uses this default value in code to process the values. Our stockable custom fields document explains on this field. See attached screenshot.
  2. There was an issue of existing rows getting updated in import. Fixed that with a patch file. Loaded it on your site too.

Import works good on your site now. Please check and let me know.

I understand about the custom_multiple not being available by export - but is there any way of exporting some demo stockable custom fields so I can use that same format to re-import them - or you need the custom_multiple field I guess to do imports?

custom_multiple is a needed field for importing stockable custom fields. The number of custom_multiple values will tell RO CSVI the number of children available for a parent product. You can use custom_title, custom_value and custom_param fields in export template to export stockable custom field values.

  • Screenshot 2020-12-16 at 6.22.48 PM.png

Kind regards,

Tharuna

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory

Author

Hi Tharuna,

Thank you so much for your assistance. I logged in and saw there was 2 updates (CSVI and Breakdesigns plugin), so I updated these. I was assuming that the 7.19.1 versions were the same updates that you patched to my site, so I hope I have not overwritten your fixes.
However, I am still having the same issue. I try the various combinations but I simply cannot import the parent and child products correctly.
I am just using your demo import code, and the import shows as successful, but it still does the same thing as my earlier problem. It adds the parent product along with the two children, but when editing the parent product, the second child does not show in the Custom Fields tab of the editing product page. And if I preview the parent product, I can only see the first option as an available product variation to choose, and no second child variation.
The same issue happens when i try other combinations - even Option 1 in the documentation with a single custom field for all imports the parent and child products, but they are not displayed in the parent product Custom Fields tab, and are not selectable when previewing the site. It is driving me crazy!

In your demo code for Option 6, I see your "custom_value" for the two child products is MCotton and LSynthetic, which are the two child product variations. If I export my own manually setup parent and child products, I get a "custom_value" of "~" for all the child products, and their variations are instead in the custom_params field.

I am so sorry to keep asking, but what am I doing wrong :(

Thanks,
Aaron

Support

Hello Aaron,

I was assuming that the 7.19.1 versions were the same updates that you patched to my site

The fix in the patch file is still in testing phase and was not included in RO CSVI 7.19.1 version. When you did the update, it has overwritten my changes.I have attached the patch file here. Please load the attached patch file and run the import again. Check if your import issue is solved with that.

Kind regards,

Tharuna

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory

Author

Hi Tharuna,

I am so sorry that I overwrote your patch. The patch allowed me to follow your instructions and import a parent product with up to 8 children as an example, all working correctly. I really appreciate your help with this matter!

We have a lot of existing products that we would like to add more custom fields/child products to. The more child products we have using the stockable custom fields plugin, the harder it is to load the parent product page to edit it correctly. Is there a work around by importing more stockable custom fields into an existing parent product that already has custom fields (child products)?

Thanks,
Aaron

Support

Hello Aaron,

We have a lot of existing products that we would like to add more custom fields/child products to. The more child products we have using the stockable custom fields plugin, the harder it is to load the parent product page to edit it correctly. Is there a work around by importing more stockable custom fields into an existing parent product that already has custom fields (child products)?

You can create an import file with new custom fields for parent product and run the import. It should append the stockable custom fields of parent product. But i am seeing an issue with it. I am working on it and will send you the updated patch file once it is ready.

Kind regards,

Tharuna

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory

Author

Hi Tharuna,

You are awesome, thank you so much for following this up so quickly!! I am trying to not post dumb questions and check for documentation first, so I tried many ways to import additional stockable fields, then I had a beer because it was getting late, and then I just kept messing things up :(
When the parent product has over 100 children (stockable custom fields), we find it hard to edit the parent page. Being able to add more stockable variations/child products to an existing parent without having to edit the parent product would be wonderful.
I've seen so many people having issues with editing the parent product with lots of stockable fields - so I will be glad to post info about this on the breakdesigns and vm forums when I see similar issues.
Thanks,
Aaron

Support

Hello Aaron,

I am trying to not post dumb questions and check for documentation first, so I tried many ways to import additional stockable fields, then I had a beer because it was getting late, and then I just kept messing things up :(

Not a good time to test the import :D

When the parent product has over 100 children (stockable custom fields), we find it hard to edit the parent page. Being able to add more stockable variations/child products to an existing parent without having to edit the parent product would be wonderful.
I've seen so many people having issues with editing the parent product with lots of stockable fields - so I will be glad to post info about this on the breakdesigns and vm forums when I see similar issues.

With the attached patch file, you will be able to append Stockable custom fields to existing parent product. RO CSVI will not do any processing on existing values but just import the new values to existing parent product. Please load the patch file and run the import. I would recommend you to test one product first and see how that goes before you run it on all the products.

Let me know on how the import with patch file goes.

Kind regards,

Tharuna

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory

Author

Hi Tharuna,

I'm sorry I haven't replied earlier, but I have now tested the patch properly. It works well when importing new stockable custom fields, and the child products appear in the correct order in the shop front. For example, if I do Colours A to Z, and Sizes 1 to 20, I can import a variety of stockable custom fields and it works as expected. I tested using one string custom field and one custom field for all inside of a stockable custom field.
When I tried importing additional products, the ordering of the string custom field was disrupted, and child products and the shop front product options appeared out of order. It seems a random ordering process, because I can't see a pattern to it.
So I thought maybe I need to use 2 custom fields for all within a stockable custom field, because that is what most of our products are. And when the custom fields are custom fields for all, we can order the options by editing the custom field in Virtuemart.
However, I have the same issue when trying to import more custom fields to an existing parent product - the ordering is re-arranged into a random order.
I started by importing 64 products, which after a complete fresh installation - which works correctly. I see A-1, A-2...B-5, B-6, C-7, C-8 etc.
The additional 10 products then break the ordering, and it is seemingly random after this - see screenshot.

If I delete all products, start again and import the initial 64 child products - unfortunately they are now imported in the wrong order - :( see screenshot
Deleting products may be leaving behind custom fields in the database - I don't know?

I have to do a clean install to get the ordering working correctly again. But then after the first import, any additional stockable custom field imports breaks the ordering. though it does work and import the new child products.

If you think the ordering issue is a bug or something that can be fixed, this would allow us to import additional stockable fields as needed.
The other thing which I have made mistakes with is the number of custom_title, custom_value and custom_multiple values. Is there a way of making this easier by adding for example Colour and Size*64 instead of adding Colour and Size Colour and Size 64 times?
This might not be so easy as what I'm thinking, but I'm just throwing it out there as a user suggestion :)

Anyway, I hope you have a Merry Christmas. I am going to be monitoring this, because we still need to make sure we don't 'break' the ordering of existing products custom fields - but I also have a few days off over the christmas period. Thank you so much for your help, and I have added your login details to the latest fresh install as well if you need them.

Edit: I also checked the ordering in the Virtuemart Custom Fields by editing the Size and Colour, but they are still showing as being in the correct A-Z and 1-20 ordering.

Thanks,
Aaron

  • order-after-additional-10-product-import.png
  • new64product-import-ordering-after-deleting-products.png
Support

Hello Aaron,
For setting up the ordering of custom fields you need to use field custom_ordering in your import file. Did you have this field in import? If not please check your import with custom_ordering field and if you still have an issue, post the import file and import debug log to check.

The other thing which I have made mistakes with is the number of custom_title, custom_value and custom_multiple values. Is there a way of making this easier by adding for example Colour and Size*64 instead of adding Colour and Size Colour and Size 64 times?
This might not be so easy as what I'm thinking, but I'm just throwing it out there as a user suggestion :)

Each custom field is processed based on custom_title and custom_value pair, adding Colour and Size 64 to custom_title field is nice and easy but i am sure custom_value still needs 64 values. It cannot be processed as custom_value64 as that will be 64 different values. Same goes for custom_param and custom_ordering fields.

Kind regards,

Tharuna

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory

Author

Hi Tharuna,

Just a quick note to say the custom fields imports are working with your patch. We are testing the custom ordering today, and I will let you know how we go. I really appreciate your help with this.

Thanks,
Aaron

Author

Hi Tharuna,

I am still having issues with importing a parent product with child products in the correct order. They appear as the correct ordering in the child products tab when editing the parent product, but the Custom Fields themselves don't seem to order correctly. So pordering is correct, but the custom_ordering for the custom fields ordering must be wrong :(

I based my import custom_ordering on an export I did of a correctly ordered parent-child example I did manually.

Also, my images from file_url don't seem to populate the parent product information either. Not sure what I am doing wrong.
Can you please check my import file?

Thanks,
Aaron

Support

Hello Aaron,

I am still having issues with importing a parent product with child products in the correct order. They appear as the correct ordering in the child products tab when editing the parent product, but the Custom Fields themselves don't seem to order correctly. So pordering is correct, but the custom_ordering for the custom fields ordering must be wrong :(

Can you please post a screenshot on which Custom Fields are not in order? As you said i am seeing the child products are in order in Custom fields tab in VirtueMart product page so i am not sure on which ordering you are talking about.

Also, my images from file_url don't seem to populate the parent product information either. Not sure what I am doing wrong.
Can you please check my import file?

Two things with your import

  1. I am not sure if you intend this for images on import but in your import template on Image tab you have set Update media link only option to Yes, this option will only check if the file_url value exists and update in database. It does not do any image processing. If you want the image to process you want to set this option to No.
  2. Another thing i found with your image is the path, RO CSVI uses VirtueMart product image default path as images/stories/virtuemart/product if not set in template. Since you have images/virtuemart/product as path that makes image path as images/stories/virtuemart/product/images/virtuemart/product/product-test.jpg and throws error that "Image images/stories/virtuemart/product/images/virtuemart/product/product-test.jpg does not exist in media table". To solve this you need to set the path of the images on Image tab under Location product files as images/virtuemart/product/ and save the template. RO CSVI will then use the path set in template instead of default path.
  • Screenshot 2021-01-13 at 3.00.19 PM.png

Kind regards,

Tharuna

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory

Author

Hi Tharuna,

When I edit my Parent Product, and look at the Custom Fields tab, the imported custom fields are in the wrong order. See attached screenshot, where the order is child 25, 26, 24, 23 and so on. When previewing the product in the front of the website, the order is the same (child 25, 26, 24, 23 etc). I have also attached screenshot of the front end product preview, where the custom field ordering is the same incorrect ordering.

If I delete the products, and clear the website cache, and re-do the import, the ordering is different and seemingly random. Every 1 in 5 imports, the ordering seems perfect - and I'm using the same import file to test.
I am adding 012 etc up to 26 for the parent product custom_ordering, and then 1~!, 12, 13 etc for my child product custom ordering - is this the correct format?

With the images, I know what you are talking about, and will update those settings and try again - thank you for the explanation.

Once again thanks for all your help. Once I have ordering correct, then the next (and hopefully last) challenge is to try importing additional custom fields and be able to insert them into the correct order.

Thanks,
Aaron

  • child-25-is-first-custom-field.png
  • custom-field-ordering.png
Support

Hello Aaron,
The debug log shows that ordering has been inserted as per the import file. From what i can see from the screenshot the ordering is in Descending order on your site on both frontend and backend. Is that correct? Running import with your file gets correct ordering of custom field on my test site. See attached screenshots. So there is nothing wrong with import file and your import.

  • Screenshot 2021-01-13 at 5.32.04 PM.png
  • Screenshot 2021-01-13 at 5.38.29 PM.png

Kind regards,

Tharuna

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory

Author

Hi Tharuna,

My custom fields ordering is often different every time I try to do an import, so I am guessing that previous import attempts and custom field database entries are causing the incorrect ordering, even though my import file is correct.

If you are able to import with correct ordering on a clean website installation (your screenshots have correct ordering), and my ordering is nearly always corrupt when using my import file - the only difference is that I have done this import many times, then deleted the products, then done the import again. Are we getting the wrong ordering because of existing or leftover database entries?

I have seen you mention on other posts about the possible need to clean up the custom fields database tables, but I'm not sure what you are referring to - wouldn't that also possibly delete other products custom fields and so on?

I clear the website cache, clear my browser cache or use an incognito browser window, then do an import - but I get the wrong ordering most attempts as per my screenshots. My custom field ordering from the last import was 25, 26, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 1, 6, 5, 7, 8, 2, 3, 4.

How can we make sure we do a "clean" import without the possibility of the wrong ordering?

For example, if I wanted to import 3 additional custom fields for this sample parent product with children 1 to 26, how do I do this? Let's say I have already imported parent product with 26 children in correct order. I want to add the new child products called 3B, 6B and 10B.
I want my ordering to be 1,2,3,3B,4,5,6,6B,7,8,9,10,10B,11,12 etc - so 3B is listed as the 4th custom field, 6B would be the 8th, and 10B would become the 13th custom field in the list of 29 children. I can't test properly because I am thinking all my previous import attempts are messing with the database, and causing my re-ordering issues.

To do this, should I import using this format? So it takes into account 3B is imported first to order number 4, so then 6B has to be imported into what is now order number 8, and 10B has to then be imported into order number 13 - like this:
product_ name | pordering | custom_ordering
Sample Parent Product | 0 | 4813
Child 3B | 4 | 14
Child 6B | 8 | 1
8
Child 10B | 13 | 1~13

Or is the importing based on the order number at the start of the import - so I want my 3B added as 4th, 6B as 7th, and 10B as 11th as per original ordering
Sample Parent Product | 0 | 4711
Child 3B | 4 | 14
Child 6B | 7 | 1
7
Child 10B | 11 | 1~11

Sorry for the long post, I have been checking the forums for previous issues and have found answers to all of my other questions, but this ordering has me beat :(

Thanks so much,
Aaron

Support

Hello Aaron,

If you are able to import with correct ordering on a clean website installation (your screenshots have correct ordering), and my ordering is nearly always corrupt when using my import file - the only difference is that I have done this import many times, then deleted the products, then done the import again. Are we getting the wrong ordering because of existing or leftover database entries?

Yes the clean installation will make a difference. I tried importing thrice on my test website and ordering is still the same.

I have seen you mention on other posts about the possible need to clean up the custom fields database tables, but I'm not sure what you are referring to - wouldn't that also possibly delete other products custom fields and so on?

That was the case with previous versions of RO CSVI and only for Customfieldsforall tables, but with RO CSVI 7.19.1 version existing values of Customfieldsforall fields are updated. When you delete the product custom fields manually using database then you are deleting custom fields of all products.

How can we make sure we do a "clean" import without the possibility of the wrong ordering?

In your import template on Options tab set Delete Custom fields relations to yes(See attached screenshot), save the template and run the import. This option will delete all the custom field related to that product and re imports it. See if that sets correct ordering. This option should also help you in inserting new child products with new ordering.

To do this, should I import using this format? So it takes into account 3B is imported first to order number 4, so then 6B has to be imported into what is now order number 8, and 10B has to then be imported into order number 13 - like this:
product_ name | pordering | custom_ordering
Sample Parent Product | 0 | 4813
Child 3B | 4 | 14
Child 6B | 8 | 1
8
Child 10B | 13 | 1~13

Or is the importing based on the order number at the start of the import - so I want my 3B added as 4th, 6B as 7th, and 10B as 11th as per original ordering
Sample Parent Product | 0 | 4711
Child 3B | 4 | 14
Child 6B | 7 | 1
7
Child 10B | 11 | 1~11

With Delete Custom fields relations option your import file will looks like

Sample Parent Product | 0 | 1~2~3~4~5~6~7~8
Child 1| 1 | 1~1
Child 2 | 2 | 1~2
Child 3 | 3 | 1~3
Child 3B | 4 | 1~4
Child 4| 5| 1~5
Child 5 | 6 | 1~6
Child 6 | 7 | 1~7
Child 6B | 8 | 1~8

Please see if the ordering is set correct for existing values first and then run import for inserting new child products. Let me know on how it goes.

  • Screenshot 2021-01-14 at 12.06.24 PM.png

Kind regards,

Tharuna

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory

Author

Hi Tharuna,

The import works every time on a clean install, however if I just delete those products (from the VM Product List page) and try another import, I get wrong custom field ordering. But I was not using the delete custom fields relation option so that might fix the imports after the initial import.

What you say about the Delete Custom fields relations option makes sense! I have been testing importing 26 - all good (YAY!) and then importing 29 (includes the 3 new children) BUT the custom field ordering was never right.

I will test this in the morning - thank you so much!

One last question - should the custom_ordering field for the parent start with a 0 or a 1?
In your example above, you mention 12345678, but I have been starting with a 0 (would be 01234567)
Which should I use?

Thanks,
Aaron

Support

Hello Aaron,

One last question - should the custom_ordering field for the parent start with a 0 or a 1?
In your example above, you mention 12345678, but I have been starting with a 0 (would be 01234567)
Which should I use?

Ordering field values are for sorting records so it does not make a difference if it starts with 0 or 1. As you said the content is an example, you can use 0 as starting number and that should not be a problem.

Kind regards,

Tharuna

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory

Author

Hi Tharuna,

I have enabled the Delete Custom fields relations option in the Import Template, but I still cannot get the correct ordering after my second import.
I am using the same example - importing parent with 26 children, which works correctly. Then I go to import my second import file, which has the additional 3 child products, using your ordering above, but i still get the wrong order after importing the 29 child products with new custom_ordering.

I can't see what I am doing wrong :( I have attached my 26 product import, the 29 product import and the import logs.

Any ideas what I am doing wrong?

Thanks,
Aaron

Support

Hello Aaron,
I was able to reproduce the ordering issue with your files and with Delete custom fields relation option set to Yes. Please load the attached patch file with the fix for the issue. Run the import and let me know on how it goes with the patch file.

Kind regards,

Tharuna

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory

Author

Even though we are 30 minutes past beer o'clock here, I couldn't wait to test it. I have a copy of the clean install that I have restored so many times, I could do it in my sleep, so what is the worst that can happen....
And guess what, it worked!:D :D :D :D :D

I was able to use those 2 import files and the ordering was correct both times. For anyone reading this in future, I was importing a parent product with 26 children (stockable custom fields), and then import a further 3 children into the required custom ordering - so all 29 are in correct order.
I even had another beer, deleted all products and did it again, and it is still working. And to think I nearly gave up drinking because I could not get this working (joking).
The only items not working in my import files are the image title and description. The thumbnail is generated correctly, but the image title and Alt (file_title and file_desc) don't work in my import test files. Do they work in your tests?

I wish I could say that I won't bug you any more, but I have to do some testing with more combinations of the custom fields, but I have a good idea of how everything works. Thanks for persisting and finding fixes.
Enjoy your weekend!

Thanks,
Aaron

  • image-title.png
Support

Hello Aaron,

Even though we are 30 minutes past beer o'clock here, I couldn't wait to test it. I have a copy of the clean install that I have restored so many times, I could do it in my sleep, so what is the worst that can happen....
And guess what, it worked!:D :D :D :D :D

Thank you for confirming that patch is working. This fix will be included in our next RO CSVI release.

The only items not working in my import files are the image title and description. The thumbnail is generated correctly, but the image title and Alt (file_title and file_desc) don't work in my import test files. Do they work in your tests?

I know why it is not working for you. In your import template on image tab set Fill media fields to No(See attached screenshot), save the template and run the import. That should solve the problem with file_title and file_desc.

I wish I could say that I won't bug you any more, but I have to do some testing with more combinations of the custom fields, but I have a good idea of how everything works. Thanks for persisting and finding fixes.
Enjoy your weekend!

We are glad that you are helping us in finding these hidden bugs :) Happy weekend to you too!

Please leave us a review on Joomla Extension Directory.

Kind regards,

Tharuna

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory

Author

Hi Tharuna,

Setting the Fill media fields to NO works, sorry i had misinterpreted that it should be set to Yes. Now that image file_title and meta fields work too. Thanks!

I'm trying to set my export template to be able to export just a single parent product with it's child products. I have looked through the Rules plugins, though I don't think they suit this need.

I can export the entire category (within the export template options), and this does export the child products (even though they aren't assigned to a category). So I had an idea to make a dummy unpublished product category called "Export Products" and assign any products I want to export to this category. Does this sound like the easiest solution to being able to export a single product with children?

Thanks,
Aaron

p.s. added a review :)

Support

Hello Aaron,

Thank you for the review, we appreciate it.

As for your export, you can also specify the product SKUs on the Options tab. This way you can export the products you want. Is that not an option for you?

Kind regards,

RolandD

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory

Author

Hi Tharuna,

The export products via SKU filter works, but is not the easiest or quickest way to export a single parent product with lots of children (each with unique SKU's).
If we want to update a parent product with lots of children and add some more custom fields, we would export the parent product with children, and copy/paste the custom_title's and other fields to save time, and then update the custom_ordering as required. And this has been working in our tests. Maybe I am doing something wrong, but if I export using SKU 101 for my example, it only exports the parent product itself and none of it's child products (they are not sku 101). I tried the Use Parent Values, but from reading the 7.19.0 changelog, this is only for exporting empty values with the parent values, and not exporting children.
If I put YES for child products only, it doesn't export anything - but this is expected as none are SKU 101.

I wish there was an option for "Export Child Products with Parent YES/NO", and I would only need to add the single parent SKU, and not all the child products sku's as well - but I might be the only one wanting that option, so I am not requesting or considering it essential or even needed, as I have thought of an easy work-around.
I thought that temporarily adding the parent (and any other export products needed) to the dummy/unpublished EXPORT category would be easiest. When I run the export, I am glad to see that the parent product is exported along with the children - even though the children have no category assigned.

So is there an easier way? And please don't tell me that it is a bug, and child products should not be exported via category filter if they have no category assigned, and you are going to fix it - i like this bug!!

Thanks,
Aaron

Support

Hello Aaron,

If we want to update a parent product with lots of children and add some more custom fields, we would export the parent product with children, and copy/paste the custom_title's and other fields to save time, and then update the custom_ordering as required. And this has been working in our tests. Maybe I am doing something wrong, but if I export using SKU 101 for my example, it only exports the parent product itself and none of it's child products (they are not sku 101). I tried the Use Parent Values, but from reading the 7.19.0 changelog, this is only for exporting empty values with the parent values, and not exporting children.
If I put YES for child products only, it doesn't export anything - but this is expected as none are SKU 101.

With product SKU filter, RO CSVI checks for all products which has SKU as 101 as part of it and not the exact SKU as 101. So if you have any common string with your child products SKU, you can use that in SKU filter. Like if first child product has SKU childsku-1, second child product has SKU as childsku-2 and third child product has SKU as childsku-3 and so on, just using the string childsku in Product SKU filter will get all the child products on export.

I wish there was an option for "Export Child Products with Parent YES/NO", and I would only need to add the single parent SKU, and not all the child products sku's as well - but I might be the only one wanting that option, so I am not requesting or considering it essential or even needed, as I have thought of an easy work-around.
I thought that temporarily adding the parent (and any other export products needed) to the dummy/unpublished EXPORT category would be easiest. When I run the export, I am glad to see that the parent product is exported along with the children - even though the children have no category assigned.

Yes, you are the first user to ask for such a feature. If we get more requests from other users we can consider in developing it. I guess assigning parent to a dummy category and exporting based on that category will be an easy workaround here. I am not seeing any other easy way considering child products SKUs are unique.

So is there an easier way? And please don't tell me that it is a bug, and child products should not be exported via category filter if they have no category assigned, and you are going to fix it - i like this bug!!

That is not a bug. That is how VirtueMart works. If a child product does not have a category or price or image assigned it uses the details of parent product. With RO CSVI VirtueMart Product export template there is an option to set if you would like to use parent values for child products on export. See attached screenshot.

  • Screenshot 2021-01-19 at 11.27.47 AM.png

Kind regards,

Tharuna

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory

Author

Hi Tharuna,

So far, so good - I have taken a clone copy of our live site, installed the CVSI and plugins and templates, and have only found issues so far exporting products that already have corrupt custom fields. These corrupt custom fields occurs when we edit parent product with too many children and it does not save the edits correctly, so the irregular exports are be expected. We can also use the export to find those errors and hopefully re-import them correctly.

The problem with my idea assigning a product to a category to export that category sounds good, BUT then I have to edit the parent product. I did not think of this, and the whole point of importing changes is to avoid editing the parent product....and as soon as I went to assign a parent product with lots of child products and could not change categories, I realised the problem with my category export idea.

Unfortunately there is no common SKU for these parent products with lots of children, so i will have to work out a way of exporting differently.
I can assign parent products with less than 100 children to a export category and it works perfectly. But i cannot edit the products with 100s of children this way.

Any other idea apart from SKU or Category filters? The skip rule would be good if it contained a DO NOT SKIP option :) for example, do not skip product sku 101 (or it's children) but skip the rest. If I better understood the rules plugins I would try and make one for this purpose.

I can always export an existing category containing the current parent product and even exclude some other sku's I don't need (unless there are lots of products in that category), so this won't be a deal breaker, but I was interested if you thought of another way?

I will be further testing tomorrow but I am hoping not to bother you too much anymore,

Thanks,
Aaron

Support

Hello,

So far, so good - I have taken a clone copy of our live site, installed the CVSI and plugins and templates, and have only found issues so far exporting products that already have corrupt custom fields. These corrupt custom fields occurs when we edit parent product with too many children and it does not save the edits correctly, so the irregular exports are be expected. We can also use the export to find those errors and hopefully re-import them correctly.

Reimporting them should correct those custom fields.

The problem with my idea assigning a product to a category to export that category sounds good, BUT then I have to edit the parent product. I did not think of this, and the whole point of importing changes is to avoid editing the parent product....and as soon as I went to assign a parent product with lots of child products and could not change categories, I realised the problem with my category export idea.

Unless the parent product is assigned to the category you cannot export it based on the category in export. The category has to be assigned to parent product and not for child products. May i know why that would be a problem assigning a category to a parent product which has lots of child products?

Any other idea apart from SKU or Category filters? The skip rule would be good if it contained a DO NOT SKIP option :) for example, do not skip product sku 101 (or it's children) but skip the rest. If I better understood the rules plugins I would try and make one for this purpose.
I can always export an existing category containing the current parent product and even exclude some other sku's I don't need (unless there are lots of products in that category), so this won't be a deal breaker, but I was interested if you thought of another way?

You can still achieve do not skip with RO CSVI Skip rule plugin using regular expressions but the problem i see here is that skip rule will only include the parent product as that has SKU 101 and not the child products as they have unique SKUs.

You can still make a rule to your purpose, take a look at Writing a rule plugin document :D

Kind regards,

Tharuna

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory

Author

Hi Tharuna

May i know why that would be a problem assigning a category to a parent product which has lots of child products?

We have found that anything over 200 children will cause the parent product page to load incorrectly when trying to edit it. We've upped our hosting but the same problems occur as per posts on the VM forums when users have a lot of custom fields assigned to the one product. As we have a generic product that has many options available for the one XYZ Brand T-Shirt as an example. We have stockable custom fields like colours, sizes, and material combinations.

Some parent products will need up to 500 custom fields...so we cannot edit those parent products after adding the first 200 or so manually. Plus importing them would be much easier - as pointed out on the VM forums, wheer a user said they used your product to setup products with a large number of custom fields, as they were also unable to edit parent products with large number of custom fields.

So at the moment, exporting an existing category it probably the best option for us :)

I looked at the rule writing before, and will see if we need to do this. I'll also look into using similar SKU's for parent and child products so this can be used in future too - this is probably the best way to go as most of our SKU's are personal use only and could be updated.

Thanks so much for your help,
Aaron

Support

Hello Aaron,

We have found that anything over 200 children will cause the parent product page to load incorrectly when trying to edit it. We've upped our hosting but the same problems occur as per posts on the VM forums when users have a lot of custom fields assigned to the one product. As we have a generic product that has many options available for the one XYZ Brand T-Shirt as an example. We have stockable custom fields like colours, sizes, and material combinations.

Some parent products will need up to 500 custom fields...so we cannot edit those parent products after adding the first 200 or so manually. Plus importing them would be much easier - as pointed out on the VM forums, wheer a user said they used your product to setup products with a large number of custom fields, as they were also unable to edit parent products with large number of custom fields.

Thank you for sharing this information. We are glad to hear that our product is of help to users in such situations :)

I looked at the rule writing before, and will see if we need to do this. I'll also look into using similar SKU's for parent and child products so this can be used in future too - this is probably the best way to go as most of our SKU's are personal use only and could be updated.

Having similar SKUs for parent and child is a good option. You can update the SKUs for existing products using RO CSVI by using virtuemart_product_id in import file.

Kind regards,

Tharuna

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory

This topic is locked. New replies are not possible.

Log in to reply to this topic.