New answers tagged

0 votes

Created new module, now all products get 404 not found

Try bin/magento indexer:reindex and make sure you have elasticsearch running
user avatar
  • 1
0 votes

Magento 2 how add product select to the widget xml?

If you need to select the single product you can reuse Magento Chooser in following way <?xml version="1.0" ?> <widgets xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&...
user avatar
0 votes

How can I get if is in this table 'catalog_product_entity_text' Use Default value on product Magento 2

When I use \Magento\Catalog\Model\Attribute\ScopeOverriddenValue was not working correctly, but with this class \Magento\Catalog\Model\Attribute\ScopeOverriddenValueFactory everything work as should. ...
user avatar
1 vote

How can I get if is in this table 'catalog_product_entity_text' Use Default value on product Magento 2

Magento doesn't store any flags like use default Magento EAV value tables designed with following rules: Row with store_id=0 means default or fallback value Row with store_id=1 means value for store ...
user avatar
1 vote

Split Configurable Products' options onto two pages

Magento doesn't support any similar features out of the box and doesn't provide any designed solution or preferable way to do it. I don't suggest you to try a split this functionality into 2 pages. ...
user avatar
0 votes

Magento 2: Invalid header value detected

It's easy to debug, and the reasons can be different. Go to: vendor/zendframework/zend-http/src/Header/GenericHeader.php:53 Add var_dump in this part: if (! HeaderValue::isValid($parts[1])) { ...
user avatar
  • 141
0 votes

Admin stuck on loading when creating a new product

Can you please Check below things : - Check broswer console on your network section may be dataprofider will display the error - please try the below command $ php bin/magento indexer:reindex - And ...
user avatar
0 votes

How to rename file while uploading catalog images in Magento2

You need to add your logic to catalog_product_save_commit_after event app/code/Acme/StackExchange/etc/events.xml <?xml version="1.0" ?> <config xmlns:xsi="http://www.w3.org/...
user avatar
1 vote
Accepted

Magento 2 - automatically set product as new when CREATING product only

This answer is very similar to previous one, but use another one observer. In Magento for create and update operations uses the single action save. If you want to check if is it new product on ...
user avatar
0 votes

Magento 2.4 get stock qty after the product is saved in plugin

With your logic and your place i think you can use something like <?php declare(strict_types=1); namespace Acme\StackExchange\Plugin\Catalog\Model\ResourceModel; use Magento\Catalog\Model\...
user avatar
0 votes

Magento 2 - automatically set product as new when CREATING product only

In this case, you can use the event like: app/code/Vendor/Module/etc/events.xml: <event name="catalog_product_save_after"> <observer name="my_custom_product_save_observer&...
user avatar
  • 2,498
1 vote

Magento 2.4 get stock qty after the product is saved in plugin

Intro MSI stock works differently from the previous CatalogInventory stock. To explain how to get the stock properly i first need to explain how MSI works. However i will state this beforehand, it is ...
user avatar
  • 2,498
0 votes

Magento 2 : Get Configurable Product using swatch-option

Following code work for me you can try it. app\code\Vendor\Extension\etc\di.xml <?xml version="1.0" ?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:...
user avatar
  • 2,498
0 votes

Magento 2 : Create a JOIN

First of all you should not to use subselect to eav_attribute and hardcode attribute table. For any manipulations with EAV attribute use \Magento\Eav\Model\Config instance. Second, you should be ...
user avatar
0 votes

Magento 2 : Create a JOIN

public function getJoinData(){ $collection = $this->_helloModelFactory->create()->getCollection(); $second_table_name = $this->_resource->getTableName('second_table_name'); $collection->...
user avatar
0 votes

New products not showing in category frontend Magento 2.3.7-p3

The same logic in patch change create temporary table described as solution in question Product EAV index exception: SQLSTATE[HY000]: General error: 1478 InnoDB: Tablespace innodb_system cannot ...
user avatar

Top 50 recent answers are included