WPPizza – A Restaurant Plugin for WordPress › Support › Feature Requests › Is there a way to display the order history…
- AuthorPosts
- 12 August, 2013 at 11:30 pm #3630Carl
Is there a way to display the order history on a page? I want my client to be able to see orders come in without having to login to the backend.
13 August, 2013 at 10:41 am #3631of course you will always have to login to the backend.
otherwise anyone could just have a look at the orders which I’m sure is not what you (or more importantly your client) wants ….
or maybe i’m missing something13 August, 2013 at 10:12 pm #3632CarlI would password protect the page. I prefer that the client have less clicks and no username to worry about logging every time. It’s also nicer when people don’t see behind the curtain.
13 August, 2013 at 10:59 pm #3633err, if you password protect the page the user still has to use a username and password too, so there are not any more clicks as in using the – perfectly valid, styleable etc – wordpress login. sorry , that makes no sense to me
regarding people not being able to see behind the curtain:
the most fleeting look at the source of any wordpress page will tell anyone that you are using wordpress (if that;s what you are worried about for some unknown reason). i really cannot see the point of your request, but feel free to expand. maybe i am still misunderstanding things14 August, 2013 at 2:57 am #3634CarlTo put it bluntly, they are older gen people and I don’t want them screwing up the wordpress. These are people who run a restaurant and want online ordering but can’t do a whole lot more than check email. I understand that your plugin sends emails to but I like how you can simply refresh the order feed and see them all in one spot. I don’t like that I’m giving them administrator access, nothing less than that allows the user to see the feed. All I’m wondering is if it’s possible to get that feed to show outside of the wordpress dashboard. If not, I will just tell them to use email, though I prefer not to if an option or line of code is available.
14 August, 2013 at 10:22 am #3635ah ok. i see where you are coming from, but I think you are missing something which you should be doing:
you do not need to/shouldn’t give them administrator access.
as the order history is only available to users with editor or above privileges I would do the following in your scenario:
get yourself a version of advanced access manager [AMM](although i found it a bit buggy in places – especially with woocommerce – in most cases it works reasonably well) or any other role editor plugin you might like
make a new role called “shopowner” (or whatever you want to call it) as a copy of the “editor” role which will already take away access to most things in the backend.
now you can use the AMM to take away everything you like from the “shopowner” role and just leave access to the order history only if you want by restricting access to everything else in access manager main menu.
as AMM is a bit crap in places (but its the best one i have found so far) you might have to goto AMM capabilities and deselect “manage categories” as well for that “shopowner ” role. anyway, play with it you’ll probably get the idea when you see itI would strongly suggest – before doing anything with AMM – to backup your db and also definitely create a new role and set this under capabilities to be a copy of editor first so you dont screw up any other “normal” wordpress roles when editing things.
now just create a new user with this “shopowner” role and tell your clients use that one. nothing they can screw up then.
and if you really want straight away redirect them to the order page put something like this in your themes function.php
function shopowner_login_redirect( $redirect_to, $request, $user ) {
if ( !is_wp_error( $user ) ) {
$redirect=admin_url();/*everybody else*/
if($user->data && $user->data->user_login=='shopowner'){
$redirect=admin_url().'admin.php?page=wppizza-order-history';
}
return $redirect;
}
}
add_filter( 'login_redirect', 'shopowner_login_redirect', 10, 3 );
14 August, 2013 at 3:39 pm #3636CarlThanks!
- AuthorPosts
- The topic ‘Is there a way to display the order history…’ is closed to new replies.