Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

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


bumbarash

Recommended Posts

Ok thanks! So hopefully this is my last question, i think! Im trying to get the main website to redirect to the mobile when a mobile is detected, i looked it up and found this code:

<br />
<?php<br />
function callback($buffer) {<br />
if ($_SERVER['SERVER_NAME'] == 'mobile.myawesomeblog.com') {<br />
$buffer = str_replace('http://www.myawesomeblog.com', 'http://mobile.myawesomeblog.com', $buffer);<br />
$buffer = preg_replace('/[\n\r\t]+/', '', $buffer);<br />
$buffer = preg_replace('/\s{2,}/', ' ', $buffer);<br />
$buffer = preg_replace('/(<a[^>]*>)(<img[^>]+alt=")([^"]*)("[^>]*>)(<\/a>)/i', '$1$3$5<br />', $buffer);<br />
$buffer = preg_replace('/(<link[^>]+rel="[^"]*stylesheet"[^>]*>|<img[^>]*>|style="[^"]*")|<script[^>]*>.*?<\/script>|<style[^>]*>.*?<\/style>|<!--.*?-->/i', '', $buffer);<br />
$buffer = preg_replace('/<\/head>/i', '<meta name="robots" content="noindex, nofollow"></head>', $buffer);<br />
}<br />
return $buffer;<br />
}<br />
ob_start("callback");<br />
?>

Now would i just add this to the end of my application top file, thats what im assuming

 

Because it doesnt redirect it for iPhone 5, iphone 4, samsung GS3, as far as ive tried every device doesn't do it

Link to comment
Share on other sites

Because it doesnt redirect it for iPhone 5, iphone 4, samsung GS3, as far as ive tried every device doesn't do it

Did you update the device list like explained in "Configure_unix_subdirectory.doc" Step 3?

Link to comment
Share on other sites

Did you update the device list like explained in "Configure_unix_subdirectory.doc" Step 3?

 

I suppose that you checked the redirect from your standard browser using a mobile device emulator.

So there is a minor bug if you visit the store from the same browser a second time, the ª"redirect cancelled" parameter will be still registered in the session parameters and prevent a new redirect.

 

In order to fix this, please do the following changes which will be included in the next update:

 

a. In mobile/includes/application_top.php:

 

Find:

 

 if (HTTP_SERVER == HTTP_MOBILE_SERVER && !tep_session_is_registered('redirectCancelled') && substr(basename($PHP_SELF), 0, 15) != 'mobile_checkout') {
	 tep_session_register('redirectCancelled');
	 $redirectCancelled = true;
}

 

Change to:

 

 if (tep_session_is_registered('redirectCancelled')) {
	 tep_session_unregister('redirectCancelled');
}

 

 

b. In: mobile/includes/footer.php

 

Find:

 

	 if((HTTP_SERVER != HTTP_MOBILE_SERVER) && !isset($_GET['redirectCancelled']) && $_GET['redirectCancelled'] != 'true') {
		 $url .= ((strpos($mobile_url,'?') > 0) ? '&redirectCancelled=true' : '?redirectCancelled=true');

 

Change to:

 

	 if(!isset($_GET['redirectCancelled']) && $_GET['redirectCancelled'] != 'true') {
		 $url .= ((strpos($mobile_url,'?') > 0) ? '&redirectCancelled=true' : '?redirectCancelled=true');

 

c. In: mobile/includes/classes/header_title.php

 

Find:

 

	 if((HTTP_SERVER != HTTP_MOBILE_SERVER) && !isset($_GET['redirectCancelled']) && $_GET['redirectCancelled'] != 'true') {
		 $url .= ((strpos($mobile_url,'?') > 0) ? '&redirectCancelled=true' : '?redirectCancelled=true');

 

Change to:

 

	 if(!isset($_GET['redirectCancelled']) && $_GET['redirectCancelled'] != 'true') {
		 $url .= ((strpos($mobile_url,'?') > 0) ? '&redirectCancelled=true' : '?redirectCancelled=true');

 

If you try the redirect, do the last visit on a mobile page.

If you used the header or footer link to the "desktop" store, the redirect cancelled parameter would be stored again as a session variable.

So you have to go back to the mobile side to unregister the "redirect cancelled" parameter.

Then close the browser tab or window.

Open a new tab or window.

Change the mobile device.

Open the URL of your "desktop" store.

Then it should redirect correct.

 

regards

Rainer

Edited by raiwa
Link to comment
Share on other sites

I suppose that you checked the redirect from your standard browser using a mobile device emulator.

So there is a minor bug if you visit the store from the same browser a second time, the ª"redirect cancelled" parameter will be still registered in the session parameters and prevent a new redirect.

 

In order to fix this, please do the following changes which will be included in the next update:

 

a. In mobile/includes/application_top.php:

 

Find:

 

 if (HTTP_SERVER == HTTP_MOBILE_SERVER && !tep_session_is_registered('redirectCancelled') && substr(basename($PHP_SELF), 0, 15) != 'mobile_checkout') {
	 tep_session_register('redirectCancelled');
	 $redirectCancelled = true;
}

 

Change to:

 

 if (tep_session_is_registered('redirectCancelled')) {
	 tep_session_unregister('redirectCancelled');
}

 

 

b. In: mobile/includes/footer.php

 

Find:

 

	 if((HTTP_SERVER != HTTP_MOBILE_SERVER) && !isset($_GET['redirectCancelled']) && $_GET['redirectCancelled'] != 'true') {
		 $url .= ((strpos($mobile_url,'?') > 0) ? '&redirectCancelled=true' : '?redirectCancelled=true');

 

Change to:

 

	 if(!isset($_GET['redirectCancelled']) && $_GET['redirectCancelled'] != 'true') {
		 $url .= ((strpos($mobile_url,'?') > 0) ? '&redirectCancelled=true' : '?redirectCancelled=true');

 

c. In: mobile/includes/classes/header_title.php

 

Find:

 

	 if((HTTP_SERVER != HTTP_MOBILE_SERVER) && !isset($_GET['redirectCancelled']) && $_GET['redirectCancelled'] != 'true') {
		 $url .= ((strpos($mobile_url,'?') > 0) ? '&redirectCancelled=true' : '?redirectCancelled=true');

 

Change to:

 

	 if(!isset($_GET['redirectCancelled']) && $_GET['redirectCancelled'] != 'true') {
		 $url .= ((strpos($mobile_url,'?') > 0) ? '&redirectCancelled=true' : '?redirectCancelled=true');

 

If you try the redirect, do the last visit on a mobile page.

If you used the header or footer link to the "desktop" store, the redirect cancelled parameter would be stored again as a session variable.

So you have to go back to the mobile side to unregister the "redirect cancelled" parameter.

Then close the browser tab or window.

Open a new tab or window.

Change the mobile device.

Open the URL of your "desktop" store.

Then it should redirect correct.

 

regards

Rainer

 

Thank you very much! I would love to thank you for all the help you have provided me and also i would like to thank you for providing this wonderful add on and all of your hard work! :thumbsup:

Link to comment
Share on other sites

Hello and thanks for all the help!

 

I did all the fixes above and still getting "Data connectivity problem" - 'The page contains too many server redirects'. The desktop side is still working.

 

Thanks! - Vid

Link to comment
Share on other sites

Hello and thanks for all the help!

 

I did all the fixes above and still getting "Data connectivity problem" - 'The page contains too many server redirects'. The desktop side is still working.

 

Thanks! - Vid

 

Hello @@videod,

 

 

I just visited your store with a old and very limited Samsung mobile phone (before android) and had not any problem to navigate, no error messages.

However you could try 2 modifications:

In mobile/includes/header.php

 

Find:

 

<style type="text/css" media="screen">
@[member='import'] "<?php echo HTTP_MOBILE_SERVER . DIR_WS_HTTP_MOBILE . DIR_MOBILE_INCLUDES; ?>mobile_stylesheet.css";
</style>

 

and change to:

 

<style type="text/css" media="screen">
@[member='import'] "includes/mobile_stylesheet.css";
</style>

 

Or try this:

 

<link rel="stylesheet" type="text/css" href="includes/mobile_stylesheet.css" />

 

I also found that the kissit image thumbnail support is not added to your mobile side.

Support is included in the support package for add-ons.

This would reduce the size of the mobile pages.

 

 

Kind regards

Rainer

Edited by raiwa
Link to comment
Share on other sites

  • 2 weeks later...

Hello,

 

I installed this great addon over the weekend, I've it it running on other shops but I can't get it working on my server. This below error appears when I change from classic site to mobile site. In fact this error message appears all the time when I try to open the mobilesite.

 

I have SEO_URL and Headertags installed.

Any ideas where I should look for a solution?

 

 

Warning: require() [function.require]: http:// wrapper is disabled in the server configuration by allow_url_include=0 in C:\xampp\htdocs\dev2\includes\application_top.php on line 41

 

Warning: require(http://127.0.0.1/dev2/includes/functions/compatibility.php) [function.require]: failed to open stream: no suitable wrapper could be found in C:\xampp\htdocs\dev2\includes\application_top.php on line 41

 

Fatal error: require() [function.require]: Failed opening required 'http://127.0.0.1/dev2/includes/functions/compatibility.php' (include_path='.;C:\xampp\php\PEAR') in C:\xampp\htdocs\dev2\includes\application_top.php on line 41

 

Best regards,

 

John

Link to comment
Share on other sites

Hello,

 

I installed this great addon over the weekend, I've it it running on other shops but I can't get it working on my server. This below error appears when I change from classic site to mobile site. In fact this error message appears all the time when I try to open the mobilesite.

 

I have SEO_URL and Headertags installed.

Any ideas where I should look for a solution?

 

 

Warning: require() [function.require]: http:// wrapper is disabled in the server configuration by allow_url_include=0 in C:\xampp\htdocs\dev2\includes\application_top.php on line 41

 

Warning: require(http://127.0.0.1/dev2/includes/functions/compatibility.php) [function.require]: failed to open stream: no suitable wrapper could be found in C:\xampp\htdocs\dev2\includes\application_top.php on line 41

 

Fatal error: require() [function.require]: Failed opening required 'http://127.0.0.1/dev2/includes/functions/compatibility.php' (include_path='.;C:\xampp\php\PEAR') in C:\xampp\htdocs\dev2\includes\application_top.php on line 41

 

Best regards,

 

John

 

Hello John,

 

it looks like the include/configure.php configuration isn't done correct for windows test environment.

 

Did you do the configuration like explained in the file: Configure_windows.doc?

Kind regards

Rainer

Link to comment
Share on other sites

Hi Rainer,

 

Thanks for your Quick answer. it was indeed the configure.php file. The previous error has disappeared.

Now with the corrected configure.php I have following error:

 

Warning: require_once(c:/xampp/htdocs/dev2/../includes/classes/image.php) [function.require-once]: failed to open stream: No such file or directory in C:\xampp\htdocs\dev2\includes\functions\html_output.php on line 73

 

I think this line is causing the trouble

(defined('MOBILE_SESSION') ? define('DIR_WS_INCLUDES', '../includes/') : define('DIR_WS_INCLUDES', 'includes/'));

I keep changing this in order to get it working but then one error disappears, then next one is coming up.

 

My configure file looks like this:

 

<?php

define('HTTP_SERVER', 'http://127.0.0.1');

define('HTTPS_SERVER', '');

define('ENABLE_SSL', false);

define('HTTP_COOKIE_DOMAIN', 'http://127.0.0.1');

define('HTTPS_COOKIE_DOMAIN', '');

define('HTTP_COOKIE_PATH', '/dev2/');

define('HTTPS_COOKIE_PATH', '');

define('DIR_WS_HTTP_CATALOG', '/dev2/');

define('DIR_WS_HTTPS_CATALOG', '');

define('DIR_WS_CACHE', 'cache/');

//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', 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:/xampp/htdocs/dev2/');

//BOF Mobile

define('DIR_FS_MOBILE', DIR_FS_CATALOG . 'mobile/');

//EOF Mobile

define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');

define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');

 

define('DB_SERVER', 'localhost');

define('DB_SERVER_USERNAME', 'root');

define('DB_SERVER_PASSWORD', '');

define('DB_DATABASE', 'testbank');

define('USE_PCONNECT', 'false');

define('STORE_SESSIONS', 'mysql');

?>

 

BR

John

Link to comment
Share on other sites

Hi Rainer,

 

Thanks for your Quick answer. it was indeed the configure.php file. The previous error has disappeared.

Now with the corrected configure.php I have following error:

 

Warning: require_once(c:/xampp/htdocs/dev2/../includes/classes/image.php) [function.require-once]: failed to open stream: No such file or directory in C:\xampp\htdocs\dev2\includes\functions\html_output.php on line 73

 

I think this line is causing the trouble

(defined('MOBILE_SESSION') ? define('DIR_WS_INCLUDES', '../includes/') : define('DIR_WS_INCLUDES', 'includes/'));

I keep changing this in order to get it working but then one error disappears, then next one is coming up.

 

My configure file looks like this:

 

<?php

define('HTTP_SERVER', 'http://127.0.0.1');

define('HTTPS_SERVER', '');

define('ENABLE_SSL', false);

define('HTTP_COOKIE_DOMAIN', 'http://127.0.0.1');

define('HTTPS_COOKIE_DOMAIN', '');

define('HTTP_COOKIE_PATH', '/dev2/');

define('HTTPS_COOKIE_PATH', '');

define('DIR_WS_HTTP_CATALOG', '/dev2/');

define('DIR_WS_HTTPS_CATALOG', '');

define('DIR_WS_CACHE', 'cache/');

//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', 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:/xampp/htdocs/dev2/');

//BOF Mobile

define('DIR_FS_MOBILE', DIR_FS_CATALOG . 'mobile/');

//EOF Mobile

define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');

define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');

 

define('DB_SERVER', 'localhost');

define('DB_SERVER_USERNAME', 'root');

define('DB_SERVER_PASSWORD', '');

define('DB_DATABASE', 'testbank');

define('USE_PCONNECT', 'false');

define('STORE_SESSIONS', 'mysql');

?>

 

BR

John

 

Hello John@@John P,

 

It could be a hardcoded directory definition in the modified code for the tep_image function in html_output.php.

 

Open includes/functions/html_output.php

Search line 73 for:

require_once('includes/classes/image.php')

 

and change it to:

require_once(DIR_WS_CLASSES . '/image.php)

 

 

This is explained in: "Add-On Support.doc":

6. If there are hardcoded directories, example:

includes/classes/add_on_class.php

Change to:

DIR_WS_CLASSES . 'add_on_class.php'

Same for: DIR_WS_INCLUDES etc.

 

And if this is a thumbnail add- on you may need to install the support for it.

 

Kind regards

Rainer

Link to comment
Share on other sites

Hi Rainer,

 

Thanks for solving my problem.

In html_output.php the image function was defined as

require_once(DIR_FS_CATALOG . DIR_WS_CLASSES . 'image.php');

 

I delete DIR_FS_CATALOG and the mobile site runs now.

 

BR

John

Link to comment
Share on other sites

hi, i have installed the mobile store everything seems to be fine but i have this 2 error lines in the account mobile page, i can login logoff. but when i select appears this:

 

 

 

Warning: Illegal string offset 'type' in /home/electr20/public_html/store/includes/functions/html_output.php on line 348

 

Warning: Illegal string offset 'iconpos' in /home/electr20/public_html/store/includes/functions/html_output.php on line 393

 

 

where in html_output the code i have is this:

 

 

beginning in line 340 to bottom

 

 

 

////

// Output a jQuery UI Button

function tep_draw_button($title = null, $icon = null, $link = null, $priority = null, $params = null) {

static $button_counter = 1;

 

$types = array('submit', 'button', 'reset');

 

if ( !isset($params['type']) ) {

$params['type'] = 'submit'; //<<<<<<<<-------------------------------line 348

}

 

if ( !in_array($params['type'], $types) ) {

$params['type'] = 'submit';

}

 

if ( ($params['type'] == 'submit') && isset($link) ) {

$params['type'] = 'button';

}

 

if (!isset($priority)) {

$priority = 'secondary';

}

 

$button = '<span class="tdbLink">';

 

if ( ($params['type'] == 'button') && isset($link) ) {

$button .= '<a id="tdb' . $button_counter . '" href="' . $link . '"';

 

if ( isset($params['newwindow']) ) {

$button .= ' target="_blank"';

}

} else {

$button .= '<button id="tdb' . $button_counter . '" type="' . tep_output_string($params['type']) . '"';

}

 

if ( isset($params['params']) ) {

$button .= ' ' . $params['params'];

}

 

$button .= '>' . $title;

 

if ( ($params['type'] == 'button') && isset($link) ) {

$button .= '</a>';

} else {

$button .= '</button>';

}

 

$button .= '</span><script type="text/javascript">$("#tdb' . $button_counter . '").button(';

 

$args = array();

 

if ( isset($icon) ) {

if ( !isset($params['iconpos']) ) {

$params['iconpos'] = 'left'; //<<<<<<<<<----------line 393

}

 

if ( $params['iconpos'] == 'left' ) {

$args[] = 'icons:{primary:"ui-icon-' . $icon . '"}';

} else {

$args[] = 'icons:{secondary:"ui-icon-' . $icon . '"}';

}

}

 

if (empty($title)) {

$args[] = 'text:false';

}

 

if (!empty($args)) {

$button .= '{' . implode(',', $args) . '}';

}

 

$button .= ').addClass("ui-priority-' . $priority . '").parent().removeClass("tdbLink");</script>';

 

$button_counter++;

 

return $button;

}

?>

 

 

 

 

thanks in advance.

Edited by Tripa-X
Link to comment
Share on other sites

hi, i have installed the mobile store everything seems to be fine but i have this 2 error lines in the account mobile page, i can login logoff. but when i select appears this:

 

 

 

Warning: Illegal string offset 'type' in /home/electr20/public_html/store/includes/functions/html_output.php on line 348

 

Warning: Illegal string offset 'iconpos' in /home/electr20/public_html/store/includes/functions/html_output.php on line 393

 

 

where in html_output the code i have is this:

 

 

beginning in line 340 to bottom

 

 

 

////

// Output a jQuery UI Button

function tep_draw_button($title = null, $icon = null, $link = null, $priority = null, $params = null) {

static $button_counter = 1;

 

$types = array('submit', 'button', 'reset');

 

if ( !isset($params['type']) ) {

$params['type'] = 'submit'; //<<<<<<<<-------------------------------line 348

}

 

if ( !in_array($params['type'], $types) ) {

$params['type'] = 'submit';

}

 

if ( ($params['type'] == 'submit') && isset($link) ) {

$params['type'] = 'button';

}

 

if (!isset($priority)) {

$priority = 'secondary';

}

 

$button = '<span class="tdbLink">';

 

if ( ($params['type'] == 'button') && isset($link) ) {

$button .= '<a id="tdb' . $button_counter . '" href="' . $link . '"';

 

if ( isset($params['newwindow']) ) {

$button .= ' target="_blank"';

}

} else {

$button .= '<button id="tdb' . $button_counter . '" type="' . tep_output_string($params['type']) . '"';

}

 

if ( isset($params['params']) ) {

$button .= ' ' . $params['params'];

}

 

$button .= '>' . $title;

 

if ( ($params['type'] == 'button') && isset($link) ) {

$button .= '</a>';

} else {

$button .= '</button>';

}

 

$button .= '</span><script type="text/javascript">$("#tdb' . $button_counter . '").button(';

 

$args = array();

 

if ( isset($icon) ) {

if ( !isset($params['iconpos']) ) {

$params['iconpos'] = 'left'; //<<<<<<<<<----------line 393

}

 

if ( $params['iconpos'] == 'left' ) {

$args[] = 'icons:{primary:"ui-icon-' . $icon . '"}';

} else {

$args[] = 'icons:{secondary:"ui-icon-' . $icon . '"}';

}

}

 

if (empty($title)) {

$args[] = 'text:false';

}

 

if (!empty($args)) {

$button .= '{' . implode(',', $args) . '}';

}

 

$button .= ').addClass("ui-priority-' . $priority . '").parent().removeClass("tdbLink");</script>';

 

$button_counter++;

 

return $button;

}

?>

 

 

 

 

thanks in advance.

 

Hello @@Tripa-X,

 

Could you please post your shop url?

Did you modify the mobile/account.php?

 

thanks and kind regards

Rainer

Link to comment
Share on other sites

Hello. I have tried IOSC on two 2 3.3 test sites and it looks excellent. IS SHARED SSL RECOMMENDED at all for this add-on? I've been testing with it and there is a problem when flipping between mobile and classic views. I also noticed one tiny glitch in the shopping cart with, "TABLE_HEADING_TOTAL" showing where simply, "total" should be. I was wondering if i missed out something on installation.

Link to comment
Share on other sites

Hello. I have tried IOSC on two 2 3.3 test sites and it looks excellent. IS SHARED SSL RECOMMENDED at all for this add-on? I've been testing with it and there is a problem when flipping between mobile and classic views. I also noticed one tiny glitch in the shopping cart with, "TABLE_HEADING_TOTAL" showing where simply, "total" should be. I was wondering if i missed out something on installation.

 

Hello @,

 

For the ssl you should check if all modifications described in the install file are correct done.

In particular in functions/general.php and functions/html_output.php, includes/application_top.php and includes/configure.php.

 

If you are using SEO URL make sure you have the correspondent support for Mobile OSC 6.0 added.

 

For the missing text in shopping_cart:

check your language file: includes/languages/english/shopping_cart.php

 

There should be this line:

define('TABLE_HEADING_TOTAL', 'Total');

 

Kind regards

Rainer

Edited by raiwa
Link to comment
Share on other sites

Thanks Rainer. You are a real magician. "define('TABLE_HEADING_TOTAL', 'Total');" was missing. "define('SUB_TITLE_SUB_TOTAL', 'Sub-Total:');" is there, so maybe it's something new. Or I messed something up.

 

One test site has seo urls installed, another does not. both sites live in subdirectories. Shared SSL works fine so far, just the transition between mobile and classic sites does not work in shared SSL. Maybe real SSL works fine. I don't have it yet.

Link to comment
Share on other sites

Thanks Rainer. You are a real magician. "define('TABLE_HEADING_TOTAL', 'Total');" was missing. "define('SUB_TITLE_SUB_TOTAL', 'Sub-Total:');" is there, so maybe it's something new. Or I messed something up.

 

One test site has seo urls installed, another does not. both sites live in subdirectories. Shared SSL works fine so far, just the transition between mobile and classic sites does not work in shared SSL. Maybe real SSL works fine. I don't have it yet.

Link to comment
Share on other sites

Thanks Rainer. You are a real magician. "define('TABLE_HEADING_TOTAL', 'Total');" was missing. "define('SUB_TITLE_SUB_TOTAL', 'Sub-Total:');" is there, so maybe it's something new. Or I messed something up.

 

One test site has seo urls installed, another does not. both sites live in subdirectories. Shared SSL works fine so far, just the transition between mobile and classic sites does not work in shared SSL. Maybe real SSL works fine. I don't have it yet.

 

Hello @,,

 

Sorry I have no experience nor possibility to test and develop installation on shared ssl.

Real ssl should work.

 

Rainer

Link to comment
Share on other sites

Hello @,,

 

Sorry I have no experience nor possibility to test and develop installation on shared ssl.

Real ssl should work.

 

Rainer

 

Thanks again. i will recheck those files to see if i did forget something. I will probably get proper ssl soon. The url when shifting to mobile from login.php in classic has DIR_WSS_HTTP_MOBILE contained in it. Example: "https://web-secure.co.uk/mystie.comDIR_WSS_HTTP_MOBILE" ...So this is probably my error.

Edited by JustifiedAncientOfMuMu
Link to comment
Share on other sites

Hi raiwa, of course is

 

http://www.electronixs123.com/store/mobile/login.php

 

i follow the manual and no, the mobile/account.php

 

looks like this

 

 

<?php

require_once('includes/application_top.php');

if (!tep_session_is_registered('customer_id')) {

$navigation->set_snapshot();

tep_redirect(tep_mobile_link(FILENAME_LOGIN, '', 'SSL'));

}

 

require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_ACCOUNT);

 

$breadcrumb->add(NAVBAR_TITLE, tep_mobile_link(FILENAME_ACCOUNT, '', 'SSL'));

require(DIR_MOBILE_INCLUDES . 'header.php');

$headerTitle->write(NAVBAR_TITLE);

/*if(AJAX_ENABLED && $curl_installed)

include(DIR_MOBILE_CLASSES . 'account_js.php');

*/?>

<!-- account //-->

<div id="iphone_content">

<table width="100%" cellpadding="0" cellspacing="0" class="categories">

<?php

echo tep_mobile_selection(tep_mobile_link(FILENAME_ACCOUNT_HISTORY, '', 'SSL'), array(TEXT_MY_ORDERS)).'<div class="fleche"><img src="' . DIR_MOBILE_IMAGES . 'arrow_select.png" /></div>';

echo tep_mobile_selection(tep_mobile_link(FILENAME_ACCOUNT_EDIT, '', 'SSL'), array(HEADER_TITLE_MY_ACCOUNT)).'<div class="fleche"><img src="' . DIR_MOBILE_IMAGES . 'arrow_select.png" /></div>';

echo tep_mobile_selection(tep_mobile_link(FILENAME_ADDRESS_BOOK), array(IMAGE_BUTTON_ADDRESS_BOOK)).'<div class="fleche"><img src="' . DIR_MOBILE_IMAGES . 'arrow_select.png" /></div>';

echo tep_mobile_selection(tep_mobile_link(FILENAME_ACCOUNT_PASSWORD), array(CATEGORY_PASSWORD)).'<div class="fleche"><img src="' . DIR_MOBILE_IMAGES . 'arrow_select.png" /></div>';

echo tep_mobile_selection(tep_mobile_link(FILENAME_ACCOUNT_NEWSLETTERS), array(EMAIL_NOTIFICATIONS_NEWSLETTERS)).'<div class="fleche"><img src="' . DIR_MOBILE_IMAGES . 'arrow_select.png" /></div>';

echo tep_mobile_selection(tep_mobile_link(FILENAME_ACCOUNT_NOTIFICATIONS), array(EMAIL_NOTIFICATIONS_PRODUCTS)).'<div class="fleche"><img src="' . DIR_MOBILE_IMAGES . 'arrow_select.png" /></div>';

echo tep_mobile_selection(tep_mobile_link(FILENAME_LOGOFF), array(HEADER_TITLE_LOGOFF)).'<div class="fleche"><img src="' . DIR_MOBILE_IMAGES . 'arrow_select.png" /></div>';

?>

</table>

<?php require(DIR_MOBILE_INCLUDES . 'footer.php');

?>

 

 

thanks Rainer

Link to comment
Share on other sites

Hi raiwa, of course is

 

http://www.electronixs123.com/store/mobile/login.php

 

i follow the manual and no, the mobile/account.php

 

looks like this

 

 

<?php

require_once('includes/application_top.php');

if (!tep_session_is_registered('customer_id')) {

$navigation->set_snapshot();

tep_redirect(tep_mobile_link(FILENAME_LOGIN, '', 'SSL'));

}

 

require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_ACCOUNT);

 

$breadcrumb->add(NAVBAR_TITLE, tep_mobile_link(FILENAME_ACCOUNT, '', 'SSL'));

require(DIR_MOBILE_INCLUDES . 'header.php');

$headerTitle->write(NAVBAR_TITLE);

/*if(AJAX_ENABLED && $curl_installed)

include(DIR_MOBILE_CLASSES . 'account_js.php');

*/?>

<!-- account //-->

<div id="iphone_content">

<table width="100%" cellpadding="0" cellspacing="0" class="categories">

<?php

echo tep_mobile_selection(tep_mobile_link(FILENAME_ACCOUNT_HISTORY, '', 'SSL'), array(TEXT_MY_ORDERS)).'<div class="fleche"><img src="' . DIR_MOBILE_IMAGES . 'arrow_select.png" /></div>';

echo tep_mobile_selection(tep_mobile_link(FILENAME_ACCOUNT_EDIT, '', 'SSL'), array(HEADER_TITLE_MY_ACCOUNT)).'<div class="fleche"><img src="' . DIR_MOBILE_IMAGES . 'arrow_select.png" /></div>';

echo tep_mobile_selection(tep_mobile_link(FILENAME_ADDRESS_BOOK), array(IMAGE_BUTTON_ADDRESS_BOOK)).'<div class="fleche"><img src="' . DIR_MOBILE_IMAGES . 'arrow_select.png" /></div>';

echo tep_mobile_selection(tep_mobile_link(FILENAME_ACCOUNT_PASSWORD), array(CATEGORY_PASSWORD)).'<div class="fleche"><img src="' . DIR_MOBILE_IMAGES . 'arrow_select.png" /></div>';

echo tep_mobile_selection(tep_mobile_link(FILENAME_ACCOUNT_NEWSLETTERS), array(EMAIL_NOTIFICATIONS_NEWSLETTERS)).'<div class="fleche"><img src="' . DIR_MOBILE_IMAGES . 'arrow_select.png" /></div>';

echo tep_mobile_selection(tep_mobile_link(FILENAME_ACCOUNT_NOTIFICATIONS), array(EMAIL_NOTIFICATIONS_PRODUCTS)).'<div class="fleche"><img src="' . DIR_MOBILE_IMAGES . 'arrow_select.png" /></div>';

echo tep_mobile_selection(tep_mobile_link(FILENAME_LOGOFF), array(HEADER_TITLE_LOGOFF)).'<div class="fleche"><img src="' . DIR_MOBILE_IMAGES . 'arrow_select.png" /></div>';

?>

</table>

<?php require(DIR_MOBILE_INCLUDES . 'footer.php');

?>

 

 

thanks Rainer

 

Hello @@Tripa-X,

 

the error appears in the file login.php not account.php

 

Please try the following:

 

1. In mobile/login.php

 

Find:

 

<?php echo '<span style="float:left;">' . tep_draw_button(IMAGE_BUTTON_FORGOT_PASS, 'mail-closed', tep_mobile_link(FILENAME_PASSWORD_FORGOTTEN, '', 'SSL'), '') . '</span>' .

 

change to:

 

<?php echo '<span style="float:left;">' . tep_draw_button(IMAGE_BUTTON_FORGOT_PASS, 'mail-closed', tep_mobile_link(FILENAME_PASSWORD_FORGOTTEN, '', 'SSL')) . '</span>' .

 

If this doesn't help:

 

2. Change in the same line the icon from:

 

'mail-closed'

 

to:

 

'key'

 

3. You could also check if in:

mobile/ext/jquery/ui/redmond/jquery-ui-1.8.22.css

 

this line is present:

.ui-icon-mail-closed { background-position: -80px -96px; }

 

 

If all of this doesn't help you could change the error reporting to a lower level.

 

Allthough I have to say that the error reporting on my test installation is set to the most strict level and I never saw this error.

 

Kind regards

Rainer

Edited by raiwa
Link to comment
Share on other sites

Hi Rainer,

 

I'm facing a new issue, read the forum but couldn't realy find an answer yet. I have a shop with 3 languages whereas the default language is german. The mobile runs. I can change the language while visiting any page. ie. I'm at conditions.php (german) I change the language by clicking on the language link adn then choose ie. english. The last page conditions.php is shown in english. However if I leave this page for ie home (index.php) then the languge changed back to german. Pls give me a hint how to solve this.

 

The language function in catalog/includes/functions/html_output.php:

// Ultimate SEO URLs v2.2d

// The HTML href link wrapper function

function tep_href_link($page = '', $parameters = '', $connection = 'NONSSL', $add_session_id = true, $search_engine_safe = true) {

global $seo_urls;

if ( !is_object($seo_urls) ){

if ( !class_exists('SEO_URL') ){

include_once(DIR_WS_CLASSES . 'seo.class.php');

}

global $languages_id;

$seo_urls = new SEO_URL($languages_id);

}

return $seo_urls->href_link($page, $parameters, $connection, $add_session_id);

}

 

////

 

The language funtion in catalog/inlcudes/classes/seo.class.php:

* SEO_URL class constructor

* @@author Bobby Easland

* @version 1.1

* @@param integer $languages_id

*/

function SEO_URL($languages_id){

global $session_started, $SID;

 

$this->installer = new SEO_URL_INSTALLER;

 

$this->DB = new SEO_DataBase(DB_SERVER, DB_SERVER_USERNAME, DB_DATABASE, DB_SERVER_PASSWORD);

 

$this->languages_id = (int)$languages_id;

 

$this->data = array();

$this->turnOffBrokenUrls(); // Turn off experimental oscommerce search engine friendly urls

 

catalog/includes/application_top.php:

// set the language

if (!tep_session_is_registered('language') || isset($HTTP_GET_VARS['language'])) {

if (!tep_session_is_registered('language')) {

tep_session_register('language');

tep_session_register('languages_id');

}

 

include(DIR_WS_CLASSES . 'language.php');

$lng = new language();

 

if (isset($HTTP_GET_VARS['language']) && tep_not_null($HTTP_GET_VARS['language'])) {

$lng->set_language($HTTP_GET_VARS['language']);

} else {

$lng->get_browser_language();

}

 

$language = $lng->language['directory'];

$languages_id = $lng->language['id'];

}

 

BR

John

Link to comment
Share on other sites

Hi Rainer,

 

I'm facing a new issue, read the forum but couldn't realy find an answer yet. I have a shop with 3 languages whereas the default language is german. The mobile runs. I can change the language while visiting any page. ie. I'm at conditions.php (german) I change the language by clicking on the language link adn then choose ie. english. The last page conditions.php is shown in english. However if I leave this page for ie home (index.php) then the languge changed back to german. Pls give me a hint how to solve this.

 

The language function in catalog/includes/functions/html_output.php:

// Ultimate SEO URLs v2.2d

// The HTML href link wrapper function

function tep_href_link($page = '', $parameters = '', $connection = 'NONSSL', $add_session_id = true, $search_engine_safe = true) {

global $seo_urls;

if ( !is_object($seo_urls) ){

if ( !class_exists('SEO_URL') ){

include_once(DIR_WS_CLASSES . 'seo.class.php');

}

global $languages_id;

$seo_urls = new SEO_URL($languages_id);

}

return $seo_urls->href_link($page, $parameters, $connection, $add_session_id);

}

 

////

 

The language funtion in catalog/inlcudes/classes/seo.class.php:

* SEO_URL class constructor

* @@author Bobby Easland

* @version 1.1

* @@param integer $languages_id

*/

function SEO_URL($languages_id){

global $session_started, $SID;

 

$this->installer = new SEO_URL_INSTALLER;

 

$this->DB = new SEO_DataBase(DB_SERVER, DB_SERVER_USERNAME, DB_DATABASE, DB_SERVER_PASSWORD);

 

$this->languages_id = (int)$languages_id;

 

$this->data = array();

$this->turnOffBrokenUrls(); // Turn off experimental oscommerce search engine friendly urls

 

catalog/includes/application_top.php:

// set the language

if (!tep_session_is_registered('language') || isset($HTTP_GET_VARS['language'])) {

if (!tep_session_is_registered('language')) {

tep_session_register('language');

tep_session_register('languages_id');

}

 

include(DIR_WS_CLASSES . 'language.php');

$lng = new language();

 

if (isset($HTTP_GET_VARS['language']) && tep_not_null($HTTP_GET_VARS['language'])) {

$lng->set_language($HTTP_GET_VARS['language']);

} else {

$lng->get_browser_language();

}

 

$language = $lng->language['directory'];

$languages_id = $lng->language['id'];

}

 

BR

John

 

Hello @@John P,

 

Do you have the support for Ultimate SEO URLs v2.2d added to mobile OSC?

 

If yes, could you post the URL of your shop.

 

Kind regards

Rainer

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...