# What is a cart transform in Shopify?

> A Shopify Function that changes the lines of a cart before checkout, such as merging several products into one bundle line, or expanding one line into the products it is made of.

URL: https://www.smootify.io/glossary/cart-transform

A cart holds one line per product variant. Sometimes a store wants the cart to show something else: a box of six wines as one line, or a product with its gift wrap and warranty as one item. A cart transform does that. It is a Shopify Function, a small piece of code that an app installs and that Shopify runs on every cart, so the cart, the checkout and the order all show the lines the same way.

A cart transform can:

- **merge** several lines into one, with its own title, image and price;
- **expand** one line into the products it is made of, so stock moves for each of them.

## In Webflow terms

There is no Webflow equivalent: a cart transform runs inside Shopify, on the cart, after the site has added the lines.

## In Smootify

Smootify’s **Magic Box** works with a cart transform. With Magic Box turned on in the Smootify dashboard, a box the customer fills, or a product with its add-ons, reaches the cart and the checkout as one line, with the products inside it. Magic Box is free, on every plan, and always needs to be turned on.

| The customer… | Use | Set up in |
|---|---|---|
| buys a set you decided | a fixed bundle (this page) | the Shopify Bundles app |
| fills a box with products they choose | [Magic Box](https://www.smootify.io/docs/features/magic-box) | Your site and a Magic Box entry |
| adds extras to one product | [add-ons](https://www.smootify.io/docs/features/add-ons) | the product's **Add ons** metafield |

More in [Magic Box](https://www.smootify.io/docs/features/magic-box) and [Add-ons](https://www.smootify.io/docs/features/add-ons).
