So I wanted to use MobileDetect inside an admin plugin page.
This is a class inside front end
I am guessing that I can pull it in via an auto loader.
But will this break things if another plugin also pulls it in and how should this be managed?
So I wanted to use MobileDetect inside an admin plugin page.
This is a class inside front end
I am guessing that I can pull it in via an auto loader.
But will this break things if another plugin also pulls it in and how should this be managed?
That class is not "normally" used on the admin-side, so unless you have multiple plugins that might be installed and all need that class you should be OK.
For multiple plugins that "might" be installed, you can use the following section in each:
PHP Code:
if (!class_exists('MobileDetect')) {
require DIR_FS_CATALOG . DIR_WS_CLASSES . 'MobileDetect.php';
}
and why would you use mobile detect? The admin use bootstrap....so code your admin interface using bootstrap classes
Mike
AEIIA - Zen Cart Certified & PCI Compliant Hosting
The Zen Cart Forum...Better than a monitor covered with post-it notes!
Because the page in question uses the camera on a mobile phone to scan barcodes but on pc it uses a barcode reader and it works already so why would I rewrite when I can just do what lat9 said
Bookmarks