-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Products block does not get rendered in the HTML output with Magento 2.4 #27
Comments
This is due to Magento\Catalog\Block\Product\ImageFactory not providing a string for their getLabel() method on an api call. Fixed this by replacing this class with my own with a check if $imageMiscParams['image_type'] does exists else setting it to empty string. `<?php namespace Vendor\Module\Rewrite\Magento\Catalog\Block\Product; use Magento\Catalog\Block\Product\Image as ImageBlock; class ImageFactory extends \Magento\Catalog\Block\Product\ImageFactory
}` |
Hey guys, it's me again.
After you added the compatibility with PHP 7.4 I could finally use the page builder functionality within Vue Storefront.
But now there comes a problem.
In Magento 2.3 I was using the products block to get some new products and they were successfully fetched. Now with Magento 2.4 it does not render. All I get from Magento is the external
div
that has adata-content-type="products"
and nothing inside.Maybe it has to do with what is inside the
div
? If a check the database I have this inside thediv
:{{widget type="Magento\CatalogWidget\Block\Product\ProductsList"...}
This is happening with an instance the Magento that has configured MSI and the default stock is 0.
I checked by changing the default stock to something != 0 and it works... Strangely.
I think this is more of a problem with Magento 2.4.0... Not sure.
Nonetheless, I report it here if anyone has the same problem 👍
The text was updated successfully, but these errors were encountered: