Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
0 votes
1 answer
466 views

what does $this->_coreRegistry->registry('current_category') return in magento 2?

what does $this->_coreRegistry->registry('current_category') return in magento 2 ?
duies's user avatar
  • 3
0 votes
1 answer
632 views

Using a data patch to add the block into cms page

my task sounds like : "Using a data patch to add the block into cms page" i have data patch cms block class CmcBlock implements DataPatchInterface { const CMC_BLOCK = 'first_cmc_block';...
esca7a's user avatar
  • 21
1 vote
1 answer
35 views

Getting and Error

I'm installing SEO Suite Installation via Composer but during installation I'm getting an error. Can anyone help me for the solution of this. Screenshot of error is attached.
Sufyan Ahmed's user avatar
1 vote
3 answers
6k views

Deprecated Functionality: Optional parameter $data declared

We're in the process of upgrading our store from Magento 2.4.2 to 2.4.4 and encountered the error shown in the image below. Please help us fix this issue. Script in the project folder: <?php ...
CodeForGood's user avatar
0 votes
2 answers
20 views

Can not add2cart grouped product when 1 input field is diabled

I need to disable the input field when customergroup = 0 or 1 and quantity is < 0 but when I add the argument 'disabled' to the input, the add2cart button does not put the other available items in ...
Rene Donkers's user avatar
1 vote
1 answer
800 views

Magento 2.4 - PayPal Smart Button Style

I want to change the button style of the PayPal Express Checkout, but is not work, I have create a module to rewrite the PayPal but how I can add my changes there? I create di.xml file on following ...
Robert's user avatar
  • 2,186
0 votes
1 answer
103 views

Magento 2 - How I can rewrite this file

I want to change the following file: vendor/magento/module-paypal/Model/SmartButtonConfig.php but if I made the modifications directly in the vendor file when I will upgrade my store this ...
Robert's user avatar
  • 2,186
0 votes
1 answer
143 views

custom module stop working after Magento 2.4.3 upgrade

I have a module that extend the functionality of other module, in fact it display the product name and product price as a variable, after I upgrade the Magento to 2.4.3 this module stop working and I ...
Robert's user avatar
  • 2,186
0 votes
2 answers
519 views

Change order status for custom module

I want to use one offline payment method module, I install this module is there any way to change the status of the order to be Processing instead of Pending? Right now all my orders have status ...
Robert's user avatar
  • 2,186
0 votes
1 answer
53 views

Can't access Magento 2.2.1 admin,

Can't access Magento 2.2.1 admin, Stores > Configuration, anyone have this error before? How I can fix this. Thank you 1 exception(s): Exception #0 (Exception): Notice: Undefined offset: 2 in /home/...
Robert's user avatar
  • 2,186
1 vote
4 answers
2k views

How to check installed extensions on database magento 2

I need to check installed module on database table I hope your help Thanks Thomas
Thomas Peters's user avatar
0 votes
1 answer
448 views

Magento 2 - How I can get category for related products

How I can get categories for related products like in the following image: I use this code: $objectManager = \Magento\Framework\App\ObjectManager::getInstance(); $category = $objectManager->get('...
Robert's user avatar
  • 2,186
1 vote
1 answer
174 views

How to know if my Magento 2 is in developer mode via PHP?

I'm using Magento 2.4 to develop a new module and I need to check if the store is running in developer mode or production mode. How could I get the Magento Mode via PHP?
Rafael Corrêa Gomes's user avatar
1 vote
1 answer
67 views

Send different email template to customer

I have a custom module which is a custom form for the user to book an appointment, this form works fine with no issues, the form once submitted sends and email to both the admin and user/customer but ...
Duggy G's user avatar
  • 193
0 votes
1 answer
105 views

Remove Items from Mass Action Menu

I am using the following to remove an Item from the Mass Action menu in the orders screen, I am struggling with making it work for multiple items. class MassAction extends \Magento\Ui\Component\...
miller75's user avatar
  • 419
1 vote
1 answer
694 views

Call current product in custom phtml file in Magento 2

On the product page I created a custom module to override the form.phtml file. I also added the option to include a new file called customFile.phtml when the user clicks on a button that is positioned ...
Jackom's user avatar
  • 503
1 vote
0 answers
143 views

JSON response does not return as an array from external API for AyMakan carrier (shipping method module), but still data posted & saved to AyMakan web

I want to get an array as JSON response from POST request to external API for AyMakan carrier (shipping method module), but still OK data posted & saved to AyMakan web server. Therefore, The ...
Fisal Assubaieye's user avatar
1 vote
1 answer
374 views

How can i get customer data after registration?

I have the following code but it is not working. vendorName/moduleName/etc/module.xml <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:...
Diego Zaizar's user avatar
0 votes
1 answer
86 views

Folder and file structure for state restriction module in Magento 2.3

I am new to Magento and am using the following "how to" guide to create a state restriction module in my Magento 2.3.3 instance: https://www.dckap.com/blog/how-to-restrict-specific-us-states-in-...
Petey88's user avatar
  • 47
1 vote
0 answers
106 views

How to add a text on Homepage using module (code) [closed]

Need help writing a code for adding text on Homepage. I'm running Magento 2 on localhost
Rishab Nema's user avatar
1 vote
2 answers
3k views

Magento 2.3.3 - Add file upload field to Contact Page

what is the best way to add a File Upload field in the Contact Page? I want to give users option to upload a file. I try this module but is not work on my 2.3.3 Magento version. Thank you
Robert's user avatar
  • 2,186
0 votes
1 answer
114 views

Intercom with Magento 2.3.3 ver problem

we get the below error when we install Intercom on Magento 2.3.3 ver problem https://i.ibb.co/qxSbXSX/2019-12-06-124841.jpg
MuhammedOmar's user avatar
0 votes
1 answer
628 views

Class contains 1 abstract method

During the install module we get issue: Compilation was started. Proxies code generation... 0/7 [>---------------------------] 0% < 1 sec 34.0 ...
Sylvester's user avatar
  • 2,254
0 votes
2 answers
289 views

Magento 2: Getting Error When Adding Customer Address Attribute

I'm using Magento 2.2.3, i need to add Customer Address Attribute, but when i run setup:upgrade I'm getting error of Wrong Entity ID. Here is My code: CustomerAddress\Attribute\Setup\InstallData.php ...
Partab Saifuddin Zakir's user avatar
0 votes
1 answer
564 views

Invalid argument supplied for foreach() in /var/www/html/app/code/Ves/Megamenu/Model/Config/Source/StoreCategories.php on line 284

I have this error when I add special characters to menu or categories like "&" It's from module Ves Megamenu. Warning: Invalid argument supplied for foreach() in /var/www/html/app/code/Ves/...
BartZalas's user avatar
  • 1,777
1 vote
1 answer
2k views

Magento2 : Save Button Not Working in Admin Form Custom Module

I am Working on A magento 2 custom Module i have a Form as well a Product Grid in my form so i created tabs using block but Whenever i click on save button gives me Javascript Error TypeError: $....
User 69's user avatar
  • 145
0 votes
2 answers
2k views

Magento 2.3 - Product stock alert not display

I use Magento 2.3 and I create a custom theme based on Luma theme. I enable the Magento_ProductAlert module from backend but the message "notify me when this product is in stock" is not display in ...
Robert's user avatar
  • 2,186
0 votes
1 answer
363 views

Magento 2 - Add subcategories images in Top Navigation Menu

I want to add subcategories images in Top Navigation Menu, I found this module but display only parents categories, I need to be on subcategories. I want to be like this:
Robert's user avatar
  • 2,186
0 votes
2 answers
649 views

Magento 2.3.0 Get Country Name

I'm trying to insert the current store country name through a CMS Page/Block by following this article. I've created a Block file countryname.php in app/code/Vendor/Countryname/Block with the ...
user2240778's user avatar
1 vote
3 answers
2k views

Get Store Information Magento 2.3.0

Using Magento 2.3.0 with php7.1 I'm trying to use this module to get store information. I have modified the folder names as such app/code/Vendor/SiteInfo/Block/SiteInfo.php And used the following ...
user2240778's user avatar
1 vote
2 answers
3k views

Magento 2: How to Override File in Vendor Folder

I installed a 3rd party PHP sdk via composer and need to override a couple files in my own module. However, I'm not quite sure what the best practice is to override these files from the vendor folder. ...
AJK's user avatar
  • 751
0 votes
0 answers
548 views

How to show Prices for OUT of stock products in Magento 2

Here is my question - How to show prices for all out of stock products? Here pic http://prntscr.com/krhurk I created the module from here https://magento.stackexchange.com/questions/160145/magento-2-...
darkattack's user avatar
0 votes
3 answers
2k views

How to re-submit form data in custom module?

I want to get post data in phtml . In case form data not save then show error and already fill form . <form class="trail-register-form" action="<?php echo htmlspecialchars($this->...
Nitesh Kumar  Singh's user avatar
1 vote
1 answer
182 views

Magento 2 - How I can remove default extensions

I want to remove some Magento 2 components like: Magento_Analytics, Magento_Braintree ... I just want to have just a product management system. How I can remove this modules completely, files and ...
Robert's user avatar
  • 2,186
0 votes
1 answer
960 views

Magento 2 Custom Module Insert Data Issue not working

I want to save custom data from Ajax Request in my database but it's not working and not saving any data. namespace/Getquote/controller/index <?php namespace namespace\Getquote\Controller\...
mahmoudismail's user avatar
0 votes
1 answer
151 views

Magento 2 Custom Cli comand Area not set

I am geting this error comand "[Magento\Framework\Exception\LocalizedException] Area code is not set " this is my code which I want to add a product. Tip if a comment " $product->save();" I am not ...
user3544190's user avatar
0 votes
2 answers
72 views

Magento 2.2 - I need little help with install one module

I try to add this new module in Magento 2.2.2, but after php bin/magento setup:upgrade nothing happens. I try to enable this module in the app/etc/config.php too but is the same. I can't install it. ...
Robert's user avatar
  • 2,186
2 votes
1 answer
726 views

Notice: Undefined index: modules in ../Converter.php line 47 - Magento 2 - (Solved)

Hi i am getting error in magento 2 frontend after creating my custom module.(Here mmm2 is my magento directory) a:4:{i:0;s:134:"Notice: Undefined index: modules in /home/vhost/_default/mmm2/lib/...
Ravi Oza's user avatar
  • 478
0 votes
1 answer
995 views

Magento 2 custom module install issue

I create a new custom module for Magento 2 and I can't install it through composer. This is the error: Your requirements could not be resolved to an installable set of packages. Problem 1 ...
Robert's user avatar
  • 2,186
2 votes
1 answer
8k views

Missed required argument request in parent::__construct call

I'm working on a Magento module for the past month, and everything works great on my local machine. Then I decided to release the module as a beta and test it online in a newly installed store, and ...
Pablo's user avatar
  • 237
1 vote
1 answer
1k views

Magento 2 custom module - get media base url

I use this module and I create a image upload field in my custom module. Everything is okay but I want to get the full url of image in the frontend. How I can do this? if I use this in the Data.php ...
Robert's user avatar
  • 2,186
0 votes
1 answer
215 views

Magento 2 custom module admin field output must be true

I want to add a filed in the Magento 2 admin panel, this field must return in the frontend True if in admin is selected Yes. I try to add this in the system.xml: <field id="do_something" translate=...
Robert's user avatar
  • 2,186
0 votes
3 answers
8k views

Magento 2 - add Enable / Disable field for custom module

I want to add some fields in the Magento 2 Admin Panel for my custom module and then I want to check in the phtml file if this field is have value or not. I need to add this fields: - enable / ...
Robert's user avatar
  • 2,186
1 vote
1 answer
1k views

Magento 2 create module block

I want to define a new phtml block in the head of my module: I try to add something like this in my app/code/Custom/Module/view/frontend/layout/default.xml file: <?xml version="1.0"?> <page ...
Robert's user avatar
  • 2,186
4 votes
2 answers
161 views

Issues on create Magento 2 module

I create a module for Magento 2 to add a custom javascript to the theme head but my custom js file is loaded in front off all javascript files and this come with the error: ReferenceError: jQuery is ...
Robert's user avatar
  • 2,186
1 vote
1 answer
280 views

Magento 2 - Create simple module

I try to learn how to create a simple module in Magento 2. I create one but I have a lot of errors. If anyone can help me with a sample. How I can create a simple Magento2 module. This module must ...
Robert's user avatar
  • 2,186
1 vote
1 answer
656 views

Magento 2 - Move swatch-options at the bottom

I try to move swatch-options in the product page at the bottom of the page, before "Write a review" zone, I use this code: <move element="product.info" destination="content" before="product.info....
Robert's user avatar
  • 2,186
1 vote
1 answer
425 views

Change button color

I am installing an custom module from someone, but im forget which module it is, but im sure i already unninstall that module, but the button color change to green like at the picture below. How could ...
Edwin Widhiyanto's user avatar
0 votes
1 answer
150 views

Template file is not running In Magento?

Hello I am new to Magento & using Magento 2.1.7. I was learning to develop custom module. My module is working till the controller but it is not printing the data present in the template file ...
Abhishek Tripathi's user avatar
5 votes
3 answers
6k views

magento 2 - backend page with tab and form on custom module

I created my custom module for backend, I created the controller, I added the link on standard menu and the acl configuration, all these part works fine. Now I'm trying to add a tab list on the left ...
3tech - Alessandro Staffolani's user avatar