Jump to content

Access to CMS pages for selected groups of users for PS 1.7


Recommended Posts

Hi

I made small changes  in PS 1.7 files (I was working on 1.7.5.1) adding function that allows admin to define which group of users has acces to specific CMS page. It's NOT a module, just small changes. So, if you upgrade your shop you must provide changes in files again and check if function works properly. Please note, that I'm not a php programmer, so functions can be not fully optimized. If you are, you can share here with improvements.

How to implement.

1.extract files from zip file (files are in directory structure as should be on the server)

2. Copy CMSGroup.php as is - this is new file.

3. In rest of files there are two possibilities:

-  simple: just overwrite rest of files BUT! remember about PS version and copy to proper directories.

- custom: open each file find mark /* added */ and copy this one line or several lines from /* added start */ to /*added stop */

4. Create table in database

CREATE TABLE `ps_cms_group` (
  `id_cms` int(10) UNSIGNED NOT NULL,
  `id_group` int(10) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

ALTER TABLE `ps_cms_group`
  ADD KEY `id_cms` (`id_cms`) USING BTREE;

 

Simple but functional. Maybe PS Team add such function to official release? Would be nice...:)

Please note, that you are making all changes for your onwn risk. I do not take any responsibility! No support to other versions.

 

TomekZ.

 

 

 

 

 

ps_ga.PNG

cms_group_access.zip

Edited by TomekZ
just text edit (see edit history)

Share this post


Link to post
Share on other sites
  • 1 year later...

Hi thanks TomekZ

In prestashop 1.7.7.1 doesnt work.

I create the table, an put your files in order making a backup of original, but doesnt work.

Your intention is so so so good, this functionally is necesary in prestashop original without modules.

Thanks

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More