Need to charge shipping fees on your Shopify store based on the number of products in your cart? Unfortunately, this isn't included by default in the basic version of Shopify.
But the good news is that it is still possible to configure this yourself quickly without any technical development and without needing to go through a Shopify agency .
There are many solutions, but here we'll give you the Shopify tip that we think is the most practical for charging shipping costs based on the number of products.
Please feel free to use the comments below to let us know if you have any relevant Shopify apps to address this issue. In most cases, we always avoid adding apps if it's possible to go through a simple setup.
How can I have variable shipping costs depending on the number of items in the basket?
A priori, if you charge shipping costs based on the quantity of products, it means that you are not charging shipping costs based on the weight of the products.
And that's the whole trick we're going to use. Indeed, Shopify's default function is to charge shipping costs based on the package's weight .
So we're just going to do the same thing here. We're going to indicate a standard weight on all product sheets, for example 10 grams for each item.

Then, in the Shopify shipping costs, we will be able to count the number of items in the cart. Indeed, if the cart is 30 “virtual” grams, there are 3 products in the cart. If the cart is 90 grams, there are 9 products.
The key here is to assign the same weight to ALL items. Otherwise, it won't work. This may seem like "basic" e-commerce advice , but use a simple system: 1 gram, 10 grams, 100 grams, 1 kilo for each product.
Then, you just need to go to the transport settings and configure a new rate with the following conditions for a product:

You can therefore precisely configure shipping costs based on the number of products in your customer's basket.
Please note that the 10 grams are purely indicative and any number can be used as long as it is similar for each product.
You can of course create multiple shipping cost ranges. You can imagine shipping costs for 1 product, for 5 products and then for 10 products. In this case you need to create 3 rules in Shopify .
There you have it, you have just created shipping costs that will vary automatically depending on the number of products!