Dhush Posted January 13, 2017 Share Posted January 13, 2017 Hi, How can i disable cart.php page? I want to completely disable it and make a redirect to login/registration page, even if someone visited directly it must be redirected. Looking for help from brain, sentq. Instead i want people to place orders directly from client area, similar to Digitalocean, vultr. More over it should be like virtkick. Thank you. 0 Quote Link to comment Share on other sites More sharing options...
twhiting9275 Posted January 13, 2017 Share Posted January 13, 2017 an htaccess modification will do this for you. Add this with your other redirects RewriteRule cart.php$ clientarea.php [L,QSA] 0 Quote Link to comment Share on other sites More sharing options...
Dhush Posted January 13, 2017 Author Share Posted January 13, 2017 Thank you, I already did that. Can any one give an idea about how to integrate ordering system in to clients dashboard? like above i mentioned! 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted January 13, 2017 Share Posted January 13, 2017 How can i disable cart.php page? I want to completely disable it and make a redirect to login/registration page, even if someone visited directly it must be redirected.Looking for help from brain, sentq. one option might be to use an action hook... <?php add_hook("ClientAreaPageCart",1,function($vars){ $client = Menu::context("client"); $clientid = (int) $client->id; if ($clientid===0){ header("Location: register.php"); exit; } }); the way it would work is to check, on any cart page, if the user is logged in - if they are not logged in, then they are redirected to the register.php page; if they are logged in, then they can use the cart as normal. Instead i want people to place orders directly from client area, similar to Digitalocean, vultr.More over it should be like virtkick. with the above hook, only logged in clients can access the cart - either directly or via the links (navbar and sidebar) in the clientarea. Can any one give an idea about how to integrate ordering system in to clients dashboard? like above i mentioned! it already is - links to the cart are in the client area. I think it would take some effort to add cart functionality directly to the client area pages (you'd likely need to write an API solution) - what I suspect you should really aim to do is theme your client area and cart templates with a similar theme, so that the join between them is seamless. off the top of my head, I can't think of any available custom orderform template that behaves like the virtkick demo. 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.