Questions tagged [save]
Questions related to save action, most commonly used in form submit
227
questions
0
votes
2
answers
29
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, ...
1
vote
1
answer
45
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 ...
0
votes
2
answers
56
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 ...
0
votes
0
answers
295
views
IMPORT PRODUCT : url key for specified store already exists
I have this method which is meant to save the product during an import script.
protected function saveProduct($product, $urlKeySuffix = 0, $baseUrlKey = false)
{
$savedProd = null;
try {
...
0
votes
1
answer
36
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\...
0
votes
0
answers
106
views
Magento 2 Save Custom Address attributes in quote address
I have created 2 custom address attributes house name and landmark. From the backend, I can save the values of the attributes and it is shown in the address section. Also I have created fields in the ...
0
votes
1
answer
17
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,...
1
vote
0
answers
25
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:
...
0
votes
0
answers
77
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');
$...
0
votes
1
answer
115
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 ...
2
votes
0
answers
439
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
{
"...
0
votes
1
answer
352
views
Customer attributes not saving from admin
I've created custom customer attribues
$attributeCodes = [
['code' => 'customer_company' , 'label'=> 'Societe'],
['code' => 'customer_siret', 'label'=> '...
0
votes
1
answer
201
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, ...
0
votes
1
answer
66
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.
0
votes
1
answer
394
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 ...
2
votes
3
answers
551
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']);
...
1
vote
1
answer
190
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 ...
0
votes
1
answer
714
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 ...
0
votes
1
answer
582
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/...
0
votes
1
answer
25
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 ...
0
votes
0
answers
144
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 ...
0
votes
1
answer
858
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 ...
1
vote
0
answers
30
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 ...
0
votes
3
answers
433
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 ...
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 ...
0
votes
2
answers
641
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 ...
2
votes
0
answers
224
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 ...
0
votes
2
answers
942
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/...
0
votes
1
answer
735
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 ...
0
votes
2
answers
1k
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 ...
0
votes
0
answers
40
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 ...
0
votes
1
answer
1k
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
...
0
votes
1
answer
664
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 ...
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=&...
0
votes
1
answer
435
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 ...
0
votes
1
answer
114
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 ...
3
votes
5
answers
6k
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?
0
votes
1
answer
37
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(...
0
votes
2
answers
676
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)...
1
vote
0
answers
197
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' => ...
0
votes
4
answers
654
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->...
0
votes
1
answer
360
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" ...
0
votes
1
answer
247
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\...
0
votes
0
answers
91
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 ...
1
vote
0
answers
351
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-...
1
vote
1
answer
74
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 ...
-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 ...
0
votes
1
answer
678
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
...
0
votes
1
answer
857
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 ...
0
votes
1
answer
85
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
...