Sometimes you may require to change the default Magento URLs of some of the pages in order to handle and recognize them in a better way. The use of fancy URL leads you to initiate rewrite for them.
Here we have come up with a quick solution to change URL of checkout page. From this, you can change URLs of wishlist page and customers’ my account page as well.
Basic checkout page URL is something like:
domain.com/checkout
domain.com/checkout/#shipping
domain.com/checkout/#payment
Sometimes you may face issue with mini cart update or with AJAX cart extension as you have made changes in route file of Magento. This will require you to fix up the section reloading while using AJAX.
Hope you have found this effective rewrite trick useful and it will definitely help you creating fancy URLs in Magento.
Feel free to contact if you have any queries regarding. We would appreciate your comments and suggestions.
In the world of business, understanding financial metrics is crucial for making informed decisions and…
Welcome to the MageComp Monthly Digest, where we bring you the latest updates, releases, and…
In this era, businesses are always on the lookout for ways to engage with their…
Managing a Shopify store efficiently involves keeping your product catalog organized. This includes removing outdated…
E-commerce has transformed the way consumers shop for products and services and interact with businesses.…
The e-commerce world is constantly in flux. New tech and strategies emerge daily to help…
View Comments
Would it be possible to update snippets, since they appear to be empty ?
I need to make
domain.com/checkout/#shipping -> domain.com/checkout/step/shipping or something in that direction
its not working can exaplin in details?
Hello guys,
I got that answer
http://magento.stackexchange.com/questions/100615/magento-2-how-can-refresh-minicart-cache-after-clear-cart-session-and-place-orde
Glad to hear :)
Hello How to update mini cart in magento 2 actually we created quick view when tou added product to cart then
mini cart is not updated after page refresh it shows can you tell how do it in jquery or code
Try placing this code in ajax success method,
if (typeof extendFunctions !== "undefined" && typeof extendFunctions.showMiniCart !== "undefined") {
extendFunctions.showMiniCart.each(function(item_function, index) {
if(jQuery.isFunction(item_function)) {
item_function(data);
}
})
}
if(mobilecheck()) {
jQuery('html, body').animate({ scrollTop: 0 }, 'slow');
}
Hi,
I create a order programmability but my mini-cart cache not showing item in this and when i click on this showing cart is empty.
So how can i refresh mini-cart cache?
Hi Prince Yadav,
Generally in Magento 1, mini cart can be updated using following code. You can try implementing it in your script.
$miniCart = $this->getLayout()
->createBlock('checkout/cart_sidebar')
->addItemRender('simple', 'checkout/cart_item_renderer', 'checkout/cart/sidebar/default.phtml')
->addItemRender('configurable', 'checkout/cart_item_renderer_configurable', 'checkout/cart/sidebar/default.phtml')
->setTemplate('checkout/cart/cartheader.phtml')
->toHtml();
And if you are using AJAX mini cart, use following code:
if (typeof extendFunctions !== "undefined" && typeof extendFunctions.showMiniCart !== "undefined") {
extendFunctions.showMiniCart.each(function(item_function, index) {
if(jQuery.isFunction(item_function)) {
item_function(data);
}
})
}
Drop us again if you need more help.