Skip to main content

Questions tagged [save]

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

Filter by
Sorted by
Tagged with
0 votes
0 answers
12 views

Test class with collection and save

i'm trying to test if a class method is doing her job. Basically here it is. public function __construct(SaveCommand $saveCommand, SubscriptionData $entityDataFactory, ...
Claims's user avatar
  • 1,191
0 votes
1 answer
29 views

Why do some core repositories use a data model in the save function while others use a model?

I have a quick question and this could help me determine what is the good practice using the repositories. To provide an example to the question I ask in the title of this subject, I can take as ...
beluga's user avatar
  • 141
1 vote
2 answers
59 views

How to edit and save a Bundled Product "Bundle Items" link fields on Magento 2.4.6 PHP 8.1

I am writing a program that is checking product data and updating where required. My problem is that I can't save a Bundled Products Bundle Items linked product fields such as price, price_type, qty, ...
Fox's user avatar
  • 211
1 vote
1 answer
79 views

Admin grid form submit button not working

When I open my admin grid form and click the Save button, nothing happens, the button just displays as clicked (no network activity, no errors in console or logs, doesnt reach Index/Save.php). When I ...
Kristaps Briks-Dravnieks's user avatar
0 votes
2 answers
110 views

Email already exist in db validation

I need help on to correct my implementation on validating the email if it's already exists. Anyone knows what's wrong with my code? It is not validating this part. It will save even if the email ...
jsnewbie21's user avatar
0 votes
1 answer
55 views

unable to save a rewrite

Im trying to save a new redirects into the urlrewrite model but it seems that save() doesn't exist in those factorys: Magento\UrlRewrite\Model\UrlRewriteFactory or Magento\UrlRewrite\Model\...
Amjad Alarori's user avatar
1 vote
1 answer
19 views

created bundle option into existing bundle wont save programatically

Magento 2.4.2-p1 Goal is to create a bundle option with a selection in it based on array of skus. The array has 4 skus of simples existing in the catalog, lets say: [50702640,50702240,90102870,...
user968865's user avatar
1 vote
0 answers
27 views

Decoding failed: Syntax error in app/code/core/Mage/Core/Model/Config.php:1394 when saving a product

Magento 1.9 I am getting this error when I try saving a product. I checked line 1394 in Config.php and it looks like this: $obj = new $className($constructArguments); The full error is: ...
user4095519's user avatar
0 votes
0 answers
97 views

Customer address not save programatically in magento 2

I tried to create and save customer address for a registered, logged user. My code in controller is like below. $addresss = $objectManager->get('\Magento\Customer\Model\AddressFactory'); $...
Mujahidh's user avatar
  • 2,813
0 votes
1 answer
146 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 ...
Claims's user avatar
  • 1,191
2 votes
0 answers
534 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 { "...
Jancy Abraham's user avatar
0 votes
1 answer
535 views

Customer attributes not saving from admin

I've created custom customer attribues $attributeCodes = [ ['code' => 'customer_company' , 'label'=> 'Societe'], ['code' => 'customer_siret', 'label'=> '...
Claims's user avatar
  • 1,191
0 votes
1 answer
284 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, ...
fernandus's user avatar
  • 484
0 votes
1 answer
75 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.
Jasvir Singh's user avatar
0 votes
1 answer
485 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 ...
Vivek Shingala's user avatar
2 votes
3 answers
661 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']); ...
IvoJongmans's user avatar
1 vote
1 answer
221 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 ...
Benjamin Box's user avatar
0 votes
1 answer
874 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 ...
JGeer's user avatar
  • 1,420
0 votes
1 answer
755 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/...
Jay Parmar's user avatar
0 votes
1 answer
26 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 ...
ZealousWeb's user avatar
  • 2,098
0 votes
0 answers
187 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 ...
aweisman's user avatar
0 votes
1 answer
974 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 ...
Black's user avatar
  • 3,380
1 vote
0 answers
31 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 ...
IvoJongmans's user avatar
0 votes
3 answers
562 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 ...
Mariano Emanuel Arias's user avatar
0 votes
1 answer
2k 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 ...
Kirti Nariya's user avatar
  • 3,051
0 votes
2 answers
768 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 ...
Unknown's user avatar
  • 581
2 votes
0 answers
266 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 ...
gabtzi's user avatar
  • 666
0 votes
2 answers
1k 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/...
Black's user avatar
  • 3,380
0 votes
1 answer
919 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 ...
Narendra Vyas's user avatar
0 votes
2 answers
2k 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 ...
Mohit Patel's user avatar
  • 3,888
0 votes
0 answers
41 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 ...
Jimit Bhavsar's user avatar
0 votes
0 answers
2k 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 ...
Pawankumar's user avatar
0 votes
1 answer
708 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 ...
Prits's user avatar
  • 625
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=&...
Sabareesh's user avatar
  • 358
0 votes
1 answer
610 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 ...
Black's user avatar
  • 3,380
0 votes
1 answer
116 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 ...
CJNotts's user avatar
  • 402
3 votes
5 answers
7k 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?
Jaisa's user avatar
  • 2,626
0 votes
1 answer
38 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(...
David Young's user avatar
0 votes
2 answers
780 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)...
TMax's user avatar
  • 83
1 vote
0 answers
217 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' => ...
Emanuele Alesina's user avatar
0 votes
4 answers
713 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->...
Haerriz's user avatar
  • 681
0 votes
1 answer
365 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" ...
Marcel H.'s user avatar
  • 147
0 votes
1 answer
252 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\...
Ajwad Syed's user avatar
  • 1,591
0 votes
0 answers
93 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 ...
Jakk64's user avatar
  • 79
1 vote
0 answers
489 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-...
Nafsss's user avatar
  • 760
1 vote
1 answer
87 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 ...
jscar's user avatar
  • 787
-1 votes
2 answers
4k 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 ...
MichaelHa's user avatar
  • 661
0 votes
1 answer
747 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 ...
Kowsigan Atsayam's user avatar
0 votes
1 answer
959 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 ...
Shafeel Sha's user avatar
  • 1,395
0 votes
1 answer
94 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 ...
Mastafis's user avatar
  • 187

1
2 3 4 5