To add a cart summary anywhere in your theme template use these few lines of code. The number of items in the cart and the total value will be displayed. This summary also acts as a link to the cart.
This snippet adds an extra line in the cart under product name, to show the category or categories.
You may want to include a free “gift” or bonus item when a certain product has been added to the cart. With this code, if a product with a set ID is added to the cart, another product automatically gets added as well. The second product should have price = 0 if it is to … Read moreAdd a gift item to the cart when another item added
On some sites a cart may be completely unnecessary. You may only have one product and the quantity selector might be superfluous. Forcing the customer to go through the cart page is pointless step and just adds another step where you might lose the sale. First disable the cart in Classic Commerce > Settings > … Read moreSkip cart and go straight to checkout
In some shops the SKU is a very important reference for the customer, so it can be useful to show it with the product name on the cart. This allows the customer to double check they are ordering exactly the item they need. This code adds the SKU (if there is one) under the product … Read moreShow SKU in the cart
You can restrict the display of prices and only allow items to be added to the cart for logged in users. This might be useful if, for example, you are a wholesaler and only want your retail clients to be able to see your prices.
This code allows to you offer set discounts when a customer buys in bulk. The price is adjusted in the cart automatically. Change the thresholds and discount percentage to suit your purpose.
This code displays the total cart weight to the customer on the cart and checkout pages.
If you want to restrict orders based on a maximum or minimum order weight, you can do so with the following code. This function displays an error message for total cart weights above 100 in three places – on the cart page, on the checkout page and when an order is initiated. The order will … Read moreDeny checkout based on cart weight
To streamline the checkout process you can combine the cart with the checkout page to make a single-step checkout process.