Jump to content
bumbarash

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

Recommended Posts

Just to update, managed to get the mobile_index to go to mobile _catalouge in HTaccess with

 

RewriteCond %{QUERY_STRING} cPath=
RewriteRule  ^mobile_index.php$ /mobile_catalogue.php?$1 [QSA]

 

and all appears to be working well, links coming in directly from google inot the mobile site

 

i am most impressed with this conrib

 

David


David

Share this post


Link to post
Share on other sites

Thanks for great contribution, we really like the way it works and is very easy to install.

We have almost everything working, except about half of our products when added to cart don't go there, but go back to our website. We can't figure out why, it seems random.

For example:

We have 2 products in category DIAPER CAKES subcategory HOLIDAY DIAPER CAKES - Christmas Poinsettia Diaper Cake and Valentine Diaper Cake. When Christmas Poinsettia Diaper Cake is added to the cart it works correctly and the cart is displayed, however when Valentine Diaper Cake is added to the cart - it goes to the product page on the main site.

We have the same issue for the products that are in categories and the products that are in subcategories.

Please HELP!!!

Just in case you need to see how it works our site is here

 

THANKS

Share this post


Link to post
Share on other sites

Very great contributions.

 

I have only on BIG problem:

 

mobile_catalogue.php work fine, but when I click to one categorie link is mobile_catalogue.php/cPath/38 instead of mobile_catalogue.php?cPath=38

 

Same think to product, mobile_product_info.php/cPath/358/products_id/5950 instead of mobile_product_info.php?cPath=358&products_id=5950

 

If I try manual link it's work fine for both (catalogue and product_info).

 

I have STS and SEO.

 

Please help me.

Share this post


Link to post
Share on other sites

if you listing products with listing (not grid 3 colunms)

 

example:

 

http://img96.imageshack.us/img96/3249/listingproducts.jpg

 

in mobile/includes/iphone.css

 

find:

 

#prodCell {

width:30%;

min-height:225px;

border:1px solid #ccc;

border-radius:5px;/*css3*/

-moz-border-radius:5px;/*gecko (ex:Firefox)*/

-webkit-border-radius:5px;/*webkit (ex:safari)*/

padding:2px;

display:block;

float:left;

margin:2px;

}

 

replace with:

 

#prodCell {

width:100%;

min-height:120px;

 

border-radius:5px;/*css3*/

-moz-border-radius:5px;/*gecko (ex:Firefox)*/

-webkit-border-radius:5px;/*webkit (ex:safari)*/

border-top-color: red;

border-top-style: solid;

border-top-width: thin;

border-bottom-color: red;

border-bottom-style: solid;

border-bottom-width: thin;

background: white;

}

 

in /mobile/incluse/modules/products.php

 

find

 

$num_of_columns = 3;

 

replace with

 

$num_of_columns = 1;

 

find

 

<div id="prodCell">

<div class="prodImg"><?php echo $path . $img . '</a>'; ?></div>

<div class="prodName"><?php echo $path . $listing['products_name'] . '</a>'; ?></div>

<div class="prodPrice"><?php echo $price; ?></div>

<div class="prodBuy"><?php echo $buy_button; ?></div>

</div>

 

replace with

 

<div id="prodCell"><table width="100%" border="0" align="left">

<tr>

<td width="24%" rowspan="3" align="center"><?php echo $path . $img . '</a>'; ?></td>

 

</tr>

<tr>

<td colspan="3" align="center"><?php echo $path . $listing['products_name'] . '</a>'; ?></td>

</tr>

<tr>

<td width="34%">  </td>

<td width="18%" align="right" ><div class="prodPrice"><?php echo $price; ?></div></td>

<td width="24%" align="center"><?php echo $buy_button; ?></td>

</tr>

</table></div>

Edited by sakkiotto

Share this post


Link to post
Share on other sites

I use 3 grid colum, and the pictures are there, but when I go to one product there are no Picture.

001.PNG

 

002.PNG

Share this post


Link to post
Share on other sites

Following the intructions:

3.2) in catalog/includes/footer.php add this snippet to show link to mobile view.

 

<p class="smalltext" align="center">

<?php echo TEXT_SHOW_VIEW; tep_show_view_selector_classic_view();?>

</p>

 

 

But I have this error:

 

 

Fatal error: Call to undefined function tep_show_view_selector_classic_view() in /catalog/includes/footer.php on line 29

Share this post


Link to post
Share on other sites

I am really liking iosc v4, but for some reason when the payment modules load, it strips out all of the tables, so my credit card fields just stream one after another instead of being uniform with <br /> or <td>. Does anyone know how to fix this. I am using paypal_wpp and it is working great, just not displaying properly formated, like the pc version.

 

Evan

Share this post


Link to post
Share on other sites

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

Edited by web-project

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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

 

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...

Share this post


Link to post
Share on other sites

Good evening I am sorry if this has been answered before but I am struggling to find the solution.

I have added the mobile plugin to a live site but it does not seem to be picking up any images.

 

I have checked and replaced code where suggested earlier in this thread and I have the latest version of the plugin....

 

Any help is greatly appreciated.

Share this post


Link to post
Share on other sites

Hello all,

 

I've uploaded a new version iOSC3 (http://addons.oscommerce.com/info/7636). See change log below:

 

New Release (v4.0) of iOSC - mobile version of OSCommerce for iPhone and smartphone

 

Changelog v4.0:

 

Cosmetic changes:

* Dutch translation

* "Mobile" removed from title (mobile/includes/header.php)

* Greeting on mobile_index.php is now multilangual

* Buy NOW button is now multilangual (mobile_product_info.php + all languages)

* Buy NOW button is now multilangual (mobile_product_reviews.php + all languages)

* Added Language to header, Home button removed

* Non used images removed

* Store address added to mobile_contact_us.php (still need some editing)

* Confirm password is now multilangual

* Button PC Site again added

 

Bugfixes:

* BUGFIX: Auto redirect to mobiele home page didn't work (includes/functions/iosc.php)

- $targetPage = "mobile_index.php"; changed in $targetPage = "../mobile_index.php";

* BUGFIX: Checkout process goes trough classic site (mobile/includes/configure.php)

- define mobile_checkout_process.php added

* BUGFIX: After a succes order the customer wasn't redirected to the homepage (mobile_checkout_succes.php)

- MOBILE removed from FILENAME_MOBILE_CHECKOUT_SUCCESS

* BUGFIX: Link to reviews repaired (mobile/includes/configure.php)

- define mobile_product_reviews.php added

* BUGFIX: link to product_review_write repaired (mobile/includes/configure.php)

- define mobile_product_reviews_write.php added

*BUGFIX: PayPal, iDEAL, CC payments, etc didn't work (mobile_checkout_confirmation.php)(thnx to pixclinic)

- "echo $payment_modules->process_button();" added (without quotes!!) after "if (is_array($payment_modules->modules)) {"

- NOTE: This will save sensitive data on your server. It's up to you to decide wether or not you might want to save creditcard data on your server. There is a contribution that you might want to add to your store that encrypts data via MD5 at: (http://www.oscommerce.com/community/contributions,4359). It is strongly recommended if you use the cc module.

*BUGFIX: Auto redirect for smartphones etc edited (thnx to Escaping for the solution, reposted by wflynn)

-NOTE: the auto redirect works, but the switch from mobile to classic gives some problems. I'm still working on this one, a great part of ths contribution needs to be rewritten. As a temperory solution you could install Custom HTTP Error Page (http://addons.oscommerce.com/info/933). This way you'll won't lose potential customers.

 

Other:

* Rewrote installation.txt

 

To do:

* Complete rewrite so the link to the classic site works as it should be

* Add a module (specials or whats new) to mobile_index.php

* Some editing on the store address in mobile_contact_us.php

* (Re)write some other contribs for iOSC (like Purchase Without Account, Points and Rewards and Discount Coupon, etc).

 

Have a look at http://www.cosmeanailart.nl/mobile/ for an example. This is a live shop.....

 

Thanks to the original writers and contributers of this contribution.

Share this post


Link to post
Share on other sites

hi

I just installed the New Release (v4.1) to my osc

first look every thing ok

But the product image can not show well,

can you help tell where to fix about this problem

my website:www.evaland.tw/max/

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

×