Jump to content
bumbarash

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

Recommended Posts

I am getting a url path error with multiple category pages.

First page loads correctly as:

www.website.com/mobile_products.php?cPath=37

 

if I go to page 2 I get:

www.website.com/mobile_products.php/cPath/37/page/2

 

should be:

www.website.com/mobile_products.php?cPath=37&page=2

 

Any assistance would be appreciated.

Jeff

Share this post


Link to post
Share on other sites

I am getting a url path error with multiple category pages.

First page loads correctly as:

www.website.com/mobile_products.php?cPath=37

 

if I go to page 2 I get:

www.website.com/mobile_products.php/cPath/37/page/2

 

should be:

www.website.com/mobile_products.php?cPath=37&page=2

 

Any assistance would be appreciated.

Jeff

Hi Jeff

 

change the mobile/includes/configurephp file and set seo to true

define ('SEO_ENABLED', 'true');

 

Steve

Share this post


Link to post
Share on other sites

Hi Jeff

 

change the mobile/includes/configurephp file and set seo to true

define ('SEO_ENABLED', 'true');

 

Steve

Steve,

 

Thank you for the response.

 

After changing the configure setting to

define ('SEO_ENABLED', 'true');

(clean cache)

I now get bad URL's on the initial category page

/mobile_products.php/cPath/37 and none of the images and css load correctly

 

When I turn it back to 'false' (clean cache) I get the original correct url

/mobile_products.php?cPath=37

Images and css are ok, only the destination url's for pages 2,3,4 etc. do not seem to be have a valid look-up and when I select page 2 it will load the page with all '/' between the values and not resolve images and css.

Share this post


Link to post
Share on other sites

I'm going to throw my problems into the mix.

 

I've read the entire thread, and made changes that apply.

 

This is my problem: When I'm on the laptop, I can get the mobile files to work like they should. I can login, view the products, add to cart, checkout, etc. However, when I try to access the mobile site from my iPhone, it comes back blank and with no errors. I have error reporting turned on. I also have Safari's debugging turned on and still no errors, just a blank mobile_index.php page.

 

Can anyone tell me why it works on the computer but not on the phone?

 

To see it, here's my site.

 

Thank you all in advance,

Paul


Paul 'n NE Kansas

Share this post


Link to post
Share on other sites

Update....

 

I talked to my hosting provider today and they said there was a conflict with my SSL Certificate. They are going to correct it on the server (according to the tech). Once I hear from them, if their "work" corrects the problem, I'll be able to share with those that are continuing to have problems.

 

Thanks,

Paul


Paul 'n NE Kansas

Share this post


Link to post
Share on other sites

I guess tier 1 support was wrong. The problem was handed up to the next tier and they said there was nothing wrong with my SSL Certificate and it was not causing a conflict. Back to the drawing board.

 

Everything works fine on the local computer but not on the phone.

 

Thanks,

Paul


Paul 'n NE Kansas

Share this post


Link to post
Share on other sites

Part of the problems might be the fact that the shop has been hacked since May.

 

There are around 400 spam links at the end of the page source in your g00gle cache.

 

I posted about this in May in a thread you started in the Paypal forum.

 

Adding the spam links is an albeit benign hack, but if someone can do that someone else with a worse type of hack will show up eventually.


If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Share this post


Link to post
Share on other sites

Thanks for pointing out the hack. In May, I repaired all the files. However, when I just checked, they were hacked again. After repairing the files, the mobile version worked just fine on the iphone. I thought I had followed all the security tips and "necessary" contribs. I must have missed something somewhere.

 

Now I'm off to check the security contribs and tips again....

 

Thanks,

Paul


Paul 'n NE Kansas

Share this post


Link to post
Share on other sites

Just a few thoughts and tips for users of this contrib. Although I've read the length of this thread, some of these ideas may have been mentioned before. My apologies if there are repeats. :rolleyes:

 

Testing the Contrib

 

For folks who lack multiple devices for testing, you can download a User Agent emulator for FireFox at https://addons.mozilla.org/en-US/firefox/addon/59/ . Among the possibilities are several mobile devices / OSs / Browsers. Since your mobile site is based on a different screen resolution, the header will appear wrong, but I've found it invaluable in testing redirects and other functions.

 

Redirect Problems

 

For folks with redirect problems, the author of this contrib has done us all a great service. I applaud their ingenuity. Unfortunately, like many others I just couldn't get the redirect to work. With all the new devices emerging daily too, I suspected that if the redirect worked for me now, it would be missing some devices in the near future. I have opted for a different redirect script. It is open source, so it is constantly being updated and totally free. It can be downloaded at http://detectmobilebrowser.com/ . Click download scripts and then php. You can set yourself a reminder to download every month or so and you're always up to date. (Again, no joy taken away from the original author. Honestly great work.)

 

Now for the implementation. I was getting errors with the redirect being called from application_top.php when the mobile_index.php calls it's own application_top that then calls the original application_top again. I was getting a loop and the address wouldn't resolve. Perhaps I did something else wrong, but I did find a solution. I call the redirect from the main site header.php. (Actually, I use a template system, so I call it from the main template, but I believe most users would use their header.php.) Here's how it would work.

 

a. Create a php file in the mobile/includes/classes dir called mobile_user_detect.php. Put the script you downloaded above in it. The last part of the script contains the redirect looking something like "header('Location: http://detectmobilebrowser.com/mobile');". Change to read "header('Location: http://yousitename.com/catalog/mobile_' . $mobile_device_url);". (I'll get to the $mobile_device_url in a moment.) If your mobile dir and mobile_* files reside in a different directory, naturally, you'll have to change this url some.

 

b. In your header.php, put the following line "require_once('mobile/includes/classes/mobile_user_detect.php');". Again, if this doesn't resolve to the right location, you'll have to adjust for your structure.

 

c. Last thing is the $mobile_device_url. If you are like me, most visitors don't enter your site on your homepage anyway. They click a search ad or organic result and enter on a product page. Redirecting to mobile_index.php doesn't make sense. You want them to go to the correct product page, just on the mobile version. Here's what you do. In your header.php immediately before the "require_once('mobile/includes/classes/mobile_user_detect.php');" line you just added, insert this code "$mobile_device_url = basename($PHP_SELF) . '?' . tep_get_all_get_params();". This grabs the product id and correct file name from the referring URL so the redirect can append it to the new URL. So, "www.yousite.com/catalog/product_info.php?product_id=1" becomes "www.yousite.com/catalog/mobile_product_info.php?product_id=1".

 

Added Benefits

For folks who are struggling with links always referring back to your main site, I think this would just send them to your mobile site again. I wasn't having this issue thanks to some previous posts, but I suspect it would function in this fashion. Guess someone else will have to try it.

 

For folks who normally use SEO URLS, this even allows my install to correctly redirect to these product pages. Basically then, "www.yousite.com/catalog/some-great-product-1.html" becomes "www.yousite.com/catalog/mobile_product_info.php?product_id=1". If you're using a different SEO URLs and it doesn't work for you, sorry. For many though, this will save you having to rewrite all your links with your PPC providers to the non-SEO URL format. It works either way.

 

I know this was a little long. Hopefully, it contains some useful info for someone. I have added several changes from some previous posts on this thread, so I don't really have a way to see if these changes will work with the contrib "out of the box". Good luck to all and thanks to the original author and many previous posters.

 

 

Hello:

I have done what you explain here and does not work, neither the redirect, no the seo.

My problem is that I have installed the ultimate seo url, so I have a file called htaccess that always call the products to my website, not to my mobile side. I would like to have the benefits of the ultimate seo url working on the mobile site. Do you know how can I fix it?

Thankyou in advance, Gregorio

Share this post


Link to post
Share on other sites

Hi,

Are there any sites which have successfully implemented this contribution?

 

I am looking to add iOSC on a fresh OSC installation with no other contributions on a server running PHP 5.2.13 & MySQL 5.0.20a-max.

 

Does it work?

Share this post


Link to post
Share on other sites

Hi,

Are there any sites which have successfully implemented this contribution?

 

I am looking to add iOSC on a fresh OSC installation with no other contributions on a server running PHP 5.2.13 & MySQL 5.0.20a-max.

 

Does it work?

Hi

 

I have got it to work, and my site is heavily modified if you want the files let me know, you might have to change them to standard osc ie removing the extras i have added

 

Steve

Share this post


Link to post
Share on other sites

Hi Steve,

 

Great, would like to take you up on the offer. How do we go about it. BTW, which mods/contributions are installed in your version?

 

Richard

Share this post


Link to post
Share on other sites

hello, when I login as a costumer all I see is a blank page, if I go manually to account_hystory or _edit it works

I checked the account.php but there's not much stuff... what should I check please?

 

thank you

Share this post


Link to post
Share on other sites

hey guys

 

ive been using this contrib for about a year now

 

but using this version

 

iOSC v1.4- mobile site fo iPhone (Update) bumbarash 3 Apr 2009

 

Big thanks to PIXCLINIC for pointing out, investigating and repairing this bug

AJAX part didn't work correctly if you have quotes or space.

addslashes() added to categories_js.php

iOSC v1.3- mobile site fo iPhone bumbarash 17 Mar 2009

 

I see there is a new version, and a whole lot of new files which are added to the catalog directory.

 

is there a major change?

 

i see the files in the mobile directory have been moved to catalog but everything else seems the same?

 

Also with the redirection, i implemented the detect browser which a few posts gave which worked perfectly but clicking on PC site now doesnt work

 

eg : http://www.domain/?redirectCancelled=true

Share this post


Link to post
Share on other sites

Hello guys,

 

This is just some tips if you want make this module working good for all mobile phones.

You must validate this module to http[:]//validator[dot]w3[dot]org/mobile/

 

Rudi

Share this post


Link to post
Share on other sites

Hi.

 

I just installed iOSC 2.0v. But when I access on my website on the iphone, main page redirected to mobile_index.php.

But When I click catalog, there is error message like this

 

"Fatal error: Call to a member function add_current_page() on a non-object in /mnt/w0329/d38/s30/b03180e7/www.mysite.com/includes/application_top.php on line 312"

 

Could you let me know what is wrong on this?

 

Thanks

Share this post


Link to post
Share on other sites

"Fatal error: Call to a member function add_current_page() on a non-object in /mnt/w0329/d38/s30/b03180e7/www.mysite.com/includes/application_top.php on line 312"

 

Could you let me know what is wrong on this?

Impossible to tell because this is an effect of another (earlier occurring) error on your site. You should change your application_top.php according to this change, throw away the cookies of your site stored in your browser (or close and restart your browser) and fix the error.

Share this post


Link to post
Share on other sites

Hello everyone.

 

I have "OsCommerce 2.2rc2a" working properly.

 

I want my store you can see it on a mobile (iphone, black berry ,....).

 

IOSC Is it stable?

Is it advisable?.

 

I have two ideas for my shop can be seen in a mobile phone:

 

a) Install IOSC

 

B ) Develop. php files to do this Operations in a mobile device:

-Login.

-Register.

-Rec.Password.

-Add product

-Delete product

-Buy (Send the mobile user to the "normal" store (800x600 tipycally pc).

 

What do you think?.

 

 

Thanks, greetings.

Edited by Kaisser74

Share this post


Link to post
Share on other sites

Here is the content of Traditional Chinese translation for V2.0d.

 

<?php

define('TEXT_SHOP', '商店');

define('TEXT_ACCOUNT', '帳戶');

define('TEXT_ABOUT', '關於');

 

define('TEXT_KEYWORDS', '關鍵字');

define('TEXT_MY_ORDERS', '訂單');

define('TEXT_NEWSLETTERS', '時事傳報');

 

define('TEXT_PRODUCT_OPTIONS', '選項');

?>

 

:D:P

=======================================

If it solve the problem would send me the chinese.php translation file to be included in the next release

Thanks


YaNotCook !!

Share this post


Link to post
Share on other sites

I have this installed and all seems to work very well except when I want to go to my mobile shopping cart page, or add product to my mobile shopping cart. At this point I receive this message.

 

Warning: require_once(/home/mysite/public_html/mobile//includes/languages/english/modules/payment/googlecheckout.php) [function.require-once]: failed to open stream: No such file or directory in /home/mysite/public_html/includes/modules/payment/googlecheckout.php on line 50

 

Fatal error: require_once() [function.require]: Failed opening required '/home/mysite/public_html/mobile//includes/languages/english/modules/payment/googlecheckout.php' (include_path='.:/usr/lib/php:/usr/local/lib/php:../includes/phpids/lib/') in /home/mysite/public_html/includes/modules/payment/googlecheckout.php on line 50

 

I am using Googlecheckout level1 and phpids contributions. These are where my problem seems to be. Any Suggestions.

 

Thanks :'(

Share this post


Link to post
Share on other sites

Hi

 

I have got it to work, and my site is heavily modified if you want the files let me know, you might have to change them to standard osc ie removing the extras i have added

 

Steve

 

Hi Steve,

 

If the offer still stands, I would love to have a look at your files to facilitate my trouble-shooting. I am resolving issues one by one, but it is a very time intensive process and I am eager to get this up and running as soon as possible. The help would be greatly appreciated.

 

Thanks greatly - Russell

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

×