- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-12-2017
03:20 AM
01-12-2017
03:20 AM
Modify Checkout URL
Hi There,
Can any one please guide me on how I can change the "Go to checkout" url to a bespoke magento URL i.e.
test.com/checkout -> test.com/my/checkout
Thanks!!
Labels:
1 REPLY 1
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-24-2017
12:13 PM
01-24-2017
12:13 PM
Re: Modify Checkout URL
You can change the word "checkout" in the URL to something else. Add a etc/frontend/routers.xml file to any of your modules with the following content:
<?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:App/etc/routes.xsd"> <router id="standard"> <route id="checkout" frontName="thenameyouwant"> <module name="Magento_Checkout" /> </route> </router> </config>
Take care that your module is being loaded after the Magento_Checkout module, i.e. by modifying your etc/module.xml as follows:
<?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd"> <module name="Your_Module" setup_version="0.1.0"> <sequence> <module name="Magento_Checkout"/> </sequence> </module> </config>
You cannot change the whole path easily, that'd be much more complicated.
Andreas von Studnitz, Trainer, Consultant, Developer and CEO of integer_net, Germany.