Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

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


bumbarash

Recommended Posts

made some progress in making here.... I now have this;

  RewriteRule ^(.*?)mobile/catalog_mb.php$ index.php [R=301,NC,L]
  RewriteRule ^(.*?)mobile/about.php$ index.php [R=301,NC,L]
  RewriteRule ^(.*?)mobile/search.php.php$ index.php [R=301,NC,L]
  RewriteRule ^(.*?)mobile/([a-z0-9/-]+).php$ index.php [R=301,NC,L]
  
  RedirectMatch 301 ^/mobile/.*$ http://www.mysite.com
  
  RewriteRule ^(.*?)mobile/([a-z0-9/-]+)-mc-([0-9_]+).html$ index.php?cPath=$3 [NC,QSA]
  RewriteRule ^(.*?)mobile/([a-z0-9/-]+)-mm-([0-9_]+).html$ index.php?manufacturers_id=$3 [NC,QSA]
  RewriteRule ^(.*?)mobile/([a-z0-9/-]+)-mp-([0-9]+).html$ product_info.php?products_id=$3 [NC,QSA]
  RewriteRule ^(.*?)mobile/([a-z0-9/-]+)-mpr-([0-9]+).html$ product_reviews.php?products_id=$3 [NC,QSA]
  RewriteRule ^(.*?)mobile/([a-z0-9/-]+)-mpri-([0-9]+).html$ product_reviews_info.php?products_id=$3 [NC,QSA] 

It would seem this

  RedirectMatch 301 ^/mobile/.*$ http://www.mysite.com

serves the same purpose as my earlier attempt (which I now have removed) of;

RewriteRule ^mobile\/$ "http\:\/\/www\.mysite\.com\/" [R=301,L]

Just works better....

Link to comment
Share on other sites

Hello all, and thank you Raiwa for this contribution.

 

I installed the iOSC3 v5.4.rev2 for my v.2.2 shop and when I go to the mobile version, I have a "404 Not Found - The requested URL /mobile_ was not found on this server".

 

The other pages work fine (mobile_catalogue.php etc), it's just for the mobile index.

 

I followed the instructions twice and I tried a lot of things but I can't figure it out.

 

Thank you a lot for your help.

Edited by aurelou
Link to comment
Share on other sites

Hello @@aurelou,

 

I'm sorry, but that version is outdated and not supported any more. You should use the actual version 7.5.9:

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

 

regards

Rainer

Link to comment
Share on other sites

I'm sorry to come again with my problems.

I installed the new version and I also have problems...

When I go to my website I have :
 

Warning: require(/homez.331/myshop/www/catalog/mobile/includes/functions/devicelist.php) [function.require]: failed to open stream: No such file or directory in /home/myshop/www/includes/application_top.php on line 607

Fatal error: require() [function.require]: Failed opening required '/homez.331/myshop/www/catalog/mobile/includes/functions/devicelist.php' (include_path='.:/usr/local/lib/php') in /home/myshop/www/includes/application_top.php on line 607

 

 

I checked my files application-top.php and configure.php and they are modified according to the instructions.

 

I have SEO URLs in my shop so I didn't modify html_output.php and I followed the instruction from the support for SEO URLs (I uploaded seo.class.php and made changes in .htaccess).

 

I feel as I am in an impasse, thank you very much if you can help me...

Link to comment
Share on other sites

I solved it !

 

In "configure.php"

 

My shop is in the root and I had "catalog" subdirectory on this line :

 

define('DIR_FS_CATALOG', '/homez.331/myshop/www/catalog');

 

 

I deleted "catalog" and now it works fine :) I don't know how my shop could work correctly before with a such big mistake.

Edited by aurelou
Link to comment
Share on other sites

@@aurelou,

 

As far as I remember, in a standard installation DIR_FS_CATALOG is only used for the download of virtual products. So if you do not offer downloadable products you'll not notice if it is wrong defined.

 

regards

Rainer

Link to comment
Share on other sites

Hi @@raiwa, this is strange because I don't offer downloadable products. When I made this modification the mobile store started to run good, I don't know why...

 

I have another question. In their mobile guide, Google precognizes to use 302 HTTP redirect for mobile sites. Could someone make me an exemple of the code to inser in .htaccess ? And when I will do this, do I have to remove the actual redirection scripts ?

 

Thank you again very much for your help.

Link to comment
Share on other sites

Hello @@aurelou,

 

this is strange because I don't offer downloadable products. When I made this modification the mobile store started to run good, I don't know why...

 

That's just what I tried to explain, you didn't use DIR_FS_CATALOG before, and so you didn't notice that it was defined wrong

 

I have another question. In their mobile guide, Google precognizes to use 302 HTTP redirect for mobile sites. Could someone make me an exemple of the code to inser in .htaccess ?

 

.There is no need to do this. The actual redirect is ok and works correct.

 

kind regards

Rainer

Edited by raiwa
Link to comment
Share on other sites

It works correct for users but does it work correct for Googlebot ? According to their guide (https://developers.google.com/webmasters/mobile-sites/mobile-seo/configurations/separate-urls?hl=en) :

 

Googlebot supports the following two redirection implementations:

  • HTTP redirects
  • JavaScript redirects

 

In iOSC it's a php redirect script, isn't it ?

Link to comment
Share on other sites

It works correct for users but does it work correct for Googlebot ? According to their guide (https://developers.google.com/webmasters/mobile-sites/mobile-seo/configurations/separate-urls?hl=en) :

 

 

In iOSC it's a php redirect script, isn't it ?

Use google mobile test tools and you'll see that it aproves the redirects. Hundreds of iosc users, no one complained until now for the redirects. :-)

 

(It's http redirect)

Edited by raiwa
Link to comment
Share on other sites

@@raiwa

 

Google webmaster tools is starting to report alot of errors on my mobile site.  Here is the issue:

 

On the non-mobile site, when viewing a category of products that contains multiple manufacturers, you can "filter" by manufacturer via a drop down box.  When you do that, a URL is created similar to this:

 

www.mysite.com/widget-category-c-14.html&filter_id=241&page=1&sort=1a

 

On the mobile site, for the same exact page, this "filter" does not exist.  Therefore, this URL is not being found and reports a 404 error:

 

www.mysite.com/mobile/widget-category-mc-14.html&filter_id=241&page=1&sort=1a

 

I assume they way to fix this is to also add a manufacturer filter like the non-mobile site has?  Then the above link would be recognized?

 

Thoughts?

Link to comment
Share on other sites

Hello Bill @@phi148,

 

Yes, the filter option is not implemented in iosc mobile.

There is only the simple manufacturer selector in catalog_mb and then on the new_products page the combination of the manufacturer and category select menu which is the equivalent of the filter option on the main site.

I tried this on my standard develop 2.3.4 store, but it doesn't give an 404 not found error. It just ignores the filter parameter and shows all products or all products of a manufacturer, if selected.

To solve this issue you could strip the filter parameter in the mobile redirect class or add a rewrite rule to .htacess.

Otherwise catalog_mb would need to be recoded including a category select menu and using the filter parameter.

A lot of job and like already stated, I went Bootstrap and will not continue adding new features to iosc Mobile.

If you can do it and find a good solution I would be happy to add it to the package.

 

kind regards

Rainer

Link to comment
Share on other sites

Hello Raiwa, I recently had mobile site installed on my 2.3.1 site (heavenandherbs.com) and the PayPal Advance iframe doesn't appear. The option to select credit cards is there on the checkout page but when you click continue to go to the checkout confirmation page no iframe to enter credit cards appears.  It works fine on my legacy site. Any help would be greatly appreciated Thanks!

Link to comment
Share on other sites

  • 3 weeks later...

Hi Raiwa

 

I've just installed Mobile OSC 7.5.9 on OSC 2.2 RC2 and browsing to my site's URL via a smartphone seems to land on the mobile view of the site. The navigation menu, however, does not work and seems to want to browse to the relevant URLs using the http://site.com/catalog/search.phpformat rather than using the mobile URL http://site.com/catalog/ mobile/search.php.

 

The site uses Ultimate SEO URLs v2.2d and noticed that step 4 (catalog/includes/functions/html_output.php) in the documentation mentioned to skip that step, which I did. If I manually type the mobile version of the URL, all seems to work fine.

 

The only extra thing to note is that I am currently running the site on a test domain, so before I modified anything I took a copy of the site and database and modified the configure.php files to look at the new test domain http://test.site.com.

 

Have I missed something? What would be preventing the site from using the mobile URL? Any help would be much appreciated.

Edited by anewsolutions
Link to comment
Share on other sites

Hello David @@anewsolutions,
 
Yes, it seems you didn't add the SEO URL support which is included in the iosc Mobile contribution support package:
http://addons.oscommerce.com/info/8578
 
See 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.[/size]

 
And Install_osc_2_2 (just the step you mentioned):
 
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.

 
Kind regards
Rainer

Edited by raiwa
Link to comment
Share on other sites

Just a quick question about the Define Content contribution (http://addons.oscommerce.com/info/8666), I use this and have noticed that someone was able to get this contribution working with the mobile version (please see: http://www.oscommerce.com/forums/topic/327785-contribution-iosc-mobile-version-of-osc-on-your-iphone/page-68#entry1710330). Do you know how they achieved this?

Edited by anewsolutions
Link to comment
Share on other sites

Hello @@anewsolutions,

 

Sorry, I never used that contribution myself. You should ask @@markyvuk who did it.

 

regards

Rainer

Link to comment
Share on other sites

  • 1 month later...

Hello Rainer,

 

I have installed for version 2.2 as seen here http://railphotosunlimited.com/Gifts

 

Two problems, it will not switch to mobile even when selecting mobile view. If you look at the mobile site http://railphotosunlimited.com/Gifts/mobile/there are no categories listed.

 

I must have missed something very basic to this but can not see what it may have been.

 

Any help would be appreciated.

 

Dan

Link to comment
Share on other sites

Hello Dan @@railroadguy,

 

 

Please check all of this in this order:

 

- add SEO URLs support for mobile included in the mobile contributions support package:

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

- check the modifications in includes/configure.php

- check the modifications in includes/application_top.php

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

 

 

If you can't get it to work, please post your modifications of the up listed files.

 

regards

Rainer

Link to comment
Share on other sites

Thank you for the quick reply. I installed http://addons.oscommerce.com/info/8578 and I also forgot the redirect in application_top.php

 

So now when we go to http://railphotosunlimited.com/Gifts/ I can select MOBILE View but still not seeing the categories.   So close is you can just give me a few more hints.

 

Thanks so much.

 

Dan

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...