Hi there forum,
I, in my shop admin area, am king - top administrator.
All I need is for a user, who is set up, to be able to open the customers orders and change the setting from pending to 'whatever' he needs..... that's it. No deleting or anything else.
I have tried to set this. I gave him 'access' to the following - home, log in, log out, orders and orders_status. I gave him 'modify' to order_status then saved it.
He is also in the correct group assigned with these permissions.
When I placed a 'false' order he could access the chosen fields and alter the order_status, but it wouldn't save!!!!!
When I went back to admin status all worked well.
I can normally figure these things out for myself but I'm a bit confused.
Thanks for any help.
DB
I, in my shop admin area, am king - top administrator.
All I need is for a user, who is set up, to be able to open the customers orders and change the setting from pending to 'whatever' he needs..... that's it. No deleting or anything else.
I have tried to set this. I gave him 'access' to the following - home, log in, log out, orders and orders_status. I gave him 'modify' to order_status then saved it.
He is also in the correct group assigned with these permissions.
When I placed a 'false' order he could access the chosen fields and alter the order_status, but it wouldn't save!!!!!
When I went back to admin status all worked well.
I can normally figure these things out for myself but I'm a bit confused.
Thanks for any help.
DB
Hi mate,
Tried multiple options and they all comedown to the fact that my user group can change order and order_status together.......but when told it can only modify order_status nothing happens.
When I hit 'save' after changing the order status there is no red message saying 'access denied' , the screen refreshes, but no change has taken place.
Strange. It's quite an important option for me as my distribution team will only have that one 'modify' option available to them.
Thanks for helping out.
DB
Tried multiple options and they all comedown to the fact that my user group can change order and order_status together.......but when told it can only modify order_status nothing happens.
When I hit 'save' after changing the order status there is no red message saying 'access denied' , the screen refreshes, but no change has taken place.
Strange. It's quite an important option for me as my distribution team will only have that one 'modify' option available to them.
Thanks for helping out.
DB
Still confused.
You have a usergroup with a user.
This user has no modify access except for "order" and "order_status" and that works.
Then you change the user group to only allow "order_status" and you save it. But "nothing happens"
?
Then the user can hit save and gets no error, but also nothing happens?
Perhaps you are confused about what order_status is. That refers to Admin->Configuration->Localisation->Order Status. Which allows you to create statuses like "pending" or "canceled". Typically only one person needs to make them once and leave it.
What it sounds like is you have admins that you want to be able to update the "status of an order". Which means you would give them "order" modify privs.
You have a usergroup with a user.
This user has no modify access except for "order" and "order_status" and that works.
Then you change the user group to only allow "order_status" and you save it. But "nothing happens"

Then the user can hit save and gets no error, but also nothing happens?
Perhaps you are confused about what order_status is. That refers to Admin->Configuration->Localisation->Order Status. Which allows you to create statuses like "pending" or "canceled". Typically only one person needs to make them once and leave it.
What it sounds like is you have admins that you want to be able to update the "status of an order". Which means you would give them "order" modify privs.
Last edited by Qphoria on Sun Jan 25, 2009 12:15 pm, edited 1 time in total.
I am so so sorry to have wasted your time.
Yes my friend you are right.... I didn't see 'Order Status' I only saw 'Status of Order' in the actual order page.
How you put up with us is beyond me?
Ok, so it isn't an easy thing to do.... but even if I have to change code how can I make it that on the order page my 'distribution team' can only change the 'status of order' then save that?
Any ideas?
Thanks
DB
Yes my friend you are right.... I didn't see 'Order Status' I only saw 'Status of Order' in the actual order page.
How you put up with us is beyond me?
Ok, so it isn't an easy thing to do.... but even if I have to change code how can I make it that on the order page my 'distribution team' can only change the 'status of order' then save that?
Any ideas?
Thanks
DB
So currently they can:
- update the order status
- delete the order
and you want to remove the ability to "delete the order" correct?
Will anybody else have the ability to delete orders besides the main admin?
Will there be more than just main admin and "distribution team" ?
- update the order status
- delete the order
and you want to remove the ability to "delete the order" correct?
Will anybody else have the ability to delete orders besides the main admin?
Will there be more than just main admin and "distribution team" ?
Last edited by Qphoria on Mon Jan 26, 2009 8:58 am, edited 1 time in total.
Hi there,
Just one main admin (me) and just one distribution team/user group.
Yes you are correct, the distribution team must only be able to alter the 'pending, cancelled, shipped' option and then save it. Nothing else at all.
Thanks for your time,
DB
Just one main admin (me) and just one distribution team/user group.
Yes you are correct, the distribution team must only be able to alter the 'pending, cancelled, shipped' option and then save it. Nothing else at all.
Thanks for your time,
DB
The easiest way would be to add another validation step to the delete function to check for super admin.
EDIT: admin/controller/order.php
FIND (just the red text):
REPLACE WITH (just the red text):
FIND:
AFTER, ADD:
Tested and Working
EDIT: admin/controller/order.php
FIND (just the red text):
Code: Select all
function delete() {
.........
........
if (($request->gethtml('order_id')) && ([color=red]$this->validate()[/color]) {
REPLACE WITH (just the red text):
Code: Select all
function delete() {
.........
........
if (($request->gethtml('order_id')) && ([color=red]$this->validateDelete()[/color])) {
FIND:
Code: Select all
function validate() {
$user =& $this->locator->get('user');
$language =& $this->locator->get('language');
if (!$user->hasPermission('modify', 'order')) {
$this->error['message'] = $language->get('error_permission');
}
if (!$this->error) {
return TRUE;
} else {
return FALSE;
}
}
AFTER, ADD:
Code: Select all
function validateDelete() {
$language =& $this->locator->get('language');
$user =& $this->locator->get('user');
if (!$user->hasPermission('modify', 'order')) {
$this->error['message'] = $language->get('error_permission');
}
if (!$user->isSuperAdmin()) {
$this->error['message'] = $language->get('error_permission');
}
if (!$this->error) {
return TRUE;
} else {
return FALSE;
}
}
Hi there,
Your code worked, my 'distribution team' can't delete the order.
When they click on delete the screen goes blank and this message comes up.....
Fatal error: Call to undefined method ControllerOrder::validateDelete() in /home/mind1stu/public_html/shop/admin/controller/order.php on line 87
The order isn't deleted, which is fine... but I just thought I'd let you know about the screen.... if this is what you were expecting then I'm happy with it.
Many thanks,
DB
Your code worked, my 'distribution team' can't delete the order.
When they click on delete the screen goes blank and this message comes up.....
Fatal error: Call to undefined method ControllerOrder::validateDelete() in /home/mind1stu/public_html/shop/admin/controller/order.php on line 87
The order isn't deleted, which is fine... but I just thought I'd let you know about the screen.... if this is what you were expecting then I'm happy with it.
Many thanks,
DB
What a tit.
I got so excited at the first bit working I forgot to look at the second bit.
Geez.
How you cope is beyond me?
DB
I got so excited at the first bit working I forgot to look at the second bit.
Geez.

How you cope is beyond me?
DB
Who is online
Users browsing this forum: No registered users and 4 guests