cancel
Showing results for 
Search instead for 
Did you mean: 

Cart not loading weights to shipping rates

SOLVED

Cart not loading weights to shipping rates

Hi All, 

I have an issue with my Magento 2.4.6 store and shipping rates. 
It seems it is not loading the weight to the cart, so no matter what is there it is 0 weight. 

 

Using table rates I set the weight to 1 and up and I receive no shipping quotes. it has to be set to 0 to get any rates returned. 


I have checked the database and weight is there and values are correct.
I have checked the weight in the backend to ensure it is not loading a virtual product, all good. 

 

I have extensions and themes, all of which have been turned off and the error is still present. 
I have removed all of the shipping extensions and just used table rates. The error is still present. 

I have googled like crazy and can see no similar issue and was hoping someone might have an idea? 

If not does anyone know the file that calls the shipping rates (weight/destination) to the cart so I can look into it there? 

Thank you

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Cart not loading weights to shipping rates

Issue Fixed.

We don't use stock levels, but you still need the check stock level in cart enabled for the system to work. 

Thank you. 

View solution in original post

5 REPLIES 5

Re: Cart not loading weights to shipping rates

When did this issue start occurring? What was the thing you did that caused it? Upgrade of Magento version?

 

Based on what you wrote you already tried, I can't think of any other obvious reason why this might be happening to you without turning on xdebug and figuring out exactly why 0 is returned for weight.

Founder at https://agency418.com

Re: Cart not loading weights to shipping rates

Thank you for your reply, 

Unfortunately I don't know when it started, we are close to launch and running final tests I came across the issue. 

I have a fresh install with the modules installed and its all working normally, I was hoping to find the file that calls all this to the cart and see if there is a difference from a base install file. 

Re: Cart not loading weights to shipping rates

Thanks to DHL's logs, 

It actually looks like the weight is being logged to the rates file, but all the QTY are 0

this is what loads to the matrix regardless of qty in checkout.  
quantity":0,"grams":80000.0,"price":344.37,"

No closer to a fix, but it explains why it is 0 weight but not a virtual product, the system is adding the qty to the Magento order but not the shipping methods query.
0 of anything is always 0kg

 

Re: Cart not loading weights to shipping rates

Issue Fixed.

We don't use stock levels, but you still need the check stock level in cart enabled for the system to work. 

Thank you. 

Re: Cart not loading weights to shipping rates

Hi @mikedevon4f84d,

 

As per magento default, table rates are working but also some cart rule is applying on shipping rates.

 

For Example when you add one product add to cart, table rates are working but when you add product qty 2 and total is greater than $50 shipping rates not working. for this check below cart price rule.

 

There is one cart rule in admin which name is :

 

Spend $50 or more - shipping is free!

 

Admin >> Marketing >> Cart Price Rules

 

you can see here Spend $50 or more - shipping is free!

 

INACTIVE this cart rule , Spend $50 or more - shipping is free! 2, When you test one product, please select a country, if you don't select a country, the system can't judge the range of shipping fee.
 New

If issue is still not resolved then check following:

 

Check Product Weights:

 

Ensure that the products in your catalog have weights assigned to them. You can check this in the product configuration under the "Weight" attribute.

 

Check Cart Weight Calculation:

 

Confirm that the cart is correctly calculating the total weight of the items added. You can check this in the shopping cart page.

 

Shipping Configuration:

 

Go to your Magento Admin Panel.

 

Navigate to Stores > Configuration > Sales > Shipping Methods.

 

Check the configuration settings for the shipping methods you are using (Table Rates in your case).

 

Verify that the "Weight vs. Destination" settings are configured correctly.

Table Rates CSV File:

 

If you are using Table Rates, ensure that your CSV file is correctly configured. The weight column in your CSV file should match the weights of your products.

 

Magento Cache:

 

Clear the Magento cache to ensure that any changes made to the configuration are reflected.

 

Check for Extensions:

 

If you have any third-party shipping or weight-related extensions installed, ensure they are compatible with Magento 2.4.6. Disable them temporarily to see if the issue persists.

 

Log Files:

 

Check Magento's log files for any error messages or warnings related to shipping. You can find these logs in the var/log directory of your Magento installation.

 

Magento Version Compatibility:

 

Ensure that your Magento version (2.4.6) is compatible with any third-party extensions you are using. Check the extension documentation or contact the extension provider for compatibility information.

 

Debugging:

 

If the issue persists, you may need to enable Magento developer mode and check for specific error messages. You can do this by running the following command in the Magento root directory

bin/magento deploy:mode:set developer

 

Check for any error messages or warnings on the frontend and in the log files.

Remember to backup your store before making any significant changes to the configuration.

 

If the issue will be resolved, Click Kudos & Accept as a Solution