[Skip to main content](#vessel-content)

#   Redirect to "My Cart" view instead of Checkout

##

- **[brettv](/forum/user/68705-brettv "View brettv's Profile")**
- [![brettv's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/68705-brettv "View brettv's Profile") Topic Author
- [ Offline](/forum/user/68705-brettv)

Less More

- Posts: 48
- Thank you received: 5
-
-

1 year 8 months ago [\#366235](#366235) by [brettv](/forum/user/68705-brettv "View brettv's Profile")  *[Redirect to "My Cart" view instead of Checkout](/forum/27-checkout/909256-redirect-to-my-cart-view-instead-of-checkout#366235 "-- HikaShop version -- : 5.1.5 -- Joomla version -- : 5.2.3 -- PHP version -- : 8.1.31  Hello,  If I take the &quot;Add to cart HTML link&quot; provided in the product view, it gives me something like: index.php?option=com&#95;hikashop&amp;ctrl=product&amp;task=updatecart&amp;quantity=1&amp;cid=4&amp;Itemid=128  Which, when inputted goes directly to the checkout view.  Instead, I would like to redirect to the Cart Display view, which is index.php?option=com&#95;hikashop&amp;view=cart&amp;layout=show  How do I do this?  I tried combining everything into index.php?option=com&#95;hikashop&amp;view=cart&amp;layout=show&amp;ctrl=product&amp;task=updatecart&amp;quantity=1&amp;cid=4&amp;Itemid=128 But that just sent me to the checkout instead of the cart display.  thanks in advance.")* was created by *[brettv](/forum/user/68705-brettv "View brettv's Profile")*

-- HikaShop version -- : 5.1.5
-- Joomla version -- : 5.2.3
-- PHP version -- : 8.1.31

Hello,

If I take the "Add to cart HTML link" provided in the product view, it gives me something like:
index.php?option=com_hikashop&amp;ctrl=product&amp;task=updatecart&amp;quantity=1&amp;cid=4&amp;Itemid=128

Which, when inputted goes directly to the checkout view.

Instead, I would like to redirect to the Cart Display view, which is index.php?option=com_hikashop&amp;view=cart&amp;layout=show

How do I do this?

I tried combining everything into index.php?option=com_hikashop&amp;view=cart&amp;layout=show&amp;ctrl=product&amp;task=updatecart&amp;quantity=1&amp;cid=4&amp;Itemid=128
But that just sent me to the checkout instead of the cart display.

thanks in advance.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0LzkwOTI1Ni1yZWRpcmVjdC10by1teS1jYXJ0LXZpZXctaW5zdGVhZC1vZi1jaGVja291dD90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86581
- Thank you received: 14322
-
-

1 year 8 months ago [\#366238](#366238) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Redirect to "My Cart" view instead of Checkout](/forum/27-checkout/909256-redirect-to-my-cart-view-instead-of-checkout#366238 "-- HikaShop version -- : 5.1.5 -- Joomla version -- : 5.2.3 -- PHP version -- : 8.1.31  Hello,  If I take the &quot;Add to cart HTML link&quot; provided in the product view, it gives me something like: index.php?option=com&#95;hikashop&amp;ctrl=product&amp;task=updatecart&amp;quantity=1&amp;cid=4&amp;Itemid=128  Which, when inputted goes directly to the checkout view.  Instead, I would like to redirect to the Cart Display view, which is index.php?option=com&#95;hikashop&amp;view=cart&amp;layout=show  How do I do this?  I tried combining everything into index.php?option=com&#95;hikashop&amp;view=cart&amp;layout=show&amp;ctrl=product&amp;task=updatecart&amp;quantity=1&amp;cid=4&amp;Itemid=128 But that just sent me to the checkout instead of the cart display.  thanks in advance.")*

Hi,

You can add a parameter "return_url" with the URL you want to use after the add to cart.
That parameter has to have the URL in base64 and urlencoded. And it needs to be the full URL.

For example, suppose that the HTML add to cart URL of your product is: Code:

https://www.hikashop.com/index.php?option=com_hikashop&amp;ctrl=product&amp;task=updatecart&amp;add=1&amp;cid=1

(it's actually the URL to add HikaShop Essential to the cart on our website)
As on your website, this URL redirects to the checkout of our website.
Once you have something in your cart on our website, you can access the cart page with the URL: Code:

https://www.hikashop.com/marketplace/cart/show.html

To get this URL in base64, you can use [ www.base64encode.org/](https://www.base64encode.org/) and you'll get: Code:

aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL21hcmtldHBsYWNlL2NhcnQvc2hvdy5odG1s

Then, you want to urlencode it, with for example, [ www.urlencoder.org/](https://www.urlencoder.org/)
In this case, the base64 value will still be the same after the urlencode, but it might not be the case all the time.
Then, you can add the parameter to the URL: Code:

https://www.hikashop.com/index.php?option=com_hikashop&amp;ctrl=product&amp;task=updatecart&amp;add=1&amp;cid=1&amp;return_url=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL21hcmtldHBsYWNlL2NhcnQvc2hvdy5odG1s

The following user(s) said Thank You: [brettv](/forum/user/68705-brettv "View brettv's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0LzkwOTI1Ni1yZWRpcmVjdC10by1teS1jYXJ0LXZpZXctaW5zdGVhZC1vZi1jaGVja291dD90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[brettv](/forum/user/68705-brettv "View brettv's Profile")**
- [![brettv's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/68705-brettv "View brettv's Profile") Topic Author
- [ Offline](/forum/user/68705-brettv)

Less More

- Posts: 48
- Thank you received: 5
-
-

1 year 8 months ago [\#366261](#366261) by [brettv](/forum/user/68705-brettv "View brettv's Profile")  Replied by *[brettv](/forum/user/68705-brettv "View brettv's Profile")* on topic *[Redirect to "My Cart" view instead of Checkout](/forum/27-checkout/909256-redirect-to-my-cart-view-instead-of-checkout#366261 "-- HikaShop version -- : 5.1.5 -- Joomla version -- : 5.2.3 -- PHP version -- : 8.1.31  Hello,  If I take the &quot;Add to cart HTML link&quot; provided in the product view, it gives me something like: index.php?option=com&#95;hikashop&amp;ctrl=product&amp;task=updatecart&amp;quantity=1&amp;cid=4&amp;Itemid=128  Which, when inputted goes directly to the checkout view.  Instead, I would like to redirect to the Cart Display view, which is index.php?option=com&#95;hikashop&amp;view=cart&amp;layout=show  How do I do this?  I tried combining everything into index.php?option=com&#95;hikashop&amp;view=cart&amp;layout=show&amp;ctrl=product&amp;task=updatecart&amp;quantity=1&amp;cid=4&amp;Itemid=128 But that just sent me to the checkout instead of the cart display.  thanks in advance.")*

Just to be clear, I seem to be getting the same results with these two URLs. Is that normal?

The return_url parameter takes a BASE64 encoded URL Code:

index.php?option=com_hikashop&amp;ctrl=product&amp;task=updatecart&amp;data[1]=1&amp;add=1&amp;Itemid=672&amp;return_url=cGFuaWVy

and the url parameter must be URL encoded (with slashes replaced by %2F) Code:

index.php?option=com_hikashop&amp;ctrl=product&amp;task=updatecart&amp;data[1]=1&amp;add=1&amp;Itemid=672&amp;url=panier

Those two approaches are equivalent? Thanks.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0LzkwOTI1Ni1yZWRpcmVjdC10by1teS1jYXJ0LXZpZXctaW5zdGVhZC1vZi1jaGVja291dD90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86581
- Thank you received: 14322
-
-

1 year 8 months ago [\#366263](#366263) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Redirect to "My Cart" view instead of Checkout](/forum/27-checkout/909256-redirect-to-my-cart-view-instead-of-checkout#366263 "-- HikaShop version -- : 5.1.5 -- Joomla version -- : 5.2.3 -- PHP version -- : 8.1.31  Hello,  If I take the &quot;Add to cart HTML link&quot; provided in the product view, it gives me something like: index.php?option=com&#95;hikashop&amp;ctrl=product&amp;task=updatecart&amp;quantity=1&amp;cid=4&amp;Itemid=128  Which, when inputted goes directly to the checkout view.  Instead, I would like to redirect to the Cart Display view, which is index.php?option=com&#95;hikashop&amp;view=cart&amp;layout=show  How do I do this?  I tried combining everything into index.php?option=com&#95;hikashop&amp;view=cart&amp;layout=show&amp;ctrl=product&amp;task=updatecart&amp;quantity=1&amp;cid=4&amp;Itemid=128 But that just sent me to the checkout instead of the cart display.  thanks in advance.")*

Hi,

Yes, almost. On some Joomla websites, if you put a urlencoded URL in a URL, the routing system won't work properly and it will create erratic behaviors.
This was the case in the past with SH404SEF in some cases for example.
That's why we switched from the "url" parameter to the "return_url" parameter 10 years ago.
By using a base64 encoded URL with the return_url, you're sure you'll circumvent that kind of issues with the routing system and that's why I talked about the return_url parameter in my previous answer and didn't mention the "url" parameter.

So, if possible, I would still recommend going for the return_url parameter if you can. You'll potentially save yourself hours of complications years in the future.

The following user(s) said Thank You: [brettv](/forum/user/68705-brettv "View brettv's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0LzkwOTI1Ni1yZWRpcmVjdC10by1teS1jYXJ0LXZpZXctaW5zdGVhZC1vZi1jaGVja291dD90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.046 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
