Jump to content



Photo
* * * * * 4 votes

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


  • Please log in to reply
1614 replies to this topic

#1601 ONLINE   raiwa

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

Posted 21 May 2015 - 13:42

@Jack_mcs and @Matjaz,

 
This is what Goolgel states on the referenced page:

 

 

Annotation in the HTML
On the desktop page (http://www.example.com/page-1), add:
<link rel="alternate" media="only screen and (max-width: 640px)"
href="http://m.example.com/page-1">

and on the mobile page (http://m.example.com/page-1), the required annotation should be:
<link rel="canonical" href="http://www.example.com/page-1">

This rel=”canonical” tag on the mobile URL pointing to the desktop page is required.

 

The actual code in header tags does this:

if (defined mobile) {
 <link rel="canonical" href="classic-url" >
} else {
<link rel="alternate" media="only screen and (max-width: 640px)" href="mobile_url" >
}

another possibility following other users opinion could be:

if (defined mobile) {
 <link rel="canonical" href="classic-url" >
} else {
 <link rel="canonical" href="classic-url" >
 <link rel="alternate" media="only screen and (max-width: 640px)" href="mobile_url" >
}

But on the mobile side, a category page uses category_mb.php while it is index.php on the desktop side and I don't know of a way to detect what the other page should be. Rainer, is there a way to know which page to link to? If there is a generic way to do that so it catches all of the pages, then I think the above would switch correctly.

 

Since the classic auto redirect feature was introduced, the easiest way to retrieve the correspondent links is to use "$classic_url" and "$mobile_url" which are defined in mobile/includes/classes/classic_redirect.php and mobile_redirect.php.

 

They show the correct URLs even with SEO URLs installed. You only would need to strip "MredirectCancelled=true" and "redirectCancelled=true" to get all clean.

 

regards

Rainer


Edited by raiwa, 21 May 2015 - 13:42.


#1602   phi148

phi148
  • Members
  • 142 posts
  • Real Name:Bill

Posted 25 May 2015 - 20:17

@raiwa

 

Just out of curiousity, for the "viewport" setting in /mobile/includes/header.php

<meta name="viewport" content="width=320, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />

Is there a reason why width is forced to 320 rather than width=device-width  ?

 

Thanks!



#1603   phi148

phi148
  • Members
  • 142 posts
  • Real Name:Bill

Posted 26 May 2015 - 03:24

@raiwa

 

2nd question :)

 

In regards to google analytics, I saw this error:

 

--------------

The Ad Destination URL http://www.mysite.com/ from the AdWords account xyz@gmail.com (xxx-xxx-xxxx):xxxxxxxxx has accrued a significant number of clicks but a lower-than-expected number of sessions from mobile clients because the page is dropping or altering the gclid parameter inserted by Google. Check the web server's redirect logic or its use of a URL rewrite engine to ensure the gclid parameter is preserved.

 

For example, the Destination URL with autotagging is: www.example.com/redirecting-page?gclid=TeSter-123, when the redirect occurs it should forward the user to www.example.com/new-url?gclid=TeSter-123 (note here that the gclid parameter remains the same, although the page URL changes).

------------

 

I imagine this is happening because of the redirect to "www.mysite.com/mobile/"   when that happens, the gclid is lost.

 

Any ideas on how to preserve that?



#1604 ONLINE   raiwa

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

Posted 26 May 2015 - 06:43

Hello Bill @phi148,

 

For viewport:

Yes, you are right. It is a "relict" from the first iosc versions. Nowadays it should be "width=device-width".

 

For Google Analytics:

The Google Analytics script needs to be added to mobile.

If your store is 2.3.3.4 or 2.3.4, the Google Analytics code can be included to mobile via the ht_google_analytics Header Tag module.

If your store version is older or the script is added by hand, it needs to be added by hand to the mobile header or footer.

 

regards

Rainer



#1605   thiartj

thiartj
  • Members
  • 22 posts
  • Real Name:Johan Thiart

Posted 26 May 2015 - 06:47

@raiwa,

 

Hi after Mobile IOSC installation we receive the error below when running a .php script to feed products to another website. The URL for the feed is http://www.hdcabling...zip=0&add_vat=1. The company providing the feed does not know either why the error below occurs and I told them no SQL security changes were done and not sure why this would occur after mobile upgrade. If you have any ideas please let me know since it seems like an authentication issue but from tests below it is not SQL database related. Nowhere in the .php file is user 'hdcablin' specified only in the configure.php

 

"Warning: mysql_query(): Access denied for user 'hdcablin'@'localhost' (using password: NO) in /home/hdcablin/public_html/bidorbuy.php on line 292

Warning: mysql_query(): A link to the server could not be established in /public_html/bidorbuy.php on line 292
Access denied for user 'hdcablin'@'localhost' (using password: NO)"

 

On the specific bidorbuy.php file line 292 code below

 

$results = mysql_query($products_query) or die(mysql_error());

 

When I create a subdomain with old FTP backup before iOSC Mobile website Installation and using the same database as after mobile upgrade the code works fine as at http://test.hdcablin...zip=0&add_vat=1.

 

I really need someone's help on this since I am clueless on where the error could be and skills on .php very poor since it works on the same database from pre-mobile iOSC install.



#1606   alladin76ro

alladin76ro
  • Members
  • 4 posts
  • Real Name:Dorian

Posted 26 May 2015 - 12:11

Hi,

 

I followed every step while installing Mobile_OsC_7.5.9 and I got a blank index page at the and. Here's my site: http://www.magazinpescuit.ro/mobile

 

Can anyone help? Thank you!



#1607 ONLINE   raiwa

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

Posted 26 May 2015 - 13:15

@alladin76ro,

 

did you add the SEO URLs support for mobile included in the contribution support package:
http://addons.oscommerce.com/info/8629

 

you should also switch error reporting on to see the eventual error message or check in your servers error log.



#1608   alladin76ro

alladin76ro
  • Members
  • 4 posts
  • Real Name:Dorian

Posted 26 May 2015 - 14:38

Sorry, but I couldn't find SEO URLs support package.

 

Here's the error log:

 

[26-May-2015 17:34:39 Europe/Bucharest] PHP Warning: include(/includes/configure.php) [<a href='function.include'>function.include</a>]: failed to open stream: No such file or directory in /home/magazinp/public_html/includes/application_top.php on line 28
[26-May-2015 17:34:39 Europe/Bucharest] PHP Warning: include() [<a href='function.include'>function.include</a>]: Failed opening '/includes/configure.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/magazinp/public_html/includes/application_top.php on line 28
[26-May-2015 17:34:39 Europe/Bucharest] PHP Warning: require(DIR_WS_FUNCTIONScompatibility.php) [<a href='function.require'>function.require</a>]: failed to open stream: No such file or directory in /home/magazinp/public_html/includes/application_top.php on line 40
[26-May-2015 17:34:39 Europe/Bucharest] PHP Warning: require(DIR_WS_FUNCTIONScompatibility.php) [<a href='function.require'>function.require</a>]: failed to open stream: No such file or directory in /home/magazinp/public_html/includes/application_top.php on line 40
[26-May-2015 17:34:39 Europe/Bucharest] PHP Fatal error: require() [<a href='function.require'>function.require</a>]: Failed opening required 'DIR_WS_FUNCTIONScompatibility.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/magazinp/public_html/includes/application_top.php on line 40

Thank you for your answer.



#1609 ONLINE   raiwa

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

Posted 26 May 2015 - 15:09

Helo Dorian @alladin76ro,

 

The first error points to the first modification to apply in catalog/includes/application_top.php, point 1a in the install_osc_2_3.doc.

The following errors are consequences of the first error and will disappear if the first one is fixed.

 

I posted the SEO URLs support download URLin the first message.

Also see: Add-On Support.doc point 1a.

 

regards

Rainer



#1610   phi148

phi148
  • Members
  • 142 posts
  • Real Name:Bill

Posted 26 May 2015 - 16:32

Hello Bill @phi148,

 

For viewport:

Yes, you are right. It is a "relict" from the first iosc versions. Nowadays it should be "width=device-width".

 

For Google Analytics:

The Google Analytics script needs to be added to mobile.

If your store is 2.3.3.4 or 2.3.4, the Google Analytics code can be included to mobile via the ht_google_analytics Header Tag module.

If your store version is older or the script is added by hand, it needs to be added by hand to the mobile header or footer.

 

regards

Rainer

 

Hi Rainer @raiwa

 

Let me clarify a little more.  The problem is not with adding analytics to the mobile site.

 

The problem is more with "adwords".   For example, when you do a google search, and one of my paid ads appears, if you click on that paid ad it will direct you to www.mysite.com/gclid?=abc123

Which is fine if you are using a desktop/laptop PC.  If you are using a mobile device, that link above should be redirected to:  www.mysite.com/mobile/gclid?=abc123

 

What is happening instead is that you are simply redirected to www.mysite.com/mobile/     and you are losing the "Gclid?=abc123" part.

 

Is there a way to retain that information in the URL on redirect to the mobile site?

 

Thanks!

Bill



#1611   alladin76ro

alladin76ro
  • Members
  • 4 posts
  • Real Name:Dorian

Posted 26 May 2015 - 16:44

Hello again Rainer @Mention,

 

I kind of solved first problem, now i have errors inside the mobile version, products not loading. I disabled for now SEO URLs, mobile products still not loading. I downloaded the zip file, search inside but didn't find SEO URLs support. Can you be more specific?

 

Thank you.



#1612 ONLINE   raiwa

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

Posted 26 May 2015 - 18:32

Dear Dorian @alladin76ro,

 

I had a look on your store, there are more errors/missing installation steps.

 

Please check all of this in this order (all in the main catalog files, not mobile files):

 

- 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

- check the modifications in includes/filenames.php

- check the modifications in includes/application_top.php

 

You NEED to add the SEO URL support to get the category and product pages to work correct. It is not the same to switch it off in Admin.

 

You read my installation instructions, you didn't?? :-

 

Start_Here.doc:

IMPORTANT NOTE:
For installation in subdirectory “mobile/”, finish “Install_osc_2_2.doc” or Install_osc_2_3.doc” before testing the mobile files.
For installation under subdomain finish also “Configure_ subdomain.doc” before testing the mobile files.
If you are using SEO URL, finish also “SEO URL” support installation included in the Add-On support package before testing the mobile redirects.
If you are using an image thumbnail add-on, finish also “image thumbnail” add-on support installation included in the Add-On support package before testing the mobile images.

 

Install_osc_2_3.doc point 4:

4) catalog/includes/functions/html_output.php

NOTE: If you use SEO URLs this code is not present here.

For ULTIMATE Seo Urls 5 ( r205 ) - by FWR Media and SEO URLs 2.2. by chemo:
No need to modify anything here, leave the code like it was modified by the original SEO URL installation. But you need to do the other additional modifications explained in the support package.

So don’t try to run the mobile pages until you finished the additional installation.

 

 

 Mobile SEO URL support is included in the iosc Mobile Contribution support package:

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

You will find 2 SEO URL support folders in the package:

1. SEO URLs USU5_vers3.3

2. SEO URLs_2.2._by_chemo_vers3.4

 

There is no mobile support for other SEO URL add-ons/versions available.

 

If you still have trouble, please read again ALL documentation and check careful ALL installation instructions.

 

If you still have trouble, post again.

 

kind regards

Rainer

 

PS: Please, understand that I spent a lot of time writing the installation docs and I already answered these basic installation things many, many times. o:)


Edited by raiwa, 26 May 2015 - 18:34.


#1613 ONLINE   raiwa

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

Posted 26 May 2015 - 18:40

Hello Bill @phi148,

 

Can you please send me an example adwords URL in a private message and I'll have a look.

 

regards

Rainer



#1614   alladin76ro

alladin76ro
  • Members
  • 4 posts
  • Real Name:Dorian

Posted 26 May 2015 - 21:47

@raiwa

 

Thank you for your help.

 

I checked twice the documentation and I'm still missing something. On my mobile homepage, when I click on recent added products or specials, an animated gif representing a circle appears, and no redirection to the product description. Except the design, I solved all the problems (I guess :) ). Again, I'm very grateful for your patience and understanding.

 

Best regards,

Dorian



#1615 ONLINE   raiwa

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

Posted 27 May 2015 - 07:44

Hello Dorian @alladin76ro,

 

I'm glad that you could fix it.

For the products please try this:

In: mobile/includes/modules/products.php

FIND line 80:

    $path = '<a href="' . tep_mobile_link(FILENAME_PRODUCT_INFO, 'products_id=' . $listing['products_id']) . '">';

and CHANGE to:

    $path = '<a data-ajax="false" href="' . tep_mobile_link(FILENAME_PRODUCT_INFO, 'products_id=' . $listing['products_id']) . '">';

This disables ajax page load and should make it more stable.

 

See also: Add-On Support.doc point 11

 

regards

Rainer