Results 1 to 10 of 30

Hybrid View

  1. #1
    Join Date
    Dec 2009
    Location
    Amersfoort, The Netherlands
    Posts
    2,845
    Plugin Contributions
    25

    Default Re: goMobile Support Thread

    Hi steve,

    Thanks for the mod. I have installed it and it does detect if i am on a pc or a mobile device and shows the right template. But I don.t seem to be able to switch between the two. I made a link at the bottom of my page to switch, but it starts reloading my page in the template it was in.
    I am using Zen Cart 1.5
    I checked for the cookie, it is being set.

    Erik

  2. #2
    Join Date
    Nov 2005
    Posts
    86
    Plugin Contributions
    1

    Default Re: goMobile Support Thread

    Hi Erik,
    Have you got the updated version installed with the sitechoice.php file.

    This fixes the original issue with the cookie not being set correctly, do you want to share a like so I can have look?

    Steve

  3. #3
    Join Date
    Dec 2009
    Location
    Amersfoort, The Netherlands
    Posts
    2,845
    Plugin Contributions
    25

    Default Re: goMobile Support Thread

    Hi Steve,
    I have removed the mod for now. Maybe I will make a test setup this weekend. Ihad the latest version installed, with the sitechoice.php. The cookie was set, but is not used when the footer link is used.
    I will report back as soon as the test site is up

  4. #4
    Join Date
    Feb 2007
    Location
    Ontario, Canada
    Posts
    36
    Plugin Contributions
    0

    Default Re: goMobile Support Thread

    Quote Originally Posted by Design75 View Post
    Hi steve,

    Thanks for the mod. I have installed it and it does detect if i am on a pc or a mobile device and shows the right template. But I don.t seem to be able to switch between the two. I made a link at the bottom of my page to switch, but it starts reloading my page in the template it was in.
    I am using Zen Cart 1.5
    I checked for the cookie, it is being set.

    Erik
    I am also having this issue and am not sure how to correct the problem. Have you had any luck fixing it Erik?

    --Colleen
    Last edited by MsHutch; 30 Sep 2012 at 11:20 AM.

  5. #5
    Join Date
    Dec 2009
    Location
    Amersfoort, The Netherlands
    Posts
    2,845
    Plugin Contributions
    25

    Default Re: goMobile Support Thread

    Hi Colleen,

    I am absolutely clueless
    this is my test site

    It is a vanilla 1.5.1 installation, only with the goMobile addon.

  6. #6
    Join Date
    Feb 2007
    Location
    Ontario, Canada
    Posts
    36
    Plugin Contributions
    0

    Default Re: goMobile Support Thread

    Well, you aren't alone! I cannot figure out why it won't work, grrrr!!!!!
    --Colleen

  7. #7

    Default Re: goMobile Support Thread

    I haven't tested the new version of this mod but it looks like there may be a problem switching between mobile and full sites.
    The new sitechoice.php looks for a querystring variable called 'fullsite', but the code looking for a querystring variable called 'fullsiteoverride' is still in init_templates.php.
    It looks to me like the init_templates.php included in the new distribution is an old one. I think it should just look for a cookie called 'siteversion' and show the appropriate template based on that rather than looking at querystring variables.
    As I mentioned, I haven't tested this yet so I could be wrong!

  8. #8

    Default Re: goMobile Support Thread

    Change this section of code in includes/init_includes/overrides/init_templates.php
    Code:
    /*** Check if user has requested specific version of the site*/
    
    if ($_GET['fullsiteoverride'] == 1) 
       {
    	$value = 'fullsiteoverride';
    	setcookie("mobileCookie", $value);
    	setcookie("mobileCookie", $value, time()+1800); /* expire in 1/2 hour */ 
    	$iwnatfullsite = 1;
    	}
    	
    if ($_GET['fullsiteoverride'] == 0) 
       {
    	$value = 'fullsiteoverride';
    	setcookie("mobileCookie", $value);
    	setcookie("mobileCookie", $value, time()-1800); /* expire in 1/2 hour */ 
    	$iwnatfullsite = 0;
    
    	}	
    
    if(isset($_COOKIE['mobileCookie'])) {$iwnatfullsite = 1; }
    
    
    /*** Check if there is a specific template for this mobile platform and use it*/
    if ($mobile_browser >= 1){
    		if($iwnatfullsite == 1)
    			{ 
    		 		$template_dir;
    			 }
    		 else
    			 {
    				$template_dir = $template_dir.'_mobile';
    			}
    }
    /*** EOF : SPECIFIC TEMPLATE FOR MOBILE CLIENT**/
    to this
    Code:
    /* Override to mobile version of site if requested */
    if(($mobile_browser >= 1 && !isset($_COOKIE['siteversion'])) || isset($_COOKIE['siteversion']) && $_COOKIE['siteversion'] == 'mobile') $template_dir = $template_dir . '_mobile';
    
    /*** EOF : SPECIFIC TEMPLATE FOR MOBILE CLIENT**/

  9. #9
    Join Date
    Feb 2007
    Location
    Ontario, Canada
    Posts
    36
    Plugin Contributions
    0

    Default Re: goMobile Support Thread

    Thank you for your input Damian! I had narrowed it down to the same thing, but wasn't sure how to make the change so that it would work. I'll give it a try this weekend!
    --Colleen

  10. #10
    Join Date
    Nov 2012
    Location
    Utrecht, Nederland
    Posts
    41
    Plugin Contributions
    0

    Default Re: goMobile Support Thread

    Quote Originally Posted by damiantaylor View Post
    Change this section of code in includes/init_includes/overrides/init_templates.php
    Code:
    /*** Check if user has requested specific version of the site*/
    
    if ($_GET['fullsiteoverride'] == 1) 
       {
    	$value = 'fullsiteoverride';
    	setcookie("mobileCookie", $value);
    	setcookie("mobileCookie", $value, time()+1800); /* expire in 1/2 hour */ 
    	$iwnatfullsite = 1;
    	}
    	
    if ($_GET['fullsiteoverride'] == 0) 
       {
    	$value = 'fullsiteoverride';
    	setcookie("mobileCookie", $value);
    	setcookie("mobileCookie", $value, time()-1800); /* expire in 1/2 hour */ 
    	$iwnatfullsite = 0;
    
    	}	
    
    if(isset($_COOKIE['mobileCookie'])) {$iwnatfullsite = 1; }
    
    
    /*** Check if there is a specific template for this mobile platform and use it*/
    if ($mobile_browser >= 1){
    		if($iwnatfullsite == 1)
    			{ 
    		 		$template_dir;
    			 }
    		 else
    			 {
    				$template_dir = $template_dir.'_mobile';
    			}
    }
    /*** EOF : SPECIFIC TEMPLATE FOR MOBILE CLIENT**/
    to this
    Code:
    /* Override to mobile version of site if requested */
    if(($mobile_browser >= 1 && !isset($_COOKIE['siteversion'])) || isset($_COOKIE['siteversion']) && $_COOKIE['siteversion'] == 'mobile') $template_dir = $template_dir . '_mobile';
    
    /*** EOF : SPECIFIC TEMPLATE FOR MOBILE CLIENT**/
    This was exactly wher i was looking for, thx for youre time and efforts :-)

 

 

Similar Threads

  1. Hebrew Support - latest release [Support Thread]
    By eranariel in forum Addon Language Packs
    Replies: 22
    Last Post: 26 Jan 2026, 06:47 AM
  2. ZX Slideshow support thread
    By balihr in forum All Other Contributions/Addons
    Replies: 766
    Last Post: 18 Oct 2025, 11:23 AM
  3. EasyPopulate 4.0 Support Thread
    By chadderuski in forum Addon Admin Tools
    Replies: 3672
    Last Post: 11 Sep 2025, 05:07 PM
  4. SysCheck [support thread]
    By swguy in forum All Other Contributions/Addons
    Replies: 36
    Last Post: 24 Oct 2020, 05:28 AM
  5. PurpleShades Support Thread
    By kobra in forum Addon Templates
    Replies: 122
    Last Post: 18 May 2011, 07:18 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg