Jump to content
Latest News: (loading..)
bumbarash

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

Recommended Posts

Hello Fátima @@famaca,

 

I checked again and 7.5.8 is running correct on all my test stores.

There is an error in the installation instructions regarding the new redirect feature in product_info and index, however it has nothing to do with the redirect loops and slow page load.

I just uploaded the fix 7.5.8r1.

 

Please check the following in that order:

- if you are using SEO URLs, check if you added the appropiate SEU URL support (and correct SEO URL version) and check all modifications.

- check the modifications in tep_href_link function in includes/funktions/html_output.php

- check the modifications in tep_redirect function in includes/functions/general.php

- check the modifications in includes/configure.php

 

If you still have troubles, you can post all the relevant parts of these files here.

 

kindest regards

Rainer

Edited by raiwa

Share this post


Link to post
Share on other sites

I was installing on new install of os commerce v.2.3.4  iOSC ver 7.5.8

 

  I used instructions

Installation for OsCommerce 2.3. to 2.3.4.

 

 

Then came to instructions section 3B

B) To install the mobile pages in your mobile subdomain:
      Copy the content of the mobile directory to the mobile subdomain directory of your shop. Keyword bothering me is subdomain

 

what is ment by "mobile subdomain directory of your shop" how does that differ from the mobile directory I just added?

 

 

Then when I get to section 4

4.  Upload this directory:
common files/catalog/mobile/…..

 

when I attempt this, There are a few files that have the same names but different sizes.

Share this post


Link to post
Share on other sites

Hello Frank @@FrankCRFG,

 

3A and 3B are alternative: OR install the mobile files in a subdirectory (mobile/) which is your case, OR install the mobile files in a subdomain (whatever the name of the subdomain folder may be).

 

For point4: there are the same filenames, but you have to upload the "mobile" folder (directory) with all content to your main directory:

Copy the mobile directory (incl. all content) to the root directory of your shop

like this xample:

Main store:

[catalog]/index.php

Mobile:

[catalog]/mobile/index.php

 

So although there are identical filenames, they are in different directories, no files have to be replaced at this point.

It's important to keep the directory structure of all files/directories.

 

Hope that helps

Rainer

Edited by raiwa

Share this post


Link to post
Share on other sites

So, In the

for_OsC_2.3.3.3_2.3.3.4  folder there is includes and mobile folders

and in

 

common files folder

is a catalog folder

 

inside of that is folders

images, includes, and mobile.

 

I was under the impression accotring to the following - to 1st copy from the folder for_OsC_2.3.3.3_2.3.3.4 mobile to my main /root directory of shop

 

3A) To install the mobile pages in the mobile subdirectory:
      Copy the mobile directory (incl. all content) to the root directory of your shop.

 

Then according 4  I am to upload the common files mobile directory

4.  Upload this directory:
common files/catalog/mobile/…..

 

since the two mobile folders have different contents - some files have different sizes, Am I to copy the 2nd mobile folder to inside of the mobile folder making

catalog/mobile/mobile ?

Edited by FrankCRFG

Share this post


Link to post
Share on other sites

@@FrankCRFG,
 
It doesn't say 3A, it says:
2a..................
2b...............
2c...........
3.............
 
A............
B..............
 
4..............
5...............
 
So A or B are alternative instructions for the following steps  4+5
 
Correct:
[cartalog]/mobile/product_info.php

Wrong:
[catalog]/mobile/mobile/product_info.php

Edited by raiwa

Share this post


Link to post
Share on other sites

Hi,

 

 I appied all the new changes to my shop and, although all the pages load faster, there is still a problem with the links to the catalog even when I access from my computer.

 

I have the Ultimate Seo Urls 5 Pro installed and I've followed the instructions " Install_SEO_URLs_5.docx" of SEO URLs USU5_vers3.2 in the support Support. 4.4.  MOsC 7.5 addon. I don't know if the problem could be here.

 

Thanks

 

Regards

Share this post


Link to post
Share on other sites

Hello Rainer

 

Is this contribution combatible when I have the addon: modular_seo_header_tags_1.4.6_min installed?

 

Thank you and have a great day

Share this post


Link to post
Share on other sites

Hello Marc @@cramli,

 

Yes, these are the same, if I well remember, than these included in the iosc mobile add on for osc 2.3.

 

Mobile header tags v1.0

http://addons.oscommerce.com/info/7646

 

 

kind regards

Rainer

Edited by raiwa

Share this post


Link to post
Share on other sites

Hello Rainer

Thank you for your fast answer.

 

To clarify what I have to do is:   First Installing Mobile OSC 7.5.8r1_1,  and then the addon mobile headertags? I am right?

 

What I am not understanding isThis package will work and HTML5 validate "out of the box" only with unmodified OSCommerce shops 

 

My shop is modified so what I have to do??

 

Thank you and best regards

 

Marc

Edited by cramli

Share this post


Link to post
Share on other sites

Dear Rainer

 

I have installed the KissIT_image_thumbnailer_r9_1. Can they work together?

 

I know you wrote that MAYBE it is not working, but somehow you have in the meantime made other experience.

 

Thank you again

 

Best regards

 

Marc

Edited by cramli

Share this post


Link to post
Share on other sites

Dear Rainer

 

I have installed the KissIT_image_thumbnailer_r9_1. Can they work together?

 

I know you wrote that MAYBE it is not working, but somehow you have in the meantime made other experience.

 

Thank you again

 

Best regards

 

Marc

Please try, it's supposed to give problems when using SSL

Share this post


Link to post
Share on other sites

Hi Rainer,

I found in your instruction to update to 7.5.8 r1

 

2. CATALOG /index.php

Add redirect to mobile when mobilesession is registered, missed modification in 7.5.8 instructions.

Find:

require('includes/application_top.php');

Replace with:

// redirect them to the mobile page if they come from mobile

if ( tep_session_is_registered('mobilesession') && !isset($_GET['MredirectCancelled']) && ('MredirectCancelled' != 'true') )

tep_redirect($mobile_url, 'redirectCancelled=true');

 

I Think it's not Replace but Add Below (same in instal osc 2.3.x point 18)

 

Thanks for your help, now my site work also in Mobile !! :thumbsup:

Marco

Share this post


Link to post
Share on other sites

Hi Rainer,

I found in your instruction to update to 7.5.8 r1

 

2. CATALOG /index.php

Add redirect to mobile when mobilesession is registered, missed modification in 7.5.8 instructions.

Find:

require('includes/application_top.php');

Replace with:

// redirect them to the mobile page if they come from mobile

if ( tep_session_is_registered('mobilesession') && !isset($_GET['MredirectCancelled']) && ('MredirectCancelled' != 'true') )

tep_redirect($mobile_url, 'redirectCancelled=true');

 

I Think it's not Replace but Add Below (same in instal osc 2.3.x point 18)

 

Thanks for your help, now my site work also in Mobile !! :thumbsup:

Marco

@@marcochiana,

 

Oh yes of course. Thank you for the report.

Share this post


Link to post
Share on other sites

I installed osc mobile in My oscommerce 2.3.4 with many addons, I try to install MVS (multi vendor System) in Mobile

 

These files are modified to work under mobile.

mobile/checkout_shipping.php checkout_shipping.php

and includes/modules/vendor_shipping.php vendor_shipping.php

 

 

 

NOTE: I'm NOT a programmer but could be a good starting point to implement MVS  Mobile

 

 

Little problem to make Radio Button mobile in this part

// Start Javascript patch

            if ( ($checked == true) || ($n == 1 && $n2 == 1) ) {

              echo ' <tr id="defaultSelected_' . $vendor_id . '_' . $radio_buttons . '" class="moduleRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="selectRowEffect(this, ' . $radio_buttons . ', ' . $vendor_id .')">' . "\n";
			
            } else {


              echo ' <tr id="defaultSelected_' . $vendor_id . '_' . $radio_buttons . '" class="moduleRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="selectRowEffect(this, ' . $radio_buttons . ', ' . $vendor_id . ')">' . "\n";

            }

// End Javascript patch

Share this post


Link to post
Share on other sites

@@marcochiana,

 

have a look on the shipping/payment selections in mobile/checkout_shipping.php and mobile/checkout_payment.php

and more information and examples here:

http://view.jquerymobile.com/1.3.2/dist/demos/widgets/radiobuttons/

Edited by raiwa

Share this post


Link to post
Share on other sites

Hello,

 

Strangely I'm getting the following:

 

Warning: Cannot modify header information - headers already sent by (output started at /.../shop/mobile/includes/header.php:6) in /..../shop/includes/functions/general.php on line 57

 

I've changed SEO URL 5.0 to rewrite and now it seems I'm getting this error in my mobile shop. Can anyone shed light please?

 

See at this link:

 

https://www.herbalmedicineuk.com/shop/mobile/green-tea-100g-mp-1056.html?redirectCancelled=true

 

Thanks,

 

Lorraine

Share this post


Link to post
Share on other sites

Hello Lorraine @@herbsandhelpers,

 

There is a specific thread for this error which can be produced by several reasons.

One of the most common is a blank space or blanc line at the end of a php file, after the last closing ?>

Althought it's strange that this happens when switching the rewrite option.

I would check the involved files and first revert what you changed to make sure that it's this.

 

regards

Rainer

Share this post


Link to post
Share on other sites

Thanks Rainer,

 

general is fine but a there's a </div> at the end of the header file. Removing it seems to make no difference can you direct me to the thread on this please?

 

Thanks,

 

Lorraine

Share this post


Link to post
Share on other sites

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/xhtml1/DTD/xhtml1-transitional.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

Share this post


Link to post
Share on other sites

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! 

Share this post


Link to post
Share on other sites

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.com/?MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMredirectCancelled=true

 

Any ideas?

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×