Questions tagged [save]

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

Filter by
Sorted by
Tagged with
0
votes
2answers
207 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('...
0
votes
2answers
56 views

How to resolve “Model LSD method save() detected in loop” in magento 2?

I am getting a warning as a "Model LSD method save() detected in the loop" when I did MEOP2" The issue is on below the line $model->setData($finalData)->save(); Please anyone can help me to ...
0
votes
0answers
40 views

How to update the stock status after the quantity changed in magento 2.2.4

I wish to update the stock status while saving the product. If the quantity is 0, then I wish to update the stock status as out of stock. If the quantity is 1 and above, I wish to update the stock ...
0
votes
1answer
309 views

While saving product throws “Unable to save Stock Item” exception in magento 2.2.6

While saving product in backend,throws "Unable to save Stock Item". I have tried after flushed the cache and reindexing but still exception throws. I have reffered below link, but no luck https://...
0
votes
1answer
53 views

Unable to unassign the category of a product in backend magento 2

I wish to unassign the categories of a product in admin end. After unassigned the categories, I have saved the product. But the saved changes is not applied. Please provide me a solution to solve this
0
votes
0answers
62 views

Magento 2.2.4: Could not save product “3395” with position 1 to category 1882

I am using Magento 2.2.4. Assigned a product to two categories. One of the categories is a child of the other. Following error is thrown while saving the parent category after removing the product ...
0
votes
0answers
125 views

Could not save product “” with position 0 to category - Magento 2 [duplicate]

I have gone through all the links as possible..but i don't find any solution for this.. From this Link ..its already fixed in 2.2.4 My current version is 2.2.7 and still i am facing the issue.. ...
0
votes
2answers
479 views

Fatal error: Uncaught TypeError: Argument 3 passed to Mage_Catalog_Model_Resource_Abstract::_canUpdateAttribute()

I am getting an error while trying to pragmatically remove products from some categories. Error: Fatal error: Uncaught TypeError: Argument 3 passed to Mage_Catalog_Model_Resource_Abstract::...
0
votes
1answer
109 views

Magento 2 Check a customer attribute is changed during save

I have created user Approve module which lets admin to approve user after registration. I want to send a email on activation and deactivation of a user, How can I find that the admin has changed the ...
0
votes
1answer
638 views

“No alive nodes found in your cluster” error in magento 2.1.6 after elasticsearch

Every time I save a new product I get that error "No alive nodes found in your cluster" My version of magento is 2.1.6 and the problem appeared after installing the elasticsearch module What ...
0
votes
0answers
34 views

Admin changes not reflecting after migrating magento 1.9 to magento 2.2

I have migrated my magento 1 site to magento 2.2.X by using the migration tool after done product and configuration all are migrated but when i change anything in admin like product qty or system ...
0
votes
0answers
577 views

How to save data in custom column in sales_order table Magento 2

I need to save a string in a new column I created in the order table but I can not get any positive results, it does not save anything. First I created the column: <?php namespace Vendor\Module\...
0
votes
1answer
58 views

Magento2:custom module add new form action after not save data

I have create new custom module click add new form after data fill up than save not working but if in existing record edit after save working please let me know hows problem?
0
votes
1answer
354 views

getting this “Integrity constraint violation: ” while creating custom option

I have create custom module to create custom option with the reference of this "https://meetanshi.com/blog/create-custom-options-programmatically-in-magento-2/" page. I'm getting bellow error for ...
0
votes
0answers
432 views

You need to choose options for your item while adding product to cart

Trying to add configurable product to cart with custom qty with below code but getting You need to choose options for your item error. foreach($optionQty as $key => $qty) { $storeId = ...
0
votes
5answers
150 views

For each loop running only once

In the below code, where I am trying to update a custom attribute called branding. The for loop is running only for one iteration and stopping. It is updating only the first product in the list and ...
0
votes
2answers
368 views

Save method is not working for products

I want to resave all products programmatically. So I am trying to use the below code to achieve it. But the save method is not working in it. I have placed the code in the root directory of my Magento ...
0
votes
2answers
328 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['...
0
votes
2answers
556 views

Magento 1.9 Save action for Catalog Product custom tab

I created the custom tab in Catalog Product. It is my layout/labels.xml <adminhtml_catalog_product_edit> <reference name="product_tabs"> <action method="addTab"><...
0
votes
1answer
542 views

While saving getting error and product is not saved In Magento 2

While creating the new product, entering all the values trying to save the product below error is displayed not saving the product. https://prnt.sc/ireqyg. Any Help would be appreciated.
0
votes
1answer
280 views

Magento 2 - Save data to multiple tables not working

I have created a custom module having two tables named helloworld_post and helloworld_tag and from front-end side I want to save fields values to these 2 tables. However I have created two respective ...
0
votes
0answers
17 views

Overidding product saveAction() - reindex issues

I have created a custom module in which I'm overriding the standard core product saveAction() function (located in app/code/core/Mage/Adminihtml/controllers/Catalog/ProductController.php). Even if ...
0
votes
1answer
136 views

Magento2. Customer repository change attribute does not work

Everything is simple as an egg, but it does not work. Please help to figure out why. If you need more details - please let me know. /** * @param int $customerId * @param int $addressId * * @...
0
votes
1answer
39 views

Magento 2 - Which function / controller has triggered my plugin?

I have setup a plugin which runs after a customer is saved. This means that the plugin runs on the following situations Frontend When a customer register When a customer updates their name Backend ...
0
votes
0answers
349 views

Fast way to resave all products

I need a fast way to resave all 75.000 products in my Magento 1.9 store. Currently I use the following code, but that is not very fast. Is there a better and faster way to resave all products? CODE: ...
0
votes
1answer
891 views

Magento 2: how to save a new instance of a custom model to the database (INSERT INTO instead of UPDATE)

I have created a model and a repository to save the model, the only functions I can find in the model->getResource() are save, load and delete. The save function always uses an UPDATE statement, so ...
0
votes
1answer
34 views

Extra actions after order saved

I am new to Magento, but what I need to do is: after the order is saved, I have to call an external webservice and pass some order data to this service. Where or what is the best place to do so? ...
0
votes
0answers
350 views

Checkout page custom filed value not save in magento 1.9.2

I have to add a custom field called "Mobile number" in Customer registration page and checkout registration the code working perfectly in customer registration but in checkout registration the value ...
0
votes
1answer
203 views

Magento 1.9.2 products appears ok only if resave them

The problems that i face in Magento products are: a) Add to cart button does not appear b) Image sort order numbers are not set When I resave a product the "Add to Cart" button is appearing and ...
0
votes
1answer
762 views

Error: Call to a member function beginTransaction()

I have created a custom module "adminform" with some custom fields when i try to save my form data it gives the error "Call to a member function beginTransaction()" I have the following form ...
0
votes
1answer
35 views

After Changing primary key of custom modules' model , does not saves data in db

I have made custom module for that I have to change tables primary key due to some reasons.I have updated it in Model\Resource\Modelclass.php file , flush cache including "Flush Cache Storage" of ...
0
votes
0answers
23 views

How to save updated row?

Building my edu module but can't manage to create a "Save" button or use existing one. I can pick record from grid and open in edit form but now I would like to change some details and save it. Would ...
0
votes
1answer
628 views

Magento save method not working with Customer Model Object

I have used below code to update the custom column in customer_entity table, but the values are not updating in database. $customer = Mage::getModel('customer/customer')->load($customerId); ...
0
votes
1answer
126 views

saveAction stores empty object

Whenever I fill a form and click "Save", magento doesn't get the form data. It just saves an empty object in the database. I can't figure out why. Here's my form and file structure: Form File ...
0
votes
1answer
662 views

unable to save / update products

Unable to save or update products in Magento ver. 1.9.1.0. When I go to save a product record in admin, it returns with onscreen error message There is no active transaction and no changes are ...
0
votes
1answer
754 views

Onepage checkout update payment section on radio button click

How can i update payment section if user click (check) radio button of payment. So i want that magento safe the new selected payment method and reload the payment section.
0
votes
1answer
100 views

Save Configurable Products automatically

My configurable product prices are updated with Lowest Price simple product on Save. As I have thousands of configurable products I can't manually open and save all of them. Is there any way I can ...
0
votes
0answers
128 views

Batch insert products (import multiple products at once)

I have an excel file with 125.125 rows in it. I loop through all the rows and save/update the products in my magento website. Now the problem is that I save the product every time I loop through a ...
0
votes
1answer
3k views

500 Internal Server Error on /checkout/onepage/saveOrder/ redirects to cart without emptying

I am facing 500 Internal Server Error on /checkout/onepage/saveOrder/form_key/xxxx at the time of clicking place order button at checkout page. I have found the same issue at this link http://forum....
0
votes
0answers
52 views

Strange issue with Product custome attribute

From last 5 days, I am facing problem with related to product custom attribute. I have created some extra attribute for product and "Donation"(Mandatory field) attribute is one of them. It was working ...
0
votes
1answer
1k views

Storing multi-value custom product attribute

I have a custom attribute for my products called 'car_model'. This is a multi-value field. Now I try to create a synchronization script to synchronize this data between Magento and another system. I ...
0
votes
1answer
569 views

How to change attribute value in one product and save it only to this product?

I am doing a small external script site for my magento to get informations and do small tasks without navigationg through the magento backend (eg. show qty of all products). What I want to do now is ...