Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options not deleted user 84211

General questions about Magento 2, not specific to a minor version. Use this tag to distinguish from Magento 1. If you have issues with a specific version, please use the appropriate 'Magento-2.x' tag instead. Functionalities between Magento 2 minor versions might differ.

2 votes
Accepted

How to validate Size and color in Product details page in Magento 2

$("#popupButton").on('click',function(){ //Model id var form = $("#product_addtocart_form"); var i = 0; form.find('input').each(function () { if($(this).attr('aria-required')) …
26vivek's user avatar
  • 467
0 votes
1 answer
302 views

Inject Class of Factory (Model or Repository) For Saving Data

If I want to save data in controller's action, what should I inject? Model Class or Repository Class Model Factory or Repository Factory . use Krish\Database\Api\Data\TestInterface; use Krish\Dat …
26vivek's user avatar
  • 467
1 vote

Magento 2.3 - How to Add New Fields on Registration page in specific in "Personal Informatio...

Create Vendor/Module/view/frontend/layout/customer_account_create.xml <?xml version="1.0"?> <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento: …
26vivek's user avatar
  • 467
0 votes
1 answer
475 views

Magento 2 - How to revert model save in afterSave method

I have two tables "first_table" and "second_table". I am using afterSave method in "first_table" model class like bellow namespace Vendor\Module\Model; use Magento\Framework\Model\AbstractModel; / …
26vivek's user avatar
  • 467
1 vote
1 answer
438 views

What is different between SimpleDataObject and ExtensibleDataObject in magento 2

Magento has 2 classes \Magento\Framework\Api\ExtensibleDataObjectConverter and \Magento\Framework\Api\SimpleDataObjectConverter What are the differences and scenario for using them?
26vivek's user avatar
  • 467
0 votes
1 answer
1k views

Render template without layout. Just html code

My layout code is <?xml version="1.0"?> <page> <body> <referenceContainer name="header.container" remove="true" /> <referenceContainer name="footer" remove="true" /> <ref …
26vivek's user avatar
  • 467
1 vote
0 answers
146 views

How Configurable Product's option rendered in magento 2

Actually I am creation a custom product view page fore understanding the rendering of product view I have created controller like this namespace Tasks\BulkAdd\Controller\Index; class Vivek extends A …
26vivek's user avatar
  • 467
2 votes
1 answer
715 views

Override Default layout with module

I have one module called Test_A. We can override any layout of Module-theme in Test_A by giving the same name. Ex. Module-theme/view/frontend/layouts/frontname_controller_action.xml can be override …
26vivek's user avatar
  • 467
2 votes
Accepted

Magento2: How to remove items from cart before adding new Item?

you can delete all item before they are adding as cart candidate. You can use following process $cart = $objectManager->create('\Magento\Checkout\Model\Cart'); foreach ($cart->getQuote()->ge …
26vivek's user avatar
  • 467
0 votes
1 answer
418 views

Custom column is not updating in customer_entity table

I added custom column 'email_status' in customer_entity table via dc_schema.xml <?xml version="1.0"?> <schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespace …
26vivek's user avatar
  • 467
0 votes
Accepted

Custom column is not updating in customer_entity table

All the columns in customer_entity table should an eav attribute of customer. So for adding any new column in customer_entity table, We must create an eav of the same name with the backend_type = …
26vivek's user avatar
  • 467
0 votes
1 answer
318 views

Magento 2 : How to restrct field to be update in model?

I have a field in admin from which only be change at the time of new record. On the form edit, I want to show that field as editable but don't want to save the changes. For that, I have created the be …
26vivek's user avatar
  • 467
0 votes
1 answer
288 views

How cache management grid renders in Magento?

I was thinking to make an invalid cache selected on page load for an easy refresh. But when I saw the code, I didn't find any UI component for listing these caches. Can anyone describe how Magento lis …
26vivek's user avatar
  • 467
1 vote
2 answers
999 views

What can we use for exist query in magento2?

We have two approaches to find if the record exists in database or not First $select = $this->bookResource->getConnection()->select() ->distinct() ->from( $this->bookResource->getMainTable(), …
26vivek's user avatar
  • 467
0 votes
1 answer
27 views

How to get translated data in customer section

I had a task to show the back order message in the mini cart. What I did is just take the message from the customer cart section and show it in the mini cart. Now the problem is with the translation. …
26vivek's user avatar
  • 467

15 30 50 per page