Questions tagged [crud]

The tag has no usage guidance.

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

Magento2 Integrate UI component in Frontend

I am integrating UI grid with complete CRUD operations with UI component on frontend. But i am facing 1 issue of caching, when we edit from Actions column on frontend grid, the data provider is called ...
hardik malkani's user avatar
0 votes
1 answer
545 views

Save custom frontend form data to database magento 2.4.5

I have created custom form on frontend and now on submit click I want to save filled data to database. module.xml <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/...
Rakhi Prajapati's user avatar
2 votes
0 answers
36 views

Code refactor - EntityManager, ResourceModel and handlers

I have a slider module which use EntityManager. I want to refactor code to use ResourceModel, but i have problem with many to many relations. With EntityManager i used EntityManager\Operation\...
Konrad's user avatar
  • 55
0 votes
1 answer
174 views

How to create custom commands to perform crud operations in magento 2

How to create custom commands to perform crud operations in Magento 2.I am not getting help online. please provide code if possible.
witcher's user avatar
  • 21
0 votes
1 answer
181 views

How to create simple CRUD module in Magento 1?

I'm new to Magento 1. I want to create 1 simple CRUD Operation module.
Dhruv Prajapati's user avatar
0 votes
1 answer
534 views

CRUD operation with admin grid, working example Magento 2

help to beginners give us working example of CRUD system in magento 2 with admin grid
NoOn's user avatar
  • 65
0 votes
1 answer
31 views

Does magento offers a crud CLI

I was wondering if magento was offering a CRUD CLI like Symfony would do. You get a prompt that ask you your entity fields and once your entered them all then the entity and it's related repository is ...
Claims's user avatar
  • 1,146
0 votes
0 answers
41 views

I need a tutorial to create a crud

I'm looking to create a form on the back end that makes a registration in the bank using grid, but I don't think 1 tutorial that works, they are always out of date or incomplete. Can anyone inform me ...
lucas's user avatar
  • 309
-3 votes
3 answers
633 views

I want to develop custom grid module with add buttons in Magento2 [duplicate]

I want to create custom module in which grid in backend with all add,edit,delete,and mass delete and also with buttons in grid for reset,back,delete,save and display it on frontend. so can anyone have ...
Deep Shah's user avatar
  • 555
1 vote
4 answers
4k views

Magento 2 - Check if record with certain value already exist in table before creating it

I created a new table company_shipping_quote. I am writing data into it like this: $quoteId = $quote->getId(); $html = $this->_generateNote($expressRule); $quoteModel = $this->...
Black's user avatar
  • 3,280
0 votes
1 answer
456 views

Magento 2 update column

I have one cronjob needs to update status periodically. Target table name is "Custom" if custom table contain customid, user_id, status, exp_date columns. I have scheduler php file call &...
clear.choi's user avatar
0 votes
1 answer
4k views

How to Create CRUD operations with Admin Grid in Magento 2

How to create the CRUD operations with Admin Grid in Magento 2? I want to : First of create frontend input form. frontend input form data get in admin grid. In admin grid Create delete options. In ...
Mohit Patel's user avatar
  • 3,750
0 votes
1 answer
351 views

Cannot update product name using productRepository in Admin Store ( Store 0 )

I'm trying to update a product using productRepository ( migrating from a flow using product factory with load ). Problem is tha when updating the name it is updating in store 1 ( default store ) but ...
sarakinos's user avatar
  • 241
0 votes
1 answer
192 views

How To Upload Images and Show Their Thumbnails From Custom Module Admin Form

I have a custom grid. Need to upload product images from admin form of the custom module. Here is the grid Edit file at: app\code\local\Crud\Banner\Block\Adminhtml\Banner\Edit\Form.php $...
Rafael de Oliveira Silva's user avatar
0 votes
0 answers
56 views

Block class is not getting loaded in magento 2.3.4

I created a simple layout where I specify the block class and the template to be rendered. But it seems like the block and template is not getting rendered. Below is the code. I am trying the CRUD ...
Mathanagopal S's user avatar
1 vote
2 answers
1k views

Magento 2:- Updating table value

I want to update the value of amount column in custom database table where customer_id with value of $total. $total = $array['amount'] - $arr['base_grand_total']; $sortedData = $prepaidModel->...
Akash Killedar's user avatar
2 votes
5 answers
9k views

CRUD operation step by step with example

Is there any working example for CRUD operations step by step with code? I tried many links but not getting the accurate result to understand the steps of crud operations. I want to make it an ...
Chirag Parmar's user avatar
0 votes
1 answer
256 views

Magento 2: Why Add/Edit redirect to Admin Dashboard

I'm working on simple CRUD (create, read, update and delete) module without grid or ui component, just simple CRUD. So when i'm trying to create add/edit form, i've meet some weird issue, when i ...
fudu's user avatar
  • 1,268
2 votes
1 answer
934 views

UIComponent Form - Spinner showing

In my Form UIComponent only a spinner is showing. I compared my implementation to several ways it is implemented. The grid is showing just fine, i only have the problem in the form. My layout file: &...
remklov's user avatar
  • 331
1 vote
1 answer
490 views

How to add a pay until date to invoice in Magento2?

Please excuse me if I am asking a dumb question, but I am new to Magento and frankly, my first impression is that it is over-designed and poorly documented. Maybe this is part of their business model, ...
Radu Marinescu's user avatar
0 votes
1 answer
3k views

Magento 2.2.6 | Uncaught Error: Undefined class constant 'CACHE_TAG'

I am very new to Magento, i created a CRUD custom module, when I input some data in form, and hit save button, I got an error like this: Fatal error: Uncaught Error: Undefined class constant '...
Partab Saifuddin Zakir's user avatar
0 votes
1 answer
792 views

Connect Ionic App to Magento 2.3 REST API

I'm a Magento developer and I need to connect an app developed in Ionic with the Magento 2 REST API. I need to make an extension that grants more access to a customer token, additionally, I need to ...
WillBrands's user avatar
2 votes
0 answers
78 views

Magento 2 - Can I have to create API, Interface & Resource Model for relational table

I am creating a module which have three tables let's say for example table1 -------- id int(13) PRIMARY_KEY title varchar(50) table2 -------- id int(13) PRIMARY_KEY title varchar(255) table3 `...
Himanshu's user avatar
  • 1,761
1 vote
2 answers
699 views

Magento2: Can anyone describe crud operation?

Can anyone describe the CRUD operations by admin panel ?
Masud Shaikh's user avatar
  • 1,189
1 vote
0 answers
176 views

Magento 2 API - crud for all tables

Is it possible to create a new REST API to update or create data in all magento tables from a xml added in POST : <data> <row table="Nom_Table_1" key="Nom_Champ_Key_1"> <...
th0r1eif's user avatar
  • 154
3 votes
2 answers
683 views

Cusotm module edit action redirects it to the dashborard

I created Grid using UI Components and provide Edit action using < actionsColumn > in vendormodulename_entity_list.xml <actionsColumn name="actions" class="Vendor\Modulename\Ui\Component\...
Kapil Dev Singh's user avatar
1 vote
1 answer
2k views

Magento 2, Cannot `getCollection()` from model factory

Using magento 2.2, CRUD, API. I got an error while try to access method getCollection(). { "messages": { "error": [ { "code": 500, "...
Bong Channarith's user avatar
3 votes
2 answers
109 views

Magento 2.2.5: Add Student Instead of Update Student

So instead of update the student, this code add a new student. I'm looking for a way that not using object manager, because the objectmanager is recommended not to use. So when i searching for how to ...
fudu's user avatar
  • 1,268
6 votes
3 answers
3k views

Magento 2.2.5 : Cant go to execute() in Controller

I'm doing a simple CRUD custom module after this module C:\xampp\htdocs\magento\vendor\magento\module-cms\Controller\Adminhtml\Page\Save.php and I have a controller to save/create/add the "students" ...
fudu's user avatar
  • 1,268
0 votes
2 answers
1k views

Magento 2 : CRUD, Invalid method _getResource() in model when Save

Magento CE 2.2.0; I created CRUD for model 'people' and save data in to database by controller for testing. While i try to save by using controllor Add: $_person = $this->_objectManager->...
Bong Channarith's user avatar
1 vote
1 answer
6k views

Magento 2.2 CRUD(Add,Update,Delete,Inline Edit) with ui component

My Concern is i want to develop basic extension with ui component with simple crud operation so i am referencing cms-page. What i have achived so far: Grid is properly working(with filter,column ...
Himanshu's user avatar
  • 1,761
3 votes
0 answers
117 views

Magento 2 : How to get top 10 repeated values in a column using CRUD instead of sql?

I want to get top 10 most repeated values in a column of my table, I can do so using sql but I need to do it using CRUD i.e using collections or model as magento coding standard doesn't allow naked ...
Vivek Kumar's user avatar
  • 5,105
0 votes
1 answer
125 views

Magento2 : CRUD Module Add Button Not Showing

Starting with this sample, https://github.com/mageplaza/magento-2-sample-module, I'm trying to make a CRUD manager module. I went through the sample and changed everything I could find that looked ...
cvassios's user avatar
  • 153
0 votes
3 answers
2k views

Correct way to save entries to database

I want to know, what is the correct way to implement CRUD operations in Magento 2? because I found a lot of examples but they use deprecated methods. I created a table ('quote reserved item') with ...
Daniel Lavric's user avatar
12 votes
2 answers
4k views

What and why is the proper way to load a model

I have quite a lot of experience with Magento but I realized that I don't understand which way of loading a model is the correct one and why. I've read everything that I could, about the topic but ...
czs's user avatar
  • 179
2 votes
1 answer
449 views

CRUD logic in Controller or Block?

I have referred several blogs which explains CRUD functionality, some of the blogs write code like saving a model, in a Controller and some in a Block. Blogs CRUD functionality in Block : http://...
Kishor Hase's user avatar
2 votes
0 answers
93 views

How to go around "Incorrect namespace usage(s)" in static tests

I have a simple CRUD module for Magento 2. When I run the static tests I get the following error/warning. "Incorrect namespace usage(s) found in file..... <Vendor>_<Module>". The ...
Marius's user avatar
  • 198k
0 votes
1 answer
741 views

How to store dropdown value in database and display selected when edit item?

I am developing custom module. Other fields are saving data in database but i have issue with Dropdown field. It's not saving value in database. My code as following: $elements['target'] = $fieldset-&...
Magecode's user avatar
  • 1,504
0 votes
1 answer
396 views

Correct way to join core tables in magento 2

I am able to join table something like this.. $totalsales = $this->orderCollectionFactory->create() ->addFieldToSelect('*') ->...
Vivek Kumar's user avatar
  • 5,105
1 vote
2 answers
1k views

Can Anyone Describe a Basic CRUD Operation of Magento From Admin Side in Magento

I want to understand the actual crud operation from admin side with coding.
Jaimin's user avatar
  • 2,146
1 vote
1 answer
3k views

Can Any one Describe a Basic CRUD Operation in Magento Front Side [duplicate]

I want to Know what is the process of ADD Update Delete in Magento from front side. so can any one help with code.
Jaimin's user avatar
  • 2,146
3 votes
2 answers
2k views

Magento\Framework\Exception\NoSuchEntityException when updating products

I am Trying to update product programmatically magento2 Magento ver. 2.1.2 Hear is my code require 'vendor/autoload.php'; use Magento\Framework\App\Bootstrap; include('app/bootstrap.php'); $...
srinath madusanka's user avatar
2 votes
0 answers
50 views

service contract save method flow - magento 2 [duplicate]

I can able to get custom table records from database using service contract but hard to understand the save flow. di.xml <preference for="Mobi\Service\Api\RcRepositoryInterface" type="Mobi\...
Bilal Usean's user avatar
  • 9,947
19 votes
2 answers
20k views

Best Way to Load a Custom Model in Magento 2

Because it was hard for me to find the right way, below you could find the best practice I made mine. Enjoy, correct my English if needed and say me I'm wrong if I am. :) Edit : ... and I found out I ...
Nicolas PERNOT's user avatar
0 votes
1 answer
508 views

Magento 1: most efficient way to bulk add entities

So I'm working on a CRUD module that creates entities based on an XML feed. Right now, I'm using Magento system, so I have an array of data that I use to populate my object then call the save() ...
Raphael at Digital Pianism's user avatar
0 votes
1 answer
2k views

Magento 2: Grid mass action provides collection of Magento\Framework\View\Element\UiComponent\DataProvider\Document instead of models

I'm trying to make a mass delete action for my custom grid. A very helpful source of examples is this grid sample module by Marius but still I can't find the reason why the grid pass collection of ...
Luke's user avatar
  • 772
1 vote
2 answers
787 views

Updating product in the catalog

I've some code to import some products: if the prodocut is new, I've insert it in the catalog, otherwise, I've to update the product if there are some changes. Code is the following: <?php ...
Federica's user avatar
  • 131
5 votes
2 answers
5k views

Magento 2 Custom Module Insert Data Issue

I'm using Magento 2 CE Version 2.1.0 I'm making a custom module. For developing custom module i'm taking reference of Magento CMS Module {folder path}\magento2\vendor\magento\module-cms I have below ...
Jackson's user avatar
  • 9,889
3 votes
3 answers
9k views

Magento 2 Compile Generation Does Not Exist

I'm using Magento 2 CE Version 2.1.0 C:\wamp\www\magento2>C:\wamp\bin\php\php5.6.19\php.exe bin/magento setup:di:compile Compilation was started. %message% 0/7 [>---------------------------] ...
Jackson's user avatar
  • 9,889
0 votes
2 answers
7k views

Delete a row by custom field in Magento

I am facing an issue with deleting rows from table by custom field. Below my database table link_id | quote_id | giftcard_value | giftcard | redeemed_at ---------------------------------------------...
Duke's user avatar
  • 452