lanouettea Posted August 7, 2013 Share Posted August 7, 2013 I'm trying to prevent a specific carrier from being ever displayed to customers through the front office. I only want this carrier to be displayed in the Order creation through the back-office. In order to do this, I thought about overriding the function that lists carriers in the Carrier class. I would simply filter out this carrier if the piece of code is called from the front office, and let it through if the code is called from the back office. I would have expected the Context variable to hold this information, but I can't find any mean to do that. Can anyone point me in the right direction? Thank you in advance, André Lanouette Link to comment Share on other sites More sharing options...
lanouettea Posted August 8, 2013 Author Share Posted August 8, 2013 (edited) Here's how I ended up achieveing this, in case anyone needs to do this: $current_context = Context::getContext(); if ($current_context->controller->controller_type == 'front'){ // Do whatever you need to do here } Edited August 8, 2013 by lanouettea (see edit history) 1 Link to comment Share on other sites More sharing options...
vekia Posted August 8, 2013 Share Posted August 8, 2013 hello thanks for your solution im going to mark this topic as [solved] btw. welcome on borard best regards 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