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 49926

Denotes questions related to Magento CE and EE 2.1.x

4 votes
2 answers
6k views

Uncaught ReferenceError: define is not defined in extension custom js

i created the custom js for backend extension module like this: custom.js: define([ 'jquery', 'underscore', 'mage/url', 'jquery/ui' ], function ($, _,urlBuilder) { 'use stric …
simple guy's user avatar
  • 2,494
0 votes
2 answers
2k views

Magento 2 how convert package weight to Kilogram (KG)

I have a custom shipping method in Magento 2, i successfully got the package weight by using this code in Model/Carrier.php : $weight = $request->getPackageWeight(); but the default system measurem …
simple guy's user avatar
  • 2,494
14 votes
2 answers
15k views

Magento 2 get all product attributes without product id

I want to retrieve all product attributes those are available, then convert it to name & value for my select options field. In Magento 1 I can achieve it like this: public function getMagentoAttribut …
simple guy's user avatar
  • 2,494
1 vote
1 answer
185 views

Failed to load 3rd party library in Magento 2

I have a 3rd party library and i put it inside lib/internal folder like this : but when i call the function in my custom module helper/data.php , i got an error undefined function, here's the helpe …
simple guy's user avatar
  • 2,494
2 votes
1 answer
817 views

Uncaught Error: Mismatched anonymous when calling JQuery in Magento 2 frontend

i use jquery in front-end for ajax in phtml page, but i'm getting this error: Uncaught Error: Mismatched anonymous define() module: function ($, _, template) here's my code: <script> define([ …
simple guy's user avatar
  • 2,494
0 votes
1 answer
265 views

How to Send Emai SMTP with template in magento 2?

I follow this respitory to send SMTP email and it successfully done, but right now if i want to set the template for email i have to use setBodyHtml() like this: $body = '<html><head> </head> <body> …
simple guy's user avatar
  • 2,494
1 vote
1 answer
2k views

Magento 2 Fileld email template dropdown is not defined in System XML

i create a system xml to load a field dropdown for selecting email template, but when i access the configuration page there is an error like this: Exception #0 (UnexpectedValueException): Email templ …
simple guy's user avatar
  • 2,494
4 votes
2 answers
1k views

Run .sql external file when installing extension in Magento 2

I have an .sql file which contain a lot of insert data, and i want import this .sql file to current magento 2 database file, everytime my custom extension finish installing and creating all custom tab …
simple guy's user avatar
  • 2,494
4 votes
2 answers
8k views

Magento 2 Get last and first item from model collections

I want to retrieve the last and first item from model collection in magento 2, in magento 1.9 i can simply retrieve it like this : $lastItem = $collections->getLastItem(); $firstItem = $collections-> …
simple guy's user avatar
  • 2,494
5 votes
1 answer
2k views

Override js core function in Magento 2 [duplicate]

in backend there is module-sales/view/adminhtml/web/order/create/scripts.js, and inside that js there is a function like this : loadShippingRates : function(){ this.isShippingMethodReset …
simple guy's user avatar
  • 2,494
3 votes
1 answer
3k views

Error : Extra parameters passed to parent construct: $coreRegistry

I have a controller in my custom module, but when i run php bin/magento setup:di:compile, i got this following error: Extra parameters passed to parent construct: $coreRegistry here's my control …
simple guy's user avatar
  • 2,494
1 vote
1 answer
12k views

How to redirect to previous page with message in magento 2 frontend?

I have a form that post data to controller in Magento 2 Frontend, i want to do some validation, and redirect back to previous page after validation with success or error message, here's how i redirect …
simple guy's user avatar
  • 2,494
2 votes
0 answers
441 views

Pre filter datasource for Magento 2 custom grid

I have 2 grid that i want to use in my custom module, the first grid have actions column that have link to access the second grid, the problem is i want to load data in second grid (listingproduct) ba …
simple guy's user avatar
  • 2,494
1 vote
1 answer
34 views

Custom block below body tag not showing

I add block .phtml file below </body> tag in my /Vendor/Module/view/frontend/layout/default.xml like this: <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="u …
simple guy's user avatar
  • 2,494
1 vote
0 answers
135 views

Get latest quote data by customer id or e-mail

I want to retrieve the latest quote and quote items that hasn't been checked out only by using customer id or customer e-mail, is there a way to do this?
simple guy's user avatar
  • 2,494

15 30 50 per page