Jump to content
bumbarash

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

Recommended Posts

I am wondering if it is possible when a visitor on the mobile website is on a products_info.php page when he/she clicks on the PC Site button he/she is automatically redirected to the corresponding PC Site product page instead of the index.php file ???

 

I will add this to the list for a next release.

Share this post


Link to post
Share on other sites
i have 2 main problems

1-redirect not working.

2- after i pass shoppingcart.php, it goes to root directory , the mobile root disapears from url see it here

Please check that line 152 in your catalog/mobile/shopping_card.php says

				<td align="right" class="main"><?php echo '<a href="' . tep_mobile_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '">' . tep_mobile_button(IMAGE_BUTTON_CHECKOUT) . '</a>'; ?></td>

Could you please describe in more details what is the problem with redirect?

Share this post


Link to post
Share on other sites
This SQL query is generated by splitPageResults class. This standard OSCommerce class.

Please verify your catalog/includes/classes/split_page_results.php line 67 should be

	  $this->sql_query .= " limit " . max($offset, 0) . ", " . $this->number_of_rows_per_page;

 

 

Thanks bumbarash!

 

It works fine now. I thought that fix was just for the problems when You upgraded SQL from 4 to 5. And since it worked

when I did a search in the store from PC I did not apply that fix. Thanks again for a great contrib and fast help!

 

/clasf

Share this post


Link to post
Share on other sites
Please check that line 152 in your catalog/mobile/shopping_card.php says

				<td align="right" class="main"><?php echo '<a href="' . tep_mobile_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '">' . tep_mobile_button(IMAGE_BUTTON_CHECKOUT) . '</a>'; ?></td>

 

I solved by changing configure.php at mobile/includes/ and also at /includes/ i cannot tell what i change but now works perfect. Sorry

 

Could you please describe in more details what is the problem with redirect?

 

I mean that when i surf in with my iphone i dont get redirected to the mobile directory, i have placed the code you refer to at the end of /includes/aplication_top.php but it gaves me an error, so i had to comment it, any other method?


If you are not part of the solution, you are part of the problem

Share this post


Link to post
Share on other sites
I mean that when i surf in with my iphone i dont get redirected to the mobile directory, i have placed the code you refer to at the end of /includes/aplication_top.php but it gaves me an error, so i had to comment it, any other method?

 

What kind of error?

Share this post


Link to post
Share on other sites
First of all, I want to make sure your main website is located at http://www.yoursite.com/catalog/

If not and you have it at http://www.yoursite.com/ , them mobile directory should be to be http://www.yoursite.com/mobile

 

If link to your product look this way productxycv123.html it means you are using some search engine optimization contribution.

Setting define ('SEO_ENABLED', 'false'); in your mobile/includes/configuration.php should solve this problem for Ultimate SEO URL contribution, but if you use something else please let me know.

 

Link to your site would help

Just a query here. If our main website is in subdomain like this

, how are we redirecting to the mobile page?

Share this post


Link to post
Share on other sites

Someone mentioned recently that mobile pages cause his Google Search to reindex his website. I'm not really sure what that means, but probably it's a good idea to disallow search boots on your mobile website and keep them on the main site.

So if you have robots.txt file in your home directory, add those lines there

 

User-Agent: *
Disallow: /mobile
Allow: /

User-Agent: Googlebot-Mobile
Allow: /mobile
Allow: /

Edited by bumbarash

Share this post


Link to post
Share on other sites

I added this code

 

define(DIR_MOBILE_CLASSES , 'mobile/includes/classes/');
  require(DIR_MOBILE_CLASSES . 'mobile_redirect.php');
  $mobileRedirect = new mobileRedirect;

 

to catalog/incudes/appication_top.php before the last ?>

 

When I type in www.mydomainname.com in the Safari browser on the iPhone, it correctly re-directs me the the catlog/mobile directory.

 

However, when I click on the icon PC Site, it keeps coming back to the catalog/mobile directory instead of the Full website.

 

Anyone else have this happen ?

Share this post


Link to post
Share on other sites
Someone mentioned recently that mobile pages cause his Google Search to reindex his website. I'm not really sure what that means, but probably it's a good idea to disallow search boots on your mobile website and keep them on the main site.

So if you have robots.txt file in your home directory, add those lines there

 

User-Agent: *
Disallow: /mobile
Allow: /

User-Agent: Googlebot-Mobile
Allow: /mobile
Allow: /

I have sitemap instaled and my robots.txt file has this line included:

Sitemap: http://mydomainname.com/sitemapindex.xml

 

Will there be a conflict ?

Share this post


Link to post
Share on other sites

i got this after successfully setup this site. any idea?

 

Notice: Constant DIR_WS_HTTP_CATALOG already defined in C:\wamp\www\catalog\includes\configure.php on line 11

Notice: Constant DIR_WS_IMAGES already defined in C:\wamp\www\catalog\includes\configure.php on line 13

Notice: Constant DIR_WS_INCLUDES already defined in C:\wamp\www\catalog\includes\configure.php on line 15

 

Also got some more questions about IE/IEMobile

 

1. Images in header bar (Store, Search, etc) can't show in IE and IEMobile. Guess it's due css.

2. Content wrapped into separate lines viewing in "Single Column Mode" of IEMobile.

 

Thanks. Ric

Edited by cathaypa

Share this post


Link to post
Share on other sites
Another question:

 

The contribution does not have a sub-directory in the mobile directory called images.

 

I do not wish to copy images from the catalog/images/ directory to the catalog/mobile/images/ directory.

 

I played around with the configure.php file in the catalog/mobile directory but I can not seem to make this work.

 

Anyone ?

 

You don't need to. It pulls them directly from your catalog/images. Problem might be most files are set as osc/... remove the osc/ if teh image folder is directly on your root. Should work :-S

 

Great application!!! Works perfectly and opens up a whole part of my business. :-)

Share this post


Link to post
Share on other sites
I have sitemap instaled and my robots.txt file has this line included:

Sitemap: http://mydomainname.com/sitemapindex.xml

 

Will there be a conflict ?

 

I don't think it will be any conflict. Is your mobile site included in your sitemap? I think it's better not to.

Just add this lines to restrict boots to your mobile site.

User-Agent: *
Disallow: /mobile

 

I'm not sure how "secondary" site will effect your google rating, so it's probably better to have it unindexed for now

Share this post


Link to post
Share on other sites
After a customer signs on and wishes to view MY ORDERS a database error occurs:

 

MYSQL QUERY ERROR REPORT

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

1054 - Unknown column 's.public_flag' in 'where clause'

 

select count(*) as total from orders o, orders_total ot, orders_status s where o.customers_id = '77' and o.orders_id = ot.orders_id and ot.class = 'ot_total' and o.orders_status = s.orders_status_id and s.language_id = '1' and s.public_flag = '1'

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

Remote Address: 174.151.234.6

Referer : http://www.mydomainname.com/mobile/account.php

Requested : /mobile/account_history.php

 

Can anyone else check to see if they get this error please.

 

Hi my site seems to work out of the box, so it's not a coding problem.

Share this post


Link to post
Share on other sites
i got this after successfully setup this site. any idea?

 

Notice: Constant DIR_WS_HTTP_CATALOG already defined in C:\wamp\www\catalog\includes\configure.php on line 11

Notice: Constant DIR_WS_IMAGES already defined in C:\wamp\www\catalog\includes\configure.php on line 13

Notice: Constant DIR_WS_INCLUDES already defined in C:\wamp\www\catalog\includes\configure.php on line 15

 

Also got some more questions about IE/IEMobile

 

1. Images in header bar (Store, Search, etc) can't show in IE and IEMobile. Guess it's due css.

2. Content wrapped into separate lines viewing in "Single Column Mode" of IEMobile.

 

Thanks. Ric

 

As for notices, please verify that you have

require_once('includes/application_top.php');

as first line in your mobile/index.php and first two lines of code in mobile/includes/application_top.php are

 

	  require('includes/configure.php');
require('../includes/configure.php');

 

About IEMobile:

1. Yes , current stylesheet is not compatible with IE. It was originally designed for iPhone/Safari. I will look at my css to make it compatible with IE.

2. I'm not familiar with IEMobile. What is "Single Column Mode"? BTW, what is the screen resolution on IEMobile?

Share this post


Link to post
Share on other sites
However, when I click on the icon PC Site, it keeps coming back to the catalog/mobile directory instead of the Full website.

Anyone else have this happen ?

That's correct, it takes you to PC Site and then redirect it back to mobile.

I will correct it for next release

Share this post


Link to post
Share on other sites
1. Yes , current stylesheet is not compatible with IE. It was originally designed for iPhone/Safari. I will look at my css to make it compatible with IE.

Thanks and eager to see it soon!

 

2. I'm not familiar with IEMobile. What is "Single Column Mode"? BTW, what is the screen resolution on IEMobile?

IE of Windows Mobile 6 wraps a multiple column table into separate rows in one column view. To override it, add following to header for 240px horizontal resoultion.

<meta name="MobileOptimized" content="240">

For details, http://msdn.microsoft.com/en-us/library/bb431690.aspx

 

One more question. I got <title><?=TITLE?></title> in header. should I "require" english.php in application_top?

Edited by cathaypa

Share this post


Link to post
Share on other sites
1. Yes , current stylesheet is not compatible with IE. It was originally designed for iPhone/Safari. I will look at my css to make it compatible with IE.

 

You may remove this in iphone.css for IEMobile

div.headerNavigation {
filter:alpha(opacity=50);
-moz-opacity:.50;
opacity:.50;"
}

Share this post


Link to post
Share on other sites

while browsing from my mobile... when I reach the shopping_cart.php page... and I click checkout it gets redirected to the same page again.... I've tried with 2 mobile handsets... same problem with all... Please tell how i can get rid of this problem.

Share this post


Link to post
Share on other sites

Hi,

 

I get the following error when I click on the add to cart button.

 

Fatal error: Call to undefined method payment::checkout_initialization_method() in /htdocs/mobile/shopping_cart.php on line 160

 

Can someone please help?

 

Thanks

phatolive

Share this post


Link to post
Share on other sites
I get the following error when I click on the add to cart button.

Fatal error: Call to undefined method payment::checkout_initialization_method() in /htdocs/mobile/shopping_cart.php on line 160

 

checkout_initialization_methods is new function has been introduced in the latest OSC v2.2

check your includes/classes/payment.php.

If you don't have it you could add this:

	function checkout_initialization_method() {
  $initialize_array = array();

  if (is_array($this->modules)) {
	reset($this->modules);
	while (list(, $value) = each($this->modules)) {
	  $class = substr($value, 0, strrpos($value, '.'));
	  if ($GLOBALS[$class]->enabled && method_exists($GLOBALS[$class], 'checkout_initialization_method')) {
		$initialize_array[] = $GLOBALS[$class]->checkout_initialization_method();
	  }
	}
  }

  return $initialize_array;
}

Share this post


Link to post
Share on other sites
while browsing from my mobile... when I reach the shopping_cart.php page... and I click checkout it gets redirected to the same page again.... I've tried with 2 mobile handsets... same problem with all... Please tell how i can get rid of this problem.

Which handsets you used (iPhone, Blackberry, Android)?

Share this post


Link to post
Share on other sites
Which handsets you used (iPhone, Blackberry, Android)?

 

I use my motorola e6 ... but i've tried browsing using 2 other nokia phones... even when i use the opera mini browser i face the same problem. please help!

Share this post


Link to post
Share on other sites
I use my motorola e6 ... but i've tried browsing using 2 other nokia phones... even when i use the opera mini browser i face the same problem. please help!

 

you can also try browsing your own site

 

http://zaramir.com/osc/mobile

 

using internet explorer... you will not be able to go past the shopping_cart.php when you click on checkout it will keep reloading and updating your shopping cart... please make necessary corrections to the code.

Share this post


Link to post
Share on other sites
you can also try browsing your own site

 

http://zaramir.com/osc/mobile

 

using internet explorer... you will not be able to go past the shopping_cart.php when you click on checkout it will keep reloading and updating your shopping cart... please make necessary corrections to the code.

 

if you try browsing the same using the google chrome or mozilla firefox you will be directed to the login.php page... so even while browsing from mobile browsers this same problem exists

Share this post


Link to post
Share on other sites
if you try browsing the same using the google chrome or mozilla firefox you will be directed to the login.php page... so even while browsing from mobile browsers this same problem exists

Yes, as it was mentioned before "Checkout" currently doesn't work on IE. This contribution was initially developed for iPhone and tested on Safari and FF only.

I'm working on IE compatibility right now.

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

×