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 32457

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.

0 votes

Error when adding product via admin

Delete var/generation folder, and delete generated folder, give full permission to pub, and var folders, it may help you
Jafar Pinjar's user avatar
  • 1,961
0 votes

Remove textfield from checkoutpage-IWD one step checkout

Please open the layout file of your module. Get the name of component and use below code to remove component. <item name="name_of_componet" xsi:type="array"> <item name="componentDisabled" xsi:ty …
Jafar Pinjar's user avatar
  • 1,961
1 vote
Accepted

Magento2: How to remove catalogue menu(Main menu) from frontend

Try to comment the lines for top menu code in below path vendor/magento/module-theme/view/frontend/templates/html/topmenu.phtml Editing in vendor file is a bad practice, try to override into your cu …
Jafar Pinjar's user avatar
  • 1,961
0 votes

How to show qty product sold in catalog/product/list.phtml in mageto 2

Create a function in Block and add below code in that. <?php namespace Vendor\Module\Block; class SoldItems extends \Magento\Framework\View\Element\Template { protected $_soldCollection public fu …
Jafar Pinjar's user avatar
  • 1,961
0 votes

Getting custom table data in customer dashboard for specific customer

Inject below class protected $customerSession; public function __construct( ..................., \Magento\Customer\Model\Session $customerSession, ................. ) { parent::__co …
Jafar Pinjar's user avatar
  • 1,961
0 votes

Magento 2 update query with AND

Please replace this $where = ['parent_id' => (int)$shipmentId, 'order_item_id' => (int)$itemId, ]; with: $where = ['parent_id' => (int)$shipmentId, 'order_item_id' …
Jafar Pinjar's user avatar
  • 1,961
0 votes
1 answer
922 views

Category name update with category Id in magento2

I am trying below code to update category name and parent id by categoryId, public function __construct( \Magento\Catalog\Model\CategoryFactory $categoryFactory ) { $this->categoryFactory …
Jafar Pinjar's user avatar
  • 1,961
1 vote

Magento 2 : how to update <meta charset="utf-8">

Default Charset is set in Theme configuration, You can find in the below file path vendor/magento/module-theme/etc/config.xml If you want to change this, override the file into your custom theme, …
Jafar Pinjar's user avatar
  • 1,961
4 votes
Accepted

Magento 2.3 Product getSpecialPrice

Use below code to check if product have special price or not $specialprice = $_product->getSpecialPrice(); $specialfromdate = $_product->getSpecialFromDate(); $specialtodate = $_product->getSpecialTo …
Jafar Pinjar's user avatar
  • 1,961
0 votes

Magento 2.X: Locate setCouponcode($string) method

Please find here vendor\magento\module-quote\Api\Data\TotalsInterface.php vendor\magento\module-quote\Model\Cart\Totals.php
Jafar Pinjar's user avatar
  • 1,961
1 vote

Convert M1 code to M2 code

You can try once below code, protected $_orderCollectionFactory; protected $orders; protected $_salesConfig; public function __construct( \Magento\Sales\Model\ResourceModel\Order\CollectionFa …
Jafar Pinjar's user avatar
  • 1,961
1 vote

Magento2: Product Import Issue

You can try this file. Download here sample file May help you!!
Jafar Pinjar's user avatar
  • 1,961
7 votes
2 answers
11k views

Add custom div before main content in magento2

I am trying to add my custom div with class and id before the maincontent. <main id="maincontent" class="page-main"> can i add the custom div before this line? How this can be done. Please anyone …
Jafar Pinjar's user avatar
  • 1,961
2 votes
2 answers
6k views

get customer id by email magento2?

I am using below code to get customer id by email use Magento\Customer\Model\Session; protected $_objectManager; protected $currentCustomer; protected $_customer; protected $_storeManager; pub …
Jafar Pinjar's user avatar
  • 1,961
3 votes
2 answers
13k views

Exception usage in magento2

I have created a custom controller to create customer using try catch, below is my magento1 code of controller How this can be used in magento2? … ; return $this->_redirect('*/*/listuser/'); } } Please anyone help me on this how try catch is used for above code in magento2 format? …
Jafar Pinjar's user avatar
  • 1,961

1
2 3 4 5
15
15 30 50 per page