If this is your first visit, check our documentation. To post, register or login.
Forums / Setting Up Your Zen Cart Products / Setting Up Categories, Products, Attributes / Implications of Master Category ID Reset on Linked Products

Implications of Master Category ID Reset on Linked Products

Started by mexico on 28 May 2015, 9:03 PM · Views: 2,190

Results 1 to 10 of 10
28 May 2015, 9:03 PM
#1
mexico avatar

mexico

New Zenner

Join Date:
Apr 2015
Location:
Lincoln, NE, USA
Posts:
3
Plugin Contributions:
0

Post #1 by mexico

I have a client who is using linked products, and they would like to use Easy Populate to do some bulk changes. Understanding that by doing so, the master category of linked products may change, what are the implications of a product ending up with a different master category other than SaleMaker (since the product's master category may be different now)?

I don't think my client will have the need to use SaleMaker, so I want to make sure nothing else gets negatively affected by potentially changing the master category of several linked products after using Easy Populate (and possibly "Reset ALL Products Master Categories ID").

Thank you in advance for your help.

Manuel

28 May 2015, 9:31 PM
#2
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Post #2 by ajeh

The table:
products

does need to know the valid categories_id for the:
master_categories_id

As to Linked Product, the table:
products_to_categories

does need to know all:
products_id and categories_id

to maintain the Linked Products ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

28 May 2015, 9:41 PM
#3
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Post #3 by mc12345678

What condition would result in the master category changing using what version of Easy Populate?

Would seem would want to not have that possibility.

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

28 May 2015, 11:26 PM
#4
mexico avatar

mexico

New Zenner

Join Date:
Apr 2015
Location:
Lincoln, NE, USA
Posts:
3
Plugin Contributions:
0

Post #4 by mexico

Ajeh:

The table:
products

does need to know the valid categories_id for the:
master_categories_id

As to Linked Product, the table:
products_to_categories

does need to know all:
products_id and categories_id

to maintain the Linked Products ...

Thank you for your reply. I probably wasn't clear enough in my concern, and also in explaining how we would use Easy Populate.

In my short experience with Easy Populate, when we download a CSV file for editing, such file will include several entries for a product with linked references (i.e., product has a master category ID, and several linked category IDs). If the CSV file that we upload includes only one of those entries, and such entry happens not to be the original master category ID, then Zen Cart will assign the uploaded category as the master category ID. It is my understanding that all related database tables respond to this change, and there are no inconsistencies. IF there were inconsistencies, then using the "Reset ALL Products Master Categories ID" would solve this issue, but this would potentially (and very probably) change the master category ID of many products with linked references to the first category ID in the list. The only consequence of this that I am aware of is that, since the Master Category ID as changed, if I were to use SaleMaker, then the sale price would not be applied to a product since its Master Category ID changed. I think we are OK with this consequence because we will not use the SaleMaker feature.

The big question is, are there other consequences to the Master Category ID being changed after the use of Easy Populate and possibly "Reset ALL Products Master Categories ID" that I am not aware of?

28 May 2015, 11:36 PM
#5
mexico avatar

mexico

New Zenner

Join Date:
Apr 2015
Location:
Lincoln, NE, USA
Posts:
3
Plugin Contributions:
0

Post #5 by mexico

mc12345678:

What condition would result in the master category changing using what version of Easy Populate?

Would seem would want to not have that possibility.

I'm pretty sure all versions of Easy Populate do this if you do the following:

  1. Download a CSV file with a product that has linked references, resulting in multiple entries for the same product model.
  2. Keep only one of the entries for modification purposes, but not knowing if such entry is the one that contains the Master Category ID (it is difficult to keep track of this when you are handling thousands of products).
  3. Upload the modified CSV file. The entry included in this CSV file will then become the new Master Category ID.

I tested this a couple of times with Zen Cart 1.5.1 and Easy Populate v1.2.5.7c.

29 May 2015, 3:08 AM
#6
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Post #6 by mc12345678

mexico:

I'm pretty sure all versions of Easy Populate do this if you do the following:

  1. Download a CSV file with a product that has linked references, resulting in multiple entries for the same product model.
  2. Keep only one of the entries for modification purposes, but not knowing if such entry is the one that contains the Master Category ID (it is difficult to keep track of this when you are handling thousands of products).
  3. Upload the modified CSV file. The entry included in this CSV file will then become the new Master Category ID.

I tested this a couple of times with Zen Cart 1.5.1 and Easy Populate v1.2.5.7c.

Not the case with EasyPopulate v4 (https://www.zen-cart.com/showthread.php?190417-EasyPopulate-4-0-Support-Thread), unless the Master_category_ID is downloaded then changed from the original and again uploaded with the modified master_category_id. Otherwise it leaves the master_category_id alone, but may cause additional linked product if the category information is changed.

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

7 May 2016, 4:25 PM
#7
vickilapp avatar

vickilapp

New Zenner

Join Date:
Nov 2007
Location:
Alameda, CA
Posts:
38
Plugin Contributions:
0

Post #7 by vickilapp

mc12345678:

Not the case with EasyPopulate v4 (https://www.zen-cart.com/showthread.php?190417-EasyPopulate-4-0-Support-Thread), unless the Master_category_ID is downloaded then changed from the original and again uploaded with the modified master_category_id. Otherwise it leaves the master_category_id alone, but may cause additional linked product if the category information is changed.

Does anyone know how to do a mass change of master category? We've created a new category called "Purple Rain", where we've linked all of our purple beads. I want to do a sale on purple beads, but it doesn't work to use sale maker on the purple rain category, because most of the beads have a different master category. I've got v154 and EasyPopulate v4. Don't want to do it one by one. Thanks in advance!

http://www.beadinspirations.com/purple-rain-c-1029.html

7 May 2016, 10:20 PM
#8
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Post #8 by mc12345678

vickilapp:

Does anyone know how to do a mass change of master category? We've created a new category called "Purple Rain", where we've linked all of our purple beads. I want to do a sale on purple beads, but it doesn't work to use sale maker on the purple rain category, because most of the beads have a different master category. I've got v154 and EasyPopulate v4. Don't want to do it one by one. Thanks in advance!

http://www.beadinspirations.com/purple-rain-c-1029.html

I've been trying to carefully review the notes I've made about working with master categories and a feature that was added to EP4. The v_status field can be used to accomplish a couple of things, one of which is to move a product from one master category to another. The thing is, it sounds like you want to keep all your existing linked product, but just want the master category to fall under a single category in order to place all such items on sale.

So a v_status of 7 will move a product from whatever category it is in and make it's master category the category that is indicated by the categories_name_X text. It will then as applicable and remove the product from its previous category. To keep the product in its previous category(ies) (linked) basically the entry for the product to indicate the master category should be before other entries of the same product.

If you don't have unique model #s for all of your product, you can add products_id to the user defined field(s) in the configuration and then change to using products_id or blank_new, export your existing data, sort the data on your primary key, find the product that you want to "centralize", for the first instance of each product add a row of data with the category(ies) identified to this new master category, and change the v_status field for that row only to 7.
Backup database.
Upload,
Import
Verify information,
Backup again for "safety".

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

12 May 2016, 6:03 PM
#9
vickilapp avatar

vickilapp

New Zenner

Join Date:
Nov 2007
Location:
Alameda, CA
Posts:
38
Plugin Contributions:
0

Post #9 by vickilapp

Thanks for the info. I tried what I understood your suggestion to be.

I set up the easy populate v_status column to be 7, and uploaded and imported, but it did not change the master category. Each item does have a unique model number, and it is listed in more than one category. Ultimately I changed each item's master category one by one, which takes too long. In the future, is there a way to use Easy Populate to do this? Maybe I'm doing it wrong? It would be helpful to have a step-by-step instruction, if this is possible. Thanks so much for your help with this.!

Vicki

12 May 2016, 9:16 PM
#10
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Post #10 by mc12345678

On the row where the status was set to 7, was the v_categories_name_X field populated to be the desired master category?

The row(s) that follow with status of 0 or 1 for that product would then be linked to the first.

As to offering instruction, I'm pretty sure that even if I provided a step-by-step, which I'll try to incorporate into the next Rev for various operations, there will be one or more usages that I'll miss. I admit that the guidance appears to be hidden in the revision notes, the original intention was to offer a way to remove linked product, but knowing that the master category was the object of revision it also serves the purpose requested and doesn't drop the necessary relationships in the database.

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...