Zen Cart Logo
Forums / All Other Contributions/Addons / Twitch Restrict Categories by Customer or Group

Twitch Restrict Categories by Customer or Group

Views: 25,390

Results 21 to 40 of 96
30 Apr 2014, 9:39 PM
#21
jimmyv avatar

jimmyv

Zen Follower

Join Date:
Feb 2008
Location:
Philadelphia
Posts:
292
Plugin Contributions:
2

Twitch Restrict Categories by Customer or Group

I want it to key off of the GROUP_PRICE_PER_ITEM1, etc. not the customers_cat_group. It will allow to retrofit an exist site without managing all the existing clients into a customers_cat_group. I'd just inherit what I already have setup and working.

So really just changing the value to be used to determine restriction parameters. Thanks. I will look at the code I really didn't much beyond knowing that it does what I need using customers_cat_group. I just don't want to deal with fixing up everyones exist account it's too many.

5 May 2014, 1:10 PM
#22
twitchtoo avatar

twitchtoo

Totally Zenned

Join Date:
Apr 2007
Location:
Ontario, Canada
Posts:
1,733
Plugin Contributions:
14

Re: Twitch Restrict Categories by Customer or Group

I would have to look a bit more in depth to see what it would take to merge the two. I'll have time in about a week from now to look into it for you if you'd like.

21 Aug 2014, 6:37 PM
#23
twitchtoo avatar

twitchtoo

Totally Zenned

Join Date:
Apr 2007
Location:
Ontario, Canada
Posts:
1,733
Plugin Contributions:
14

Re: Twitch Restrict Categories by Customer or Group

Twitch Restrict Categories by Customer or Group for Zen Cart 1.53 will be released shortly!!

This package is designed solely to work with 1.53, if you are using 1.51 please use Twitch Restrict 14.c - Feb 14.2014 the last complete and stable version for 1.51.

24 Aug 2014, 7:22 PM
#24
trinity14 avatar

trinity14

Zen Follower

Join Date:
Jan 2014
Location:
Ontario, Canada
Posts:
252
Plugin Contributions:
3

Re: Twitch Restrict Categories by Customer or Group

Before you release the new package for 1.5.3...

Consider making a filter addition for the secondary modules like new products, all products, features and specials.

My past websites weren't using the all products or new products link/sort/filter. Therefore I never needed to apply the restriction filter... until now.

Great module btw, thanks for your efforts! Look for a donation arriving soon ;)

25 Aug 2014, 3:22 PM
#25
twitchtoo avatar

twitchtoo

Totally Zenned

Join Date:
Apr 2007
Location:
Ontario, Canada
Posts:
1,733
Plugin Contributions:
14

Re: Twitch Restrict Categories by Customer or Group

I'll include the filters for the next release. Thanks.

8 Oct 2014, 6:49 PM
#26
imagixx avatar

imagixx

New Zenner

Join Date:
Oct 2014
Location:
Miami
Posts:
7
Plugin Contributions:
0

Re: Twitch Restrict Categories by Customer or Group

Looking for a clean install of Zen 1.5.3 and need a means of restricting categories. I like the flexibility I see here, but noticed that it's been over a month ago that you promised a version for 1.5.3. Any approximate date for a release? Thanx,

8 Oct 2014, 8:25 PM
#27
twitchtoo avatar

twitchtoo

Totally Zenned

Join Date:
Apr 2007
Location:
Ontario, Canada
Posts:
1,733
Plugin Contributions:
14

Re: Twitch Restrict Categories by Customer or Group

imagixx:

Looking for a clean install of Zen 1.5.3 and need a means of restricting categories. I like the flexibility I see here, but noticed that it's been over a month ago that you promised a version for 1.5.3. Any approximate date for a release? Thanx,

The package for 1.53 is ready and passed testing, just need to compile it and publish.

11 Oct 2014, 8:41 PM
#28
jimmyv avatar

jimmyv

Zen Follower

Join Date:
Feb 2008
Location:
Philadelphia
Posts:
292
Plugin Contributions:
2

Re: Twitch Restrict Categories by Customer or Group

I installed this module on a test site finally today.

I can see the category based restrict field and also on the customer file. Setting those is simple.

Can you clarify the following

  1. If I restrict a category it stops showing to those not with access in general and on menus
  2. If I restrict category then those with access should see it (but dont) in their side category menu and in general
  3. If I restrict everything the new and special etc products still show up like normal regardless of access level.

Am I missing something and being totally stupid?

Because... If I restrict everything I still see products in new etc...

If I restrict a category it is not shown in the menu even though client should be able to see it since they are a non-restricted code.

Very confused on why this is not working.

Also the instructions are very very difficult to understand.

I do not understand why sql patches are written in there v being provided as an sql file to install. And I do not understand why dozens of pages of code are in here (I assume to explain what is in your actual files) when they are likely handled by me and others using a winmerge.

And patch c is all written at end v in the files so not sure if that is already in this package or we have to manually do all the changes in area c of instructions.

Sorry concept great but I don't want to learn what you have accomplished here unless I test it and like it.

13 Oct 2014, 2:34 PM
#29
twitchtoo avatar

twitchtoo

Totally Zenned

Join Date:
Apr 2007
Location:
Ontario, Canada
Posts:
1,733
Plugin Contributions:
14

Re: Twitch Restrict Categories by Customer or Group

JimmyV:

Can you clarify the following

  1. If I restrict a category it stops showing to those not with access in general and on menus
    - Correct

  2. If I restrict category then those with access should see it (but dont) in their side category menu and in general
    - Correct only those with access with see it.

  3. If I restrict everything the new and special etc products still show up like normal regardless of access level.
    - The new release for 1.53 will have the patch for this bug

Because... If I restrict everything I still see products in new etc...
- This bug existed because there were no restriction filters in the new and all products code. The original stock Zen Cart had these categories turned off very early in the project.

If I restrict a category it is not shown in the menu even though client should be able to see it since they are a non-restricted code.
- This is where people get confused. You develop the restriction levels. Therefore, if you were to restrict access to one category, then only the customer with the same restriction number will be able to see it. All of the other categories will be available to everyone assuming they have the default restriction code. If you add the same restriction code to two or more customers each of those customers will see it.

Very confused on why this is not working.

Also the instructions are very very difficult to understand.

I do not understand why sql patches are written in there v being provided as an sql file to install. And I do not understand why dozens of pages of code are in here (I assume to explain what is in your actual files) when they are likely handled by me and others using a winmerge.

And patch c is all written at end v in the files so not sure if that is already in this package or we have to manually do all the changes in area c of instructions.

Sorry concept great but I don't want to learn what you have accomplished here unless I test it and like it.
- The code is written in a top-to-bottom install set. The additional patches at the bottom were added to the original text to ensure those with the first release could patch their Zen Cart all the way to the most recent patch - at the bottom of the document.

  • The new release for 1.53 will resolve these issues.
  • Also, adding the fileset is not ideal, as many clients are adding this to existing Zen Carts. Step by step instructions with example code to follow along allows the programmer to install these restrictions within the correct cycle or loop within the code. Failure to include the restrictions in the correct location will result in a security breach of course. And, just imagine trying to uninstall this package if you couldn't reverse the steps one by one... Yes we all make backups, but that doesn't mean they always work ;)

So, yes there is a filter missing in the new products and all products list. This is corrected in the new release for 1.53. I am considering adding the fileset to this package on a clean install of 1.51 and 1.53 with all of the patches installed.

I appreciate your patience with the updates.

24 Oct 2014, 7:52 PM
#30
twitchtoo avatar

twitchtoo

Totally Zenned

Join Date:
Apr 2007
Location:
Ontario, Canada
Posts:
1,733
Plugin Contributions:
14

Re: Twitch Restrict Categories by Customer or Group

It's here... Twitch Restrict now includes Product Level Restrictions by Category/Customer_Cat_Group.

I'm cleaning up the installation instructions, then zip it and release. Check my site or the Zen Plugins for the newest patch!

Applies to:
Index and Sideboxes

  • New Products
  • Featured Products
  • Specials
  • Upcoming Products

Coded for:
Zen Cart 1.53

Note: the new patch should be backwards compatible with 1.51, although I haven't tested it, many of the patched files are similar/identical between 1.51 and 1.53.

1 Feb 2015, 6:46 PM
#31
twitchtoo avatar

twitchtoo

Totally Zenned

Join Date:
Apr 2007
Location:
Ontario, Canada
Posts:
1,733
Plugin Contributions:
14

Re: Twitch Restrict Categories by Customer or Group

Twitch Restrict 16a for ZC v1.54 is now available.

Check the forum *plugins *or my website for your copy.

NEW - Inherited Product Restriction
NEW - Now filters restricted products on - new products, all products, featured products, specials, and upcoming products in the sideboxes and index pages.
NEW - Works with category tabs, category sidebox and search/advanced search.
NEW - Works with 'Categories Always Show on Main Page - 1 | True'

Optional

  • Works with Twitch Master ID = 1 + Sales ID = 2
  • Supports Encrypted Master Password - Login from Admin as Customer with Sales 2 ID

All instructions have been organized, line numbers updated for ZC v154, and it now includes Inherited Product Restriction.

Yes it is directly compatible with ZC v1.53 - line numbers will be out by 2 - 5 digits.

There is now a demo store operating on my website for anyone that would like to see this module in action!

16 Mar 2015, 6:17 AM
#32
luke_galyan avatar

luke_galyan

New Zenner

Join Date:
Jun 2014
Location:
Las Vegas, Nevada, United States
Posts:
47
Plugin Contributions:
0

Re: Twitch Restrict Categories by Customer or Group

First kudos for such a great install / update log for your plugins! Freaking awesome work.

So I installed the Twitch Restrict Module. A lot of the files I just copied over to my server.
Other files have been modified by other plugins previously installes or by me when modifying things.

For the files that had been previously changed, I did not move your supplied files to my server.
Instead I referred to your file twitch_restrict_cat_by_cust_or_group_16a_for_154.txt (here after called install.txt)
and added the code outlined in the install.txt.

I found a few issues along the way. Maybe you can tell me what I am doing wrong or maybe you have a little tweaking to do to the install files? Below most (not all) of the issues relate to missing code in your supplied files. For the files that do have the all the code added it is easy to look at your supplied files and know exactly how to add the code to my server files. But a few of the supplied files seem to be missing some code?

Issue 1
The Install.txt has instructions starting on line 1404
Instructing the additions of some lines to file
admin/includes/modules/category_product_listing.php
When looking at the files supplied with the Restrict Module, the lines you suggest adding are not in the file you supplied. Needless to say they are also not in my file.

I am not a coder so I am hesitant to just pick a spot to add the suggested code changes.
On each file I look at the file you supplied and note how to add the suggested code to my file on the server.
With the code missing in your supplied files I have no example to follow.
Am I missing something?

Issue 2A
The Install.txt has instructions starting on line 130
Instructing the additions of 3 lines of code to file
admin/includes/languages/english/customers.php
Again the lines of code are not present in your supplied file.

Issue 2B
The Install.txt has instructions starting on line 1397
Instructing the additions of 3 more lines of code to file
admin/includes/languages/english/customers.php
Again the lines of code are not present in your supplied file.

For issues 2A and 2B (same file)
I took a best guess and added all the lines of code next to eachother after line 40 in my file.
Here is a copy paste of the code I added with an existing line of code above it and an existing line of code below it so you can see where I put it. Is this in the correct location or will I have issues?
While I am hesitant to make a guess at where things go, this seemed to be a small file and assume it easy to find what I did.

define('ENTRY_NONE', 'None');

define('TABLE_HEADING_CAT_GROUP','CatGroup ID');
define('CUSTOMERS_CAT_GROUP', 'CatGroup ID: ');
define('CUSTOMERS_CAT_GROUP_NOTES', '    Customers Category Group ID = 0 (Default) => Everyone | Master ID = 1 | Sales = 2 (Twitch Restrict Categories by Customer or Group).');
define('CUSTOMERS_CAT_GROUP_ORIGINAL', 'Original CatGroup ID: ');
define('CUSTOMERS_CAT_GROUP_ORIGINAL_NOTES', '    Original Customers Category Group ID (for reference only)');

define('TABLE_HEADING_COMPANY','Company');

Issue 3
The Install.txt has instructions starting on line 1367
Instructing the additions of some lines to file
admin/customers.php
Again the lines of code are not present in your supplied file.

I am hesitant to just make a guess and go for it.

Issue 4
The Install.txt has instructions starting on line 265
Instructing the additions of some lines to file
admin/includes/modules/category_product_listing.php
When I add this line it moves my headings over but not the data under the headings, so the data is not under the correct headings anymore.
This is in relation to my admin area where I view the products in a category.
I must have missed something else that is supposed to go with this so things still line up?

Any help you can give to get me back on track would be appreciated. Then I can start trying to figure out how to use it.

Luke

16 Mar 2015, 2:24 PM
#33
twitchtoo avatar

twitchtoo

Totally Zenned

Join Date:
Apr 2007
Location:
Ontario, Canada
Posts:
1,733
Plugin Contributions:
14

Re: Twitch Restrict Categories by Customer or Group

Luke Galyan:

First kudos for such a great install / update log for your plugins! Freaking awesome work.

Thanks :)

Luke Galyan:

I found a few issues along the way. Maybe you can tell me what I am doing wrong or maybe you have a little tweaking to do to the install files? Below most (not all) of the issues relate to missing code in your supplied files. For the files that do have the all the code added it is easy to look at your supplied files and know exactly how to add the code to my server files. But a few of the supplied files seem to be missing some code?

You are correct, this version includes 'optional' code for anyone that absolutely needs the functionality of these specific extras. Streamlining the complete module was necessary as most people will never use these extras.

Luke Galyan:

Issue 1
The Install.txt has instructions starting on line 1404
Instructing the additions of some lines to file
admin/includes/modules/category_product_listing.php
When looking at the files supplied with the Restrict Module, the lines you suggest adding are not in the file you supplied. Needless to say they are also not in my file.

At line 1330 you will find:
** ***** Optional - Add support for Twitch Master/Sales ID *******
This is a feature that allows you to force master and sales ID switches in the first numerical slots of the catgroup id. It also includes the catgroup original input field for tracking or managing ID's.

Luke Galyan:

I am not a coder so I am hesitant to just pick a spot to add the suggested code changes.
On each file I look at the file you supplied and note how to add the suggested code to my file on the server.
With the code missing in your supplied files I have no example to follow.
Am I missing something?

Please, continue to be hesitant :) it's much better to stop and ask questions, get answers then proceed!

Luke Galyan:

Issue 2A
The Install.txt has instructions starting on line 130
Instructing the additions of 3 lines of code to file
admin/includes/languages/english/customers.php
Again the lines of code are not present in your supplied file.

I just downloaded the .zip from zc plugins - this code** is **in the admin customers.php.

Luke Galyan:

Issue 2B
The Install.txt has instructions starting on line 1397
Instructing the additions of 3 more lines of code to file
admin/includes/languages/english/customers.php
Again the lines of code are not present in your supplied file.

You are correct about this one, this code is not included in the file as it applies only to the 'optional' code for:
***** Optional - Add support for Twitch Master/Sales ID *****

Luke Galyan:

For issues 2A and 2B (same file)
I took a best guess and added all the lines of code next to each other after line 40 in my file.
Here is a copy paste of the code I added with an existing line of code above it and an existing line of code below it so you can see where I put it. Is this in the correct location or will I have issues?
While I am hesitant to make a guess at where things go, this seemed to be a small file and assume it easy to find what I did.

define('ENTRY_NONE', 'None');

define('TABLE_HEADING_CAT_GROUP','CatGroup ID');
define('CUSTOMERS_CAT_GROUP', 'CatGroup ID: ');
define('CUSTOMERS_CAT_GROUP_NOTES', '    Customers Category Group ID = 0 (Default) => Everyone | Master ID = 1 | Sales = 2 (Twitch Restrict Categories by Customer or Group).');
define('CUSTOMERS_CAT_GROUP_ORIGINAL', 'Original CatGroup ID: ');
define('CUSTOMERS_CAT_GROUP_ORIGINAL_NOTES', '    Original Customers Category Group ID (for reference only)');

define('TABLE_HEADING_COMPANY','Company');

In language files like this one you can put the defines anywhere as long as they are cut and paste correctly with all of their syntax in tact ;)

Luke Galyan:

Issue 3
The Install.txt has instructions starting on line 1367
Instructing the additions of some lines to file
admin/customers.php
Again the lines of code are not present in your supplied file.

I am hesitant to just make a guess and go for it.

You are correct about this one, this code is not included in the file as it applies only to the 'optional' code for:
***** Optional - Add support for Twitch Master/Sales ID *****

Luke Galyan:

Issue 4
The Install.txt has instructions starting on line 265
Instructing the additions of some lines to file
admin/includes/modules/category_product_listing.php
When I add this line it moves my headings over but not the data under the headings, so the data is not under the correct headings anymore.
This is in relation to my admin area where I view the products in a category.
I must have missed something else that is supposed to go with this so things still line up?

Here you are adding in a heading which creates an empty 'space' in the structure of the table. You need to add that space back to the correct line below the heading to draw the table structure properly.

If you have other modules installed that have changed this file often times they forget to add the space. Alternately adding too much space will push the rows over and look wrong also.

If you can take a screenshot of this happening I can point you in the right direction for a fix.

Luke Galyan:

Any help you can give to get me back on track would be appreciated. Then I can start trying to figure out how to use it.

Luke

Help provided :)

17 Mar 2015, 1:01 AM
#34
luke_galyan avatar

luke_galyan

New Zenner

Join Date:
Jun 2014
Location:
Las Vegas, Nevada, United States
Posts:
47
Plugin Contributions:
0

Re: Twitch Restrict Categories by Customer or Group

Ok so now that I get the optional thing....... Thank you for clarifying. :)

I went back and made sure none of the optional stuff made its way into my files. I also uninstalled the one SQL update that was related to the optional stuff (installed all SQL updates originally and didn't notice the optional note).

I will have time to play with this later and I "think I am ok now? Time will tell.

The only issue I still have left is the moving of my information relative to the headers in my category view pages.
I took Screenshots of with and without your code.
This is in reference to file admin/includes/modules/category_product_listing.php

Without line 72 added.jpg
Shows a screenshot of a category with only one product and shows how the information lines up under the correct headings. This is without adding your code to line 72.

With line 72 added.jpg
Shows a screenshot of a category with only one product and shows how the information does not lines up under the correct headings. This is without adding your code to line 72.

For now I have left the code out since it all lines up correctly. But I would like to know if this needs to be changed for some reason?

17 Mar 2015, 1:09 AM
#35
twitchtoo avatar

twitchtoo

Totally Zenned

Join Date:
Apr 2007
Location:
Ontario, Canada
Posts:
1,733
Plugin Contributions:
14

Re: Twitch Restrict Categories by Customer or Group

Luke Galyan:

Ok so now that I get the optional thing....... Thank you for clarifying. :)

I went back and made sure none of the optional stuff made its way into my files. I also uninstalled the one SQL update that was related to the optional stuff (installed all SQL updates originally and didn't notice the optional note).

I will have time to play with this later and I "think I am ok now? Time will tell.

The only issue I still have left is the moving of my information relative to the headers in my category view pages.
I took Screenshots of with and without your code.
This is in reference to file admin/includes/modules/category_product_listing.php

Without line 72 added.jpg
Shows a screenshot of a category with only one product and shows how the information lines up under the correct headings. This is without adding your code to line 72.

With line 72 added.jpg
Shows a screenshot of a category with only one product and shows how the information does not lines up under the correct headings. This is without adding your code to line 72.

For now I have left the code out since it all lines up correctly. But I would like to know if this needs to be changed for some reason?

It's fine without the line with the space ** ** in it :)

Be sure to check the behaviour when viewing sub categories and products.

4 May 2015, 3:08 PM
#36
buildingblocks avatar

buildingblocks

Totally Zenned

Join Date:
Jun 2008
Posts:
629
Plugin Contributions:
0

Re: Twitch Restrict Categories by Customer or Group

Hi

I have version 16a installed on zen cart 1.5.3. It's mostly working. The two major issues are the category menus on the storefront.

The category sidebox is using better categories. I managed to get the category restrict code merged and it seems to be working ok, barring any unforeseen problems.

I am struggling trying to integrate the twitch category restrict code into the top category navigation which is using the module, Category Tab Simple Dropdown Menu

https://www.zen-cart.com/downloads.php?do=file&id=1003

It relies on two files which are a stylesheet and the file tpl_modules_categories_tabs.php

Have you tried your code on this module yet? Can it work on this module?

Everything I have tried (I'm not a coder) has resulted in errors blocking the full loading of the menu and rest of the site or the menu and site loads but has ill affect on the category that is meant to be hidden. I'll keep trying but so far no joy.

4 May 2015, 5:34 PM
#37
buildingblocks avatar

buildingblocks

Totally Zenned

Join Date:
Jun 2008
Posts:
629
Plugin Contributions:
0

Re: Twitch Restrict Categories by Customer or Group

and another thought is we need it to work for a mobile menu. Is that something that can be done?

5 May 2015, 11:45 PM
#38
twitchtoo avatar

twitchtoo

Totally Zenned

Join Date:
Apr 2007
Location:
Ontario, Canada
Posts:
1,733
Plugin Contributions:
14

Re: Twitch Restrict Categories by Customer or Group

buildingblocks:

and another thought is we need it to work for a mobile menu. Is that something that can be done?

Yes. The filters need to be custom coded or added into the correct locations in the existing menu code.

5 May 2015, 11:46 PM
#39
twitchtoo avatar

twitchtoo

Totally Zenned

Join Date:
Apr 2007
Location:
Ontario, Canada
Posts:
1,733
Plugin Contributions:
14

Re: Twitch Restrict Categories by Customer or Group

buildingblocks:

Hi

I have version 16a installed on zen cart 1.5.3. It's mostly working. The two major issues are the category menus on the storefront.

The category sidebox is using better categories. I managed to get the category restrict code merged and it seems to be working ok, barring any unforeseen problems.

I am struggling trying to integrate the twitch category restrict code into the top category navigation which is using the module, Category Tab Simple Dropdown Menu

https://www.zen-cart.com/downloads.php?do=file&id=1003

It relies on two files which are a stylesheet and the file tpl_modules_categories_tabs.php

Have you tried your code on this module yet? Can it work on this module?

Everything I have tried (I'm not a coder) has resulted in errors blocking the full loading of the menu and rest of the site or the menu and site loads but has ill affect on the category that is meant to be hidden. I'll keep trying but so far no joy.

It will work as far as I can tell, needs to be placed correctly in the php file.

15 May 2015, 4:43 PM
#40
mattys avatar

mattys

Zen Follower

Join Date:
Sep 2006
Location:
North Devon, England, UK
Posts:
289
Plugin Contributions:
0

Re: Twitch Restrict Categories by Customer or Group

Hi

I'm using zencart 1.51 and Twitch Restrict 14.c - Feb 14.2014.

I can hide a category, but customers not logged in can still see sub categories and products, this page https://www.jarbon.com/dev/index.php?main_page=product_info&cPath=42_140&products_id=202 is within a category that should be restricted.

is this because i am using Twitch Restrict 14.c - Feb 14.2014? if so, can i upgrade but still use zencart 1.5.1?

thanks