Tutorials & Solutions
Orders management
Inventory and shipping
Rates & Benefits
Master Data
Message Center
Sales Policies
Account management
Credit Control
Projects & Integrations

What is the shared cart

Clara Baluz
Clara Baluz
Last updated

The shared cart is a tool that allows more than one customer to add, remove or update items and informations from the same cart.

For your customer, the shared cart means practicality when making a purchase. For your store, it means:

  • Opportunity for a larger sale.
  • Lower logistics effort.
  • Single order flow.

How this is technically possible

We started using a parameter in the URL to identify the cart. As a result, the URL can be shared with other users, who can view the items, add and remove products, and even pay for the order.

However, for users already registered in the plataform (whose data is filled automatically in the checkout), all personal informations are secure: only the informations' owner has access to them, after he is authenticated in the store.

Information security

The payment is still done by one person whose informations remain secure, since the profile and delivery data are visible only to the user who creates the cart. For others, these same data are masked because, with the shared cart, the cart does not have a single owner anymore, only the data has.

Changes to the checkout URL

As informed, we have a new parameter in the checkout URLs to identify the cart. However, the feature is optional, not impacting stores that do not use it.

In order to use this feature, simply insert the parameter (also called querystring) orderFormId, with the ID of the cart you want to access. The cart ID can be obtained from the checkout APIs - facilitated with VTEX.js.

Default URL: http://www.site.com/checkout/#/cart

URL for sharing: http://www.site.com/checkout/?orderFormId=31155bb8fd6944c99829c171aa8ed5c4#/cart

The querystring (?orderFormId=...) must be placed before the "hash" (#/cart)

Please note that, as new parameters are inserted, the page crawling that is based on the URL can be affected. Therefore, it is necessary to adapt it to continue viewing those same pages as being from the checkout.

One change we can make is in the URLs of the Google Analytics conversion funnel, because it relies solely on the addresses that customers browsed. In order to have a funnel compatible with the additional parameters, see the rules updated in our article on how to set up the sales funnel on Google Analytics.

Other scenarios should be checked with your marketing team and service providers.

Practical use of the shared cart

Summarizing all the previous informations, it is necessary to:

  • adapt the page crawling services so they become compatible with the new URL parameter (Google Analytics, for example);
  • use VTEX APIs to obtain the cart ID;
  • customize the cart's page to provide its link to the user com base no ID obtido.
Still got questions?
Ask the community
Find solutions and share ideas in VTEX's community.
Talk to our experts
Get in touch if you have something specific to ask about the platform.
  • PT
  • ES
VTEX website