# Shopping Cart

The Shopping Cart component renders a fully functional shopping cart. It lets users change product quantities and remove products and finish their checkout. Payments are transferred to the linked PayPal/Stripe account and orders are recorded in Reflow's control panel.

# Examples

# How to Embed

To embed this component on your website and display a list of products, include the reflow library, and add the following tag somewhere in the <body> of your page:

<div data-reflow-type="shopping-cart"></div>

# Supported Attributes

To change the behavior of the shopping cart, you can pass the following data-reflow-xxx attributes.

Attribute Possible Values Description
data-reflow-type shopping-cart Must always be set.
data-reflow-success-url URL (optional) The URL where the customer will be redirected after a successful payment. It is a good practice to redirect the customer to a "Thank You" page explaining what the next steps are. If not set, defaults to the current page.

Additional parameters will be added to the URL for connecting with the Order Status component (read more).

Examples:
  • data-reflow-success-url="https://example.com/thankyou.html"
  • data-reflow-success-url="/thankyou.html"
data-reflow-cancel-url URL (optional) The URL where the customer will be redirected after a failed or cancelled payment. Normally you would want to redirect the customer to a page explaining what's happened, with a link to the cart so they can try purchasing again or contacting you.

Examples:
  • data-reflow-cancel-url="https://example.com/failure.html"
  • data-reflow-cancel-url="/failure.html"