Hello, Guest |
| Register
Remember me Forgot password ?
Site Map Site Map Contact us Contact us
PrestaShop
  648 users online
Forum  >  English Forum  >  Third party modules  >  Thread

1 of 2
1
Post Reply
New Topic
[CONTRIBUTION] CMS Page Group Restrictions

offline
Posted: 17 October 2009 12:14 PM   [ Ignore ]
Club Member
RankRankRank
Avatar

Messages :

  • total: 102
  • last 7 days: 0
Joined: 2009-05-09

I have refactored Aaron @ Geocachestore’s excellent “Group Functionality in the CMS Info Block” contribution to be a more general solution for hiding CMS pages from specific groups. It is available here for PrestaShop 1.2.4.

http://www.thatsoftwareguy.com/prestashop_cms_group_restrictions.html

That Software Guy

 Signature 

That Software Guy - http://www.thatsoftwareguy.com
My Mods: Better Together, Boilerplate Description, Sort order in CMS
http://www.thatsoftwareguy.com/prestashop.html

Please support my feature request for a generalized fee/discount framework in PrestaShop: http://www.prestashop.com/bug_tracker/view/3044/

 
offline
Posted: 17 October 2009 01:54 PM   [ Ignore ]   [ # 1 ]
Club Member
RankRankRank
Avatar

Messages :

  • total: 123
  • last 7 days: 0
Joined: 2009-10-04

It’s a mess here ! Some anomalies, but I think it’s because of my former hack, AND WHAT IT SEEMS TO BE A BUG of prestashop …

I noticed that if in blockinfo you select nothing (no cms) , then all cms are displayed !!!! you must select at least 1 cms.

In other hand, I would like in fact hide blocks in accordance of groups permissions. Not only contents … but the block itself (because to see an empty block is not smart ! ).

How ?

 Signature 

signé: LionHell

 
offline
Posted: 17 October 2009 01:58 PM   [ Ignore ]   [ # 2 ]
Club Member
RankRankRank
Avatar

Messages :

  • total: 102
  • last 7 days: 0
Joined: 2009-05-09

Did you restore modules/blockinfos/blockinfos.php from the default copy? The old modified copy is no good anymore.

 Signature 

That Software Guy - http://www.thatsoftwareguy.com
My Mods: Better Together, Boilerplate Description, Sort order in CMS
http://www.thatsoftwareguy.com/prestashop.html

Please support my feature request for a generalized fee/discount framework in PrestaShop: http://www.prestashop.com/bug_tracker/view/3044/

 
offline
Posted: 17 October 2009 02:13 PM   [ Ignore ]   [ # 3 ]
Club Member
RankRankRank
Avatar

Messages :

  • total: 123
  • last 7 days: 0
Joined: 2009-10-04

That was my mistake, you’re right, I made the backup it’s ok for that, but I’ve edited my 1st message in that post, read it again ….

 Signature 

signé: LionHell

 
offline
Posted: 17 October 2009 02:33 PM   [ Ignore ]   [ # 4 ]
Club Member
RankRankRank
Avatar

Messages :

  • total: 123
  • last 7 days: 0
Joined: 2009-10-04

I have a problem …. surprising ?

In the BO:

If I create a CMS with NO restriction -> This CMS is displayed in modules/blockinfos settings.

If I create (or modify) a CMS with some restriction -> The CMS IS NOT displayed in modules/blockinfos settings

So impossible to set up the block !

 Signature 

signé: LionHell

 
offline
Posted: 17 October 2009 02:41 PM   [ Ignore ]   [ # 5 ]
Club Member
RankRankRank
Avatar

Messages :

  • total: 123
  • last 7 days: 0
Joined: 2009-10-04

I say again, in fact I would prefer to know how to show/hide a block according the customer groups ?!

 Signature 

signé: LionHell

 
offline
Posted: 17 October 2009 04:56 PM   [ Ignore ]   [ # 6 ]
Club Member
RankRankRank
Avatar

Messages :

  • total: 102
  • last 7 days: 0
Joined: 2009-05-09

You found a bug. I just fixed it; please download the ZIP again.

 Signature 

That Software Guy - http://www.thatsoftwareguy.com
My Mods: Better Together, Boilerplate Description, Sort order in CMS
http://www.thatsoftwareguy.com/prestashop.html

Please support my feature request for a generalized fee/discount framework in PrestaShop: http://www.prestashop.com/bug_tracker/view/3044/

 
offline
Posted: 17 October 2009 06:49 PM   [ Ignore ]   [ # 7 ]
Club Member
RankRankRank
Avatar

Messages :

  • total: 123
  • last 7 days: 0
Joined: 2009-10-04

OK trying again

 Signature 

signé: LionHell

 
offline
Posted: 17 October 2009 07:04 PM   [ Ignore ]   [ # 8 ]
Club Member
RankRankRank
Avatar

Messages :

  • total: 123
  • last 7 days: 0
Joined: 2009-10-04

Humm, now it’s the contrary !

Block settings are ok, CMS settings OK as well, but the display of CMS is not working.

No restriction: display ok for all groups.

Restriction: CMS that should appear for authorized group do not display.

 Signature 

signé: LionHell

 
offline
Posted: 17 October 2009 07:09 PM   [ Ignore ]   [ # 9 ]
Club Member
RankRankRank
Avatar

Messages :

  • total: 102
  • last 7 days: 0
Joined: 2009-05-09

I can’t reproduce this result. Are you sure you’ve selected the CMS page in the block where you want it to display in the admin?

 Signature 

That Software Guy - http://www.thatsoftwareguy.com
My Mods: Better Together, Boilerplate Description, Sort order in CMS
http://www.thatsoftwareguy.com/prestashop.html

Please support my feature request for a generalized fee/discount framework in PrestaShop: http://www.prestashop.com/bug_tracker/view/3044/

 
offline
Posted: 18 October 2009 12:08 AM   [ Ignore ]   [ # 10 ]
Club Member
RankRankRank
Avatar

Messages :

  • total: 123
  • last 7 days: 0
Joined: 2009-10-04

No, I checked again configuration, no doubt.

The only thing is that I didn’t update the mysql table, but it seems you made no change on that table.

My last test:

I login in front office as member belonging to an authorized group.
Then in BO I remove all restrictions to a cms.
This cms is visible in FO (normal !)
Then I set restriction to the cms so that my group can see the cms …
In FO the cms becomes invisible !

 Signature 

signé: LionHell

 
offline
Posted: 18 October 2009 12:43 AM   [ Ignore ]   [ # 11 ]
Club Member
RankRankRank
Avatar

Messages :

  • total: 123
  • last 7 days: 0
Joined: 2009-10-04

OK, I know the reason !!!!

When you edit a customer profile to setup the group of this customer, you can check the groups but not defaut ! you cannot uncheck default.

So all customers belong to default, and optionally to another group…

So … in your system if you restrict default , you restrict all logged customers !!

 Signature 

signé: LionHell

 
offline
Posted: 18 October 2009 03:29 AM   [ Ignore ]   [ # 12 ]
Club Member
RankRankRank
Avatar

Messages :

  • total: 102
  • last 7 days: 0
Joined: 2009-05-09

The idea of restricting default is that it will only show up for not logged in customers. That’s why I added “guest”. This is just how PS works; guess I’ll document it more thoroughly.

 Signature 

That Software Guy - http://www.thatsoftwareguy.com
My Mods: Better Together, Boilerplate Description, Sort order in CMS
http://www.thatsoftwareguy.com/prestashop.html

Please support my feature request for a generalized fee/discount framework in PrestaShop: http://www.prestashop.com/bug_tracker/view/3044/

 
offline
Posted: 18 October 2009 01:15 PM   [ Ignore ]   [ # 13 ]
Club Member
RankRankRank
Avatar

Messages :

  • total: 102
  • last 7 days: 0
Joined: 2009-05-09

OK, I updated the documentation to include more details on the default group (which you rightly pointed out is confusing). Maybe in a future release I will remove it altogether; we’ll see.

http://www.thatsoftwareguy.com/prestashop_cms_group_restrictions.html

Scott

 Signature 

That Software Guy - http://www.thatsoftwareguy.com
My Mods: Better Together, Boilerplate Description, Sort order in CMS
http://www.thatsoftwareguy.com/prestashop.html

Please support my feature request for a generalized fee/discount framework in PrestaShop: http://www.prestashop.com/bug_tracker/view/3044/

 
offline
Posted: 18 October 2009 01:51 PM   [ Ignore ]   [ # 14 ]
Club Member
RankRankRank
Avatar

Messages :

  • total: 123
  • last 7 days: 0
Joined: 2009-10-04

I’ll try that evening … for now I’m at work.

I’m not sure to understand …

Let’s suppose I’ve created a group “A”.

1/ If I check “A” in restriction, and let “Default” unchecked, does it mean that A group won’t see CMS and default (and other groups) will see ?

2/ How can I make a CMS visible only for “A” ??? Do I have to let default unchecked ? In that case do you confirm that customers belonging only to default won’t see the cms ?

 Signature 

signé: LionHell

 
offline
Posted: 18 October 2009 02:02 PM   [ Ignore ]   [ # 15 ]
Club Member
RankRankRank
Avatar

Messages :

  • total: 102
  • last 7 days: 0
Joined: 2009-05-09

The “default” behavior makes this very confusing. I think I will revert to making the checkbox mean “show” rather than “hide.”

 Signature 

That Software Guy - http://www.thatsoftwareguy.com
My Mods: Better Together, Boilerplate Description, Sort order in CMS
http://www.thatsoftwareguy.com/prestashop.html

Please support my feature request for a generalized fee/discount framework in PrestaShop: http://www.prestashop.com/bug_tracker/view/3044/

 
 
1 of 2
1
Fast Reply
New Topic