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 101750

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

Fatal error: Uncaught Error: Call to a member function getTypeId() on null

Can you check the product before getting the product type id? $curPro = $this->coreRegistry->registry('current_product'); $productType = $curPro->getId(); If it works, then I think you can get the pr …
Aaron Wang's user avatar
0 votes

I want to put an additional sku in the product page but getting an error null

Update your code like this <?php $product = $block->getData('product'); $sku = $product->getSku(); if (trim($sku) !== "") : ?> <div class="product-info-sku"> <?php echo $sku; ?> </div> <?php endif …
Aaron Wang's user avatar
0 votes

How to redirect the custom button on product page

Simply you can do it like this. <?php $productUrl = $_product->getProductUrl();?> <a href="<?= $productUrl ?>">Subscribe</a>
Aaron Wang's user avatar
0 votes

How to get a list of unique cart products

You can get the cart items' info with the below code. $allItems = $cart->getQuote()->getAllItems(); $totalCount = sizeof($allItems); foreach ($allItems as $item) { echo $item->getItemId(); …
Aaron Wang's user avatar
0 votes

Magento 2 showing pub folder after correcting permissions

I checked the attached png file. But it looks like the index.php file was missed. So I think you have to download Magento again. If there's a composer.json in your root directory, then run the compose …
Aaron Wang's user avatar
0 votes

Magento 2.4: bin/magento commands not working after installing cpanel on my VPS

I don't know if this will help you. Check the apache or ngnix installed. Check MySQL and PHP installed and check PHP modules. Check the vhost settings.
Aaron Wang's user avatar
0 votes

Transactional Email Template

Please check these links. Magento 2: Override/extend the email.css that is being used in the transactional email header https://nwdthemes.com/2018/05/25/how-to-style-email-templates-in-magento-2/ http …
Aaron Wang's user avatar
0 votes

Magento2 How can we set 2 layout?

I think there's no option for Product-full-width in default. So did you create new layout with product-full-width? You need to set the layout with "product-full-width" in theme/Magento_Catalog/layout/ …
Aaron Wang's user avatar
0 votes

Magento 2 on Product duplicate and save action giving fatal error

You have to set the different SKU for it.
Aaron Wang's user avatar
1 vote

strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated

<?= strpos($pos, $viewMode . '-primary') ? /* @noEscape */ $secureRenderer->renderStyleAsTag( $position, …
Aaron Wang's user avatar
0 votes

I want to Auto turn on/off the product, but don't know how. Can you help me?

You can enable/disable the product with the qty. So if the qty is below 0, the Magento system will hide the product in the frontend. You have to update the settings in Admin Admin->Stores->Configurati …
Aaron Wang's user avatar
0 votes

How i check list of page enable/disable in magento using CLI?

So do you want to disable/enable the cms pages? Go to Admin. magento admin url/login Left Navigation->Content->Pages (You can see the page list) Select the page that you want to enable/disable In the …
Aaron Wang's user avatar
0 votes

How to move VAT field in billing Address in checkout Magento2

So you have to add the custom module to move the vat from first with the link that you attached. And in the afterProcess() function, add the codes with this. $whereBilling = $this->_helper->getConfig( …
Aaron Wang's user avatar
1 vote
3 answers
4k views

mobile menu not working in mobile view

The Magento version is the latest version 2.4.5. The menu is working well on desktop and actual mobile devices. But when I load the site in mobile view, the menu doesn't work well. If I click the pare …
Aaron Wang's user avatar
2 votes
Accepted

mobile menu not working in mobile view

I think this doesn't work in 2.4.5. First, you have to rewrite the menu.js. So I added the below code to _toggleMobileMode in menu.js 'click .ui-menu-item:has(a)': function (event) { …
Aaron Wang's user avatar

15 30 50 per page