Author Topic: Mobile template redirect?  (Read 2695 times)

Offline mikev619

  • Newbie
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
Mobile template redirect?
« on: 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?

« Last Edit: August 11, 2013, 03:42:46 AM by mikev619 »

Offline abantecart

  • Administrator
  • Hero Member
  • *****
  • Posts: 4279
  • Karma: +283/-10
    • View Profile
    • Ideal Open Source Ecommerce Solution
Re: Mobile template redirect?
« Reply #1 on: August 19, 2013, 09:01:03 PM »
There was a suggestion on stackoverflow that looks correct to me.

http://stackoverflow.com/questions/18141708/smarty-php-abantecart-e-commerce-user-agent-theme

You can not simply redirect to URL with sf=[template_id] parameter. This will be the template id of your mobile template set in abantecart.
Please  rate your experience or leave your review
We need your help to build better free open source ecommerce platform for everyone. See how you can help

 

Powered by SMFPacks Social Login Mod