Issue
I need to add Mobile_Detect.php in prestashop 1.7. I tried to override FrontController.php according to this post https://www.prestashop.com/forums/topic/224983-need-help-including-class-to-detect-mobile-phones/
but no class added in tpl file.
Solution
You can use prestashop default device detect functionality :
get device :
Context::getContext()->getDevice();
Check Mobile :
Context::getContext()->isMobile();
Check Tablet:
Context::getContext()->isTablet();
You can find the prestashop default class: prestashop_root_path/classes/Context.php
Answered By - Md Kamruzzaman Answer Checked By - Cary Denson (PHPFixing Admin)
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.