News:

Support the VirtueMart project and become a member

Main Menu

Maxumum Number of Children for 1 product

Started by T.A. Garrison, LLC, April 14, 2023, 01:29:07 AM

Previous topic - Next topic

T.A. Garrison, LLC

I've found a problem with VM, but it's understandable for what I'm attempting.

I created 4 ramifications for 1 Parent. All is well.
I created 178 rows in the first ramification.
I created 207 rows in the second ramification.
I created 19 rows in the third ramification.
And finally, 68 rows in the fourth ramification.
Creating all of those "without" any children being created went perfectly.

Each row has specific options, so each selection displays those options on the front end.
3 of the ramifications are what the user needs to select.
The fourth ramification is simply what the user will "see" as their final product.

This is a key blank site. So users are trying to find the correct key blank they need.
Instead of going through the hassle of making the user select the year, make, model and then have a huge selection of keys from which to choose, we want the user to do a very simple search as I've already created and outlined, so they have 1 key they are told is the "correct" key based upon the selections they made.

When I checked the box to create the children for this 1 parent, I got a HUGE list of errors from the database. I could only read the first few errors, but it was obvious that it was "too many" children for the database. Yet, I know that a database can handle Terabytes of data. That's a lot more than I'll have. It's the limitations of the tables that seems to be causing the problem.
I'm sure there are limits to the size of tables, but that's where I am now. What are the limits?

I was able to get the system to create 625 children for the 1 parent, but that's where it stopped, and that also stops the administration from functioning because VM is unable to load all of that information.
Each time I tried to simply review the parent custom fields, the page would stop loading and my browser would say the page is too slow and I had the option to "Stop" the page from continuing to load.

I'm going to the database itself to study the size limits, but I know that MySQL MyISAM can handle a lot more than I'm trying to create.
This process is going to have "hundreds" of Parents, which means millions of Children.

I'm hoping there is someone who finds this and can recommend a good solution.

One option, without digging into the database, would be to have multiple Parents for 1 manufacturer which would completely erase everything I've tried to do by making the front end very simple. So I don't really consider that an option.

Here's the scenario.
Approximately 800 manufacturers.
Each manufacturer is 1 Parent.
Each parent has:
models
years of production
options for the various years
the "key" that fits the combination of selections from above.

I'm using Multi Variant to create all the variations so that just 4 "Select" fields appear on the front end for 1 Parent.

Is there another method that would allow something very similar, but be able to create the necessary table sizes?
Or, is there a different method of creating the children, since the database is more than capable of handling the number of children.

Even the size of the database would not be an issue once everything is entered.
Is it just that VM cannot enter that many fields automatically?

After a review of the database, MySQL documentation and considering alternatives, it would seem to me, and I hope VM developers will either confirm or deny, it's "not" the database that's being restricted for the amount of data. It's the process of VM creating the data automatically.
By that I mean, if I remove some of what's causing the errors and loading problems in admin, then I can load the Parent and use VM normally.

I deleted about 400 rows of data in the database within "_virtuemart_products" and everything seems to function well. The Parent loaded all of the (now) 285 Children.
That tells me that if the remaining children required were created "manually", then there would be no problem.

Is there a maximum for VM to edit? A maximum to "display" in the Parent?
VM displays the 285 without any problem. But that's a far cry from what's necessary.
T.A. Garrison, LLC
3150 Orleans St. # 28261
Bellingham, WA 98228

Studio 42

Hi,
The problem is the saved values in the database not the number of children
The ramification is saved in the customfield table and is limited by the field size.
A solution is to use generic child variant for each ramification in the parent
created 4 ramifications in main product
in the childrens created 178 rows in the first ramification.
in the childrens of childrens  created 207 rows in the second ramification.
in the childrens of childrens of childrens created 19 rows in the third ramification.
And finally, in the childrens of childrens of childrens  of childrens 68 rows in the fourth ramification.
Using this logic you are not really limited because the generic child variant save only a simple text

T.A. Garrison, LLC

#2
Hi - I agree with your assessment. So I'll provide a bit more information.

I've found your posts helpful in many places.
So please let me know if you are available for some help.

I've determined that VM has an issue, but I'm unable to actually find the fix. The "cause" is the Child of a Parent when the Child has the Multi Variant.

I had the idea you suggested and have been doing that - Parent > Child > Children
But the Child of the Parent is what's causing the problem. I don't know why, but just having the Multi Variant with Ramifications in that Child causes the database to do this:
min_order_level=""|max_order_level=""|step_order_level=""|shared_stock="0"|product_box=""|

I unpublished and unassigned each of the children of the Child, but that didn't help. The Child continues to enter the above with quotes around 0.
All other products save properly, including the Parent.
Because I have it working in another test site, I'm convinced that there is something I cannot find in VM that's causing the problem. I know it's 1 product, and I know what it adds to the database to throw the errors. But I do not know "why".

Notice the quote around shared_stock="0"
They are not supposed to be there. Let me state that another way. No other products except the children of a child with the Multi Variant has the quotes around the 0.
As a result, if there are children assigned to that Child, and I "Save" the Child, then all the children have the quotes placed around the 0 and all of the children throw errors in admin.
The products still work, but the errors are horrible.

When I get this issue resolved, and I may simply move (again) to a fresh installation and see if that works, but I will need your importing software.
We've spent so much time on this part of the project that I really need to make things go faster. Importing instead of 1-by-1 adding products and children will allow us to do that.

Would you be willing to review and see what you think of this situation I have before I move the site and see if starting over will work? Or, perhaps, you come up with a "fix" so I don't have to move a second time.

T.A. Garrison, LLC
3150 Orleans St. # 28261
Bellingham, WA 98228

Studio 42

Sorry for late answer. I do not have always time to visit the forum.
I have an own solution for multi variant that you can see here https://pro.st42.fr/fr/demo/multi-variants.html
I do not know the exact limit but on save the product ids are only saved for eg. 3546 in the parameters as array
The paramaters can handel 65,535 characters in mysql because it use a TEXT
So i estimate near 10000 the max
If i calculate your needs 178x207x19x68 = 47605032
This is so to say impossible to handel even with my system
So perhaps the solution is to use multiple products ?

You can contact me using private message or here https://shop.st42.fr/en/vendor/joomla-download-shop/contact if you need me to study your case


T.A. Garrison, LLC

Studio 42 - I responded using your Web site.
Thank you.
T.A. Garrison, LLC
3150 Orleans St. # 28261
Bellingham, WA 98228

Studio 42

Hi Thomas
I got some message today in the shop, but not from you ?
Did you used this link https://shop.st42.fr/en/vendor/joomla-download-shop/contact ?

T.A. Garrison, LLC

Hi - Yes. But my E-mail often goes to spam due to my signature. I've got my mail server set up with everything to identify it, but the E-mail continues to go to spam folders.

Check and see if it's there. I have, however, received a message from you to which I replied.
T.A. Garrison, LLC
3150 Orleans St. # 28261
Bellingham, WA 98228