Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Recommended Posts

Posted (edited)

Hi All!

 

I have a question about Hide products from customer groups for SPPC.

My problem is that i have to create a new usergoup for each user. The new user may not see any category. Default setting is: the new group can see all of categories. So i must go to each category and disable visibility for this new group.

 

It is possible to change this setting. I mean that any group have default setting "no visibility on categories" and the visibility must be set from admin for each group. The contribution shall have then the name "Show products to customer groups for SPPC"

 

Thx for help

 

dimmer

Edited by dimmer450
Posted
My problem is that i have to create a new usergoup for each user. The new user may not see any category. Default setting is: the new group can see all of categories. So i must go to each category and disable visibility for this new group.

 

It is possible to change this setting. I mean that any group have default setting "no visibility on categories" and the visibility must be set from admin for each group. The contribution shall have then the name "Show products to customer groups for SPPC"

Have you tried changing the queries with and find_in_set('" . $customer_group_id . "', categories_hide_from_groups) = 0 to and find_in_set('" . $customer_group_id . "', categories_hide_from_groups) > 0. Logic would say they suddenly are only visible to the customer groups that they were once hidden for. Haven't tried it myself though.
Posted

Hi,

 

Thanks for reply,

 

yes a have, but it dont work. Just created group with a new user have access to all categories. May be i have not undestand how it shall work or have explain wrong

 

The problem is that i can hide a category from an existing usergroup, so every new group has automatic access to all categories.

The problem could be solved if any new group would get aktive select box (hide category) by creation in all categories.

 

Or the logic must be changed from hide categories to show categories to group. By this way any category which has no active "hide select box" shall be not visible for any group.

 

May be more information about the logic of contribution will help. It will be great think not only for me.

 

Thanks for help

 

dimmer

Posted (edited)

Hi!

 

The best way is if every new category will be unvisible by all usergroups. The visibility to each group must be set by admin.

It is possible?

 

How can i change it?

 

Thanks

 

dimmer

Edited by dimmer450
Posted
The best way is if every new category will be unvisible by all usergroups. The visibility to each group must be set by admin.

It is possible?

I just told you how to do it. Try what I told you to do in includes/boxes/categories.php. The programming logic is one of the first things that is explained in the install_hide_prods_and_cats_for_cg_sppc.txt.

 

MySQL manual on FIND_IN_SET.

Posted

Thanks for help and your endurance with me! It works. Now is the active select box "hide category" means show the the category.

 

Please undestand i'm not in the know OSC and can't find right places to modifly. May be for this reason are my questions stupid for you. I'm sorry.

There are some logic errors. I have tried that i can but havent get acceptable result in:

 

1. The Category-box show reverse produckt count. It means if normaly 1 product would be visible for all and 3 only for sertain users then it shows after modification reverse count (3 visible and 1 hidden). But the new products frame shows rights products.

 

2. If i traverse the category tree down to products then is the category emty even new products frame shows right products.

 

Which files shall i look?

 

Thanks for reading

 

dimmer

Posted
Please undestand i'm not in the know OSC and can't find right places to modifly.
I would suggest to search the install instructions for the word "find_in_set". Then you have found all the places where to reverse the behaviour from "hide" to "show". A quick count revealed more than 22.
1. The Category-box show reverse produckt count. It means if normaly 1 product would be visible for all and 3 only for sertain users then it shows after modification reverse count (3 visible and 1 hidden).
I assume this is the function tep_count_products_in_category in catalog/includes/functions/general.php where you have to change the "= 0" to "> 0" (around line 418).
2. If i traverse the category tree down to products then is the category emty even new products frame shows right products.
Probably the function tep_get_categories, around line 568 in the same file.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...