In a previous blog post we created a link which put more products to the Virtuemart cart and it is redirecting the user to the cart right away. It's a nonSEF URL that you may want to hide.
There are 2 ways to redirect the URL in this post:
J! redirect plugin
In the following there will be a redirection added to it for smoother user experience. It also comes handy if you are a marketer because you can use tinyurl or bitly instead of J! core Redirect plugin.
In this case we stick with J! Redirect plugin.
01 Type a non existing url into the 'Expired url' field.
02 Copy and paste the code below into the 'New url' field.
03 Set the status to Enabled.
04 It redirects the user to the cart page with products added at the same time.
Better user journey
with a pop-up
In order to give the best user experience for your users you can set up a new article (with menu item). Create an Engage box for it and after loading the page let your users know you are processing their request and you are setting up their cart.
The process will be the following:
01 We inform our customer there is a promotion or special offer. It can be via email or an advertising or just a simple link in your Joomla content.
02 The user clicks on the link and we redirect her to the /special-offer.html which is an empty article but there is an Engage Box loaded in.
03 Right after the page loaded the Engage Box pops up and a loader.gif shows that there is something happening, a process has been started.
04 There is a html redirection rule hidden in the Engage Box pop-up. Find the code here
05 The user is landing on the Virtuemart cart page with the products you set up earlier in her cart. Simple as that.
Engage box pop up settings
In the Advanced tab add the following:
<meta http-equiv="refresh" content="1;url=index.php?option=com_virtuemart&view=cart&task=add&virtuemart_product_id=316&quantity=1&task=add&virtuemart_product_id=314&quantity=1">
We recommend to add a Next button with the same link in the content part of the pop-up. If the redirection stops for some reason the user can navigate to the cart by clicking it.
The article is based on a Virtuemart forum thread.