首页 > 其他分享 >Magento: 判断是否为手机浏览 Optimise Web's Mobile Detect Class for Magento

Magento: 判断是否为手机浏览 Optimise Web's Mobile Detect Class for Magento

时间:2023-03-23 12:03:32浏览次数:57  
标签:Web Detect Optimise extension Mobile Magento Class


项目地址:Optimise Web's Mobile Detect Class for Magento

Optimise Web's Mobile Detect Class for Magento

MobileDetect.net is a lightweight PHP class for detecting mobile devices. Optimise Web's Magento extension allows using Mobile Detect's functions from within Magento.

Usage

Mage::helper('mobiledetect')->isMobile()

You can find all the mobile detection functions that Mobile_Detect provides on their Github project page and on their MobileDetect.net website. You just have to use Mage::helper('mobiledetect')-> instead of $detect->

This extension is primarily for use by developers who wish to write PHP conditionals to detect mobile devices.

FAQs

 

1. Should I backup Magento's files and database?

Not required. This extension doesn't touch Magento's core file system and it also doesn't interface with the database. Still, please make it a point to backup your files and database before installing or upgrading any Magento module.

 

2. Do you offer support for this extension?

This is a free extension and support will be limited. Please write to us and we'll do our best to help you out.

 

下载包:Optimiseweb_MobileDetect-0.2.2


标签:Web,Detect,Optimise,extension,Mobile,Magento,Class
From: https://blog.51cto.com/u_8895844/6144609

相关文章

  • Magento事件与事件监听
    事件和事件监听也许是magento中最有趣的功能之一,因为它允许开发者来扩展magento应用程序中的关键部分。为了为不同模块之间提供更多的灵活性和便利,magento使用了一种事件/......
  • 【web 开发基础】PHP 快速入门(9)-PHP 运算符之位运算符详解
    前言PHP开发基础开速入门系列目录:《【web开发基础】php开发基础快速入门(1)-PHP介绍及开发环境快速安装和基本使用介绍》《【web开发基础】php开发基础快速入门(2)-......
  • Magento: 获取类别所有子类别 (无限级别-目录树) Get All Sub Categories
    生成分类目录树(CategoryTree)$rootcatId=Mage::app()->getStore()->getRootCategoryId();$categories=Mage::getModel('catalog/category')->getCategories($rootca......
  • Magento: 获取产品评论 get all reviews with review summary
    1.根据产品id获取该产品评论$productId=1234;$product=Mage::getModel('catalog/product')->load($productId);$storeId=Mage::app()->getStore()->getId();Mage......
  • webpack的基本使用(一)
    学习目录什么是webpack1、webpack是一个工具,用来把前端工程化的。2、它提供了友好的前端模块化开发支持,以及代码压缩混淆(能让文件体积更小)、处理浏览器端J......
  • 核心网页指标 WebVitals 优化遇到的问题
    1.FCP时间太久。首屏不应该包含动态内容,内容在动,可能会被认作没有完成FCP的渲染。2.关于CLS。CSS不应该包含在页面中间,如果页面中间有CSS,建议移动到页面头部Head里面。3.......
  • Netty中使用WebSocket实现服务端与客户端的长连接通信发送消息
    上面讲了使用使用Socket搭建多客户端的连接与通信。那么如果在Netty中使用WebSocket进行长连接通信要怎么实现。WebSocket现在,很多网站为了实现推送技术,所用的技术都是Ajax......
  • 微信小程序websocket的使用
    微信小程序websocket的使用微信小程序中使用websocket分为两步:一、现在微信公众平台的开发者工具中配置socket的域名   二、开始编写业务代码业务代码大致可以......
  • dynamic web module讲解
    一。java的web系统有多种类型,比如静态的和动态的,然后动态的javawebproject要设置dynamicwebmodule,也就是动态网页模型,他必须要和对应的服务器搭配好了才能跑,今天看见的......
  • 获取当前web站点路径
    1.//获取当前we站点的路径(在做上传下载的时候,可以使用)2.privateStringgetWebpath(HttpServletRequestrequest){3.//returnrequest.getSession().getServlet......