News:

AbanteCart v1.4.2.1 is released.

Main Menu

Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - mikev619

#1
Template Support / Mobile template redirect?
August 09, 2013, 03:20:03 AM
Hello i have been using AbanteCart for a couple months now and have been wondering if i could somehow redirect AbanteCart to use either the mobile or default template folder?
       References -
Quote
0
down vote
way more better, would be to load the set of templates based on the user agent / device, so for example:

$template_dir = '/path/to/default/templates/';
if($mobile_device) {
    $template_dir = '/path/to/default/templates/';
}
or more dynamic like this:

$template_dir = '/path/to/templates/' . $device;
how granular $device here can be, depends on the application needs.

From a stack overflow that i found someone posted

Thanks, Mike.

8/11/2013


So i just found this in the index php and was wondering if this may be what I'm looking for?

A way to say if user agent Ios,Android etc then define('RDIR_TEMPLATE',  'admin/view/default/MOBILETHEME'); else define('RDIR_TEMPLATE',  'admin/view/default/');

Look at the text file I added, for some reason i couldn't paste the code because of it being a external link?

Forum Rules Code of conduct
AbanteCart.com 2010 -