10 votes
Accepted

Magento 2.0.x Remove Account Tab in Mobile Menu

Add this code in you active theme's default.xml <referenceContainer name="page.top"> <referenceBlock name="store.links" remove="true" /> </referenceContainer> And run command -...
Dipesh Rangani's user avatar
9 votes
Accepted

Rest API strategy for mobile app in Magento 2

In order to create a rest api there are some certain requirements you need to create an interface in your modules Api folder. then you need to define all the api methods that you want to expose to ...
webkul's user avatar
  • 454
8 votes
Accepted

Magento 2: How to setup separate theme for desktop and mobile?

Try to create multiple exceptions for each device
Waqar's user avatar
  • 974
5 votes
Accepted

I have to add condition in Magento 1.9 to check if its mobile device

You can use below condition . It's work for me for detect mobile device. $isMobile = Zend_Http_UserAgent_Mobile::match( Mage::helper('core/http')->getHttpUserAgent(), $_SERVER ); Note: ...
Kul's user avatar
  • 1,777
5 votes
Accepted

How to get country dial code for telephone number in Magento 2?

You can create function in helper by enter all dial number with country code. I have created function like below: public function getphonecode($code) { $countrycode = array( 'AD'=>'376'...
Surinder Kaur's user avatar
4 votes

Magento 2 - 3rd level menu items collapsed on mobile devices

Okay, I came up with a solution. It may not be ideal, but it works for me. Hopefully somebody will find it useful. It will depend on the base theme you're using, but first of all I had to comment out ...
Geat's user avatar
  • 834
4 votes

Cache Issue on mobile and desktop

for the HTML, JS and CSS changes you can enable the merging and bundling the JS and CSS files, and then it will merge it to the client's browser too and reflect the changes, https://devdocs.magento....
Ankit Srivastava's user avatar
3 votes
Accepted

How to use Different themes for Mobile App & site

Sure, you can do this by Magento admin. Go to System > Configuration > General > Design -> Package and Theme sections. Click Matched Expression and this: iPhone|iPod|BlackBerry|Palm|...
Anil Suthar's user avatar
  • 4,731
3 votes
Accepted

Magento 1.9 - Hide Module/Script from mobile version

There no default way in admin to do so. But you can create a Helper with this function which will return true if it's mobile device otherwise will return false function isMobile() { $useragent=$...
Anil Suthar's user avatar
  • 4,731
3 votes

Rest API strategy for mobile app in Magento 2

I think there are two options. Navigate to Stores> Configuration > Services > Magento Web API. Then select Yes from the Allow Anonymous Guest Access menu. I have tested, it works. Use OAuth-...
Qiong's user avatar
  • 81
3 votes

How can initialize a function mobile only?

The recommended way would be to use matchMedia. require(['jquery','accordion', 'matchMedia' ], function ($, mediaCheck) { mediaCheck({ media: '(min-width: 768px)', ...
Stevie-Ray Hartog's user avatar
3 votes

Magento2 Certain Mobile Product Page Images too big - not responsive

I can confirm that this is an issue that is commented, I don't know if it is connected to the original reported issue, but I happens for all of our staging/development/production sites we have. It ...
Mayur Rathod's user avatar
3 votes

Magento 2: How to close all product tabs on Mobile

Jake you can close all the tabs by adding below parameters: <div class="product data items" data-mage-init='{"tabs":{"openedState":"active","active"...
deepakd's user avatar
  • 123
2 votes

Rest API strategy for mobile app in Magento 2

You can search for products instead of getting them. However there are indeed some things that were not included in the API or were not thought for mobile apps. For instance, if you need to create a ...
awavi's user avatar
  • 989
2 votes

How can I change the menu tab title? (mobile version)

Add below code in your default.xml file Path : app/design/frontend/YourTheme/Package/Magento_Theme/layout/default.xml <referenceBlock name="store.menu" > <arguments> <...
Suresh Chikani's user avatar
2 votes
Accepted

Is it possible Custom theme for desktop and Luma theme for mobile and ipad

You can achieve this by design configuration from magento 2 admin. Go to STORES > Configuration > General > Design -> User-Agent Exceptions Search String -> Search strings are either normal strings ...
Krishna ijjada's user avatar
2 votes

Magento 2 - 3rd level menu items collapsed on mobile devices

You can add a custom jQuery widget to extend on the lib/web/mage/menu.js, how to do this is described here: https://devdocs.magento.com/guides/v2.3/javascript-dev-guide/javascript/js_practice.html In ...
Wendy de Kock's user avatar
2 votes
Accepted

Reload theme on page resize

As themes contain dynamic files such as PHP and PHTML templates you will need to refresh the page, it isn't as simple as just changing a theme at a certain breakpoint. Because of this my ...
Ben Crook's user avatar
  • 15.7k
2 votes
Accepted

Magento 2 : hide sidebar on mobile view

You want layout changes only in mobile. So best way to use CSS/LESS to achieve your output To hide sidebar-main section in mobile below 768px add below css in you css/less file. .cms-index-index ....
Kanhaiya lal's user avatar
  • 1,548
2 votes

Magento2 Push notification for IOS and Android

Below approach may help you: Write the respective function in helper class. namespace PackageName\ModuleName\Helper; class Data extends \Magento\Framework\App\Helper\AbstractHelper { ...
Prasanta Hatui's user avatar
2 votes

How to load less products on the mobile/tablet front page?

You can use below infinite scroll extention which will load more products when you scroll and reach at bottom of page. So with use of this extention you will improve performance of your list page in ...
Chirag Rajput's user avatar
2 votes
Accepted

Custom field of mobile number is not showing on registration page in Magento 2.2.5

app/design/frontend/{Vendor}/{theme}/Magento_Customer/templates/form/register.phtml <div class="field required"> <label for="customer_number" class="label"><span><?= __('...
PЯINCƎ's user avatar
  • 11.7k
2 votes
Accepted

Magento 2 - Different menu for Mobile theme

Using php : if(preg_match('/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|...
Saphal Jha's user avatar
  • 1,863
2 votes

Magento 2: How to close all product tabs on Mobile

Use: data-mage-init='{"tabs":{"active":"false"}} If you want to close the details tabs on mobile only: Create a copy of the core details.phtml file in your local theme: app/design/frontend/{Vendor}/...
Stevie-Ray Hartog's user avatar
2 votes

Magento 2 : How to validate email or mobile number in a textbox validation

Magento 2 uses validation.js file for apply validations which is located at lib/web/mage directory of Magento 2. In Magento 2, it's not by default provide rule which validate mobile number and email ...
Rohan Hapani's user avatar
  • 17.4k
2 votes
Accepted

Magento2 - reduce size of style-m.css?

To reduce the weight of style-m.css, you can try several things: Minify the CSS: You can use a CSS minifier tool to reduce the size of the CSS file by removing unnecessary whitespace, comments, and ...
HuanTH's user avatar
  • 135
1 vote

Have Magento removed Mobile Menu from admin in version 1.9.2

Yes It has been Removed The Mobile menu was only used for the mobile app service that Magento provided a few years ago. That service hasn't been offered for a while, so the menu was removed in a ...
Priyank's user avatar
  • 7,672
1 vote

Magento 2: How to setup separate theme for desktop and mobile?

In Admin Panel go to Content-> Design-> Configuration Choose the store that you need In Design Rule section add new User Agent Rules with next string: /iPhone|iPod|BlackBerry|Palm|Googlebot-Mobile|...
Drew Shumski's user avatar
1 vote
Accepted

Issue in magento auto currency

Same issue with me a day ago problem with model/store.php I face same issue in a mobile chrome browser Solution public function getCurrencyCodeIp2Country() { // load Ip2Country ...
Vaibhav Ahalpara's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible