Skip to main content

Questions tagged [save]

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

Filter by
Sorted by
Tagged with
13 votes
1 answer
2k views

Avoiding save in a loop in mass action

I've created my own CRUD module that contains an inline edit action similar to the one for CMS pages Everything works OK, but when running phpsniffer with the EcgM2 standard I get this warning: ...
Marius's user avatar
  • 198k
9 votes
1 answer
6k views

Magento 2: How to Insert Multiple Records to custom table?

I have created a new table in Magento2: my_custom_table with 4 fields: id: primary key, product_id: int(11), customer_id: int(11) status:int(11) I want to save multiple records at a time. Here is ...
Jancy Abraham's user avatar
7 votes
2 answers
12k views

Magento2 : user define customer attribute not save value while create / save from admin

I have created two customer attribute one "abc" and second is "xyz" this two attribute display properly in customer admin. also attributes are created in database table "eav_attribute". But while save ...
Sarfaraj Sipai's user avatar
7 votes
3 answers
2k views

Magento Enterprise Slow Product Save (/w and /wo Solr Integration)

Issue: Product save has become incrementally slower over the past 12 months Background: Magento Enterprise 1.14.1 (Issue also present in 1.13.0.2) ~15,000 Products, ~700 Categories, 2 Stores Solr 3....
john-jh's user avatar
  • 550
6 votes
3 answers
5k views

Product stock is not saved when creating a product programmatically

I'm creating products programatically on Magento CE 1.8.1. The form works fine except every once in a while we get a nasty error that comes and goes away, and does not affect all users. :"SQLSTATE[...
Vic's user avatar
  • 1,424
6 votes
1 answer
871 views

Category with 20000 product not save

I have a category with 20000 products and 50 subcategories, while I tried to save that category at that time Magento go into infinite loop and after 10-15 min getting 500 error. I have set 18000 max ...
Navin Bhudiya's user avatar
5 votes
1 answer
10k views

Insert multiple rows without calling model save inside loop

Following code is working fine. $data = $this->_customDataSave->create(); $data->setUsername($this->getUsername()); $data->setFullname($this->getFullname()); $data->setEmail($...
Anshu Mishra's user avatar
  • 8,980
5 votes
3 answers
6k views

Magento 2.3 : How to set qty for multiple sources (Multi source inventory) programmatically

I have a site with 3 inventory sources. I want to add and update product inventory to each source by product sku. Please help me
Jancy Abraham's user avatar
5 votes
1 answer
775 views

Magento Configurable Product Save Not Working

On configurable product creation, when I hit the save button, I'm getting the error Fatal error: Call to a member function getStoreLabel() on a non-object in /app/code/core/Mage/Catalog/Model/Product/...
blakcaps's user avatar
  • 1,965
4 votes
1 answer
3k views

Magento 2 : Could not save admin form contents into the DB

I have added an admin form using Ui component. example_example_edit.xml <?xml version="1.0"?> <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:...
E.B's user avatar
  • 1,010
4 votes
4 answers
963 views

How to call save method in collection instance

I was appeared Magento 2 Associate developer certification exam, in that I got the below tricky question, but I don't know the concept and answer of the question. can you have an idea regarding the ...
senthil's user avatar
  • 1,729
4 votes
2 answers
8k views

Magento 2 : Use aftersave and beforesave method

I want to add aftersave and beforesave method of Magento 2 in my model. How can I do this and which model I have to called ?
Krupali's user avatar
  • 1,140
4 votes
2 answers
3k views

Magento 225 :Notice: Array to string conversion

When I try to create a new record in my custom module I get the below mentioned error Something went wrong while saving the item.Notice: Array to string conversion in /opt/lampp/htdocs/...
Verdu's user avatar
  • 1,730
4 votes
3 answers
2k views

Magento 2. Catalog product edit save button not working

admin/catalog/product/save button is not working anymore. I'm unable to edit/save product. No output whatsoever in var/log/* No output whatsoever in browser console No activity in browser network ...
vitoriodachef's user avatar
4 votes
4 answers
760 views

Whenever I save a product I get "Something went wrong" and in the report I get this error

I got this in my error report: > a:4:{i:0;s:37:"Object DOMDocument should be created.";i:1;s:5172:"#0 > /data/web/magento2/vendor/magento/framework/View/Element/UiComponent/Config/...
Rolf's user avatar
  • 41
4 votes
0 answers
350 views

No ID parameter in model save controller when saving after edit

I've written a model object and I cannot edit and save an existing object, a new object is always created. I can create and delete, but editing doesn't work. I'm pretty sure that this is because the "...
Joseph Hovik's user avatar
3 votes
1 answer
11k views

How to create a productrepository using object manager in Magento 2?

I want to save/update the product in phtml file and I need to create productRepository using object manager. I don't want any controller to be called. Is there any possibility to save product in phtml ...
Mandar Parbate's user avatar
3 votes
1 answer
2k views

Magento 2 Fail to save the value of a newly added Yes/No customer attribute

The customer attribute shows up but cannot save it because there are no records about this attribute in eav_entity_attribute table, when I manually add a row for the attribute, it can be saved. How to ...
Ricky.C's user avatar
  • 2,182
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
3 votes
1 answer
2k views

Magento 1.9.2.4 - SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '0' for key 'PRIMARY' while saving categories

I got the below error while saving some categories(not all categories) 2016-12-14T12:56:58+00:00 ERR (3): exception 'PDOException' with message 'SQLSTATE[23000]: Integrity constraint violation: ...
Priya Ponnusamy's user avatar
3 votes
1 answer
1k views

Difference between catalog_product_prepare_save and catalog_product_save_before

What is the difference between catalog_product_prepare_save and catalog_product_save_before? I have an observer that updates some attributes when a product is saved. It works great when I save a ...
lv2fly's user avatar
  • 141
3 votes
1 answer
2k views

Can't PUT customer in Rest Api Magento2 - fails to complete

How do you PUT (update) a customer using the rest api? I have a ticket open on github, but I was wondering if I'm just doing this wrong.. https://github.com/magento/magento2/issues/5115 I've ...
CarComp's user avatar
  • 1,256
3 votes
1 answer
3k views

Send Email and Save Data to database table with custom form

I have created the module with a form in front end on submit it send email and its working fine, now i also want to save the current form data to a Database table and keep the email functionality too ...
Xabby's user avatar
  • 529
3 votes
1 answer
826 views

Magento 2 - CMS Content Won't Save

I'm having a crazy issue where I'm trying to copy over CMS content and it seems that when there are certain words, the content does not save. It just refreshes the admin page and brings me back to ...
Paul's user avatar
  • 1,501
3 votes
1 answer
2k views

How does $customer->save() actually work?

So ,i am developing some extension for the company I work for on Magento (enterprise) and I was testing some code in an Observer going like this: $_customer=Mage::getModel("customer/customer")->...
PVL's user avatar
  • 326
3 votes
2 answers
4k views

Custom Field Value not saving on sales_flat_quote & sales_flat_order

I have created a custom field from sales_flat_quote & sales_flat_order tables and in checkout page have field called delivery_date. When an order is being placed, it's not saving my custom field ...
Manoj Kumar's user avatar
  • 1,348
3 votes
1 answer
2k views

Magento2 make simple afterSave action plugin of custom module

I am trying to create afterSave plugin for my admin form save action controller of my custom module. The purpose of this is to save some data into second table once all data completely save in first ...
Pratik Navapara's user avatar
3 votes
1 answer
666 views

Issues in loading and saving Customer addresses where customer is linked to many addresses (200+)

My customer has 200+ addresses, the page takes a long time to respond(this is one issue),and other is when I try to save some changes,I am getting error as shown in pic.If customer has few addresses, ...
Abdul Ghaffar's user avatar
3 votes
1 answer
4k views

On customer address save, get origin data

I'm working on an observer of the customer_address_save_before event. On customer address saving, i've to check if there's changes before doing some actions. I did something similar for the customer/...
WilliamZ's user avatar
  • 146
3 votes
1 answer
2k views

Magento 2 : Admin form using ui component not able to do edit and save

I have created an admin form using ui component and I could save a new form using the following code. But now I am facing an issue with edit form save. ext_form.xml <fieldset name="ext_details"&...
E.B's user avatar
  • 1,010
3 votes
2 answers
2k views

Saving product deletes tier price and group price

I've got a problem when programatically saving a product. While loading the product with help of the product collection or the model (by attribute), setting some value and then saving it, I'm losing ...
Akerus's user avatar
  • 402
3 votes
1 answer
2k views

Magento 2: How to save data in DB from admin through UI component?

I can not save the data in the database when editing the record, the data remains the same as it was before Ronis\Feedback\Api\Feedback\FeedbackInterface.php <?php namespace Ronis\Feedback\Api\...
Рома Лытарь's user avatar
3 votes
1 answer
405 views

Custom attribut value don't save in editing product from back-end

I've had a custom select option in the product edit in the backend. When I try to save the product, my option is not saved. Here the code : di.xml <config xmlns:xsi="http://www.w3.org/2001/...
user3535832's user avatar
3 votes
1 answer
881 views

URL key for specified store already exists on Category edit in Magento in Magento 2.1.6

I working on a project on which I get the error URL key for the specified store already exists While editing category on store 2. I get this error only on store 2 Arabic first category and also ...
Sameer Bhayani's user avatar
2 votes
2 answers
11k views

Programatically update a single attribute in Store View Scope

If you load a product in Store View scope, all the inherited data ("Use Default Values") comes with it... which makes perfect sense, so far so good. $_product = Mage::getModel('catalog/product')->...
Doug McLean's user avatar
  • 1,150
2 votes
4 answers
9k views

New product attributes value cannot be saved in magento 2

I have created nearly 10 new attributes under product attributes. Its added to attribute set as well. But now, when I update the product information, the data is not getting saved. Instead, after the ...
Jithin U. Ahmed's user avatar
2 votes
2 answers
13k views

How to save customer attribute value in custom script in Magento 2

How to save customer attribute value in custom script in Magento 2. The prerequisite is to add first your new attribute programatically. To do add a customer attribute please review these: Magento2 ...
Daniel Ifrim's user avatar
  • 3,404
2 votes
3 answers
12k views

magento 2 - How to create new object Product?

How to create new object Product ? Example: $product = new Product(); $product->sku = 'fdfds'; ... $product->save();
MrTo-Kane's user avatar
  • 3,664
2 votes
1 answer
4k views

How do you get the new product ID after programmatically creating the product?

I have a configurable product and am trying to programmatically create a new simple product and then associate it with my configurable product. This is what I have so far... $newProduct = $this->...
Scruffy Paws's user avatar
2 votes
1 answer
1k views

Magento2. More information about the Entity Manager?

A part from this question Magento 2.1: using the entity manager that was asked and answered a year ago, a lot can change in an year, I can't seem to find anything about the Entity Manager. Should I ...
vitoriodachef's user avatar
2 votes
2 answers
2k views

Magento 2.2.2 On product save i get error ''Invalid Form Key. Please refresh the page'

I add some custom option in sample product. I save this product and add changes in custom option. But I can not save the product. and get this error, Invalid Form Key. Please refresh the page.
Dhaduk Mitesh's user avatar
2 votes
2 answers
486 views

How to save an EAV entity from controller?

I'm trying to build a custom module that contains an EAV entity in Magento 2 for learning purposes. I have troubles performing a proper save from an admin controller. I'm trying to avoid code like: $...
Marius's user avatar
  • 198k
2 votes
3 answers
836 views

Magento admin custom form with multiple entry

I have a custom form in Magento admin. When I submit the form with multiple click of the save button the multiple entry are inserted in my table, even if I have a form key. if ($data = $this->...
senthil's user avatar
  • 1,729
2 votes
2 answers
670 views

Category save not working

I am trying to update the category using following code. $category = $this->categoryFactory->create()->load($categoryId); foreach($data as $d) { $category->setDataUsingMethod($d['...
Anshu Mishra's user avatar
  • 8,980
2 votes
2 answers
5k views

How to add save and continue button in ui-form in Magento 2?

I have created admin grid and form using ui component. Now I need to add save and continue button, How do I add it? Please provide me a solution
Jaisa's user avatar
  • 2,626
2 votes
1 answer
2k views

How to create a Magento 2.1 custom payment to save credit card information

I am unable to use Authorize.net or PayPal in the country my store is working. I'm migrating from magento 1.9 to magento 2.1; and I manually process all my payments from credit cards using the Save CC ...
Sergio Cadavid's user avatar
2 votes
2 answers
3k views

How to fix Invalid method Varien_Object::save() in product saving?

I got following error when tried to save product from collection: Invalid method Varien_Object::save(Array()) And here is full code (I know, that it is ugly, but now I try refactor it): public ...
Rakshazi's user avatar
2 votes
1 answer
18k views

How can i quick update of qty and stock and all inventory fields in Magento

I want quick update of product on MAGENTO C.E 1.7 I know about the quick update of product attribute value using below code: getResource()->saveAttribute() just like $product=Mage::...
Amit Bera's user avatar
  • 77.6k
2 votes
1 answer
1k views

UI component save button controller magento 2

I have UI admin form xml file. I've got SaveButton.php block file, but I need to save form in db. As far as I know I need controller. How this controller would look like and in which directory it ...
Rufus's user avatar
  • 621
2 votes
1 answer
5k 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 ...
Mohit Rane's user avatar
  • 1,965

1
2 3 4 5