Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

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


bumbarash

Recommended Posts

  • 3 weeks later...

Hello Raiwa,

 

We just did a fresh install of Mobile_OSC_6_0rev5_ and also followed the Ultimate URL5 addon install for mobile version.

 

Each time we enable the mobile version on the oscommerce admin, front page just becomes a blank page.

 

Any ideas?

 

Thanks

Link to comment
Share on other sites

Hello Raiwa,

 

We just did a fresh install of Mobile_OSC_6_0rev5_ and also followed the Ultimate URL5 addon install for mobile version.

 

Each time we enable the mobile version on the oscommerce admin, front page just becomes a blank page.

 

Any ideas?

 

Thanks

 

Hello Tony@@TONYSHOES,

 

did you install in a subdomain or subdirectory?

 

Can you please post the file: includes/configure.php, can be without the database details at the bottom.

 

Kind regards

Rainer

Link to comment
Share on other sites

Hi

 

Thanks for contribution, looks greate on my Osc 2.3.3

 

Bit of debugging

 

mobile/inclides/header.php, correct syntax is

content="width=320, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />

 

mobile/includes/classes/header_title.php line 20 omitted </a>, correct is

$leftButton = '<td id="headerTitleLeft" class="headerTitleLeft" onclick="location.href=' . $url . '"><a rel="nofollow" href="' . $url . '">' . TEXT_SHOW_VIEW_1 . '</a><a rel="nofollow" href="' . $url . '">' . TEXT_CLASSIC_VIEW . '</a>' . TEXT_SHOW_VIEW_2 . '</td>';

Link to comment
Share on other sites

Hi

 

Thanks for contribution, looks greate on my Osc 2.3.3

 

Bit of debugging

 

mobile/inclides/header.php, correct syntax is

content="width=320, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />

 

mobile/includes/classes/header_title.php line 20 omitted </a>, correct is

$leftButton = '<td id="headerTitleLeft" class="headerTitleLeft" onclick="location.href=' . $url . '"><a rel="nofollow" href="' . $url . '">' . TEXT_SHOW_VIEW_1 . '</a><a rel="nofollow" href="' . $url . '">' . TEXT_CLASSIC_VIEW . '</a>' . TEXT_SHOW_VIEW_2 . '</td>';

 

Thank you very much

Link to comment
Share on other sites

Spoted in latest 6.0 rev. 5 what back button in catalog_mp.php is not actually sending back but to advamced_search.php

 

Is it possible to fix, thanks!

 

<div id="bouton">
<?php echo tep_draw_button(IMAGE_BUTTON_BACK, 'triangle-1-w', tep_mobile_link(FILENAME_ADVANCED_SEARCH, tep_get_all_get_params(array('sort', 'page')), 'NONSSL', true, false)); ?> 
</div>

Link to comment
Share on other sites

  • 2 weeks later...

Spoted in latest 6.0 rev. 5 what back button in catalog_mp.php is not actually sending back but to advamced_search.php

 

Is it possible to fix, thanks!

 

<div id="bouton">
<?php echo tep_draw_button(IMAGE_BUTTON_BACK, 'triangle-1-w', tep_mobile_link(FILENAME_ADVANCED_SEARCH, tep_get_all_get_params(array('sort', 'page')), 'NONSSL', true, false)); ?>
</div>

 

Hello@@leveera,

 

thanks for the bug report.

Change the lines to:

<div id="bouton">
<?php echo tep_draw_button(IMAGE_BUTTON_BACK, 'triangle-1-w', tep_mobile_link(FILENAME_CATALOG_MB)); ?> 
</div>

 

This will link back to the catalog root.

 

Next version (7.0.0.) will link back to the last visited page.

Link to comment
Share on other sites

Ok, my problem is when i go to the shop on my iPhone 5 or any other mobile device it doesn't redirect to the mobile site I have to click on the link to mobile version. And I have updated the php device list thing.

 

Hello @@ltaa09,

 

please post the link to your store to check what is wrong and which exact iOSC Version do you use?

Link to comment
Share on other sites

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

Real ssl should work.

 

Rainer

 

Hi Rainer.

 

I have PROPER ssl now. I still have the same issue as before. redirect from the "Show mobile view" box doesn't work in SSL.

It works fine in non-ssl. And the classic view link in the mobile site works perfectly in SSL.

 

Incidentally, I am testing using 2.3.3 installed in a subdirectory. Example - mysite.com/catalog/mobile/

SEO URLS PRO 5 is installed. I uploaded the IOSC support package for this, following instructions.

 

I have checked the following files as instructed to the best of my ability - functions/general.php and functions/html_output.php, includes/application_top.php and includes/configure.php.

 

Any ideas why this link doesn't work? The rest of my website seems OK.

 

Faithfully, Steve

Edited by JustifiedAncientOfMuMu
Link to comment
Share on other sites

Hi Rainer.

 

I have PROPER ssl now. I still have the same issue as before. redirect from the "Show mobile view" box doesn't work in SSL.

It works fine in non-ssl. And the classic view link in the mobile site works perfectly in SSL.

 

Incidentally, I am testing using 2.3.3 installed in a subdirectory. Example - mysite.com/catalog/mobile/

SEO URLS PRO 5 is installed. I uploaded the IOSC support package for this, following instructions.

 

I have checked the following files as instructed to the best of my ability - functions/general.php and functions/html_output.php, includes/application_top.php and includes/configure.php.

 

Any ideas why this link doesn't work? The rest of my website seems OK.

 

Faithfully, Steve

 

Hello Steve @,

 

Can you please post your store URL so I can check what's going on.

 

Thanks and kind regards

Rainer

Link to comment
Share on other sites

Hello Steve @,

 

Can you please post your store URL so I can check what's going on.

 

Thanks and kind regards

Rainer

 

Thanks. I Sent you a Message. I guess if the 'Show mobile view' box link doesn't work for me i can do without. But it's better with it there isn't it.

Link to comment
Share on other sites

Hello Steve @,

 

Can you please post your store URL so I can check what's going on.

 

Thanks and kind regards

Rainer

 

Here is my includes/configure.php file as instructed -

 

<?php

define('HTTP_SERVER', 'http://www.mywebsite.com');

define('HTTPS_SERVER', 'https://www.mywebsite.com');

define('ENABLE_SSL', true);

define('HTTP_COOKIE_DOMAIN', 'mywebsite.com');

define('HTTPS_COOKIE_DOMAIN', 'mywebsite.com');

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

define('HTTPS_COOKIE_PATH', '/catalog/');

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

define('DIR_WS_HTTPS_CATALOG', '/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', 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_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', '/home/sites/mywebsite.com/public_html/catalog/');

//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', 'myusername');

define('DB_SERVER_PASSWORD', 'mypassword');

define('DB_DATABASE', 'mydatabase');

define('USE_PCONNECT', 'false');

define('STORE_SESSIONS', 'mysql');

define('CFG_TIME_ZONE', 'Europe/London');

?>

Link to comment
Share on other sites

Here is my includes/configure.php file as instructed -

 

<?php

define('HTTP_SERVER', 'http://www.mywebsite.com');

define('HTTPS_SERVER', 'https://www.mywebsite.com');

define('ENABLE_SSL', true);

define('HTTP_COOKIE_DOMAIN', 'mywebsite.com');

define('HTTPS_COOKIE_DOMAIN', 'mywebsite.com');

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

define('HTTPS_COOKIE_PATH', '/catalog/');

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

define('DIR_WS_HTTPS_CATALOG', '/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', 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_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', '/home/sites/mywebsite.com/public_html/catalog/');

//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', 'myusername');

define('DB_SERVER_PASSWORD', 'mypassword');

define('DB_DATABASE', 'mydatabase');

define('USE_PCONNECT', 'false');

define('STORE_SESSIONS', 'mysql');

define('CFG_TIME_ZONE', 'Europe/London');

?>

 

 

Hello Steve @,

 

the config file is correct.

 

I found the error in includes/application_top.php:

 

find:

   $mobile_site = (($request_type == 'SSL') ? DIR_WSS_HTTP_MOBILE : DIR_WS_HTTP_MOBILE) . $mobile_site . '?' . rtrim (tep_output_string(tep_get_all_get_params()), '&');
   } else {
   $mobile_site = (($request_type == 'SSL') ? DIR_WSS_HTTP_MOBILE : DIR_WS_HTTP_MOBILE) . $mobile_site;

 

change to:

 

   $mobile_site = (($request_type == 'SSL') ? DIR_WS_HTTPS_MOBILE : DIR_WS_HTTP_MOBILE) . $mobile_site . '?' . rtrim (tep_output_string(tep_get_all_get_params()), '&');
   } else {
   $mobile_site = (($request_type == 'SSL') ? DIR_WS_HTTPS_MOBILE : DIR_WS_HTTP_MOBILE) . $mobile_site;

 

Please confirm and I'll upload the fix.

 

Thanks and kind regards

Rainer

Link to comment
Share on other sites

Hello Steve @,

 

the config file is correct.

 

I found the error in includes/application_top.php:

 

find:

$mobile_site = (($request_type == 'SSL') ? DIR_WSS_HTTP_MOBILE : DIR_WS_HTTP_MOBILE) . $mobile_site . '?' . rtrim (tep_output_string(tep_get_all_get_params()), '&');
} else {
$mobile_site = (($request_type == 'SSL') ? DIR_WSS_HTTP_MOBILE : DIR_WS_HTTP_MOBILE) . $mobile_site;

 

change to:

 

$mobile_site = (($request_type == 'SSL') ? DIR_WS_HTTPS_MOBILE : DIR_WS_HTTP_MOBILE) . $mobile_site . '?' . rtrim (tep_output_string(tep_get_all_get_params()), '&');
} else {
$mobile_site = (($request_type == 'SSL') ? DIR_WS_HTTPS_MOBILE : DIR_WS_HTTP_MOBILE) . $mobile_site;

 

Please confirm and I'll upload the fix.

 

Thanks and kind regards

Rainer

 

Hi Rainer. My code is slightly different. Probably because I have SEO URLS PRO5 installed. Can you possibly confirm which part(s) require changing. Thanks :)

 

Section from my includes/application_top.php -

 

 


if($mobile_site != $_SERVER['REQUEST_URI']) {
$mobile_url = (($request_type == 'SSL') ? HTTPS_MOBILE_SERVER . DIR_WSS_HTTP_MOBILE : HTTP_MOBILE_SERVER . DIR_WS_HTTP_MOBILE) . $mobile_site;
} else {
$mobile_url = (($request_type == 'SSL') ? HTTPS_MOBILE_SERVER . DIR_WSS_HTTP_MOBILE : HTTP_MOBILE_SERVER . DIR_WS_HTTP_MOBILE) . $_SERVER['REQUEST_URI'];
}
} else {
$mobile_site = basename($PHP_SELF);
if (strpos($_SERVER['REQUEST_URI'], 'index.php') && (strpos($_SERVER['REQUEST_URI'], 'manufacturers_id=') || strpos($_SERVER['REQUEST_URI'], 'cPath='))) {
$mobile_site = str_replace('index.php', 'catalog_mb.php', $mobile_site);						
}
if (tep_not_null(tep_get_all_get_params())) {
$mobile_url = (($request_type == 'SSL') ? HTTPS_MOBILE_SERVER . DIR_WSS_HTTP_MOBILE : HTTP_MOBILE_SERVER . DIR_WS_HTTP_MOBILE) . '?' . rtrim (tep_output_string(tep_get_all_get_params()), '&');
} else {
$mobile_url = (($request_type == 'SSL') ? HTTPS_MOBILE_SERVER . DIR_WSS_HTTP_MOBILE : HTTP_MOBILE_SERVER . DIR_WS_HTTP_MOBILE);

Link to comment
Share on other sites

Hi Rainer. My code is slightly different. Probably because I have SEO URLS PRO5 installed. Can you possibly confirm which part(s) require changing. Thanks :)

 

Section from my includes/application_top.php -

 

 


if($mobile_site != $_SERVER['REQUEST_URI']) {
$mobile_url = (($request_type == 'SSL') ? HTTPS_MOBILE_SERVER . DIR_WSS_HTTP_MOBILE : HTTP_MOBILE_SERVER . DIR_WS_HTTP_MOBILE) . $mobile_site;
} else {
$mobile_url = (($request_type == 'SSL') ? HTTPS_MOBILE_SERVER . DIR_WSS_HTTP_MOBILE : HTTP_MOBILE_SERVER . DIR_WS_HTTP_MOBILE) . $_SERVER['REQUEST_URI'];
}
} else {
$mobile_site = basename($PHP_SELF);
if (strpos($_SERVER['REQUEST_URI'], 'index.php') && (strpos($_SERVER['REQUEST_URI'], 'manufacturers_id=') || strpos($_SERVER['REQUEST_URI'], 'cPath='))) {
$mobile_site = str_replace('index.php', 'catalog_mb.php', $mobile_site);						
}
if (tep_not_null(tep_get_all_get_params())) {
$mobile_url = (($request_type == 'SSL') ? HTTPS_MOBILE_SERVER . DIR_WSS_HTTP_MOBILE : HTTP_MOBILE_SERVER . DIR_WS_HTTP_MOBILE) . '?' . rtrim (tep_output_string(tep_get_all_get_params()), '&');
} else {
$mobile_url = (($request_type == 'SSL') ? HTTPS_MOBILE_SERVER . DIR_WSS_HTTP_MOBILE : HTTP_MOBILE_SERVER . DIR_WS_HTTP_MOBILE);

 

 

Hello Steve @

 

change:

DIR_WSS_HTTP_MOBILE

 

to:

DIR_WS_HTTPS_MOBILE

 

in all places (4 places I guess)

 

If your code is different you should update to the last version (Mobile OSC 6.0rev5).

The redirect function in application_top.php is the same in standard and SEO Url since Mobile OSC 6.0.

 

But in any case if it works with this correction maybe no need for update.

 

regards

Rainer

Link to comment
Share on other sites

Hello Steve @

 

change:

DIR_WSS_HTTP_MOBILE

 

to:

DIR_WS_HTTPS_MOBILE

 

in all places (4 places I guess)

 

If your code is different you should update to the last version (Mobile OSC 6.0rev5).

The redirect function in application_top.php is the same in standard and SEO Url since Mobile OSC 6.0.

 

But in any case if it works with this correction maybe no need for update.

 

regards

Rainer

 

Hi Rainer. Changing all 4 seems to work. I probably copied the above code contained in includes/application_top.php from the SEO URLS 5 contribution support package. I will go through it again to check. Is this support package still relevant?

 

Some links in Mobile My Account are not SSL. Maybe this isn't set up. For example, "Your Password" does not work as SSL, but "My Order history" works.

Another thing I just noticed was the mobile stylesheet isn't working in SSL mode in chrome. It works fine in Firefox and on my Android phone. Weird!

 

Thank you for all your help. I will re-check everything. Steve

Edited by JustifiedAncientOfMuMu
Link to comment
Share on other sites

Hi Rainer. Changing all 4 seems to work. I probably copied the above code contained in includes/application_top.php from the SEO URLS 5 contribution support package. I will go through it again to check. Is this support package still relevant?

 

Some links in Mobile My Account are not SSL. Maybe this isn't set up. For example, "Your Password" does not work as SSL, but "My Order history" works.

Another thing I just noticed was the mobile stylesheet isn't working in SSL mode in chrome. It works fine in Firefox and on my Android phone. Weird!

 

Thank you for all your help. I will re-check everything. Steve

 

Hello Steve @

 

The no ssl connection for the password page and some other pages is an "heritage" of the older versions before 5.0 which are not my development and I didn't discover these bugs until now.

 

To fix it open mobile/account.php

find:

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>';

 

and change to:

echo tep_mobile_selection(tep_mobile_link(FILENAME_ADDRESS_BOOK, '', 'SSL'), 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, '', 'SSL'), array(CATEGORY_PASSWORD)).'<div class="fleche"><img src="' . DIR_MOBILE_IMAGES . 'arrow_select.png" /></div>';

 

If you find any other page with the same problem, search the link (tep_mobile_link) in the page from where you were linked to the non sssl page and do the same change or change NONSSL to SSL.

 

I'll upload an update with all of these fixes and some more tomorrow.

 

Thanks again for the report

Rainer

Link to comment
Share on other sites

Hello Rainer,

 

This is an amazing contribution thanks a lot.

 

1. In update rev 6 from rev5 there is :

 

 

Find:

$mobile_site = (($request_type == 'SSL') ? DIR_WSS_HTTP_MOBILE : DIR_WS_HTTP_MOBILE) . $mobile_site . '?' . rtrim (tep_output_string(tep_get_all_get_params()), '&');

} else {

$mobile_site = (($request_type == 'SSL') ? DIR_WSS_HTTP_MOBILE : DIR_WS_HTTP_MOBILE) . $mobile_site;

Replace with:

$mobile_site = (($request_type == 'SSL') ? DIR_WS_HTTPS_MOBILE : DIR_WS_HTTP_MOBILE) . $mobile_site . '?' . rtrim (tep_output_string(tep_get_all_get_params()), '&');

} else {

$mobile_site = (($request_type == 'SSL') ? DIR_WS_HTTPS_MOBILE : DIR_WS_HTTP_MOBILE) . $mobile_site;

 

But in mobile osc rev5, that code is a bit different it is mobile_url if I am not mistaking.

$mobile_url = (($request_type == 'SSL') ? HTTPS_MOBILE_SERVER . DIR_WS_HTTP_MOBILE : HTTP_MOBILE_SERVER . DIR_WS_HTTP_MOBILE) . '?' . rtrim (tep_output_string(tep_get_all_get_params()), '&');

} else {

$mobile_url = (($request_type == 'SSL') ? HTTPS_MOBILE_SERVER . DIR_WS_HTTP_MOBILE : HTTP_MOBILE_SERVER . DIR_WS_HTTP_MOBILE);

 

Also, I have a shipping module that uses data from a file /classes. When trying to check out on the mobile site, checkout shipping would be blank so I modified my code in the shipping module as follow and it works on the sides of the store classic and mobile, but is it all right?

 

Was

require_once(DIR_FS_CATALOG . DIR_WS_CLASSES . "way2ship_osc.php");

Now

require_once((defined('MOBILE_SESSION') ? '../includes/classes/way2ship_osc.php' : 'includes/classes/way2ship_osc.php'));

 

Last but not least, I have searched the fix this issue but can not find the problem. Pages that load in ssl have no css or images from the mobile/images file. If I load the page without ssl, everything is fine.

 

Thanks for your support,

 

Patrick

Edited by Patrick73
Link to comment
Share on other sites

Hello Rainer,

 

This is an amazing contribution thanks a lot.

 

1. In update rev 6 from rev5 there is :

 

 

 

But in mobile osc rev5, that code is a bit different it is mobile_url if I am not mistaking.

 

 

Also, I have a shipping module that uses data from a file /classes. When trying to check out on the mobile site, checkout shipping would be blank so I modified my code in the shipping module as follow and it works on the sides of the store classic and mobile, but is it all right?

 

Was

require_once(DIR_FS_CATALOG . DIR_WS_CLASSES . "way2ship_osc.php");

Now

require_once((defined('MOBILE_SESSION') ? '../includes/classes/way2ship_osc.php' : 'includes/classes/way2ship_osc.php'));

 

Last but not least, I have searched the fix this issue but can not find the problem. Pages that load in ssl have no css or images from the mobile/images file. If I load the page without ssl, everything is fine.

 

Thanks for your support,

 

Patrick

 

 

Hello Patrick @@Patrick73,

 

 

For the redirect function in application_ top.php you are right, it is the wrong code in update Mobile OSC 6.0rev5 to 6.0rev6.

I'll ipload the correct instructions right now, thank's for the report.

The only change is:

DIR_WSS_HTTP_MOBILE

to

DIR_WS_HTTPS_MOBILE

in 4 places.

 

For the shipping modification:

require_once((defined('MOBILE_SESSION') ? '../includes/classes/way2ship_osc.php' : 'includes/classes/way2ship_osc.php'));

this is correct if your mobile files are installed in a subdirectory.

This would be a more generic/universal approach which would work also if you one day decide to move the mobile files to a subdomain:

require_once(DIR_WS_CLASSES . 'way2ship_osc.php');

or if this doesn't work:

require_once((defined('MOBILE_SESSION') ? 'DIR_FS_MOBILE . DIR_WS_CLASSES . 'way2ship_osc.php' : DIR_FS_CATALOG . DIR_WS_CLASSES . 'way2ship_osc.php'));

 

FOr the images problem when ssl is used it sounds strange to me, ssl shouldn't have any influence on the images. But who knows, you could post your store URL to see what's going on. You can send me a private message if you don't like to publish it here.

 

Kind regards

Rainer

Edited by raiwa
Link to comment
Share on other sites

Thanks for reply Rainer,

 

I've figured out that The images problem over ssl has no incidence on mobile devices, it was a problem while browsing mobile site with chrome. Everything else works perfectly well with iphone, but does not redirect automatically over ipad.

 

Great work Rainer!!!!!!!

Link to comment
Share on other sites

Thanks for reply Rainer,

 

I've figured out that The images problem over ssl has no incidence on mobile devices, it was a problem while browsing mobile site with chrome. Everything else works perfectly well with iphone, but does not redirect automatically over ipad.

 

Great work Rainer!!!!!!!

 

Thank you,

 

ipad is not considered to need the mobile version and so not included in the device list for redirect, there is always the manual link to mobile version for visitors who prefer this.

Edited by raiwa
Link to comment
Share on other sites

I'm getting this error Fatal error: Cannot redeclare smartphone() (previously declared in /home/lyons/public_html/mobile/includes/classes/mobile_redirect.php:5) in /home/lyons/public_html/mobile/includes/classes/mobile_redirect.php on line 14

 

After upgrading my 2.2 install.

Any ideas?

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.

 

I am having the exact same problem. If I delete the following off of my mobile/login.php it goes away. What is causing this? How do I get rid of it? You had suggested 3 solutions that might get rid of it, but none of them works for me. <div id="bouton">

 

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

'<span style="float:right;">' . tep_draw_button(IMAGE_BUTTON_LOGIN, 'key', null, '', 'SSL') . '</span></form>'; ?>

</div>

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