Questions tagged [crud]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
32 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.
user avatar
0 votes
1 answer
144 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
user avatar
  • 31
0 votes
1 answer
16 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 ...
user avatar
  • 727
0 votes
0 answers
36 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 ...
user avatar
  • 177
0 votes
0 answers
19 views

Display config data array in a admin grid

I create a system.xml file that saves an array in the config_data table. {"_1621473140678_678":{"shipping_method":"shipmethod1","cost":"15"},"...
user avatar
-3 votes
3 answers
337 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 ...
user avatar
  • 473
0 votes
4 answers
2k 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->...
user avatar
  • 2,380
0 votes
1 answer
30 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 &...
user avatar
0 votes
1 answer
2k 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 ...
user avatar
  • 3,157
0 votes
1 answer
173 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 ...
user avatar
  • 211
0 votes
1 answer
43 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 $...
user avatar
0 votes
0 answers
36 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 ...
user avatar
1 vote
2 answers
549 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->...
user avatar
2 votes
5 answers
7k 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 ...
user avatar
0 votes
1 answer
111 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 ...
user avatar
  • 1,168
2 votes
1 answer
608 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: &...
user avatar
  • 291
1 vote
1 answer
416 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, ...
user avatar
0 votes
1 answer
2k 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 '...
user avatar
0 votes
1 answer
735 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 ...
user avatar
2 votes
0 answers
46 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 `...
user avatar
  • 1,683
1 vote
2 answers
663 views

Magento2: Can anyone describe crud operation?

Can anyone describe the CRUD operations by admin panel ?
user avatar
  • 1,127
1 vote
0 answers
130 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"> <...
user avatar
  • 134
2 votes
2 answers
357 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\...
user avatar
1 vote
1 answer
1k 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, "...
user avatar
3 votes
2 answers
103 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 ...
user avatar
  • 1,168
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" ...
user avatar
  • 1,168
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->...
user avatar
1 vote
1 answer
5k 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 ...
user avatar
  • 1,683
3 votes
0 answers
96 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 ...
user avatar
  • 4,585
0 votes
1 answer
86 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 ...
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 ...
user avatar
12 votes
2 answers
3k 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 ...
user avatar
  • 179
2 votes
1 answer
432 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://...
user avatar
2 votes
0 answers
92 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 ...
user avatar
  • 195k
0 votes
1 answer
632 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-&...
user avatar
  • 1,434
0 votes
1 answer
383 views

Correct way to join core tables in magento 2

I am able to join table something like this.. $totalsales = $this->orderCollectionFactory->create() ->addFieldToSelect('*') ->...
user avatar
  • 4,585
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.
user avatar
  • 2,116
1 vote
1 answer
2k 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.
user avatar
  • 2,116
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'); $...
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\...
user avatar
  • 9,479
19 votes
2 answers
18k 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 ...
user avatar
0 votes
1 answer
459 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() ...
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 ...
user avatar
  • 684
1 vote
2 answers
770 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 ...
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 ...
user avatar
  • 9,443
3 votes
3 answers
8k 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 [>---------------------------] ...
user avatar
  • 9,443
0 votes
2 answers
6k 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 ---------------------------------------------...
user avatar
28 votes
1 answer
5k views

Magento 2.1: using the entity manager

From 2.1 Magento has introduced Magento/Framework/Model/EntityManager I may be wrong here but from my understanding it is to replace Magento/Framework/Model/AbstractModel which was implementing the ...
user avatar
10 votes
2 answers
355 views

Magento 2 and Services Contracts

I know there is a lot of topics about this question but I'm not sure to clearly understand.. When did we need to use service contract ? Are they replacing the CRUD done by Model / ResourceModel ? ...
user avatar
2 votes
1 answer
2k views

i need set flag in model save before event and get in model save after event in magento 2

I have Create two event model save before and after i get specific object and set flag in before model and get in after model. for example in before model public function execute(\Magento\...
user avatar
  • 3,685