Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

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


bumbarash

Recommended Posts

One other question, I am using the KISS image thumbnailer, seems to work fine.

 

The only odd thing is, every now and then, when on the mobile site, if I click on a product, the picture does not appear in the product listing.  However, if I simply hit the refresh button in my browser, the picture then shows up just fine.  It is simply on the first load that the picture does not show.

 

Any ideas on that one?

 

Thanks again for the excellent support!  :)

Link to comment
Share on other sites

Link to comment
Share on other sites

Hello Bill @@phi148,

 

Please try this:

in: catalog/mobile/includes/header.php

Find:

<script type="text/javascript" src="<?php echo HTTP_SERVER . DIR_WS_HTTP_CATALOG; ?>ext/photoset-grid/jquery.photoset-grid.min.js"></script>
<link rel="stylesheet" type="text/css" href="<?php echo HTTP_SERVER . DIR_WS_HTTP_CATALOG; ?>ext/colorbox/colorbox.css" />
<script type="text/javascript" src="<?php echo HTTP_SERVER . DIR_WS_HTTP_CATALOG; ?>ext/colorbox/jquery.colorbox-min.js"></script><?php

Modify to:

<script type="text/javascript" src="<?php echo ($request_type == 'SSL') ? HTTPS_MOBILE_SERVER . DIR_WS_HTTPS_MOBILE : HTTP_MOBILE_SERVER . DIR_WS_HTTP_MOBILE; ?>ext/photoset-grid/jquery.photoset-grid.min.js"></script>
<link rel="stylesheet" type="text/css" href="<?php echo ($request_type == 'SSL') ? HTTPS_MOBILE_SERVER . DIR_WS_HTTPS_MOBILE : HTTP_MOBILE_SERVER . DIR_WS_HTTP_MOBILE; ?>ext/colorbox/colorbox.css" />
<script type="text/javascript" src="<?php echo ($request_type == 'SSL') ? HTTPS_MOBILE_SERVER . DIR_WS_HTTPS_MOBILE : HTTP_MOBILE_SERVER . DIR_WS_HTTP_MOBILE; ?>ext/colorbox/jquery.colorbox-min.js"></script><?php

Let me know, I'll include it then in the next update.

 

Thank you very much for the reports and testing.

 

kind regards

Rainer

Edited by raiwa
Link to comment
Share on other sites

Hello Bill @@phi148,

 

Please try this:

in: catalog/mobile/includes/header.php

Find:

<script type="text/javascript" src="<?php echo HTTP_SERVER . DIR_WS_HTTP_CATALOG; ?>ext/photoset-grid/jquery.photoset-grid.min.js"></script>
<link rel="stylesheet" type="text/css" href="<?php echo HTTP_SERVER . DIR_WS_HTTP_CATALOG; ?>ext/colorbox/colorbox.css" />
<script type="text/javascript" src="<?php echo HTTP_SERVER . DIR_WS_HTTP_CATALOG; ?>ext/colorbox/jquery.colorbox-min.js"></script><?php

Modify to:

<script type="text/javascript" src="<?php echo ($request_type == 'SSL') ? HTTPS_MOBILE_SERVER . DIR_WS_HTTPS_MOBILE : HTTP_MOBILE_SERVER . DIR_WS_HTTP_MOBILE; ?>ext/photoset-grid/jquery.photoset-grid.min.js"></script>
<link rel="stylesheet" type="text/css" href="<?php echo ($request_type == 'SSL') ? HTTPS_MOBILE_SERVER . DIR_WS_HTTPS_MOBILE : HTTP_MOBILE_SERVER . DIR_WS_HTTP_MOBILE; ?>ext/colorbox/colorbox.css" />
<script type="text/javascript" src="<?php echo ($request_type == 'SSL') ? HTTPS_MOBILE_SERVER . DIR_WS_HTTPS_MOBILE : HTTP_MOBILE_SERVER . DIR_WS_HTTP_MOBILE; ?>ext/colorbox/jquery.colorbox-min.js"></script><?php

Let me know, I'll include it then in the next update.

 

Thank you very much for the reports and testing.

 

kind regards

Rainer

 

Fixed!  

 

I also have some additional MVS fixes that I'll be passing to you via PM.

 

Additional modifications to checkout_process.php and checkout_confirmation.php appear to be needed.

 

Thanks!

Link to comment
Share on other sites

Link to comment
Share on other sites

Hello Bill @@phi148,

 

Please try this:

in: catalog/mobile/includes/header.php

Find:

<script type="text/javascript" src="<?php echo HTTP_SERVER . DIR_WS_HTTP_CATALOG; ?>ext/photoset-grid/jquery.photoset-grid.min.js"></script>
<link rel="stylesheet" type="text/css" href="<?php echo HTTP_SERVER . DIR_WS_HTTP_CATALOG; ?>ext/colorbox/colorbox.css" />
<script type="text/javascript" src="<?php echo HTTP_SERVER . DIR_WS_HTTP_CATALOG; ?>ext/colorbox/jquery.colorbox-min.js"></script><?php

Modify to:

<script type="text/javascript" src="<?php echo ($request_type == 'SSL') ? HTTPS_MOBILE_SERVER . DIR_WS_HTTPS_MOBILE : HTTP_MOBILE_SERVER . DIR_WS_HTTP_MOBILE; ?>ext/photoset-grid/jquery.photoset-grid.min.js"></script>
<link rel="stylesheet" type="text/css" href="<?php echo ($request_type == 'SSL') ? HTTPS_MOBILE_SERVER . DIR_WS_HTTPS_MOBILE : HTTP_MOBILE_SERVER . DIR_WS_HTTP_MOBILE; ?>ext/colorbox/colorbox.css" />
<script type="text/javascript" src="<?php echo ($request_type == 'SSL') ? HTTPS_MOBILE_SERVER . DIR_WS_HTTPS_MOBILE : HTTP_MOBILE_SERVER . DIR_WS_HTTP_MOBILE; ?>ext/colorbox/jquery.colorbox-min.js"></script><?php

Let me know, I'll include it then in the next update.

 

Thank you very much for the reports and testing.

 

kind regards

Rainer

 

Actually, I think there is a bug in that code you posted.  colorbox and photoset-grid do not exist in "mobile/ext"

Link to comment
Share on other sites

@@phi148,

 

ohps well, you are right. I was too fast with this, I just copied the base url above. Of course it should be the main server and directory:

<script type="text/javascript" src="<?php echo ($request_type == 'SSL') ? HTTPS_SERVER . DIR_WS_HTTPS_CATALOG : HTTP_SERVER . DIR_WS_HTTP_CATALOG; ?>ext/photoset-grid/jquery.photoset-grid.min.js"></script>
<link rel="stylesheet" type="text/css" href="<?php echo ($request_type == 'SSL') ? HTTPS_SERVER . DIR_WS_HTTPS_CATALOG : HTTP_SERVER . DIR_WS_HTTP_CATALOG; ?>ext/colorbox/colorbox.css" />
<script type="text/javascript" src="<?php echo ($request_type == 'SSL') ? HTTPS_SERVER . DIR_WS_HTTPS_CATALOG : HTTP_SERVER . DIR_WS_HTTP_CATALOG; ?>ext/colorbox/jquery.colorbox-min.js"></script><?php

Sorry and thank you.

 

For the description links to contact_us.php:

Just add the same redirect snippet you added to catalog/index.php and catalog/product_info.php also to catalog/contact_us.php

 

For the Header Tgas:

In catalog_mb.php and product_info.php they look all ok.

On the other mobile pages it seems you didn't add the header tags, they are not showing.

 

regards

Rainer

Edited by raiwa
Link to comment
Share on other sites

Thanks for the feedback.

 

I've moved onto the support package containing the mobile sitemap.

 

I copied the folder (usu5_sitemaps) and I ran the index.php

 

All the sitemaps were indeed generated, however they do not contain the SEO URL's.  For example, this is part of the output of sitemapMobileProducts.xml

 

<url>
<loc>
http://www.mysite.com//mobile/product_info.php?products_id=1252
</loc>
<lastmod>2015-04-26</lastmod>
<changefreq>weekly</changefreq>
<priority>0.5</priority>
<image:image>
<image:loc>
http://www.mysite.com/images/xxx/xxx.jpg
</image:loc>
<image:title>Widget</image:title>
</image:image>
<mobile:mobile/>
</url>
 
Any clue on the fix for that one?
Edited by phi148
Link to comment
Share on other sites

Hi Bill @@phi148 ,

I appreciate, if you share the modification needed for MVS in mobile checkout_process.php and checkout_confirmation.php here or via PM

 

Thanks

Marco

 

Sure, I'll be in touch soon.  I should have time tomorrow to get the information together.

Edited by phi148
Link to comment
Share on other sites

Hello Bill @@phi148,

 

In mobile/catalog_mb.php

find:

        if ($column_list[$i] == 'PRODUCT_LIST_NAME') {
          $HTTP_GET_VARS['sort'] = $i+1 . 'a';
          $listing_sql .= " order by pd.products_name";
          break;

change to:

        if ($column_list[$i] == 'PRODUCT_LIST_NAME') {
          $HTTP_GET_VARS['sort'] = $i+1 . 'a';
          $listing_sql .= " order by order by final_price desc";
          break;
Edited by raiwa
Link to comment
Share on other sites

I have a problem.
I have version 2.3.4. and for some years also SEO Urls 5. If I don't delete application.php :
 
  /**
  * ULTIMATE Seo Urls 5 PRO by FWR Media
  */
  
Usu_Main::i()->setVar'languages_id'$languages_id )
               ->
setVar'request_type'$request_type 
               ->
setVar'session_started'$session_started 
               ->
setVar'sid'$SID 
               ->
setVar'language'$language )
               ->
setVar'filename'$PHP_SELF )
               ->
initiate( ( isset( $lng ) && ( $lng instanceof language ) ) ? $lng : array(), $languages_id$language );

and until I dont delete in html_output.php;
 
  /**
  * ULTIMATE Seo Urls 5 PRO by FWR Media
  * Replacement for osCommerce href link wrapper function
  */
  
require_once DIR_WS_MODULES 'ultimate_seo_urls5/main/usu5.php';
  
  function 
tep_href_link$page ''$parameters ''$connection 'NONSSL'$add_session_id true$search_engine_safe true ) {
    return 
Usu_Main::i()->hrefLink$page$parameters$connection$add_session_id$search_engine_safe );
  }
 
my web site does not work properly in mobile way. When I add original not corrected html_output.php files mobile supplement:

    defined('MOBILE_SESSION') ? $mobile_directory = HTTP_MOBILE_SERVER . DIR_WS_HTTP_MOBILE : $mobile_directory = HTTP_SERVER . DIR_WS_HTTP_CATALOG;
    defined('MOBILE_SESSION') ? $mobile_secure_directory = HTTPS_MOBILE_SERVER . DIR_WS_HTTPS_MOBILE : $mobile_secure_directory = HTTPS_SERVER . DIR_WS_HTTPS_CATALOG;
    if ($connection == 'NONSSL') {
      $link = $mobile_directory;
    } elseif ($connection == 'SSL') {
      if (ENABLE_SSL == true) {
        $link = $mobile_secure_directory;
      } else {
        $link = $mobile_directory;

mobile works without any problem. What I have missed? How to install SEO Urls 5 code that I had to delete so that SEO Urls 5 works again?
Link to comment
Share on other sites

Hello @@Matjaz,

 

Did you add the SEU URLs 5 support for mobile which is included in the iosc Mobile contribution support package??

Edited by raiwa
Link to comment
Share on other sites

Hello @@Matjaz,

 

Yes it's this.

 

iosc Mobile Start_here.doc:

IMPORTANT NOTE:
For installation in subdirectory “mobile/”, finish “Install_osc_2_2.doc” or Install_osc_2_3.doc” before testing the mobile files.
For installation under subdomain finish also “Configure_ subdomain.doc” before testing the mobile files.
If you are using SEO URL, finish also “SEO URL” support installation included in the Add-On support package before testing the mobile redirects.
If you are using an image thumbnail add-on, finish also “image thumbnail” add-on support installation included in the Add-On support package before testing the mobile images.

:-

 

regards

Rainer
 

Link to comment
Share on other sites

 

Hello Bill @@phi148,

 

In mobile/catalog_mb.php

find:

        if ($column_list[$i] == 'PRODUCT_LIST_NAME') {
          $HTTP_GET_VARS['sort'] = $i+1 . 'a';
          $listing_sql .= " order by pd.products_name";
          break;

change to:

        if ($column_list[$i] == 'PRODUCT_LIST_NAME') {
          $HTTP_GET_VARS['sort'] = $i+1 . 'a';
          $listing_sql .= " order by order by final_price desc";
          break;

 

Thanks Raiwa

 

You have a slight typo:

 

$listing_sql .= " order by order by final_price desc";

 

should be:

 

$listing_sql .= " order by final_price desc";

 

Also, how do I get the dropdown sort box to reflect this current status.  Doing the change above works fine, however the sort dropdown box is now misleading as it defaults to: "Sorted by: Product Name"

 

When in reality, on page load, it is sorted by price with the change you suggested.

 

Thanks

bill

Link to comment
Share on other sites

Am I looking proper for KissIT_image_thumbnailer_r9? This I cannot find in my mobile file. I have osc 2.3.4

 

Thanks 

 

 

1. in: mobile/product_info.php

 

OsCommerce 2.3.

2 same entries:

a. *** FIND line 73:

 

$pi_entry .= '" target="_blank">' . tep_image(DIR_WS_IMAGES . $pi['image'], $product_info['products_name'], MOBILE_PRODUCT_IMAGE_WIDTH, MOBILE_PRODUCT_IMAGE_HEIGHT) . '';

 

*** CHANGE TO:

 

$pi_entry .= '" target="_blank">' . tep_image(DIR_WS_IMAGES . $pi['image'], $product_info['products_name'], KISSIT_MAIN_PRODUCT_IMAGE_WIDTH/2, KISSIT_MAIN_PRODUCT_IMAGE_HEIGHT/2) . '';

 

 

b. *** FIND line 88:

 

 

<?php echo '' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], addslashes($product_info['products_name']), MOBILE_PRODUCT_IMAGE_WIDTH, MOBILE_PRODUCT_IMAGE_HEIGHT) . ''; ?>

 

*** CHANGE TO:

 

<?php echo '' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], addslashes($product_info['products_name']), KISSIT_MAIN_PRODUCT_IMAGE_WIDTH/2, KISSIT_MAIN_PRODUCT_IMAGE_HEIGHT/2) . ''; ?>

 

 

b. *** FIND line 192:

 

 

$pi_entry .= '" target="_blank">' . tep_image(DIR_WS_IMAGES . $pi['image'], $product_info['products_name'], MOBILE_PRODUCT_IMAGE_WIDTH, MOBILE_PRODUCT_IMAGE_HEIGHT) . '';

 

*** CHANGE TO:

 

$pi_entry .= '" target="_blank">' . tep_image(DIR_WS_IMAGES . $pi['image'], $product_info['products_name'], KISSIT_MAIN_PRODUCT_IMAGE_WIDTH/2, KISSIT_MAIN_PRODUCT_IMAGE_HEIGHT/2) . '';

 

 

 

2. in: mobile/includes/modules/product_header.php

 

OsCommerce 2.2. and OsCommerce 2.3

a. *** FIND:

 

echo '

' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], $product_info['products_name'], MOBILE_PRODUCT_IMAGE_WIDTH, MOBILE_PRODUCT_IMAGE_HEIGHT) . '

';

 

*** CHANGE TO:

 

echo '

' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], $product_info['products_name'], KISSIT_MAIN_PRODUCT_IMAGE_WIDTH, KISSIT_MAIN_PRODUCT_IMAGE_HEIGHT, '') . '

';

 

--------------------------------------------------------------------------------------------------------------

 

3. in: mobile/includes/header.php

 

*** FIND:

 

' . tep_image(DIR_WS_HTTP_MOBILE . DIR_MOBILE_IMAGES . 'store_logo.png', STORE_NAME) . '

 

 

*** CHANGE TO:

 

' . tep_image(DIR_WS_HTTP_MOBILE . DIR_MOBILE_IMAGES . 'store_logo.png', STORE_NAME, MOBILE_LOGO_WIDTH, MOBILE_LOGO_HEIGHT) . '

 

 

--------------------------------------------------------------------------------------------------------------

 

4. in: includes/catalog_mb.php

 

*** FIND (inside other code):

 

$img = strlen($item['categories_image']) > 0 ? tep_image(DIR_WS_IMAGES . $item['categories_image'], $item['categories_name']) : tep_image(DIR_MOBILE_IMAGES . 'placeholder_trans.gif') ;

 

*** CHANGE TO:

 

$img = strlen($item['categories_image']) > 0 ? tep_image(DIR_WS_IMAGES . $item['categories_image'], $item['categories_name'], KISSIT_MAIN_PRODUCT_IMAGE_WIDTH/2, KISSIT_MAIN_PRODUCT_IMAGE_HEIGHT/2) : tep_image(DIR_MOBILE_IMAGES . 'placeholder_trans.gif') ;

 

--------------------------------------------------------------------------------------------------------------

 

5a. in: includes/configure.php

 

*** FIND:

 

// Width and height of the main product_info.php image

define ( 'KISSIT_MAIN_PRODUCT_IMAGE_WIDTH', 300 );

define ( 'KISSIT_MAIN_PRODUCT_IMAGE_HEIGHT', 200 );

 

*** ADD BELOW:

 

define ( 'MOBILE_LOGO_WIDTH', '' );

define ( 'MOBILE_LOGO_HEIGHT', 50 );

 

--------------------------------------------------------------------------------------------------------------

 

5b. in: includes/configure.php

 

NOTE: This modification works for mobile installation in subdirectory. If your mobile site is installed under subdomain leave the standard setting and try.

If it doesn't work try another thumbnail add-on.

 

*** FIND:

 

(defined('MOBILE_SESSION') ? define('DIR_WS_IMAGES', HTTP_SERVER . DIR_WS_HTTP_CATALOG . 'images/') : define('DIR_WS_IMAGES', 'images/'));

 

*** CHANGE TO:

 

(defined('MOBILE_SESSION') ? define('DIR_WS_IMAGES', '../images/') : define('DIR_WS_IMAGES', 'images/'));

Link to comment
Share on other sites

@@phi148,

 

Great that you found it.

 

Fo rthe default selected sort by:

One line above the first change:

          $HTTP_GET_VARS['sort'] = $i+1 . 'b';
          $listing_sql .= " order by final_price desc";

change $i+1 to $i+2 if you are using the default order:

Image=1

Product Name=2

Product Price=3

 

If you changed the order in

Admin => Configuration=>Mobile Site

then try changing the number until Price shows by default

 

Change the letter b for descendent and a for ascendent.

Link to comment
Share on other sites

Hello @@Matjaz,

 

The kissit image thumbnail support has not been updated to the actual 2.3.4 version, so there are some minor changes.

However the main request for kissit image thumbnail to work are only 2:

1. the tep_image function must be used to call the image

2. fix image size (width and height) must be passed to the tep_image function.

 

so it's not difficult to modify the code even it changed a little bit:

 

For your points:

 

1. you can use here the instructions in KissIT_image_thumbnailer_BS, it's the same code in 2.3.4 mobile like in the main file:

http://addons.oscommerce.com/info/9206

 

2. very little change find:

					echo '<div class="visuel">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], $product_info['products_name'], MOBILE_PRODUCT_IMAGE_WIDTH, MOBILE_PRODUCT_IMAGE_HEIGHT) . '</div>';

and MOBILE_PRODUCT_IMAGE_WIDTH, MOBILE_PRODUCT_IMAGE_HEIGHT to KISSIT_MAIN_PRODUCT_IMAGE_WIDTH, KISSIT_MAIN_PRODUCT_IMAGE_HEIGHT

 

It works also with the original code, just try, its only a question of the image size.

 

3+4 this code is there like shown in the instructions.

 

5. This has been updated in 7.5.8, the instructions are for iosc Mobile 7.5.0.

 

Search now for:

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

However you should try to understand the sense of the code and not only search and replace for exact text strings.

In this line the image directory is defined and the line to replace can be identified if you look for: define('DIR_WS_IMAGES',

 

replace all line with the given code in the kissit instructions.

 

I'm sorry, but it is impossible to keep all add-on support updated for all changes and updateds in core files and other add-ons which are related.

 

regards

Rainer

Link to comment
Share on other sites

Thanks Raiwa, yet again, awesome support.

 

Everything seems to be working spot on.  Just one more question.

 

What would be the easiest way to either eliminate or redirect "home" to "store" ?

 

I would really like customers to land on "catalog_mb" rather than "index.php" when going to :   www.mysite.com/mobile

 

I really have no need for the "home" as it does not list categories and forces the customer to click on "store" to start navigating the site.

Link to comment
Share on other sites

 

Raiwa

 

That change actually breaks SEO URLS 5.

 

I've noticed that now the .htaccess rewrites are incorrect as they reference "catalog_mb.php" that no longer exists if I get rid of that file.  I changed the .htaccess to "index.php" instead, but it appears there are still more changes needed.

 

Can you help?

Link to comment
Share on other sites

Raiwa

 

That change actually breaks SEO URLS 5.

 

I've noticed that now the .htaccess rewrites are incorrect as they reference "catalog_mb.php" that no longer exists if I get rid of that file.  I changed the .htaccess to "index.php" instead, but it appears there are still more changes needed.

 

Can you help?

 

 

Ok I fixed it.

 

1) Change all instances of "catalog_mb" to "index" in .htaccess

2) Create a new file in includes\modules\ultimate_seo_urls5\page_modules\mobile called "index.php"

3) Make it a copy of "catalog_mb.php" and change 

  class Catalog_Mb_Page_Module extends aPage_Modules {

To:

  class Index_Page_Module extends aPage_Modules {

and

 

Change

     if ( !self::$_singleton instanceof Catalog_Mb_Page_Module ) {

to

     if ( !self::$_singleton instanceof Index_Page_Module ) {
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.
Note: Your post will require moderator approval before it will be visible.

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