Jump to content


Corporate Sponsors


Latest News: (loading..)

- - - - -

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


471 replies to this topic

#461 web-project

  • Community Member
  • 4,310 posts
  • Real Name:Alex
  • Gender:Male
  • Location:Hertfordshire, UK

Posted 11 February 2012, 19:04

the contribution is missing the checkout function, removed all the necessary functions of oscommerce, incorrectly set the filenames, completely mess

Edited by web-project, 11 February 2012, 19:05.

Please read this line: Do you want to find all the answers to your questions? click here. As for contribution database it's located here!
8 people out of 10 don't bother to read installation manuals. I can recommend: if you can't read the installation manual, don't bother to install any contribution yourself.
Before installing contribution or editing/updating/deleting any files, do the full backup, it will save to you & everyone here on the forum time to fix your issues.
Any issues with oscommerce, I am here to help you.

#462 axioma

  • Community Member
  • 168 posts
  • Real Name:yesid borislov

Posted 14 February 2012, 17:52

last version works good. perfect, the only flaw for the moment is the redirect to mobile pages from search engines

#463 DAVID3733

  • Community Member
  • 155 posts
  • Real Name:DAVID
  • Location:essex UK

Posted 14 February 2012, 17:58

View Postaxioma, on 14 February 2012, 17:52, said:

last version works good. perfect, the only flaw for the moment is the redirect to mobile pages from search engines

What do you mean?
David

#464 axioma

  • Community Member
  • 168 posts
  • Real Name:yesid borislov

Posted 14 February 2012, 20:48

View PostDAVID3733, on 14 February 2012, 17:58, said:

What do you mean?

works good! payment, search, evrything.... the mobile web is ready to make and Hybrid app for iphone or android.

the flaw by the moment... is for example, from google in your phone. the link lead the costumer to a product... this product wont show on the mobile version; it shows on web version... well i did no work araound this, for a while....
but im sure that it will be a solution for that.

Edited by axioma, 14 February 2012, 20:51.


#465 DAVID3733

  • Community Member
  • 155 posts
  • Real Name:DAVID
  • Location:essex UK

Posted 15 February 2012, 09:56

I think this Conbrib is great, my site is working fine, would be nice to be able to make a App for Submission, wouldnt know where to start, is there any pointers out there for this?
David

#466 axioma

  • Community Member
  • 168 posts
  • Real Name:yesid borislov

Posted 17 February 2012, 05:17

View PostDAVID3733, on 15 February 2012, 09:56, said:

I think this Conbrib is great, my site is working fine, would be nice to be able to make a App for Submission, wouldnt know where to start, is there any pointers out there for this?
conduit is for free.... but the splash screen is add from conduit

or http://blog.dvia.com/2011/02/how-to-make-hybrid-iphone-app-in-7.html

or the best and free opensource
http://phonegap.com/

when i have more time i will update the addon that I uplodeD some time ago

#467 DAVID3733

  • Community Member
  • 155 posts
  • Real Name:DAVID
  • Location:essex UK

Posted 17 February 2012, 07:49

Hi Axioma

Do you mean you have created a OSC addon to make a App for IOSC, please can you let me have a link to it.

Thank you
David

#468 axioma

  • Community Member
  • 168 posts
  • Real Name:yesid borislov

Posted 17 February 2012, 18:26

View PostDAVID3733, on 17 February 2012, 07:49, said:

Hi Axioma

Do you mean you have created a OSC addon to make a App for IOSC, please can you let me have a link to it.

Thank you

NO I ONLY SAID... that this current addon can be transformed easily in a hybrid app FOR iphone and android. (search google about hybrid app and native app)
eje
Bank of America uses hybrid app.

Edited by axioma, 17 February 2012, 18:27.


#469 DAVID3733

  • Community Member
  • 155 posts
  • Real Name:DAVID
  • Location:essex UK

Posted 01 March 2012, 13:51

This Contrib is very good, do however have a problem with client who wishs to divert to main site

while on the mobile site the web page is

/catalouge.php?cPath=113

when PC button is clicked the site trys to go to

/catalouge.php?cPath=113&redidrectCancelled=true

this brings up a 404 page on the main site, the address on the main site for this page would be

/-c-113.html

where is the rewrite for this in the files, can anybody point me in the right direction?

Thank you

david
David

#470 vashichino7

  • Community Member
  • 213 posts
  • Real Name:Von Essaghol

Posted 21 March 2012, 20:25

View Postsakwoya, on 17 November 2011, 11:55, said:


I had this working just fine 'out of the box' on a WAMP localhost but when I uploaded to a live site on *NIX then no redirect - spent ages trying to work out why by following the redirect through the new mobile class and whilst all values looked/echoed out correctly - no redirect - so some sort of server setting preventing it?

So adapted wflynn's suggestion above and only edited catalog/includes/application_top.php (unlike wflynn I was not experiencing a loop) with the following code right before the closing ?> and replacing the code from the original add-on/contribution

if (MOBILE_SITE=='True'){
		 $useragent=$_SERVER['HTTP_USER_AGENT'];
		 //start of code from http://detectmobilebrowser.com/ .
				if(preg_match('/android.+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i',$useragent)||preg_match('/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|e\-|e\/|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(di|rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|xda(\-|2|g)|yas\-|your|zeto|zte\-/i',substr($useragent,0,4)))
		//end fo code from http://detectmobilebrowser.com/
		//start of code from original class file mobile_redirect.php
		{		$path = split("/" , $_SERVER['SCRIPT_NAME']);
				$filename = $path[sizeof($path)-1];
				$file = 'mobile_' . $filename;
				$qstring = urldecode($_SERVER['QUERY_STRING']);
				$SSL = ($_SERVER['HTTPS']) ? "SSL" : "NONSSL";
				if (file_exists($file)){
				tep_redirect(tep_href_link($file, str_replace('&', '&',$qstring), $SSL, false, false));
				}
		//end of original
		}
   }//end if (MOBILE_SITE=='True')

Grab the code as he advises from http://detectmobilebrowser.com/ and use it as:

if (preg_match......)//detectmobilebrowser code
{ // your redirect code
}

I've also wrapped this redirect in a
if (MOBILE_SITE=='True'){
										}//end if (MOBILE_SITE=='True')

so that I could turn it off easily in the live site - to use this you need to insert the following using phpMyAdmin or whatever floats your boat:
INSERT INTO `configuration` VALUES ('', 'Enable Mobile Site?', 'MOBILE_SITE', 'FALSE', 'Do you want to enable the mobile version of the site?', 1, 99, NULL, '2011-09-19 08:47:54', NULL, 'tep_cfg_select_option(array(''True'', ''False''), ');

Now go to store admin, configuration, My Store and change the 'Enable Mobile Site' to 'True'. If you do not want to use it just delete the code in the last box (if(MOBILE_....)

the site concerned uses RC 2.2, STS Templates and SEO Urls.

If you find that you now get a working categories list but 404 for products try checking the products url - you may see an '&' in there - if so then check your file catalog/includes/functions/general.php for the function tep_redirect($url) you may need to add the line $url = str_replace('&', '&', $url); towards the end of the file thus:

$url = str_replace('&', '&', $url);

header('Location: ' . $url);

tep_exit();

May help but YMMV

Graeme

I did this got everything to work except now when you click on a product category, I get this error:

Fatal error: Call to undefined function tep_redirect() in ..../html/mobile_catalogue.php on line 24

@sakwoya any clue why? It would work before I inserted your method...

#471 vashichino7

  • Community Member
  • 213 posts
  • Real Name:Von Essaghol

Posted 22 March 2012, 20:21

fixed the error...

#472 Retro

  • Community Member
  • 41 posts
  • Real Name:Diego

Posted 10 May 2012, 17:52

any news about paypal??

thank you