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
-...
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 ...
8
votes
Accepted
Magento 2: How to setup separate theme for desktop and mobile?
Try to create multiple exceptions for each device
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: ...
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'...
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 ...
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....
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)',
...
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 ...
3
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}/...
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"...
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>
<...
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 ...
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 ...
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 ...
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 ....
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><?= __('...
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 ...
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
{
...
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|...
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 ...
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 ...
1
vote
How can initialize a function mobile only?
Less then 640 width would be mobile you can check this below way
require(['jquery','accordion'], function ($) {
if ($(window).width() < 640) {
$("#element").accordion({
...
1
vote
I want to change the url for mobile user to m.mysite.com with same mobile view look in browser
Can you please specify which version of Magento you are using?
What is your end goal with this mobile version of the site if the theme is going to be the same?
You can setup JS redirects based on ...
1
vote
Magento APIs mapping to Mobile Per Screen API Request
The answer we came too after doing some research is that the APIs are geared towards mobile browser not mobile app.
Apps we've seen that use the mobile APIs OOTB are designed to follow how the ...
1
vote
Magento 2 add mobile number to checkout
Here you find information how to add new custom field into checkout shipping address. In similar way you can do it for Billing Address.
Unfortunately devdocs doesn't have information how to save new ...
1
vote
Accepted
Magento2: Best way to have a desktop and mobile template in a module
I tried different options but at the end to keep it easier to understand from the magento admin I added 2 themes desktop and mobile that override the module.
I didn't needed to change the layout ...
1
vote
Accepted
Can you use an iPad for Magento2 admin?
Who said it doesn't?
The docs may not explicitly mention it, but yes, the M2 admin panel should work fine with iPads. I believe it was designed specifically with touch device UX in mind.
1
vote
How to give user agent rule for iPad and Tablet in Magento 2.1?
This is because the mobile user agent includes the iPad. To workaround this you'll need to specify the mobiles individually.
Note that the Safari on iPad user agent string contains the word "...
1
vote
Accepted
Need to create a separate mobile homepage. Does anyone know how?
you can create new theme by agent wise.
You can create new theme and call block using xml.
Hope it works for you
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
mobile × 180magento2 × 54
magento-1.9 × 38
theme × 24
menu × 15
api × 13
css × 13
magento-1.7 × 12
rwd × 12
rest-api × 11
app × 10
magento-1.8 × 9
magento2.3 × 5
javascript × 5
jquery × 5
soap × 5
design × 5
application × 5
category × 4
magento2.2 × 4
configuration × 4
redirect × 4
navigation × 4
topmenu × 4
product × 3