BigCommerce - Hosted Ecommerce Software by Interspire

Interspire Forum

 
Go Back   Interspire Forum > Interspire Shopping Cart Community Forum > Customization and Integration > Code Modification and Development Questions

Reply
 
Thread Tools Display Modes
  #1  
Old 02-19-2014, 02:35 AM
red1x + red1x is offline
Interspire Customer
 
Join Date: Jul 2009
Posts: 245
Default how to disable mobile cart to load full site version for ipad and other tablets

hi

I need to change the cart so it loads the full site version for tablets instead of the mobile version. I want the phone version to remain as the mobile version template though.

Can I just remove the android and iphone reference in the config template the code...
PHP Code:

// Mobile/Portable Template
    
$GLOBALS['ISC_CFG']['enableMobileTemplate'] = true;
    
$GLOBALS['ISC_CFG']['enableMobileTemplateDevices'] = array(
        
'iphone',
        
'ipod',
        
'pre',
        
'android',
    ); 
and config remote.php

PHP Code:

    
// Mobile/Portable Template
    
$GLOBALS['ISC_CFG']['enableMobileTemplate'] = true;
    
$GLOBALS['ISC_CFG']['enableMobileTemplateDevices'] = array (
  
=> 'iphone',
  
=> 'ipod',
  
=> 'ipad',
  
=> 'pre',
  
=> 'android',
);
    
$GLOBALS['ISC_CFG']['mobileTemplateLogo'] = 'mobile_logo.png'
and there is a refence in the lib/general.php file as well??
PHP Code:

    
/**
     * Determine, and get the type of portable device for a particular user agent.
     * If no agent is supplied, the function will attempt to take the value
     * of HTTP_USER_AGENT.
     *
     * The returned mobile device array will contain a category (mobile or tablet)
     * as well as device (iphone, ipad, etc)
     *
     * @param string $userAgent User agent to determine type of mobile device.
     * @return false|array False when agent is not a mobile device. Array when is.
     */
    
function getPortableDeviceType($userAgent '')
    {
        if(empty(
$userAgent) && !empty($_SERVER['HTTP_USER_AGENT'])) {
            
$userAgent $_SERVER['HTTP_USER_AGENT'];
        }

        if(empty(
$userAgent)) {
            return 
false;
        }

        
// Webkit based mobile and tablet devices
        
if(stripos($userAgent'webkit') !== false) {
            if(
stripos($userAgent'iphone') !== false) {
                return array(
                    
'category'    => 'phone',
                    
'device'    => 'iphone'
                
);
            }
            else if(
stripos($userAgent'ipod') !== false) {
                return array(
                    
'category'    => 'phone',
                    
'device'    => 'ipod'
                
);
            }
            else if(
stripos($userAgent'ipad') !== false) {
                return array(
                    
'category'    => 'tablet',
                    
'device'    => 'ipad'
                
);
            }
            else if(
stripos($userAgent'android') !== false) {
                return array(
                    
'category'    => 'phone',
                    
'device'    => 'android'
                
);
            }
            else if(
stripos($userAgent'webos') !== false && stripos($userAgent'pre') !== false) {
                return array(
                    
'category'    => 'phone',
                    
'device'    => 'pre'
                
);
            }
        }

        return 
false;
    } 
can anyone help please
__________________
aslandesign.com.au & adghosting.com.au for all your online solutions
Reply With Quote
Reply

Tags
ipad, mobile

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump