Acil müdahale gerektiren bir sorununuz mu var?Acil müdahale mi?Acil yardım alın →
Blog

MageBooster ekibinden upgrade, güvenlik, hız ve taşıma üzerine pratik Magento 2 rehberleri.

Magento 2.4.9 shipping methods: Flat Rate, Free Shipping, Table Rates and Matrix Rate (Lesson 15)

Magento 2.4.9 shipping: Flat Rate per order or per item, Free Shipping from a minimum amount, Table Rates from a CSV at Website scope, and the free Matrix Rate extension installed with Composer, checked in the cart and at checkout.
Ders 15MageBooster Dersleri · Magento 2.4.9

Magento shipping methods: Flat Rate, Free Shipping, Table Rates and Matrix Rate

Magento brings three shipping methods that need no carrier account: Flat Rate, Free Shipping and Table Rates. In this lesson we set all three, import a table rates CSV at Website scope, install one free, open-source extension with Composer (WebShopApps Matrix Rate) for several delivery types per country, and check every price in the cart and at checkout. Every command and both CSV files can be copied or downloaded. All prices are example values.

Güncelleme November 2026Video yaklaşık 7 dkSeviye Mağaza sahipleri ve geliştiriciler

Flat Rate and Free Shipping

In the 2.4.9 admin the shipping methods are under Stores › Configuration › Sales › Delivery Methods. The address your parcels ship from is Shipping Settings › Origin; we set it in Ders 4. The same page also lists In-Store Delivery, UPS, USPS, FedEx and DHL: those need an account with the carrier.

AyarOur valueNot
Flat Rate › TypePer OrderThe default is Per Item: the price is charged for every item in the cart.
Flat Rate › Price5.00Example value.
Free Shipping › EnabledEvet
Free Shipping › Minimum Order Amount100Compared with the subtotal after discounts.
Free Shipping › Include Tax to AmountEvetOur catalog prices include VAT (Lesson 12), so 100 means 100 with VAT.
Free Shipping › Show Method if Not ApplicableHayırWith Yes the method is listed with its error message even when the cart does not qualify.
Table Rates › ConditionWeight vs. DestinationOther choices: Price vs. Destination, # of Items vs. Destination.

Luma sample data: the cart price rule Spend $50 or more – shipping is free! (Marketing › Cart Price Rules) is active after a sample data install. We measured on our 2.4.9 test server that it marks every cart from 50 (without VAT) for free shipping: Free Shipping then shows long before your minimum amount, and Table Rates and Matrix Rate calculate with 0 kg, so they always charge their first weight line. We switched the rule off before recording.

Table Rates and the CSV file

Five columns: country (ISO code), region/state, postcode, the condition value (here: weight and above, in your weight unit) and the price. * means any; a * country line covers every other country.

tablerates.csvİndir

Country,Region/State,Zip/Postal Code,Weight (and above),Shipping Price
GB,*,*,0,4.90
GB,*,*,2,6.90
DE,*,*,0,9.90
DE,*,*,2,12.90
NL,*,*,0,9.90
NL,*,*,2,12.90
*,*,*,0,19.90

Example prices. Edit it in a spreadsheet and save as CSV.

Or create and view it on a server:

cat > tablerates.csv <<'EOF'
Country,Region/State,Zip/Postal Code,Weight (and above),Shipping Price
GB,*,*,0,4.90
GB,*,*,2,6.90
DE,*,*,0,9.90
DE,*,*,2,12.90
NL,*,*,0,9.90
NL,*,*,2,12.90
*,*,*,0,19.90
EOF

column -s, -t tablerates.csv

The import belongs to a website: switch the admin Scope → Main Website (your website), open Table Rates, use Export CSV to get the current rates in the exact format, choose your file under Import ve Save Config. Magento replaces that website’s rates for the selected condition.

Matrix Rate with Composer

WebShopApps Matrix Rate (webshopapps/module-matrixrate) is a free, open-source carrier from ShipperHQ, version 20.5.3, released 22 October 2026, licence OSL-3.0 and AFL-3.0. Like Table Rates it reads a CSV per website, but every line has a delivery type, so one country can get Standard and Express, with weight (or price, or quantity) ranges and optional city and postcode columns. Its composer file sets no PHP or Magento version limits, so we installed and tested it on our Magento 2.4.9 / PHP 8.5 test server before recording.

As the Magento file owner, in the Magento folder (the store runs in production mode):

bin/magento maintenance:enable

composer require webshopapps/module-matrixrate

composer show webshopapps/module-matrixrate | grep -E '^(name|versions|released|license|source)'

bin/magento module:enable WebShopApps_MatrixRate && bin/magento setup:upgrade

bin/magento setup:di:compile

bin/magento setup:static-content:deploy -f en_US en_GB de_DE

bin/magento maintenance:disable && bin/magento cache:flush

bin/magento module:status WebShopApps_MatrixRate

Then as root, because OPcache on our server does not check files for changes (Lesson 1):

systemctl reload php8.5-fpm

Matrix Rate settings and CSV

Delivery Methods now has WebShopApps Matrix Rate (it starts with a ShipperHQ box about their paid service; the settings are below). Default Config: Enabled Yes, Title Parcel (shown above the delivery types), Condition Weight vs. Destination, Save Config. Then Scope Main Website, Import the file, Save Config.

matrixrates.csvİndir

Country,Region/State,City,Zip/Postal Code From,Zip/Postal Code To,Weight From,Weight To,Shipping Price,Delivery Type
GB,*,*,*,*,0,10,3.95,Standard
GB,*,*,*,*,10,*,7.95,Standard
GB,*,*,*,*,0,*,8.95,Express
DE,*,*,*,*,0,10,6.95,Standard
DE,*,*,*,*,10,*,11.95,Standard
DE,*,*,*,*,0,*,14.95,Express
NL,*,*,*,*,0,10,6.95,Standard
NL,*,*,*,*,10,*,11.95,Standard
NL,*,*,*,*,0,*,14.95,Express

Columns: Country, Region/State, City, Zip/Postal Code From, Zip/Postal Code To, Weight From (exclusive), Weight To (inclusive), Shipping Price, Delivery Type. * in Weight To = no upper limit. Example prices.

cat > matrixrates.csv <<'EOF'
Country,Region/State,City,Zip/Postal Code From,Zip/Postal Code To,Weight From,Weight To,Shipping Price,Delivery Type
GB,*,*,*,*,0,10,3.95,Standard
GB,*,*,*,*,10,*,7.95,Standard
GB,*,*,*,*,0,*,8.95,Express
DE,*,*,*,*,0,10,6.95,Standard
DE,*,*,*,*,10,*,11.95,Standard
DE,*,*,*,*,0,*,14.95,Express
NL,*,*,*,*,0,10,6.95,Standard
NL,*,*,*,*,10,*,11.95,Standard
NL,*,*,*,*,0,*,14.95,Express
EOF

column -s, -t matrixrates.csv

Check the imports

A quick look at both tables (as root; magento is our database name):

mariadb magento -e "SELECT dest_country_id AS country, condition_value AS kg_from, price FROM shipping_tablerate WHERE website_id = 1 AND condition_name = 'package_weight'"

mariadb magento -e "SELECT dest_country_id AS country, condition_from_value AS kg_from, condition_to_value AS kg_to, price, shipping_method FROM webshopapps_matrixrate"

Our result: 7 table rate rows (country 0 is the * line) and 9 Matrix Rate rows (a * in Weight To is stored as 10,000,000).

Cart and checkout

On the storefront: the MageBooster Travel Mug from Lesson 10 (24.00, 0.4 kg), then the cart’s Estimate Shipping and Tax. What our test store showed with the example files:

SepetÜlkeParcel (Matrix Rate)Best Way (Table Rate)Flat RateFree Shipping
1 mug, 24.00, 0.4 kgUnited KingdomStandard 3.95 · Express 8.954.905.00not shown
1 mug, 24.00, 0.4 kgAlmanyaStandard 6.95 · Express 14.959.905.00not shown
5 mugs, 120.00, 2 kgAlmanyaStandard 6.95 · Express 14.9512.905.000.00

The checkout’s shipping step lists the same methods and prices. Cart and checkout pages are not cached by Varnish, so new rates show at once; after changing settings, a bin/magento cache:flush never hurts.

İndirmeler

shipping-commands.shİndir

#!/bin/bash
# MageBooster Lesson 15: shipping methods in Magento 2.4.9 + the free Matrix Rate extension. Run the parts one by one on the server.
# 1) The table rates file (or download tablerates.csv), then import it in the admin at Website scope
cat > tablerates.csv <<'EOF'
Country,Region/State,Zip/Postal Code,Weight (and above),Shipping Price
GB,*,*,0,4.90
GB,*,*,2,6.90
DE,*,*,0,9.90
DE,*,*,2,12.90
NL,*,*,0,9.90
NL,*,*,2,12.90
*,*,*,0,19.90
EOF
column -s, -t tablerates.csv

# 2) Install Matrix Rate (as the Magento file owner, in the Magento folder; production mode)
cd /var/www/magento
bin/magento maintenance:enable
composer require webshopapps/module-matrixrate
composer show webshopapps/module-matrixrate | grep -E '^(name|versions|released|license|source)'
bin/magento module:enable WebShopApps_MatrixRate && bin/magento setup:upgrade
bin/magento setup:di:compile
bin/magento setup:static-content:deploy -f en_US en_GB de_DE    # your admin + store view locales
bin/magento maintenance:disable && bin/magento cache:flush
bin/magento module:status WebShopApps_MatrixRate
# as root: OPcache without timestamp checks needs a PHP-FPM reload (your PHP version)
systemctl reload php8.5-fpm

# 3) The Matrix Rate file (or download matrixrates.csv), then import it in the admin at Website scope
cat > matrixrates.csv <<'EOF'
Country,Region/State,City,Zip/Postal Code From,Zip/Postal Code To,Weight From,Weight To,Shipping Price,Delivery Type
GB,*,*,*,*,0,10,3.95,Standard
GB,*,*,*,*,10,*,7.95,Standard
GB,*,*,*,*,0,*,8.95,Express
DE,*,*,*,*,0,10,6.95,Standard
DE,*,*,*,*,10,*,11.95,Standard
DE,*,*,*,*,0,*,14.95,Express
NL,*,*,*,*,0,10,6.95,Standard
NL,*,*,*,*,10,*,11.95,Standard
NL,*,*,*,*,0,*,14.95,Express
EOF
column -s, -t matrixrates.csv

# 4) Check both imports (as root, database "magento"; use your own database name/login)
mariadb magento -e "SELECT dest_country_id AS country, condition_value AS kg_from, price FROM shipping_tablerate WHERE website_id = 1 AND condition_name = 'package_weight'"
mariadb magento -e "SELECT dest_country_id AS country, condition_from_value AS kg_from, condition_to_value AS kg_to, price, shipping_method FROM webshopapps_matrixrate"
shipping-config.shİndir

#!/bin/bash
# MageBooster Lesson 15: the Default Config shipping settings of the lesson, from the command line instead of the admin.
# The CSV imports are admin-only (Stores > Configuration > Sales > Delivery Methods, scope Main Website).
cd /var/www/magento
sudo -u magento bin/magento config:set carriers/flatrate/active 1
sudo -u magento bin/magento config:set carriers/flatrate/type O            # O = Per Order, I = Per Item (default)
sudo -u magento bin/magento config:set carriers/flatrate/price 5.00
sudo -u magento bin/magento config:set carriers/freeshipping/active 1
sudo -u magento bin/magento config:set carriers/freeshipping/free_shipping_subtotal 100
sudo -u magento bin/magento config:set carriers/freeshipping/tax_including 1
sudo -u magento bin/magento config:set carriers/freeshipping/showmethod 0
sudo -u magento bin/magento config:set carriers/tablerate/active 1
sudo -u magento bin/magento config:set carriers/tablerate/condition_name package_weight   # or package_value_with_discount, package_qty
sudo -u magento bin/magento config:set carriers/matrixrate/active 1
sudo -u magento bin/magento config:set carriers/matrixrate/title Parcel
sudo -u magento bin/magento config:set carriers/matrixrate/condition_name package_weight
sudo -u magento bin/magento cache:clean config

Sorun giderme

BelirtiNeden ve çözüm
Free Shipping shows below your minimum amount; table or matrix rates never change with weightA cart price rule with free shipping is active (Luma sample data: “Spend $50 or more – shipping is free!”). Switch it off in Marketing › Cart Price Rules.
No Import / Export for Table Rates or Matrix RateThey only appear at Website scope: change the Scope switcher to your website.
Import error “Please correct … in Row #”Check the column count, ISO country codes (DE, not Germany), region codes and decimal points. Export CSV first and keep its format.
A method is missing for a countryNo CSV line matches that country and weight, or Ship to Applicable Countries limits it. Add a * country line as a fallback.
Flat Rate is much higher than expectedType is Per Item (the default): the price is multiplied by the number of items.
The admin or storefront looks broken after the installProduction mode: run setup:di:compile ve setup:static-content:deploy for your locales, then flush the cache and reload PHP-FPM.

Sonraki ders

Lesson 16: Store languages: English, Turkish and German store views.

Shipping rules getting complicated?We set up Magento shipping, rates and carriers for shops.

▶ Tüm MageBooster derslerini YouTube’da izleyin: sırayla tüm dersler · kanala abone olun

Bu sayfada bir hata mı gördünüz? Bize bildirin, hemen düzeltelim.

Ücretsiz Site Analizi

Mağaza bilgilerinizi gönderin. Hız, güvenlik ve eklentileri inceleyip 3 iş günü içinde hemen uygulayabileceğiniz üç iyileştirme önerisiyle size dönelim.

Konuşalım

Teklif alın

Mağazanızdan bahsedin, bir iş günü içinde size dönelim. Sohbet etmeyi mi tercih edersiniz? WhatsApp'tan yazın

MageBooster UnoPim demosu talep edin UnoPim’i sizinkine benzer ürünlerle canlı görün. Yeni bir PIM ya da Akeneo’dan geçiş: plan, zaman çizelgesi ve teklifle dönüyoruz.
✓ Resmi UnoPim partneri✓ Ekibiniz için yapay zeka asistanı✓ Magento’ya bağlı
MageBooster Hyvä projenizi başlatın Sıfırdan ya da mevcut mağazanızdan. Proje planı, zaman çizelgesi ve teklifle dönüyoruz.
✓ Tasarım ve kurgu bizden✓ Hyvä’ya optimize sunucu✓ Bonus modüller dahil

MageBooster

Size ulaşalım

Bilgilerinizi ve mağaza adresinizi bırakın. Önce mağazanıza bakıyoruz, ardından bir iş günü içinde tercih ettiğiniz yoldan, telefon, WhatsApp ya da e-posta ile size ulaşıyoruz.

Partnerimiz olun