All Questions

Tagged with
Filter by
Sorted by
Tagged with
2
votes
1answer
592 views

Magento 2.1: Letter Case for Controller Actions URL Route

I tried to create a custom payment gateway by creating a custom module based on Paypal module, specically Paypal Express Checkout. I was able to replicate the route for controller actions: Start, ...
1
vote
3answers
596 views

Magento 2:- How to get customers now online?

Magento 2:- How to get customers now online? Want to get all customers data current login.
6
votes
4answers
4k views

How to solve admin grid error?

I am getting this error in admin custom module of Magento 2. Something went wrong with processing the default view and we have restored the filter to its original state. admin grid error.
4
votes
1answer
1k views

Magento2.1: How to override the template in custom module?

I want to create an extension that will give shop owners ability to edit their product image. So I understand I need this template Magento/ProductVideo/view/adminhtml/templates/helper/gallery.phtml I ...
1
vote
2answers
3k views

how to get block data on phtml template in magento 2

what is missing in my code block data not shown in phtml template block page namespace xxxx\Trails\Block; use \Magento\Framework\View\Element\Template; use \Magento\Framework\View\Element\...
0
votes
2answers
1k views

Magento 2.1: Get Breadcrumb Array

How can I get the breadcrumb array from my template? I'm able to get the object: $this->getLayout()->getBlock('breadcrumbs'); and full breadcrumb path as final HTML $this->getLayout()-&...
1
vote
2answers
2k views

Magento 2 - How to change position of Sign in and My Account link?

How can i move account creation link and sign in link after the search box. Need Help
1
vote
2answers
2k views

Magento:2 How to Image upload in custom module

Image upload working fine in tmp folder, then store in DB. I want to after saving data image stored in the base folder pub/media/events var_dump($data); " ["events_url"]=> array(1) { [0]=> ...
0
votes
1answer
703 views

Magento 2 Class Inject in Constructor

I am trying to create a simple module based on this answer https://magento.stackexchange.com/a/125519/45358 I just need a function to check if customer is logged or not in a custom theme header.phtml....
1
vote
5answers
3k views

Magento 2.1 UI component form addFieldToFilter() on null

I am trying to make a UI component form for creating products in Magento 2.1 module. However, I stuck with the problem that it throws this error: Fatal error: Method Magento\Ui\TemplateEngine\...
19
votes
2answers
21k views

Magento 2.1.1 How to load Order with Increment ID using OrderRepository object

What would be the latest best practice to load Order using increment ID (instead of Order ID) using OrderRepository
1
vote
1answer
29 views

How to set varchar on installschemas

I would like to add a new column inside the magento2 database. Write now i add a \Magento\Framework\DB\Ddl\Table::TYPE_TEXT as the column type. here is my code if(!$installer->getConnection()-&...
1
vote
1answer
58 views

Magento 2 Uncaught TypeError: Argument 1 […] \DataSetup::__construct() […] must be an instance […]

I have an Ubuntu Server 18.04 with PHP 7.0.33 and a working Magento 2.1.7 installation with a working (up to yesterday) module for credit card payment after adding some new modules, compiling and ...
1
vote
2answers
223 views

magento 2 - custom router throws Front controller reached 100 router match iterations error

I am trying to build a module that has a custom front-end router on magento 2.1.12. I am following magento doc & I am using the inchoo custom router example. The problem is the route (MY-SITE/...
0
votes
1answer
86 views

How to add custom button to product page to three different places (magento 2)?

Button position decide by store owner(using admin panel). There are three positions.if user select test01 button's position others shouldn't be display.(Display only one place depend on user decision) ...
1
vote
2answers
252 views

Cannot add new cli command “Class does not exist” on setup:upgrade

I am trying add custom command for beginning 'hello world'. I'm doing all by guide but always have this error [ReflectionException] Class Hesoy\HelloWorld\Console\Command\HelloWorldCommand ...
2
votes
1answer
185 views

How to override mini-cart default template html file?

I have Magento 2.2.4 version, And I want to overwrite Magento_Checkout/template/minicart/item/default.html file in my custom module. For this, I created require-jsconfig.js file at below path /app/...
2
votes
2answers
1k views

Magento 2: How to solve Duplicate Of Template Name?

When I installed a new module and did the setup:upgrade I received this message:
0
votes
1answer
78 views

Cannot add custom topmenu link with plugin

I want to add custom links to the topmen / a submenu in the topmenu (I need the links for custom filters). To achieve this, I have created a plugin: app/code/Vendor/Module/etc/frontend/di.xml: <...
0
votes
1answer
91 views

magento 2 admin not working correctly

I used wamp to install Magento 2 but admin not working correctly, how can I fix it when I opened "inspect" I found this error
0
votes
0answers
73 views

Customer Custom Attribute gets deleted upon update in Magento 2

We are facing an issue while updating customer information from Customer My account section on frontend that is Customer Custom attributes gets deleted upon update or save customer information. For ...
0
votes
2answers
943 views

M2 Module to Override Login Page Title

I have written a module to override vendor/magento/module-customer/Block/Form/Login/Login.php in app/code to change the page title. My override code is below: <?php /** * Copyright © 2013-2017 ...
1
vote
1answer
223 views

Magento 2: How to stop event/observer if another already ran

I have 2 events running if subscribe to newsletter is checked on the checkout page. sales_model_service_quote_submit_success newsletter_subscriber_save_after Can i prevent event #2 from happening if ...
3
votes
2answers
2k views

How to load a popup in the home page?

I need to show a popup when the store loads and need to ask users to select the city, then only products deliverable to these cities must show. In the backend, I added some cities to a new attribute '...
0
votes
1answer
416 views

Magento 2 Credit Memos : Template override doesn't work after clicking “Update Qty's” button

I am creating a custom module to simplify the Credit Memo creation for admin users. One of the features is hiding the "Return to Stock" column. I have overwritten 2 files for this: vendor/magento/...
2
votes
1answer
2k views

Magento2 Disable All Modules of a Particular Vendor Name

I would like disable all module of a particular vendor in a single command. I know we have php bin/magento module:disable [Vendor_ModuleName] command but as far as I know it doesnot take wild cards ...
0
votes
1answer
253 views

How to publish my module in magento Marketplace?

I have developed a module for magento 2. In particular is a custom shipping method, I would like anybody could be able to use my shipping method. How can I do to put my module downloable. I tried on ...
2
votes
3answers
2k views

Magento 2: How to get visitors data

I want to get visitor Id in my custom block for getting product view history of non logged in customer public function __construct( \Magento\Customer\Model\Visitor $customerVisitor ){ $...
0
votes
0answers
24 views

How can I call my API of Shipping when the order is placed using my custom shipping module?

I have created a custom shipping method and is appearing in the admin config page, and also is able in the customer order to be selected. Now I need to do an api call to my shipping company when the ...
0
votes
1answer
26 views

How to add custom configs variables to custom shipping method?

I have created a custom shipping method following this tutorial: https://www.mageplaza.com/devdocs/magento-2-create-shipping-method/ Now I would need to add a couple of extra variables to admin ...
1
vote
1answer
293 views

Can't see the custom shipping method just added

I need to add a custom shipping method. I was fallowging this tutorial: https://www.mageplaza.com/devdocs/magento-2-create-shipping-method/ I was able to configure my custom shipping method. I set ...
2
votes
1answer
468 views

Send custom email by using cron job magento2

I want to send an Email through a cron job for every 24hrs once.In that email need to mention all the abandoned cart details. I am new to Cron jobs so can you please explain it. Thanks in advance
6
votes
1answer
959 views

How to add a color picker field in Admin form?

How to add color picker in my custom module of Magento 2 admin panel form? Not in System Configuration.
4
votes
2answers
982 views

I created a custom module ,but getting error, not able to figure out what the error is about. How to get out of this error? [duplicate]

Recoverable Error: Argument 1 passed to Webkul\Grid\Controller\Adminhtml\Grid\Index::__construct() must be an instance of Magento\Backend\App\Action\Context, instance of Magento\Framework\...
0
votes
1answer
55 views

How to create module for module_quote

I am following this Aaron Allen's solution for my problem. Magento 2.1.7 Change Shipping Method Title method.method_title USPS Pirority Mail Day 1 He says "You need to make a module, which is the ...
0
votes
2answers
45 views

adding a new block with overwritten class fails

I have created a new module (to extend checkout): <?xml version="1.0" ?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:...
0
votes
1answer
160 views

Magento 2 Extension Vendor name start with digit Not working

Try to create Magento 2 Module, Vendor name start with digit Like : app/code/3dvendor/3dmodule (3dvendor_3dmodule) when run "php bin/magento setup:di:compile" command we get error Is it valid ...
0
votes
1answer
234 views

Add customer attribute with yes/no option

I need to create custom Customer Attribute with Yes/No option. I successfully created ones with Text input previously. What I need now is, create a separate attribute for set if Customer is on Hold or ...
0
votes
0answers
785 views

Magento2: Recoverable Error: Argument 1 passed to ::__construct() must implement interface

I am trying to make a shipping method based on percentage. Can someone explain to me whats wrong with the following? I get this error message: main.CRITICAL: Recoverable Error: Argument 1 passed to ...
0
votes
0answers
609 views

Magento 2:- how to show selected value in ui components?

how to show selected value in edit form in Magento admin using UI component many-to-many relation public function toOptionArray() { if (!$this->_options) { $...
0
votes
1answer
113 views

Override function does not work

Although I have seen many examples of overriding a function in Magento2, I still cannot manage to make the following work: Disabling the Welcome-Email for new customers. The Welcome-Email is sent by ...
0
votes
0answers
80 views

Magento 2: How to add Join query in a custom module

want to add join query in getPost function in a single view public function getPost() { if ($this->_post === null) { /** @var Post $post */ $post = $this->...
0
votes
0answers
341 views

How to Upload image in magento 2 using UiComponent

I am trying to upload Images with a custom module in Magento admin <field name="recipes_image"> <argument name="data" xsi:type="array"> <item name=...
1
vote
3answers
1k views

Create custom route in Custom module magento 2

How to create a custom route in Magento 2 http://127.0.0.1/magento8/trails/post/view/id/13 module:- trails folder :-post controller :- view argument :-id/13 I want to http://127.0.0.1/magento8/...
3
votes
2answers
522 views

Magento 2 module not working. Override fails

I am trying to write a module that filters products in a product collection. For that I have tried to override Magento\Catalog\Model\Layer. These are the files in the module: /Viking/FilterProducts/...
0
votes
2answers
526 views

Magento 2 Ui Conditions component in custom module

Please tell me about using Ui Conditions component in my custom module. I`m trying to make module with products conditions filtration, like a catalog widget 'catalog product list': I'm trying to ...
1
vote
0answers
202 views

Update the summary section in checkout cart page

I am stuck on the one problem,I have added one product with custom price in cart using custom-module controller.Product is adding with the custom price but the summary section subtotal and grandtotal ...
0
votes
2answers
133 views

How do I override this file in theme?

There is a phtml file from a module that I want to override in my theme. The path to the file is: \vendor\mageplaza\magento-2-social-login\view\frontend\templates\form\social.phtml. I am trying to ...
1
vote
1answer
40 views

Magento 2.1 Translate text to given locale

I have a situation where I need to save values in couple of languages, Arabic and English at a save form, So I have two fields with the name Product Name and اسم المنتج i.e Product Name in Arabic, So ...
0
votes
0answers
53 views

Find referenceContainer in Magento 2.1 module

This is my first attempt to write a Module for Magento 2.1 I have read the documentation for referenceContainer that is not very helpful, I would like to know how can I access and apply my change in ...