Skip to content

magento man

SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: After issue with reindex

For some reason we had a problem with magento 2.4.6 databaase and we forced to restart database without checking that indexers were working. Now when I duplicate a product from admin I get this error: main.CRITICAL: PDOException: SQLSTATE[23000]: Integrity constraint… Read More »SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: After issue with reindex

How to get all currency codes whether enabled or not in magento 2

Im trying to add custom atribute ‘currency codes’ by creating ‘Vendor/Module/Setup/Patch/Data/PriceCrncyCodeAttribute.php’. declare(strict_types=1); namespace VendorModuleSetupPatchData; use MagentoEavModelEntityAttributeScopedAttributeInterface; use MagentoEavSetupEavSetup; use MagentoEavSetupEavSetupFactory; use MagentoFrameworkSetupModuleDataSetupInterface; use MagentoFrameworkSetupPatchDataPatchInterface; use MagentoFrameworkSetupPatchPatchRevertableInterface; use MagentoStoreModelStoreManagerInterface; use MagentoFrameworkAppState; class PriceCrncyCodeAttribute implements DataPatchInterface, PatchRevertableInterface { /** * @var ModuleDataSetupInterface… Read More »How to get all currency codes whether enabled or not in magento 2