We’re rewarding the question askers & reputations are being recalculated! Read more.

Questions tagged [save]

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

Filter by
Sorted by
Tagged with
4
votes
0answers
213 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 "...
0
votes
1answer
166 views

How to save custom product tab drop box fields values to database in Magento 2

By using data-form-part="product_form" in input tag, text values are getting. But how gets the drop down values. When i used data-form-part="product_form" same in option, it gives an array with key ...
2
votes
1answer
5k 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 ...
2
votes
1answer
2k 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->...
0
votes
1answer
521 views

Adminhtml - NULL in saveAction() form

I'm creating a new admin module, when i click on save button in my form, he calls saveAction with all paramaters fields but he saves me NULL value. I think that the problem comes from saveAction() but ...
3
votes
1answer
686 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 ...
1
vote
0answers
254 views

Product Save button of Magento 2

I am using Magento 2. I am trying to edit a product. But the Product Save button is not working.
0
votes
1answer
1k views

Magento 2 REST API: Products not saved correctly

I create products through the REST API (catalogProductRepositoryV1) using a POST request. For some reason there is something different about these products. Just after creating them everything seems ...
1
vote
1answer
1k views

Magento:Save Product image from external url

I want to save a simple product programatically.I have used the following link http://inchoo.net/magento/programming-magento/programatically-manually-creating-simple-magento-product/ All fields are ...
0
votes
1answer
194 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 ...
1
vote
1answer
2k views

Magento 1 - Save Collection Without Foreach

I am currently going through and optimizing our codebase for our custom modules. I am using PHP Codesniffer along with the Magento Coding Standard rules to scan our code. In many of our files I see a ...
2
votes
0answers
39 views

I want to create orders in Magento2. Orders have bundled product

I want to add orders in Magento 2. Orders have bundled products.Is there specific function/parameters we need to use to store bundled product orders ?
1
vote
0answers
39 views

Backend not loading completely

In magento backend, if I click on save button loads the page but the saving modal dialog newer stop. you see this on the screenshot. Page is not loading but the saving popup is not stopping. Also if ...
7
votes
1answer
3k 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 ...
3
votes
1answer
578 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"&...
2
votes
1answer
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 ...
3
votes
1answer
2k 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 ...
3
votes
1answer
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: ...
4
votes
1answer
2k 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:...
0
votes
1answer
759 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 ...
1
vote
1answer
758 views

On adminform save gives an error : Call to a member function load() on boolean

Here is the form that i am using in admin form: protected function _prepareForm() { $form = new Varien_Data_Form(array( 'id' => 'edit_form', 'action' => $this->getUrl('*/*...
1
vote
1answer
200 views

Save Form data to database Gives error: Call to a member function addData() on boolean

Have the following fields in my from: protected function _prepareForm() { $form = new Varien_Data_Form(array( 'id' => 'edit_form', 'action' => $this->getUrl('*/*/save'...
0
votes
1answer
72 views

How can I specify 0000-00-00 as Year-Month-Date while Save

I want to save a time reference in database which date part should be always 0000-00-00. I have below code with me. $entity = Mage::getModel('my_entity_reference')->load(1); $entity->...
0
votes
1answer
33 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 ...
1
vote
0answers
1k views

INSERT ON DUPLICATE KEY UPDATE Magento2 Error

When i tried to save the product from Admin i am getting below error SQLSTATE[42S02]: Base table or view not found: 1146 Table 'catalog_product_category_cl' doesn't exist, query was: INSERT INTO ...
0
votes
2answers
549 views

Can't update product value after update attribute's label

So, I updated the "product_length" label attribute and now I can't save a new product value to this attribute. I can't save this value by admin or programatically. $_product = Mage::getModel('catalog/...
2
votes
2answers
185 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: $...
0
votes
1answer
3k views

Magento2: Unable to save product

I am unable to save product from magento2 admin Getting below error SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`...
0
votes
1answer
782 views

Magento 2: Custom Module URL Key Magento Function

I'm using Magento 2 CE Version 2.1.0. I'm creating a custom module. For saving data I'm using custom INSERT query. In that INSERT query, i also need to save URL Key/Identifier which is going to ...
4
votes
4answers
709 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/Reader.php(95)...
1
vote
2answers
77 views

Proceeding to an exception page after save new category

When I save new category, I proceed to exception page. exception 'Magento\Framework\Exception\LocalizedException' with message 'Can't create directory /var/www/html/var/generation/Magento/...
1
vote
1answer
1k views

The table 'catalog_product_index_price_tmp' is full error

I faced one strange issue with product saving on Magento EE 1.14.2.4. This issue appears only when I save exactly one product, I'm able to save other products without any problems. Here is screenshot ...
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 ...
1
vote
0answers
310 views

Uncaught exception 'Exception' with message 'User Error some transactions…'

I'm getting this error when i try to save to my db an employee. > Fatal error: Uncaught exception 'Exception' with message 'User Error: > Some trans actions have not been committed or rolled ...
3
votes
1answer
352 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 ...
2
votes
1answer
2k views

Magento 2 Add extra data to an order

I'm brand new to Magento 2 programming, although I have a number of years of PHP behind me. I need to store an id from an external system alongside an order that that system creates. I've got the ...
0
votes
1answer
622 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
2answers
2k views

Magento 2 not able to save order data in custom table using observer.php with sales_order_place_after

I am trying to save order details in a custom table with sales_order_place_after observer, but its not working. public function execute(\Magento\Framework\Event\Observer $observer) { ...
1
vote
1answer
316 views

Register customer region to State/Province table

I'm fairly new to Magento and I'm not quite sure how to add a State/Province field to the register.phtml form. I read somewhere that it's not a good idea to edit this file since it gets wiped whenever ...
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 ...
11
votes
1answer
1k 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: ...
3
votes
1answer
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 ...
0
votes
1answer
41 views

Why do I need to save Configurable Products 2x times?

I am having problems on putting my product in stock. I create it, I associate simple products to it, and it works fine. Visibility and simple products stock are also correct. The big problem here is ...
0
votes
1answer
187 views

Update website id using collection

I have to update website for some items and price. I do it in the loop and fetch data from csv file. I did it this way: $productCollection = Mage::getModel('catalog/product')->getCollection()...
4
votes
1answer
4k 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 ?
3
votes
1answer
1k 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")->...
0
votes
1answer
1k views

Magento 2 : How to save data in database

I want to save some data in to custom table.When I use static value to save data then it is going good but If I try to use dynamic data or used any calculation in between then It is going in infinite ...
1
vote
1answer
50 views

custom email logic

What have i done wrong here? If someone saves a product or updates a product attribute but the product is disabled it shouldn't send an email. If a product is enabled and they disable it whether ...
3
votes
1answer
511 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, ...
0
votes
1answer
654 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 ...