Questions tagged [patch-data]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
6 views

How to add new field to 'catalog_product_option' table using Schema Patch?

I have created a custom option checkbox field, now on save, i have to update the value(0/1) to the table 'catalog_product_option' so that i can utilize this field on frontend. How can i achieve this ...
0
votes
0answers
25 views

Magento2: Config data save using Custom Module

I want to save encrypted value in core_config_data while setup upgrade without using config.xml. I am trying to use data patch file Vendor\Credentials\Setup\Patch\Data\AddData.php use Magento\...
0
votes
0answers
14 views

how to create a store pragmatically

I need to create two stores pragmatically using declarative schema. To do this, I created a module and inside the module I have date patch class. I'm new here in magento. Please explain in order how I ...
-1
votes
1answer
34 views

Added custom customer attribute with patch script but it gives an error

I added a custom attribute to my customer with a data patch script. The attribute is added in the database tables but when I try to register a new customer I get this error: main.CRITICAL: Exception ...
0
votes
0answers
62 views

Magento 2: How to update the store configuration value using Data Patch

i want to update the store configuration value using Data Patch. Note: please do not suggest install and upgrade script. i tried below code but its not working: <?php /** * Copyright © All ...
0
votes
1answer
68 views

Remove trailing and first space from sku

I have Magento 2.2.2. Some SKU products contain a trailing space. How to using data patch or MySQL database query which will remove all leading and trailing spaces from SKU products.
0
votes
0answers
37 views

Missing Product scope after create websites/stores/storeviews via Data/Patch - Magento V2.4 Enterprise

I faced an issue. After create script Data/Patch to create multi websites/stores/storeviews. At dropdown of Scope Product, i dont see new websites/stores/storeviews, in spite of it has in ...
2
votes
3answers
597 views

Problem in creating Drop down product attribute in Magento2

I have created a Data patch file to create the product drop down attribute with options. used the following code in it. <?php declare(strict_types=1); namespace Custom\Module\Setup\Patch\Data; ...
0
votes
1answer
764 views

Patch Not Working

Patch File: Bedard/CustomGloves/Setup/Patch/Data <?php namespace Bedard\CustomGloves\Setup\Patch\Data; use Magento\Framework\Setup\Patch\DataPatchInterface; use Magento\Framework\Setup\Patch\...
0
votes
1answer
1k views

Create attribute option using Data patch in Magento2

I am creating a product attribute with option using Magento 2.3 Data patch. Used below code. <?php declare(strict_types=1); namespace Vendor\Module\Setup\Patch\Data; use Magento\Eav\Model\...
0
votes
1answer
48 views

How to change assigned group of a custom product attribute?

I have a custom product attribute which is under Advanced Pricing group . I am trying to change attribute group of this attribute via data patch using below code : <?php namespace Vendor\Module\...
0
votes
1answer
679 views

How to update existing CMS block content using data patches?

I have updated content for the existing cms page by using data patches in Magento 2.3.3, but the same approach not working for CMS block. <?php namespace Test\CmsExport\Setup\Patch\Data; use ...
1
vote
0answers
70 views

Magento 2: Adding quote and order attribute using patch data

Can we add custom quote and order attribute/field using patch data in Magento 2.3.x ? If yes then how it can be done ?