David R Posted April 19, 2010 Share Posted April 19, 2010 im new here so im not to sure how much this topic has been discused but havent found something related... I´m building a real estate portal so i would need a system that would work in a way that people could post the adds and have a certin control of there post editing etc would this be posible by prestashop?I would realy apretiate if any examplesthanks for the help! Link to comment Share on other sites More sharing options...
rocky Posted April 20, 2010 Share Posted April 20, 2010 This is not possible with Prestashop at the moment. You cannot give customers the option to add products to your site and manage just their products. You can only add them as employees, which gives them access to edit all the products on the website. Link to comment Share on other sites More sharing options...
Ameenullah Posted May 30, 2010 Share Posted May 30, 2010 is it possible to set like if the post created autor/editor=the viewing , allow editing else just view only.if so where it can be done? any clue?thanx in adv Link to comment Share on other sites More sharing options...
rocky Posted May 30, 2010 Share Posted May 30, 2010 That won't work, since PrestaShop doesn't keep track of which employee created a product. Link to comment Share on other sites More sharing options...
Ameenullah Posted May 31, 2010 Share Posted May 31, 2010 thanks alot for the info Rocky, any other suggestion/idea? so that i can channel myself into that...Is it possible to create extra field for the author(the one who logged in) while creating a product. So that we can have a track later? if so, which module i have to edit? Link to comment Share on other sites More sharing options...
rocky Posted May 31, 2010 Share Posted May 31, 2010 This would be difficult, but possible. You'll need to add an id_employee field to the ps_product table. Then add the following to the public variables near the top of classes/Product.php: /** @var integer Employee id */ public id_employee; Then add the following to the getFields function in classes/Product.php: $fields['id_employee'] = pSQL($this->id_employee); Then add the following to the top of the add function in classes/ObjectModel.php so you can access the cookie: global $cookie; and then the following after filling in the dates to fill the currently-logged-in employee: if ($this->table == 'product') $this->id_employee = intval($cookie->id_employee); I haven't tested this code, but it should put the currently-logged-in employee's ID in the database when a product is created, but not update the employee ID when an update occurs. Link to comment Share on other sites More sharing options...
Ameenullah Posted June 1, 2010 Share Posted June 1, 2010 great help ROCKY,"This would be difficult, but possible."Thanks for your Positive reply.I will give a try and let you know the output, also if anyone interested in the same thing, can join for more discussion...Edit:I added the field in DB, and lines added in other files too (as you said) but i couldnt see the data in the employee field in DB after adding the product into it. Link to comment Share on other sites More sharing options...
lophie Posted January 4, 2011 Share Posted January 4, 2011 I'm totally interested. I made a post but was lost in forum stack with no reply since I asked it in a developer sense.What I made so far you can EASILY show the employee ONLY his product. This is what I've done.Added the field id_employee to products table. Filled the data manually to test since I needed the code uphere to make this workthen on admin/tabs/AdminProducts.php <- not sure of the name I added a filter line to show only if a product id_employee == Admincookie->id_employeethen to make sure the global admin can see all the product. You can use an if statement to check the profile id (make a profile for merchants)using the same concept you can make the employee able to change ONLY his own password.View his own orders and products.. blah blahI have a deadline with my partner in the small shop we're doing (I'm the computer geek XD). so I'll post you my results with details whenever I think it's working and concrete Link to comment Share on other sites More sharing options...
lophie Posted January 4, 2011 Share Posted January 4, 2011 just to report to you.What rocky suggested worked fine. You just need to add id_employee(INTEGER) to products database. Now I'm implementing what I told you above. Link to comment Share on other sites More sharing options...
arvix Posted January 14, 2011 Share Posted January 14, 2011 Can you telll me how exactly you create filter line to show only if a productid_employee == Admincookie->id_employee?? Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now