Re: EasyPopulate 4.0 Support Thread
Quote:
Originally Posted by
adb34
OK silly question time:
I want to change the category that a lot of my products are in, so, if I use this plugin to download all my products, change the category of the products then upload. The question is will I duplicate the products in the different categories or will the category be over written by the new category?
Told you it is a silly question! :blush:
Actually, not as silly as you may think. Normally this will create a linked product (duplicate but not so much a duplicate as it maintains the same products_id).
There currently is no "remove a product from a category" type feature... If a product being processed on import is in the category "assigned", then nothing is done, if it is not in the category that is assigned/determined in the process, then the product is added to the category (if the category didn't exist before, then it is created before this addition).
Removal from a category is somewhat of a two step process. The product's master_categories_id in the products table needs to reflect an existing category and the table products_to_categories needs to have the entry for the products_id removed for the category from which it is leaving and if not already associated with the new category an entry made... I did not find any code that did a delete on the products_to_categories table on import and there is nothing that specifically modifies an existing master_categories_id entry other than a product update with master_categories_id as a user defined field. The only other instance of affecting the master_categories_id is upon initial insert of a product as it must have/maintain a master_categories_id assigned.
So, removal of a product from one category (ie part of a process to move a product from one category to another) is not yet in the code... Perhaps can come up with something like another status switch that would "reassign" the master_categories_id to the chosen category and remove the linked product from the products_to_categories table in relation to the previous master category (status of 9 deletes a product, perhaps a different number could be used to do a move). It would not *directly* resolve issues associated with other linked product, but it would support a move action... Technically if the product were moved through each respective linked category, then there would remain but one category associated with the product (this could be accomplished in a single file upload where each line of the file had the product moved to each linked category and then a final move to the desired end category...)
Perhaps if considered further necessary (large issue with linked product) an additional option (dropdown, link, whatever) to address just bulk linked product changes would help...
I would suggest though in the interim not counting on the above to happen/be implemented quickly... Work on this is generally a free time dependent project, though now that a path is seen, it may not be as long as originally anticipated and there are other factors that could make it go faster. :)
Re: EasyPopulate 4.0 Support Thread
[QUOTE=mc12345678;1290615]Actually, not as silly as you may think...... (abbreviated) QUOTE]
I do understand this is a work in progress and some options are not available.
I have had a thought on this;
What is your [key]_id? If you identify one then set up the upload so that it over writes the that [key]_id and if not there then add. I know this does not over come the duplicated product?
I do not know what it is called, but, when you look at a downloaded file there is a number in the very first column just labelled 'id' could you tie everything to that?
andy
Re: EasyPopulate 4.0 Support Thread
When you want to MOVE ALL products to a new category - this is what works for me.
I would try it with a category that has very few products (and even do as practice
because there is nothing more tedious that removing items ONE by @#$@%# One
and besides, what does a former blonde know "for sure"
Use EZPop to download the category you are "closing out"
I like to save it to the desktop with a name that will remind what it is "just in case" you need to put stuff back
much less taxing than a full back up
after that, you are using other functions of Zen
Make a note of the old category NUMBER - this will correspond to the number 8 in the explanation
Create new Category & note that number as well - this will correspond to the 22 in the explanation
select any product that you want in the new category
Click on the C for copy
from the copy menu on your right
scroll down and select
Multiple Categories Link Manager
Scroll donw to
Global Category Link Changes and Master Category ID Reset
Using the first function: Copy ALL Products in a category as linked...
Enter Old Category Number (and I really wish that word was there )
In the box next to "Select All Products in Category"
Enter NEW Category Number in the "Link to Category"
Click" copy products as Linked
(note it would be REALLY Nice to be able to Copy products as Duplicates
Next, (third function down) Enter the NEW category number
in the box:
Reset the Master Categories ID for All Products in Category:
Click: Reset Master...
Finally ( and this is where I usually manage to screw up)
Middle function:
Remove ALL Products in a Category that are LINKED....
Enter OLD number in Select All Products in Categoy
enter NEW number in Remove from being linked
Now check your work in case I (as I often might) have the placement of old and new confused.
Re: EasyPopulate 4.0 Support Thread
If I want to adjust a column in the data base which is not exported by default (for example the column STOCK_LIMITED) can I include a header for it in the CSV file and import or do I need to add that somewhere in the code?
Re: EasyPopulate 4.0 Support Thread
Quote:
Originally Posted by
Blenderite
If I want to adjust a column in the data base which is not exported by default (for example the column STOCK_LIMITED) can I include a header for it in the CSV file and import or do I need to add that somewhere in the code?
If the field (column) STOCK_LIMITED is in the products table, then it is easily included by entering the field in the custom_fields option under configuration->Easy Populate 4 and it will be included in applicable exports and imports.
Re: EasyPopulate 4.0 Support Thread
Quote:
Originally Posted by
Blenderite
If I want to adjust a column in the data base which is not exported by default (for example the column STOCK_LIMITED) can I include a header for it in the CSV file and import or do I need to add that somewhere in the code?
You also need to enter it in the admin under configuration->ep4
Enter any extra fields as user defined.
Re: EasyPopulate 4.0 Support Thread
Further, if don't know the location of the field in the database, there is no harm in adding the field in the user defined option and then exporting the full products option. If the field appears, then it is in the products table, if not then more "investigation" is necessary. When entering the field name, enter it as it appears in the database table (typically without v_)
Re: EasyPopulate 4.0 Support Thread
Quote:
One of those things that not everyone uses, so it seems that it was left off as a default like option, but is something still possible.
I've always written my import routines to show all fields and let the user determine which field they don't want to import. Most users who use import tools like this are your more advanced users who have an understanding of what fields are and how to remove them off the CSV file if not needed.
Therefore I'd rather see ALL fields in the CSV file than MOST USED fields.
Re: EasyPopulate 4.0 Support Thread
Quote:
Originally Posted by
citapinc
I've always written my import routines to show all fields and let the user determine which field they don't want to import. Most users who use import tools like this are your more advanced users who have an understanding of what fields are and how to remove them off the CSV file if not needed.
Therefore I'd rather see ALL fields in the CSV file than MOST USED fields.
So I believe that it was this aspect that was considered by the original author/rewriter (chadder) in that the option to add fields was made available through the configuration menu... It has also been identified by some that export (well seems to have been more of an import issue) of all fields regardless of "desire" takes additional time, space, and effort to remove the undesired option(s)...
There is also the level of support aspect to be provided when/if all fields are exported and the issues involved with making changes and then importing them again... For example, while I'm about to release a version that will work off of products_id, there is little that can be offered as error buffers to prevent someone from mangling their database... Backup before uploading... That's about the most that can be offered... Or at least at the moment the most that I can offer on a volunteer basis...
Yes, up front the products table could be evaluated on each export and all fields added to the export file... The entire database could be so processed, but is that what is needed? Or are things like that needed by the few that either can modify the code to accomplish the desired task or seek assistance to make it happen? As I said more than 2 years ago, EP4 is so adaptable and compartmentalized enough that either one compartment can be modified to obtain the desired results or duplicated to provide the modified results... There are still a few minor things to work out, but it is quite a power house... I've also been thinking about how chadder and I can work the instructions a little more in favor of a "I want to do this" type style rather than a this is how this feature works style... Reason? Well look at the number of times that the filename has been an issue in the last several pages... It's in the instructions (limited that they are), but I have refrained from going that short of a response...
Afterall, someone identified that there was an issue with specials when this code was run on PHP 5.6 I think it was because of the way dates were handled on import... That was good feedback and would like to see issues like that identified more publicly as I had to dig to find that someone had identified that problem... There have been things added based on others needs and inquiries, but I do have a concern of adding too many/too many more switches to support "branches"... I'm beginning to consider adding notifiers and observers so that various "features" can be added through file uploads instead... More to contemplate on that one though..
Re: EasyPopulate 4.0 Support Thread
Is there a sample file floating around that I could use to start putting together my products list?