• Home
  • Joomla services
    • Joomla website building
    • Emergency services for Joomla
    • Joomla support
    • Joomla, Virtuemart SEO
    • PageSpeed services
    • J! extension development
    • More Joomla services
      • Joomla hosting
      • Template services
      • PSD to Joomla
      • Content management services
      • Web portal development
  • Joomla extensions
    • Rel link plugin
    • Virtuemart Reorder
    • Pure CSS FAQ module
    • Admin notes
    • Accessibility plugin for J3!
    • Livesession plugin
    • Meta data for Joomla!
    • VM Crosslink
  • Software development
    • Web portal development
    • Custom software development
    • Metabase support services
    • ERP software development
  • Blog
  • Contact

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:

  • Redirect via plugin
  • Using an EngageBox popup

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.

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  

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

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

Content tab
Trigger tab
Assignments tab
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.

By Oliver Menyhart

Blog
Modified Date 2022-12-01
Published: 2022-01-20
 
  • Home /
  • Blog /
  • Multiple product addtocart with redirection
Joomla services
  • Joomla extension development
  • Pagespeed
  • Joomla Support
  • J! website building
  • Web portal development
  • Joomla hosting
  • Content management services
  • Joomla, Virtuemart SEO
  • Template development and optimization
  • Psd to Joomla
  • Emergency services
Software development
  • Custom software development
  • Metabase support and development
  • Our Joomla extensions
Contact
  • Contact details
  • Company details
  • Write to us!

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.


close amphtml version