Jump to content



Photo
* * * * * 4 votes

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


  • Please log in to reply
1688 replies to this topic

#1681 ONLINE   raiwa

raiwa
  • Community Sponsor
  • 1,064 posts
  • Real Name:Rainer Schmied
  • Gender:Male
  • Location:Sant Iscle de Vallalta, Barcelona, Spain

Posted 05 January 2016 - 14:25

Hello Bill @phi148,

 

Best practice would be to overwrite the jquery mobile stylesheet for the categories name with a customized stylesheet. This avoids that other places get affected.

Try this:

In the mobile stylesheet you wish to use, for example "mobile/ext/css/mobile_OSC_stylesheet.css"

Add at the end:

.mycategories.ui-li-heading {
	overflow:show;
	text-overflow:clip;
	white-space:normal;
	margin-top:-7px;
}

(The original stylesheet "ui-li-heading" is defined in: mobile/ext/jquery.mobile.structure_1.3.2.min.css)

 

Then in mobile/categories_mb.php

Find line 200:

			echo  '<li><a href="' . tep_mobile_link(FILENAME_CATALOG_MB, tep_get_path($item['categories_id'])) . '">' . $img . '<h2 style="margin-top:19px">' . $item['categories_name'] . ((MOBILE_PRODUCT_COUNT == 'true')? '<span class="ui-li-count">' . tep_count_products_in_category($item['categories_id']) . '</span>' : '') . '</h2></a></li>';

and replace with:

			echo  '<li><a href="' . tep_mobile_link(FILENAME_CATALOG_MB, tep_get_path($item['categories_id'])) . '">' . $img . '<h2 class="mycategories">' . $item['categories_name'] . ((MOBILE_PRODUCT_COUNT == 'true')? '<span class="ui-li-count">' . tep_count_products_in_category($item['categories_id']) . '</span>' : '') . '</h2></a></li>';

This should now wrap the category name if it doesn't fit and palcethe first line at the top instead of centered. You can also overwrite type size, style etc in the same stylesheet.

 

Hope this helps

 

regards

Rainer



#1682   phi148

phi148
  • Members
  • 154 posts
  • Real Name:Bill

Posted 06 January 2016 - 04:23

Hello Bill @phi148,

 

Best practice would be to overwrite the jquery mobile stylesheet for the categories name with a customized stylesheet. This avoids that other places get affected.

Try this:

In the mobile stylesheet you wish to use, for example "mobile/ext/css/mobile_OSC_stylesheet.css"

Add at the end:

.mycategories.ui-li-heading {
	overflow:show;
	text-overflow:clip;
	white-space:normal;
	margin-top:-7px;
}

(The original stylesheet "ui-li-heading" is defined in: mobile/ext/jquery.mobile.structure_1.3.2.min.css)

 

Then in mobile/categories_mb.php

Find line 200:

			echo  '<li><a href="' . tep_mobile_link(FILENAME_CATALOG_MB, tep_get_path($item['categories_id'])) . '">' . $img . '<h2 style="margin-top:19px">' . $item['categories_name'] . ((MOBILE_PRODUCT_COUNT == 'true')? '<span class="ui-li-count">' . tep_count_products_in_category($item['categories_id']) . '</span>' : '') . '</h2></a></li>';

and replace with:

			echo  '<li><a href="' . tep_mobile_link(FILENAME_CATALOG_MB, tep_get_path($item['categories_id'])) . '">' . $img . '<h2 class="mycategories">' . $item['categories_name'] . ((MOBILE_PRODUCT_COUNT == 'true')? '<span class="ui-li-count">' . tep_count_products_in_category($item['categories_id']) . '</span>' : '') . '</h2></a></li>';

This should now wrap the category name if it doesn't fit and palcethe first line at the top instead of centered. You can also overwrite type size, style etc in the same stylesheet.

 

Hope this helps

 

regards

Rainer

 

Thanks a ton!!  Perfect! :)



#1683   penzahar

penzahar
  • Members
  • 3 posts
  • Real Name:Penzahar

Posted 11 January 2016 - 20:51

Hello Rainer,
Thanks for the great contribution.
I installed on 2.3.3 and its working fine except redirecting issue.
Footer links are empty in source code, and with auto redirecting codes, pages are not loading. I couldn't even find the error report anywhere on my server.
I have USU5 installed and made all the settings as instructed. Also have Modular SEO Header Tags but i don't know if that effects.
What this issue can be?



#1684 ONLINE   raiwa

raiwa
  • Community Sponsor
  • 1,064 posts
  • Real Name:Rainer Schmied
  • Gender:Male
  • Location:Sant Iscle de Vallalta, Barcelona, Spain

Posted 11 January 2016 - 21:39

Hello @penzahar,

 

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.

You can also PM your configure.php, .htaccess, Store URL and I'll have a look.

 

regards

Rainer



#1685   penzahar

penzahar
  • Members
  • 3 posts
  • Real Name:Penzahar

Posted 11 January 2016 - 23:06

Thanks a lot Rainer,

It took 6 hours to find the issue.
Just missed one } on application top :-
Finally happy with it :)  Thank you very much for this great contribution.

Best regards



#1686   david75

david75
  • Members
  • 11 posts
  • Real Name:david

Posted 27 January 2016 - 21:15

Hi, thanks for your contribution. Excuse the English translation. I have some complicated problems and do not know how to fix them.
Tests'm doing in the store at no extra original contributions and localhost. To further make it live on the web server.
The shop is osCommerce version 2.3.1 and Mobile_OsC_7.5.9
Store location and mobile wallet is this:
C: / AppServ / www / store / catalog /
C: / AppServ / www / store / catalog / mobile /
I have done the installation manual 2.3 (Install_osc_2_3.docx) and (Configure_subdomain.docx), the others do not do that in this store have not installed any extra contribution as seo url, thumbails, etc.
Mobile testing do with the way the Chrome browser as it has in options / More tools / developer tools, the option to make a simulation with different mobile phone models.

Well the problem is that I always have to click twice to charge me the mobile version when I click the mobile gift of the web and once the page is loaded with mobile version also have to click twice to run anything from the web mobile.
And the funny thing is that if I press only once the browser is loading and within seconds I restarted the computer directly, as if you were to reset the computer. But by double-clicking it Works perfect website and everything looks good.

My set is this:

<?php
define('HTTP_SERVER', 'http://localhost');
define('HTTPS_SERVER', 'http://localhost');
define('ENABLE_SSL', false);
define('HTTP_COOKIE_DOMAIN', '');
define('HTTPS_COOKIE_DOMAIN', '');
define('HTTP_COOKIE_PATH', '/tienda/catalog/');
define('HTTPS_COOKIE_PATH', '/tienda/catalog/');
define('DIR_WS_HTTP_CATALOG', '/tienda/catalog/');
define('DIR_WS_HTTPS_CATALOG', '/tienda/catalog/');
define('DIR_FS_CATALOG', 'C:/AppServ/www/tienda/catalog/');
//BOF Mobile
define('HTTP_MOBILE_SERVER', 'http://localhost/tie...talog/mobile');
define('HTTPS_MOBILE_SERVER', 'http://localhost/tie...talog/mobile');
define('DIR_WS_HTTP_MOBILE', '/');
define('DIR_WS_HTTPS_MOBILE', '/');
(defined('MOBILE_SESSION') ? define('DIR_WS_IMAGES', ((getenv('HTTPS') == 'on')? HTTPS_SERVER . DIR_WS_HTTPS_CATALOG : HTTP_SERVER . DIR_WS_HTTP_CATALOG) . 'images/') : define('DIR_WS_IMAGES', 'images/'));
define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');
(defined('MOBILE_SESSION') ? define('DIR_WS_INCLUDES', DIR_FS_CATALOG . 'includes/') : define('DIR_WS_INCLUDES', 'includes/'));
//EOF Mobile

define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/');
define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');
define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');
define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');
define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');
//BOF Mobile
define('DIR_MOBILE_IMAGES', 'images/');
define('DIR_MOBILE_INCLUDES','includes/');
define('DIR_MOBILE_MODULES', DIR_MOBILE_INCLUDES . 'modules/');
define('DIR_MOBILE_CLASSES', DIR_MOBILE_INCLUDES . 'classes/');
define('DIR_MOBILE_HEADERS', DIR_MOBILE_INCLUDES . 'headers/');
define('DIR_MOBILE_LANGUAGES', DIR_MOBILE_INCLUDES . 'languages/');
//EOF Mobile
define('DIR_WS_DOWNLOAD_PUBLIC', 'pub/');

//BOF Mobile
define('DIR_FS_MOBILE', 'C:/AppServ/www/tienda/catalog/mobile/');
//EOF Mobile
define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
//BOF Mobile
(defined('MOBILE_SESSION') ? define('DIR_WS_DOWNLOAD_PUBLIC', HTTP_SERVER . DIR_WS_HTTP_CATALOG . 'pub/') : define('DIR_WS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/'));
//EOF Mobile
define('DB_SERVER', 'localhost');
define('DB_SERVER_USERNAME', 'root');
define('DB_SERVER_PASSWORD', '2904');
define('DB_DATABASE', 'tienda');
define('USE_PCONNECT', 'false');
define('STORE_SESSIONS', 'mysql');
?>

I would appreciate any help.



#1687 ONLINE   raiwa

raiwa
  • Community Sponsor
  • 1,064 posts
  • Real Name:Rainer Schmied
  • Gender:Male
  • Location:Sant Iscle de Vallalta, Barcelona, Spain

Posted 27 January 2016 - 21:29

hello David @david75,

 

you do not need to apply the subdomain modifications, your installation is in subdirectory, not subdomain. Apply all changes exact as said in the instructions (only Install_osc_2_3.docx, NOT Configure_subdomain.docx).

If you still have troubles, you can PM in spanish if you feel more comfortable,

regards

Rainer



#1688   david75

david75
  • Members
  • 11 posts
  • Real Name:david

Posted 27 January 2016 - 23:00

Rainer ya esta, ya he cambiado los archivos como tu dices, instalando solo only Install_osc_2_3.docx.

Pero tengo el mismo defecto, abro la página con versión escritorio y luego pulso en el icono movil para cambiar a la versión movil y tengo que hacerlo dos veces para que cargue la página. Una vez cargada la versión movil para navegar por ella tengo que pulsar dos veces en cualquier cosa para que funcione.

Mi archivo configure:

<?php

  define('HTTP_SERVER', 'http://localhost');
  define('HTTPS_SERVER', 'http://localhost');
  define('ENABLE_SSL', false);
  define('HTTP_COOKIE_DOMAIN', '');
  define('HTTPS_COOKIE_DOMAIN', '');
  define('HTTP_COOKIE_PATH', '/tienda/catalog/');
  define('HTTPS_COOKIE_PATH', '/tienda/catalog/');
  define('DIR_WS_HTTP_CATALOG', '/tienda/catalog/');
  define('DIR_WS_HTTPS_CATALOG', '/tienda/catalog/');
  
  //BOF Mobile
define('HTTP_MOBILE_SERVER', HTTP_SERVER);
define('HTTPS_MOBILE_SERVER', HTTPS_SERVER);
define('DIR_WS_HTTP_MOBILE', DIR_WS_HTTP_CATALOG . 'mobile/');
define('DIR_WS_HTTPS_MOBILE', DIR_WS_HTTPS_CATALOG . 'mobile/');
  (defined('MOBILE_SESSION') ? define('DIR_WS_IMAGES', ((getenv('HTTPS') == 'on')? HTTPS_SERVER . DIR_WS_HTTPS_CATALOG : HTTP_SERVER . DIR_WS_HTTP_CATALOG) . 'images/') : define('DIR_WS_IMAGES', 'images/'));
define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');
  (defined('MOBILE_SESSION') ? define('DIR_WS_INCLUDES', '../includes/') : define('DIR_WS_INCLUDES', 'includes/'));
//EOF Mobile
 
  define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/');
  define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');
  define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');
  define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');
  define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');
//BOF Mobile
define('DIR_MOBILE_IMAGES', 'images/');
define('DIR_MOBILE_INCLUDES','includes/');
define('DIR_MOBILE_MODULES', DIR_MOBILE_INCLUDES . 'modules/');
define('DIR_MOBILE_CLASSES', DIR_MOBILE_INCLUDES . 'classes/');
define('DIR_MOBILE_HEADERS', DIR_MOBILE_INCLUDES . 'headers/');
define('DIR_MOBILE_LANGUAGES', DIR_MOBILE_INCLUDES . 'languages/');
//EOF Mobile
  //BOF Mobile
  (defined('MOBILE_SESSION') ? define('DIR_WS_DOWNLOAD_PUBLIC', HTTP_SERVER . DIR_WS_HTTP_CATALOG . 'pub/') : define('DIR_WS_DOWNLOAD_PUBLIC', 'pub/'));
//EOF Mobile
  define('DIR_FS_CATALOG', 'C:/AppServ/www/tienda/catalog/');
  //BOF Mobile
define('DIR_FS_MOBILE', DIR_FS_CATALOG . 'mobile/');
//EOF Mobile
  define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');  
//BOF Mobile
  define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');
  
  define('DB_SERVER', 'localhost');
  define('DB_SERVER_USERNAME', 'root');
  define('DB_SERVER_PASSWORD', '2904');
  define('DB_DATABASE', 'tienda');
  define('USE_PCONNECT', 'false');
  define('STORE_SESSIONS', 'mysql');
?>


#1689 ONLINE   raiwa

raiwa
  • Community Sponsor
  • 1,064 posts
  • Real Name:Rainer Schmied
  • Gender:Male
  • Location:Sant Iscle de Vallalta, Barcelona, Spain

Posted 28 January 2016 - 11:15

@david75 I send you a private message, public forum language is english :)