Jump to content



Photo
* * * * * 3 votes

[Contribution] iOSC - mobile version of OSC on your iPhone


  • Please log in to reply
1533 replies to this topic

#1521 ONLINE   raiwa

raiwa
  • Community Sponsor
  • 727 posts
  • Real Name:Rainer Schmied
  • Gender:Male
  • Location:Sant Iscle de Vallalta, Barcelona, Spain

Posted 23 April 2015 - 10:37

Hello Lorraine @herbsandhelpers,

 

I'm very sorry, I can't find it again. I'll try to approach the problem as far as I remember.

The error is produced if html output is done before the correct html declaration is output what should be for 2.3. stores in template_top.php:

2.3.3.4:

<!DOCTYPE html>

or

older 2.3 versions:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR...nsitional.dtd">
 

 

Any other php file which is loaded in application_top or the page file before template_top, should not output any html code.

So a blank line or even whitespace at the end of any php file, after the last closing ?>, may produce a html output.

 

Now for your concrete error:

If it is only produced when you switch SEO URLs to rewrite, the fault should be in the SEO URL file which is used for rewrite mode instead of standard mode.

Ergo I would check the following file:

includes/modules/ultimate_seo_urls5/uri_modules/rewrite.php

 

If this doesn't help, check all other files in the ultimate_seo_urls5 directory.

 

If this doesn't help, search this forum for older posts related to this error.

Older versions of the iosc mobile add-on had several files included with blank lines and produced that error.

If you neither find the solution there, try a google search for more generic solutions for that error.

 

Kind regards

Rainer



#1522   herbsandhelpers

herbsandhelpers
  • Members
  • 105 posts
  • Real Name:Lorraine Hodgkinson
  • Gender:Female

Posted 25 April 2015 - 13:15

Solved! The whole problem was the Ultimate SEO urls 5, With making soo many changes I uploaded the original Ultimate SEO files but then didn't upload the ones from support as well! Once this corrected all is well. Many thanks, when you make several changes it's hard to know what's gone wrong sometimes.

 

Back to normal thanks for a great contrib! 



#1523   phi148

phi148
  • Members
  • 125 posts
  • Real Name:Bill

Posted 25 April 2015 - 18:53

Hello

 

i'm attempting to install this addon in a subdomain.

 

It appears something is going haywire with the code at the very bottom of /includes/application_top.php:

 

//BEGIN : MOBILE REDIRECT_SCRIPT   

      require(DIR_FS_MOBILE . 'includes/functions/devicelist.php');

      if ( MOBILE_SITE=='True'&& !defined('MOBILE_SESSION') ) {

        require(DIR_FS_MOBILE . 'includes/classes/mobile_redirect.php');

          if ( !strpos($_SERVER['REQUEST_URI'], 'checkout') )

                  $mobileRedirect = new mobileRedirect;

      } elseif ( !strpos($_SERVER['REQUEST_URI'], 'checkout') ) {

        require(DIR_FS_MOBILE . 'includes/classes/classic_redirect.php');

        $mobileRedirect = new classicRedirect;

      }

//END : MOBILE REDIRECT_SCRIPT

 

 

What happens is when viewing my normal (non-mobile) site, the page continues to use the "classic_redirect" over and over and over until the site times out.  I have "mobile" disabled in admin, I'm simply just trying to make sure the non-mobile site still works correctly before I enable the "mobile" portion.

 

Any clue on why it would redirect over and over?

 

This is what is in the URL bar in my browser when it eventually times out with the redirect loop:

 

http://www.mysite.co...tCancelled=true

 

Any ideas?



#1524   phi148

phi148
  • Members
  • 125 posts
  • Real Name:Bill

Posted 25 April 2015 - 22:14

Just switched from a subdomain to a subdirectory.  Still have the same issue.  :(

 

Help !



#1525 ONLINE   raiwa

raiwa
  • Community Sponsor
  • 727 posts
  • Real Name:Rainer Schmied
  • Gender:Male
  • Location:Sant Iscle de Vallalta, Barcelona, Spain

Posted 26 April 2015 - 12:04

Hello Bill @phi148,

 

Yes ok. I checked it and this happens if the main switcher in:

Admin => Configuration => Mobile Site => Enable Mobile Site? is set to false

AND

Auto Redirect to Desktop Site is set to true

 

Please set both to true or both to false for a fast fix.

 

Then I found these modifications which allow to use both settings in any combination:

 

In catalog/includes/application_top.php

At the very end modify the mobile redirect  to:

  //BEGIN : MOBILE REDIRECT_SCRIPT    
	require(DIR_FS_MOBILE . 'includes/functions/devicelist.php');
	if ( (MOBILE_SITE=='True' || MOBILE_CLASSIC_REDIRECT == 'true') && !defined('MOBILE_SESSION') ) {
	  require(DIR_FS_MOBILE . 'includes/classes/mobile_redirect.php');
	    if ( !strpos($_SERVER['REQUEST_URI'], 'checkout') )
			$mobileRedirect = new mobileRedirect;
	} elseif ( !strpos($_SERVER['REQUEST_URI'], 'checkout') ) {
	  require(DIR_FS_MOBILE . 'includes/classes/classic_redirect.php');
	  $mobileRedirect = new classicRedirect;
	}
//END : MOBILE REDIRECT_SCRIPT

In: catalog/mobile/includes/classes/mobile_redirect.php:

find:

    function isCancelled() {
    	if (tep_session_is_registered('MredirectCancelled')) 
    		return true;
    	if(isset($_GET['MredirectCancelled']) && $_GET['MredirectCancelled'] == 'true') {
    		tep_session_register('MredirectCancelled');
    		return true;
    	}
    	return false;
    }

and change to:

    function isCancelled() {
    	if (MOBILE_SITE != 'True') 
    		return true;
    	if (tep_session_is_registered('MredirectCancelled')) 
    		return true;
    	if(isset($_GET['MredirectCancelled']) && $_GET['MredirectCancelled'] == 'true') {
    		tep_session_register('MredirectCancelled');
    		return true;
    	}
    	return false;
    }

Please try and let me know if it works for you too.

I'll include this fix then in the next update.

 

regards

Rainer

 

PS: nothing to do with subdirectory or subdomain. Should work for both.


Edited by raiwa, 26 April 2015 - 12:05.


#1526   phi148

phi148
  • Members
  • 125 posts
  • Real Name:Bill

Posted 26 April 2015 - 16:06

Hello Bill @phi148,

 

Yes ok. I checked it and this happens if the main switcher in:

Admin => Configuration => Mobile Site => Enable Mobile Site? is set to false

AND

Auto Redirect to Desktop Site is set to true

 

Please set both to true or both to false for a fast fix.

 

Then I found these modifications which allow to use both settings in any combination:

 

In catalog/includes/application_top.php

At the very end modify the mobile redirect  to:

  //BEGIN : MOBILE REDIRECT_SCRIPT    
	require(DIR_FS_MOBILE . 'includes/functions/devicelist.php');
	if ( (MOBILE_SITE=='True' || MOBILE_CLASSIC_REDIRECT == 'true') && !defined('MOBILE_SESSION') ) {
	  require(DIR_FS_MOBILE . 'includes/classes/mobile_redirect.php');
	    if ( !strpos($_SERVER['REQUEST_URI'], 'checkout') )
			$mobileRedirect = new mobileRedirect;
	} elseif ( !strpos($_SERVER['REQUEST_URI'], 'checkout') ) {
	  require(DIR_FS_MOBILE . 'includes/classes/classic_redirect.php');
	  $mobileRedirect = new classicRedirect;
	}
//END : MOBILE REDIRECT_SCRIPT

In: catalog/mobile/includes/classes/mobile_redirect.php:

find:

    function isCancelled() {
    	if (tep_session_is_registered('MredirectCancelled')) 
    		return true;
    	if(isset($_GET['MredirectCancelled']) && $_GET['MredirectCancelled'] == 'true') {
    		tep_session_register('MredirectCancelled');
    		return true;
    	}
    	return false;
    }

and change to:

    function isCancelled() {
    	if (MOBILE_SITE != 'True') 
    		return true;
    	if (tep_session_is_registered('MredirectCancelled')) 
    		return true;
    	if(isset($_GET['MredirectCancelled']) && $_GET['MredirectCancelled'] == 'true') {
    		tep_session_register('MredirectCancelled');
    		return true;
    	}
    	return false;
    }

Please try and let me know if it works for you too.

I'll include this fix then in the next update.

 

regards

Rainer

 

PS: nothing to do with subdirectory or subdomain. Should work for both.

 

Works like a charm!  I can't THANK YOU enough!



#1527   phi148

phi148
  • Members
  • 125 posts
  • Real Name:Bill

Posted 26 April 2015 - 16:07

One other question, I am using the KISS image thumbnailer, seems to work fine.

 

The only odd thing is, every now and then, when on the mobile site, if I click on a product, the picture does not appear in the product listing.  However, if I simply hit the refresh button in my browser, the picture then shows up just fine.  It is simply on the first load that the picture does not show.

 

Any ideas on that one?

 

Thanks again for the excellent support!  :)



#1528   phi148

phi148
  • Members
  • 125 posts
  • Real Name:Bill

Posted 26 April 2015 - 16:55

Another question regarding SSL.   I have my mobile shop installed in a subfolder.   mysite.com/mobile/

 

I noticed in IE when testing checkout, the SSL page is not fully secure because there are insecure URL's.  This only happens in the mobile store.

 

Example from whynopadlock.com on my "mobile/create_account.php" page:

 

Insecure URL: http://www.mysite.co...set-grid.min.js
Found in: https://www.mysite.c...ate_account.php

Insecure URL: http://www.mysite.co...ox/colorbox.css
Found in: https://www.mysite.c...ate_account.php

Insecure URL: http://www.mysite.co...colorbox-min.js
Found in: https://www.mysite.c...ate_account.php

Insecure URL: http://www.mysite.co...ges/overlay.png
Found in: http://www.mysite.co...ox/colorbox.css

Insecure URL: http://www.mysite.co...es/controls.png
Found in: http://www.mysite.co...ox/colorbox.css

Insecure URL: http://www.mysite.co...ages/border.png
Found in: http://www.mysite.co...ox/colorbox.css

Insecure URL: http://www.mysite.co..._background.png
Found in: http://www.mysite.co...ox/colorbox.css

Insecure URL: http://www.mysite.co...ges/loading.gif
Found in: http://www.mysite.co...ox/colorbox.css



#1529 ONLINE   raiwa

raiwa
  • Community Sponsor
  • 727 posts
  • Real Name:Rainer Schmied
  • Gender:Male
  • Location:Sant Iscle de Vallalta, Barcelona, Spain

Posted 26 April 2015 - 17:16

Hello Bill @phi148,

 

Please try this:

in: catalog/mobile/includes/header.php

Find:

<script type="text/javascript" src="<?php echo HTTP_SERVER . DIR_WS_HTTP_CATALOG; ?>ext/photoset-grid/jquery.photoset-grid.min.js"></script>
<link rel="stylesheet" type="text/css" href="<?php echo HTTP_SERVER . DIR_WS_HTTP_CATALOG; ?>ext/colorbox/colorbox.css" />
<script type="text/javascript" src="<?php echo HTTP_SERVER . DIR_WS_HTTP_CATALOG; ?>ext/colorbox/jquery.colorbox-min.js"></script><?php

Modify to:

<script type="text/javascript" src="<?php echo ($request_type == 'SSL') ? HTTPS_MOBILE_SERVER . DIR_WS_HTTPS_MOBILE : HTTP_MOBILE_SERVER . DIR_WS_HTTP_MOBILE; ?>ext/photoset-grid/jquery.photoset-grid.min.js"></script>
<link rel="stylesheet" type="text/css" href="<?php echo ($request_type == 'SSL') ? HTTPS_MOBILE_SERVER . DIR_WS_HTTPS_MOBILE : HTTP_MOBILE_SERVER . DIR_WS_HTTP_MOBILE; ?>ext/colorbox/colorbox.css" />
<script type="text/javascript" src="<?php echo ($request_type == 'SSL') ? HTTPS_MOBILE_SERVER . DIR_WS_HTTPS_MOBILE : HTTP_MOBILE_SERVER . DIR_WS_HTTP_MOBILE; ?>ext/colorbox/jquery.colorbox-min.js"></script><?php

Let me know, I'll include it then in the next update.

 

Thank you very much for the reports and testing.

 

kind regards

Rainer


Edited by raiwa, 26 April 2015 - 17:18.


#1530   phi148

phi148
  • Members
  • 125 posts
  • Real Name:Bill

Posted 26 April 2015 - 17:41

Hello Bill @phi148,

 

Please try this:

in: catalog/mobile/includes/header.php

Find:

<script type="text/javascript" src="<?php echo HTTP_SERVER . DIR_WS_HTTP_CATALOG; ?>ext/photoset-grid/jquery.photoset-grid.min.js"></script>
<link rel="stylesheet" type="text/css" href="<?php echo HTTP_SERVER . DIR_WS_HTTP_CATALOG; ?>ext/colorbox/colorbox.css" />
<script type="text/javascript" src="<?php echo HTTP_SERVER . DIR_WS_HTTP_CATALOG; ?>ext/colorbox/jquery.colorbox-min.js"></script><?php

Modify to:

<script type="text/javascript" src="<?php echo ($request_type == 'SSL') ? HTTPS_MOBILE_SERVER . DIR_WS_HTTPS_MOBILE : HTTP_MOBILE_SERVER . DIR_WS_HTTP_MOBILE; ?>ext/photoset-grid/jquery.photoset-grid.min.js"></script>
<link rel="stylesheet" type="text/css" href="<?php echo ($request_type == 'SSL') ? HTTPS_MOBILE_SERVER . DIR_WS_HTTPS_MOBILE : HTTP_MOBILE_SERVER . DIR_WS_HTTP_MOBILE; ?>ext/colorbox/colorbox.css" />
<script type="text/javascript" src="<?php echo ($request_type == 'SSL') ? HTTPS_MOBILE_SERVER . DIR_WS_HTTPS_MOBILE : HTTP_MOBILE_SERVER . DIR_WS_HTTP_MOBILE; ?>ext/colorbox/jquery.colorbox-min.js"></script><?php

Let me know, I'll include it then in the next update.

 

Thank you very much for the reports and testing.

 

kind regards

Rainer

 

Fixed!  

 

I also have some additional MVS fixes that I'll be passing to you via PM.

 

Additional modifications to checkout_process.php and checkout_confirmation.php appear to be needed.

 

Thanks!



#1531 ONLINE   raiwa

raiwa
  • Community Sponsor
  • 727 posts
  • Real Name:Rainer Schmied
  • Gender:Male
  • Location:Sant Iscle de Vallalta, Barcelona, Spain

Posted 26 April 2015 - 17:52

@phi148,

 

I do not use MVS myself, please see the post from @marcochiana

 

http://forums.oscomm...hone/?p=1726801

 

and the next posts.

 

Please contact him for support.


Edited by raiwa, 26 April 2015 - 17:54.


#1532   phi148

phi148
  • Members
  • 125 posts
  • Real Name:Bill

Posted 26 April 2015 - 19:50

Hello Bill @phi148,

 

Please try this:

in: catalog/mobile/includes/header.php

Find:

<script type="text/javascript" src="<?php echo HTTP_SERVER . DIR_WS_HTTP_CATALOG; ?>ext/photoset-grid/jquery.photoset-grid.min.js"></script>
<link rel="stylesheet" type="text/css" href="<?php echo HTTP_SERVER . DIR_WS_HTTP_CATALOG; ?>ext/colorbox/colorbox.css" />
<script type="text/javascript" src="<?php echo HTTP_SERVER . DIR_WS_HTTP_CATALOG; ?>ext/colorbox/jquery.colorbox-min.js"></script><?php

Modify to:

<script type="text/javascript" src="<?php echo ($request_type == 'SSL') ? HTTPS_MOBILE_SERVER . DIR_WS_HTTPS_MOBILE : HTTP_MOBILE_SERVER . DIR_WS_HTTP_MOBILE; ?>ext/photoset-grid/jquery.photoset-grid.min.js"></script>
<link rel="stylesheet" type="text/css" href="<?php echo ($request_type == 'SSL') ? HTTPS_MOBILE_SERVER . DIR_WS_HTTPS_MOBILE : HTTP_MOBILE_SERVER . DIR_WS_HTTP_MOBILE; ?>ext/colorbox/colorbox.css" />
<script type="text/javascript" src="<?php echo ($request_type == 'SSL') ? HTTPS_MOBILE_SERVER . DIR_WS_HTTPS_MOBILE : HTTP_MOBILE_SERVER . DIR_WS_HTTP_MOBILE; ?>ext/colorbox/jquery.colorbox-min.js"></script><?php

Let me know, I'll include it then in the next update.

 

Thank you very much for the reports and testing.

 

kind regards

Rainer

 

Actually, I think there is a bug in that code you posted.  colorbox and photoset-grid do not exist in "mobile/ext"



#1533 ONLINE   raiwa

raiwa
  • Community Sponsor
  • 727 posts
  • Real Name:Rainer Schmied
  • Gender:Male
  • Location:Sant Iscle de Vallalta, Barcelona, Spain

Posted Yesterday, 07:13

@phi148,

 

ohps well, you are right. I was too fast with this, I just copied the base url above. Of course it should be the main server and directory:

<script type="text/javascript" src="<?php echo ($request_type == 'SSL') ? HTTPS_SERVER . DIR_WS_HTTPS_CATALOG : HTTP_SERVER . DIR_WS_HTTP_CATALOG; ?>ext/photoset-grid/jquery.photoset-grid.min.js"></script>
<link rel="stylesheet" type="text/css" href="<?php echo ($request_type == 'SSL') ? HTTPS_SERVER . DIR_WS_HTTPS_CATALOG : HTTP_SERVER . DIR_WS_HTTP_CATALOG; ?>ext/colorbox/colorbox.css" />
<script type="text/javascript" src="<?php echo ($request_type == 'SSL') ? HTTPS_SERVER . DIR_WS_HTTPS_CATALOG : HTTP_SERVER . DIR_WS_HTTP_CATALOG; ?>ext/colorbox/jquery.colorbox-min.js"></script><?php

Sorry and thank you.

 

For the description links to contact_us.php:

Just add the same redirect snippet you added to catalog/index.php and catalog/product_info.php also to catalog/contact_us.php

 

For the Header Tgas:

In catalog_mb.php and product_info.php they look all ok.

On the other mobile pages it seems you didn't add the header tags, they are not showing.

 

regards

Rainer


Edited by raiwa, Yesterday, 07:18.


#1534   phi148

phi148
  • Members
  • 125 posts
  • Real Name:Bill

Posted Today, 00:50

Thanks for the feedback.

 

I've moved onto the support package containing the mobile sitemap.

 

I copied the folder (usu5_sitemaps) and I ran the index.php

 

All the sitemaps were indeed generated, however they do not contain the SEO URL's.  For example, this is part of the output of sitemapMobileProducts.xml

 

<url>
<loc>
http://www.mysite.com//mobile/product_info.php?products_id=1252
</loc>
<lastmod>2015-04-26</lastmod>
<changefreq>weekly</changefreq>
<priority>0.5</priority>
<image:image>
<image:loc>
http://www.mysite.com/images/xxx/xxx.jpg
</image:loc>
<image:title>Widget</image:title>
</image:image>
<mobile:mobile/>
</url>
 
Any clue on the fix for that one?

Edited by phi148, Today, 00:51.