Multiple product addtocart with redirection

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:

Redirecting via
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.

url redirection in joomla 3.x
Joomla Redirect manager

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.

/index.php?option=com_virtuemart&view=cart&task=add&virtuemart_product_id[]=316&quantity[]=1&virtuemart_product_id[]=314&quantity[]=1

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.
Like this:

User journey to the cart with engage box

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

Engage box popup settings
Content tab
Engage box popup settings
Trigger tab
Engage box popup settings
Assignments tab
Engage box popup settings
Advanced tab - html redirection goes here

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.


Blog


Cloudhoreca Kft. and this site is not affiliated with or endorsed by The Joomla! Project™. Any products and services provided through this site are not supported or warrantied by The Joomla! Project or Open Source Matters, Inc. Use of the Joomla!® name, symbol, logo and related trademarks is permitted under a limited license granted by Open Source Matters, Inc.