Jump to content

Can a custom group be added to all categories/products automatically?


Recommended Posts

I have created a custom group (for pricing purposes). I have thousands or products and hundreds of categories. Is there a fast way to set this group access on every product and every category without having to click the check box on each item?

post-867501-0-69939300-1437691766_thumb.gif

The image shows the painful way of clicking a check box in every category and product. I hope to avoid the manual click on all these items. Any ideas?

Link to comment
Share on other sites

 

A SQL query like this should do the work:

INSERT IGNORE INTO ps_category_group (id_category, id_group) 
SELECT id_category, 6 FROM ps_category;

6 is the id of your custom group.

 

Awesome gabdara! Thank you for the reply. That appears it will do what I need - Add the custom "Members" group to the groups on each category that currently exists. 

 

However, I was hoping there was a way to add a new custom group to the default groups so that I do not have to keep checking the check box for every entry added to the shopping cart. The query would work, but I still have many categories to add and then hundreds of products. Clicking a check box on each item is kind of silly. I wish I knew how the default groups were set so that I could just add the new group to the defaults. I believe that solution would automatically check the box and all categories and products would be available to the new group. At least that is what I would expect to happen if I could add it to the default groups.

 

Otherwise, I will have to do a SQL insert every time I add products and/or categories. By the way, I am not knocking your solution at all and I greatly appreciate your help.

 

I import CSV files (products and categories) and I don't see a column for groups. Any other ideas?

Link to comment
Share on other sites

×
×
  • Create New...