Re: EasyPopulate 4.0 Support Thread
Quote:
Originally Posted by
mc12345678
Perhaps Chadster can help with the "format" or setup needed within the program, but looking at the Stock by Attributes table in my database (Table Prefix)products_with_attributes_stock, I have 5 columns:
Stock_id (This is used specifically to identify a unique item's stock),
products_id (Which ties back to the (Table Prefix)products table),
stock_attributes (Which identifies which one or more attributes are associated with the stock_id),
quantity (The total number of items that match the stock_attributes for this product_id and stock_id), and
sort (supposedly to be used to sort the particular stock_id when viewing the products_id, though I don't know if or when that is enforced).
So, perhaps the easiest way to implement this is to only be able to deal with existing items that have a stock_id and not to have to add a new one attribute to an item.
In my list, I have a number for a products_id, and one or more numbers in the stock_attributes, these numbers correspond back to the product itself (which to use this mod requires a model number) and a designated attribute (red, black, whatever you have chosen) that is listed in the (Table Prefix)products_attributes table. So, there are ties back to each of those attributes. By exporting the (table prefix)products_with_attributes_stock table substituting the applicable product name (or model number as desired/needed) and the applicable attribute, the user (you) can intelligently understand what product is being referenced. Include in that output the stock_id and the quantity as a minimum, then when importing the data, (going back to probably using the model number) with the stock_id in the downloaded data, the upload is quite easy because there is only one item in the table that has that stock_id; however, it may also be possible (less likely for a user to make an error) to use the model number and the associated attributes to find in the table the one row that has that product_id and only that one attribute combination (it is possible though not desired to have a product_id that has less attributes identified than those that would be sold, but I think that comes through attempting to incorrectly modify the number of attributes while adjusting quantities at the same time, ie. user error. :) )
That's the basic flow/thought process that I see, and although I have just yesterday tried to update a single item using the Full-EP file format, I did look through a bit of the main controller for EP 4 to see what I might need to do to ensure it worked. I would think that Chadster could identify the areas that would need to be worked in to add the above functionality.
Also take a look at a post I put up earlier on a different thread. It takes you to one of the other threads about one/two versions of SBA that are recognized out there. http://www.zen-cart.com/showthread.p...46#post1208146
I implemented the method I described and was able to create SQL that I could use/copy into the admin panel and update the table(s) with the desired information. It is dirty sort of like what you were referring to (using a reference table or something) and is somewhat the foundation to EP, but it also does not afford any type of real checks so would want to implement cautiously. (That means BACKUP, BACKUP, BACKUP and test/check after taking action.)
Re: EasyPopulate 4.0 Support Thread
Hey guys,
There MAY be some small hope to do this. But, believe me, the attribute importing code is quite complex.
But, look at the DETAILED attribute export. This is a "special" file as it is one-to-one. When you export this file and look at the first columns, and examine the import code, you see that this is a very basic key lookup and replace loop.
That is why I made the creation of the values different than the updating.
I would be possible to modify the DETAILED attribute export code to also incorporate the SBA tables in a similar manner, and then do the same for the Import code.
Unfortunately, I don't have time right now. Day job + 3 demanding clients and their projects have me inundated.... and I'm trying to get EP4's update to github and the zencart team.
-chadd
Re: EasyPopulate 4.0 Support Thread
Quote:
Originally Posted by
chadderuski
Hey guys,
There MAY be some small hope to do this. But, believe me, the attribute importing code is quite complex.
But, look at the DETAILED attribute export. This is a "special" file as it is one-to-one. When you export this file and look at the first columns, and examine the import code, you see that this is a very basic key lookup and replace loop.
That is why I made the creation of the values different than the updating.
I would be possible to modify the DETAILED attribute export code to also incorporate the SBA tables in a similar manner, and then do the same for the Import code.
Unfortunately, I don't have time right now. Day job + 3 demanding clients and their projects have me inundated.... and I'm trying to get EP4's update to github and the zencart team.
-chadd
Fully understood about having (or not having) the time. Part of the reason to try to document the process that might be needed and talk about what we have to work with. For me, the above direction may be enough to develop the code (same here time permitting), but just because I get my version to work doesn't mean that it would work for other versions of SBA, which to be honest I'm not 100% sure which version I installed. (2 years ago and I didn't take good notes like I should have about what specifically I installed and did to make it work, but it does or I have to make some manual tweaks once in a while.)
That said, thanks for the insight into where to look "next". Probably may end up as a mix of a couple of the routines, but would seem that in general a one-to-one would at least get the specific table updated. Would still need to pull from other tables to provide user friendly info, but seems even each of those is a one-to-one relationship.
Re: EasyPopulate 4.0 Support Thread
Huh, actually, just took a look at the detailed attribute export file and for products that only have one attribute, this would be the way to go, would just have to add in the SQL to also capture the info in the SBA table so that it could be fed back. For mutliple attributes, though would have to probably build to the point of an SBA input just like when using the mod, ie, enter product, enter attributes that don't exist, assign attribute(s) to product, then populate the quantities of the product(s) that have the attribute(s). The only potential problem I see, is that the total quantity of an item would not be updated/synchronized by this process if the associated code isn't brought in/activated to perform a synchronization after import. In the interim though, I think that after population, the user could go into the admin panel and activate that operation.
Re: EasyPopulate & Maximum Product ID
Prior to this version of ZenCart, I used the "paid" version of Easy Pop which allowed assign the Product ID
Why no longer matters as I am accepting this is not posible in EP 4.
However, my Zen Cart currnently thinks I have the maximum number of product ID (214........)
I know this number cannot be changed.
And I have found that because of this, using the current Zen Cart and Easy Pop 4, I cannot add new product, etiher via EP4 or "manually"
I am concernter that if I just go into the SQL DB and reset the number, it will start using numbers already assigned to existing products and it will be an even bigger mess (if that is possible)
We do have other add on in use, but I know from past experience (and the error log) that they are not the problem.
Any suggestions.
Thank you for your consideration
Wheat
Re: EasyPopulate 4.0 Support Thread
Quote:
Originally Posted by
wheat
Prior to this version of ZenCart, I used the "paid" version of Easy Pop which allowed assign the Product ID
Why no longer matters as I am accepting this is not posible in EP 4.
However, my Zen Cart currnently thinks I have the maximum number of product ID (214........)
I know this number cannot be changed.
And I have found that because of this, using the current Zen Cart and Easy Pop 4, I cannot add new product, etiher via EP4 or "manually"
I am concernter that if I just go into the SQL DB and reset the number, it will start using numbers already assigned to existing products and it will be an even bigger mess (if that is possible)
We do have other add on in use, but I know from past experience (and the error log) that they are not the problem.
Any suggestions.
Thank you for your consideration
Wheat
Essentially it sounds like you need to "clean" your database, which is a function available under the tools->Store Manager section of the admin panel.
Yes, your concern is valid about randomly assigning the product Id. As for using EP to assign the product_id, it is possible, but which is easier to "remember" when working on the data, item #2 or RosyRedFlowers? Also, as a programmer, basically by forcing the data table to accept this new product #52, can cause that table to obtain errors (something like, though not necessarily because of, the problems you are experiencing. ) It does take a little more planning by the store operator to make it work, but the resulting functionality is tremendous. And actually, EP might be able to fix your issue.
If you were to download all of the table data from your store, you could copy your store program code to another location, from there copy the existing database, wipe out the data within the applicable product tables, then upload (through EP) all of the product data again. If all data and associated referenc information is properly reset, the this would resolve your problem also, but seriously, back up back up, BACKUP and a number of other concerns to possibly do things this way. I still think the database compression/cleanup described above would be the best bet, if not at least a great start.
Re: EasyPopulate 4.0 Support Thread
Thank you, I do understand what you are saying. However the issue is that ZenCart has a "hard coded" maximum number. For some reason buried back in about 2008 - my system "thought" it had reached that number.
The first line of the error report mention that number -
Fortunately I had a copy of the "other" EZ Pop and was able to find determine what the highest Prod ID really was. Once I knew that, the DB had to be manually edited (cannot be done thru any of the ZenCart Admin Pages) Equally. Fortunately once I realized what the problem - my other half was able to resolve the issue.
I had to delete one product and then change the product number to be incremented as products are added and it is all good until I do something else terminally stupid on purpose or accidentally.
Meanwhile because I am sometimes more adventurous than I should be, my SO wrote something so that the entire DB is backed up daily, zipped and sent via email so I always have a copy no older than 24 hours available.
Thank you for your thoughts, they make help with some other occasional issues.
Enjoy The Making
Wheat
Re: EasyPopulate 4.0 Support Thread
Quote:
Originally Posted by
wheat
Thank you, I do understand what you are saying. However the issue is that ZenCart has a "hard coded" maximum number. For some reason buried back in about 2008 - my system "thought" it had reached that number.
The first line of the error report mention that number -
Fortunately I had a copy of the "other" EZ Pop and was able to find determine what the highest Prod ID really was. Once I knew that, the DB had to be manually edited (cannot be done thru any of the ZenCart Admin Pages) Equally. Fortunately once I realized what the problem - my other half was able to resolve the issue.
I had to delete one product and then change the product number to be incremented as products are added and it is all good until I do something else terminally stupid on purpose or accidentally.
Meanwhile because I am sometimes more adventurous than I should be, my SO wrote something so that the entire DB is backed up daily, zipped and sent via email so I always have a copy no older than 24 hours available.
Thank you for your thoughts, they make help with some other occasional issues.
Enjoy The Making
Wheat
Okay, a couple of things, I can't imagine that the maximum number of products in your store can be 218 or whatever low number showed in this thread. After that, I find it difficult to have perhaps millions of products that are active in a single store.
As for the auto_number. As you said if you are able to find the "actual" next number, then you should go into your mySQLadmin panel and reset the auto_number to "that" number. Thing is, if not mistaken, the total number of items is limited by the server not so much Zen-Cart. If you are unable to use the standard Zen-Cart add product functionality, then this version of EP is most likely also not going to work.
Re: EasyPopulate 4.0 Support Thread
Quote:
Originally Posted by
wheat
Previous to EP4, I used the paid version. So sorry for all the "born a blonde, but white haired now" questions.
Is there something I can do to have the report include the master category number
Thank you for your time
Wheat
Not sure what you mean by the master category number. You can export just about anything you want from the database. If I'm not mistaken though I thought the master category was named something else and included in the detailed download of the products. Once you have downloaded Chaddruski's version of EP, you could do whatever you want with it to export additional data if so desired, but at ones own risk.