Skip to content

Getting Integrity constraint violation: 1062 Duplicate entry after updating extension

After updating one of my extensions (which was required because I updated to Magento 2.4.4), I am getting this error when I run the upgrade command: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry ‘646-1’ for key ‘AMASTY_ORDER_ATTRIBUTE_ENTITY_ENTITY_ID_PARENT_ENTITY_TYPE’, query was: ALTER… Read More »Getting Integrity constraint violation: 1062 Duplicate entry after updating extension

How to save value entered in custom field in the Source (MSI) form?

In a Magento 2.4.5, I’ve (successfully) added a custom field (opening_mon) to the AdminHtml form for a Source (MSI), using view/adminhtml/ui_component/inventory_source_form.xml. I do see the field in the form. <form xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xsi:noNamespaceSchemaLocation=”urn:magento:module:Magento_Ui:etc/ui_configuration.xsd”> <fieldset name=”opening_times” sortOrder=”40″> <settings> <label translate=”true”>Opening times</label> <collapsible>true</collapsible>… Read More »How to save value entered in custom field in the Source (MSI) form?

Magento 2: Call custom admin controller from frontend

Is there a way to call custom admin controller (which prints a pdf file from sales order view page) from frontend download anchor link? <a href=”http://m7.local/index.php/admin/magemechanic_workorder/order/print/order_id/<?php echo $orderId ?>” download>Download</a>

Validation Name is not working

Actually, I add validation of alpha-num there it shows the Magento default validation message there. I want to add my custom message there. Validation is working app/design/frontend/Theme/CustomTheme/Magento_Customer/templates/widget/name.phtml Here is my code <div class=”field field-name-firstname required”> <label class=”label” for=”<?= $block->escapeHtmlAttr($block->getFieldId(‘firstname’)) ?>”><span><?=… Read More »Validation Name is not working