2022 Developer Survey is open! Take survey.

Questions tagged [save]

Questions related to save action, most commonly used in form submit

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

Incorrect integer value: '' for column `project-preprod_db`.`catalog_product_entity`.`has_options` at row 1

Running a custom import script, I'm facing this error for some products (some others are perfectly being created without this issue). Error occured on B2C product import : The product that was ...
user avatar
  • 772
0 votes
0 answers
28 views

Magento 2 REST API Add validation for data interface payload

I have created a custom REST API to save data into my table. My table contains many fields so I am using the DataInterface structure for payload. Now I need to add a validation like as below { "...
user avatar
0 votes
1 answer
15 views

Customer attributes not saving from admin

I've created custom customer attribues $attributeCodes = [ ['code' => 'customer_company' , 'label'=> 'Societe'], ['code' => 'customer_siret', 'label'=> '...
user avatar
  • 772
0 votes
1 answer
12 views

Magento 2 Add additional fiels to sales_order and pass addData before save

I am doing a custom order placement based on the API data I receive, I have to introduce the new column on the sales_order table whet I have to add them before order save using addData or setNewfield, ...
user avatar
  • 434
0 votes
1 answer
34 views

Getting Error on Add Item Page in Admin UI Component

I just created a Form with Ui_components, but When I go to this page, I'm getting the following error.
user avatar
0 votes
1 answer
32 views

$this->productRepository->save($product) fail for bulk update with multiple attribute sets and tier pricing

I have a custom cron to update/import bulk products using a csv file. All the products have tier pricing and different attribute sets assigned. use Magento\Catalog\Api\ProductRepositoryInterface; use ...
user avatar
1 vote
3 answers
63 views

How to save stock attribute value ('qty') for a product with Magento 2 objectmanager?

I've found out how to do this with other attributes. For example a custom 'location' attribute: $product = $this->objectManager->get('Magento\Catalog\Model\Product')- >load($post['id']); ...
user avatar
1 vote
1 answer
28 views

An error occurred while saving the category on Magento2

when I try to save a category I get this error from the backoffice. Here is the error related to this action: Blockquote [2021-11-24 10:52:02] main.CRITICAL: DateTime::__construct(): Failed to parse ...
user avatar
0 votes
0 answers
25 views

Function is slower when it overrides another function

I experienced the following issue and I'm wondering if anyone out there did experienced something similar: when a function that overrides another function is called, its execution is slower than when ...
user avatar
  • 146
0 votes
1 answer
250 views

Solved: Product saving issue - images - unique constraint violation found - 2.4.2-p1

We face a unique constraint violation found error when we try to save the product. When we check the attribute code '87' in the catalog_product_entity_varchar table, we see that it is the default ...
user avatar
  • 1,474
0 votes
0 answers
25 views

How to find what is the controller responsible?

I am using the Amasty store locator module, in the backend, i am filled with all values and click the save button, how to find which controller is responsible for saving all the values. After clicking ...
user avatar
  • 103
0 votes
1 answer
73 views

How can I insert multiple row at once without for loop using collection in Magento 2?

I want insert multiple record without for loop in Magento 2 my data is as follow, Array ( [0] => Array ( [path] => whatsapp_contact/whatsapp_contact_button_settings/...
user avatar
0 votes
1 answer
19 views

URL key for specified store already exists while importing products through custom script

I have some of the products already added in magento admin. And now i am trying to create same name product with the use of script that time i am facing error "URL key for specified store already ...
user avatar
  • 1,948
0 votes
0 answers
45 views

Custom model save data processor DI/Reflection only working once?

I'm working on a simple FAQ widget module for a client and I seem to have run into something quite strange with the DI/Reflection cache. My problem is with the Save controller action which uses a ...
user avatar
0 votes
1 answer
314 views

Magento 2 - can't save changes to product

I try to change some product info text and then save, but after it saves, the text in the backend/frontend still remains the same. There is no error showing. What can I do? Additional Information I ...
user avatar
  • 2,402
1 vote
0 answers
21 views

Unable to change or add categories

We're unable to change or add categories in the Magento 1 (1.9.2.2) backend. Upon clicking the 'Save category' button I get the following error in my console: I've traced it back to the follwing code ...
user avatar
0 votes
3 answers
139 views

Problem with changing price in admin

As described in this question in Magento 2 if I insert a new product or update an existing one using only comma in price it uses it as a decimal separator. Example: if I set the price to 10,000 it ...
user avatar
0 votes
1 answer
401 views

Magento 2: Change the "URL Key" and save the category "The value specified in the URL Key field would generate a URL that already exists."

When change the "URL Key" and save the category then throw the below error. This store Migrate Magento 1.9 to Magento 2.3.5-p1 and used multi store view. Error: The value specified in the ...
user avatar
  • 3,159
0 votes
2 answers
120 views

Unable to save value of customer attribute in magento2

I am trying to edit customer form data in which i have added one contact number as attribute in form. On removing the text from contact number and then saving it i am not able to save null or empty ...
user avatar
  • 561
2 votes
0 answers
94 views

how can I add my custom validation logic to product edit/create form?

I would like to add some custom logic when a product is saved to validate the data in the form before it is saved in the database. In order to achieve this I decided to create an after Plugin to hook ...
user avatar
  • 521
0 votes
2 answers
254 views

Magento 2 - Created new table and model - but model does not save!

I created a new table company_shipping_quote and new models by using https://mage2gen.com/. But how can I create a new object and save it so that it appears in the database? Models: Company/Shipping/...
user avatar
  • 2,402
0 votes
1 answer
366 views

Unable to change product status - for "All store views" (Global Store)

I am in need to disable a list of SKUs. For that I have created a console command, read the CSV and then setting product as disabled. I am facing an issue that I am not able to make product disabled ...
user avatar
0 votes
2 answers
667 views

save admin form and redirect back url in magento 2.3

I have create admin sales grid. All is working fine. And i have added one link in order view page. This link click redirect custom admin form. And Finally i want to save custom admin form. And ...
user avatar
  • 3,167
0 votes
0 answers
36 views

Category save issue after upgrade - M2

Getting this "A technical problem with the server created an error. Try again to continue what you were doing. If the problem persists, try again later." error after category save. I have ...
user avatar
0 votes
1 answer
646 views

Magento 2 admin form save button not working in custom module

Magento 2 i have created admin grid and form. when i am trying to add new data save button not working add new->new form ->save and continue , save both not wokring below is my code <?php ...
user avatar
0 votes
1 answer
287 views

How to Save data from Checkout new Steps in Magento 2?

I want to save data from Checkout new Steps in Magento 2 ? I have created two text fields in My Step Two Title Tabs which is successfully created but how to save those value in database after ...
user avatar
  • 526
0 votes
1 answer
22 views

I need to set an activity if the customer is created or updated but it is not working in magento 2.3

events.xml (path : app/code/vendor/module/etc/frontend) <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation=&...
user avatar
  • 300
0 votes
1 answer
106 views

Magento 2 - cant enable template hints

I try to enable template hints in Stores -> Settings: Configuration -> Advanced -> Developer -> Debug But if I make my changes and save, then it reloads and the settings are reseted to the ...
user avatar
  • 2,402
0 votes
1 answer
94 views

Trying to Save Customer Account Causes 500 Error

Whenever I try to save a particular customer account the screen changes to the following: This page isn’t working www.mywebsite.com is currently unable to handle this request. HTTP ERROR 500 The ...
user avatar
  • 360
2 votes
5 answers
4k views

How to update the attribute scope programmatically in Magento 2

I have 20 product attributes. I need to change those attributes' saving scope to "Global". How can I achieve this?
user avatar
  • 2,376
0 votes
1 answer
29 views

How set value for attribute?

I have this code: foreach ($skuScope as $sku) { $object = Mage::getModel('catalog/product'); $product = $object->loadByAttribute('sku', $sku); $attributes = $product->getAttributes(...
user avatar
0 votes
2 answers
419 views

Magento Redirecting to Dashboard on Save in Back-End, Changes Lost

I have an intermittent issue that seems to happen across all of the Magento 2 sites I manage where if I'm working in the back-end and I save something (could be a content block, category, product, etc)...
user avatar
  • 73
1 vote
0 answers
66 views

How can i change the action of the Save Button in AdminHtml?

In the Save.php file in magento Catalog the Button is defined like this: 'label' => __('Save'), 'class' => 'save primary', 'data_attribute' => [ 'mage-init' => ...
user avatar
0 votes
4 answers
456 views

Save Config Button Not work in payment methods

I was trying to add a new payment method klarna. I configured klarna in a proper way and I couldn't save it. Further try to some other changes in stores->setting->configuration->sales->...
user avatar
  • 661
0 votes
1 answer
269 views

Magento 2.3.3 | unable to save changes on imported products

I just imported a few products in my Magento 2.3.3 Shop and need to change a bit here and there. Unfortunatly i cant save theese changes. After editing everything i wanted to change i click on "save" ...
user avatar
0 votes
1 answer
189 views

Date format issue to save giftcard Lifetime in Magento 2

I am creating giftcard code programmatically. For this in vendor GiftCardAccount Module, the code is: $model = $this->giftCAFactory->create()->setStatus( \Magento\GiftCardAccount\...
user avatar
  • 1,521
0 votes
0 answers
70 views

Save grouped product : Requested product doesn't exist

I am getting an error in a external script when I am trying to save a grouped product : something goes wrong with product save method, the exception is "Requested product doesn't exist". Doing unit ...
user avatar
  • 79
1 vote
0 answers
160 views

Magento 2.3 Save and Duplicate Product

I wanted to make a duplicate product. SO i did save and duplicate and a product was created. For product 1,SEO url is gin-glasses-pasabahce-timeless For product 2 , SEO url is gin-glasses-pasabahce-...
user avatar
  • 700
1 vote
1 answer
60 views

How can I programmatically save selected products? - url key is empty after csv import

I imported some non-visible simple products (from csv) with an empty url key field. If I save one of these manually in the back end the url key is generated OK. If I bulk update an attribute the ...
user avatar
  • 787
-1 votes
2 answers
3k views

Magento 2 : Class interceptor does not exist [duplicate]

I have a simple module when I save data then this error : Magepow\Importexport\Controller\Adminhtml\Allimports\Save\Interceptor does not exist [] [] here is save file <?php namespace ...
user avatar
  • 641
0 votes
1 answer
378 views

Saved image in the admin grid is not fetching while editing the grid Magento 2

The image is already saved in the uploaded image. But when editing the form it shows No file Chosen. How can I fetch the previously save the image? Here is the save.php code: <?php ...
user avatar
0 votes
1 answer
605 views

Magento2 : Product not saving set custom attribute using Observer

I want to set Discount on my product after Save product so I'm using catalog_product_save_after then I am creating an attribute 'discount' and set the calculated value, but when i save the collection ...
user avatar
  • 1,372
0 votes
1 answer
44 views

Get value changed in admin grid SaveButton magento 2

I created a custom magento 2 form. As far as saving, I would like to take the modified value in the save.php of the controller. Is there any method I can use? This is my save.php controller <?php ...
user avatar
  • 187
0 votes
1 answer
68 views

Magento 2 Error while saving product

I am getting " DateTime::__construct(): Failed to pass time string (17/06/2019) 0(1):Unexpected character error while saving product. See the Screen shot below Image Here What can be the ...
user avatar
  • 700
1 vote
1 answer
118 views

Programatically Product Save with Image

This is My File Uploader in .phtml file : <input type="file" id="imageUploader" name="imageUploader"> This my PHP file code where form post. <?php namespace VendorName\ExtensionName\...
user avatar
  • 1,516
0 votes
0 answers
351 views

Magento 2 add custom tab in customer edit section and save data

I am able to add custom tab customer edit section when they click on it i am showing one form by using protected function _prepareForm() { this function form is showing but when i change data in that ...
user avatar
0 votes
0 answers
73 views

Magento2.3.0 : In admin inside Payment method after save getting error

I am using Magento 2.3.0 I go to admin panel store -> configuration -> sales -> payment methods enable any payment method after save below image display. on this same page showing this error ...
user avatar
  • 1,587
2 votes
1 answer
3k views

Magento 2: How to get product old and new data on product save button in admin backend?

I am working on Admin Actions Log Extension. For the reference, I am using the link below https://amasty.com/admin-actions-log-for-magento-2.html I want to get old and new data of products while we ...
user avatar
  • 1,838
1 vote
0 answers
242 views

Magento2.3.0 Getting error on admin side when save blog [closed]

I am using third party module mageplaza blog extensions this is an issue when I save in admin side getting error 1 exception(s): Exception #0 (Exception): The file was not uploaded. Exception #0 (...
user avatar
  • 1,587
0 votes
2 answers
1k views

Fastest way to load category and save programmatically in Magento 2

I want to load all collection in Magento 2 and save one by one programmatically. is there any faster way to do so. I tried below code for one category use Magento\Framework\App\Bootstrap; include('...
user avatar

1
2 3 4 5