Nikita_kharkov Posted December 16, 2016 Share Posted December 16, 2016 (edited) Hello! I didn't find any inbox parameter which give me only URI except "$come_from", but it contains GET parameters. Few examples: I need: http://myhost.com/some-category/some-subcategory. From $_SERVER['REQUEST_URI'] I could get it only if it don't content some query parameters (URI like http://myhost.com/some-category/some-subcategory?new=true or http://myhost.com/some-category/some-subcategory#/some-Filter) Can help somebody? I don't want spend time for writing this functions and want to use inbox vars. Edited December 16, 2016 by Nikita_kharkov (see edit history) Link to comment Share on other sites More sharing options...
Nikita_kharkov Posted December 19, 2016 Author Share Posted December 19, 2016 (edited) I made my own little solution and add it to FrontController as $page_uri_without_params variable. This issue arose when I have to add canonical link for SEO. I had to add link without any parameters. I hope this solution help to somebody. $page_uri_without_params = substr($this->context->shop->getBaseURL(), 0, -1). // remove slash at the end preg_replace('@(/?\?.*)|(/#.*)|(/$)@', '', $_SERVER['REQUEST_URI']); // remove PS query and standart query Edited December 19, 2016 by Nikita_kharkov (see edit history) 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