M2M2: Product has weight issue

Published on 03 Apr 2019 , edited on 23 Apr 2019

So the migration succeeded (quite mysteriously I must add) and it looks like we have all data;

  • Customers
  • Orders
  • Products
  • Categories
  • Attributes

But there are some things missing, most notably there are no products shown on the frontend. Main lead on this is that there is a storeview missing which gives Fatal Erros in the backend.

Getting products to show

So what I did was just to create the missing storeview in the backend, and although it crashed the database a couple of times (it appears to be a hyper intensive task) it eventually pulled through. This resolved the errors in the category management, but it still doesn’t show my products.

So I installed Visibility Grid to help me see why. It shows that none of the products are visible in the categories, but doesn’t tell me why. Whenever I open and save a product, it does list as “Visisble on category” in the extension, but it still won’t show on the frontend.

And after digging and digging through the web I saw someone mention “the weight”.

And product weight was something I hadn’t checked (who would think to, right?). And sure enough, it was the weight. But the way it is an issue makes for another interesting bug to fix..

Product’s weight issue

So it turns out every product with the “has weight” toggle set to yes but with a weight of 0 or null is automatically added as a virtual product. Because which physical product would have a weight of 0 right? Right.

But it appears the status of the product (being virtual or simple) has no bearing on it showing or not. Just the weight toggle. Not the actual weight number, but if it is true or not. Toggling this setting once in the backend makes that product appear in the frontend. So this should be relatively easy to bulk-update, but it isn’t because of course it isn’t.

It appears that the whole crux of the issue is the product_has_weight toggle. There are a few known bugs around this, and they probably originated in the migration tool. So the facts we know are this: If I open a product in the backend, toggle the has_weight in any way and save it, it gets shown. As far as I know now, there is no way to do this in bulk or via the database (yet) (source)

Most topics dealing with this issue suggest to bulk update the product type from virtual to simple. This isn’t the issue in my case, sadly. Until I learn of a good way to edit the product_has_weight attribute in bulk, I’ll focus on the modules and frontend and hope that that bugfix is coming through soon.

https://blog.mdnsolutions.com/magento-2-missing-weight-field-on-backend-and-wrong-virtual-product-types/

Update: The latest 2.3.1 update seems to have fixed the issue, thankfully!

M2M2

Moving To Magento Two; A big move from multiple Magento 1.9.x systems to Magento 2.x. Documented every step chronologically (currently ongoing!).

All categories

All tags

All posts