Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

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


bumbarash

Recommended Posts

Raiwa

 

The only other error I'm aware of at this time is when ajax is enabled in the mobile configuration.

 

When this is active, I noticed my images don't appear with any consistency.  Especially on first page loads there is no image present.  If I refresh the browser the image appears.

 

Turning Ajax off remedies this problem as a quick fix.  I am using KISS image thumbnailers as well (in case that is related).

 

Thanks again for the awesome contribution!  :)

Link to comment
Share on other sites

hello Bill @@phi148,

 

You can exclude any  individual page from ajax page load if needed. There are sometimes incompatibilities.

Please see point 11 of the Add-On support.doc. You may also need to add "data-ajax="false" to all links to that page.

Link to comment
Share on other sites

Hi Raiwa, I hope you can provide some help please. I have installed Mobile_OsC_7.5.8r2 and the site is working fine without Ultimate_SEO_URLSv22d_14a installed. The desktop website functions correctly after Ultimate_SEO_URLSv22d_14a installed. After installation of Ultimate_SEO_URLSv22d_14a and making the changes as indicated on Support. 4.4. MOsC 7.5.x I still receive errors on mobile site when clicking on any products from mobile main page under new products or specials. The link on the mobile site on product does point to e.g http://mobile.hdcabling.co.za/transmitter-hdmi-receiver.html but it states an "Error Loading Page" which I assume it cannot find. Also when I click on Store from mobile main page the categories / manufacturers show but when clicking on a category the same error message appear "Error Loading Page". I unfortunately have very limited programming knowledge and basically follow install instructions and did all changed as suggested after Ultimate_SEO_URLSv22d_14a install in .htaccess file. The subdomain mobile.hdcabling.co.za is located under desktop website root /mobile and I also ensured that all rewrites in .htaccess has the mobile/ for each .php file. Can you please help 

Link to comment
Share on other sites

@@thiartj,

 

can you please post you .htacces file of the mobile subdomain. Did you place the mobile copy of .htaccess in the mobile subdomain directory??

 

However, as stated in the instructions, the subdomain directory support for Ultimate_SEO_URLSv22d_14a has not been tested, so I can't give you further support.

If you can't get it to work, try the installation in subdirectory or use SEO URLs USU5 which is tested for subdomain.

 

kind regards

Rainer

Link to comment
Share on other sites

@@raiwa,

 

Thank you the SEO part works fine now:-) I placed the .htaccess file in mobile site root and removed /mobile from entries.  However when clicking on a product the product title, description  / add to cart and all items are shown except product image. I did not install any image add-ons. Any suggestions ?

Link to comment
Share on other sites

@@raiwa,

 

update on above. When clicking on product as explained above image does not show, however when on product page and pressing F5 to refresh page the image then shows. Any suggestions please why it will not show on first page load and only after refresh ? Same when on mobile product page and image does not show on load, swopping to desktop view and back to mobile view then image does show. After a single page refresh or swopping from Mobile to Desktop and back to Mobile all products display with images without a page refresh. When the browser tab is closed and site opened again the Page refresh is needed again for any products to show image.

Link to comment
Share on other sites

Hello Johan @@thiartj,

 

I tried and found that the image path is correct in the source code and the image shows when reloading the page. From that point on images show all correct for the first load of all other products.

So it seems to be a problem of the colorbox script/css.

 

Could you please try to temporary switch off ajax page load in the mobile configuration. If it works then, you could add data-ajax="false" to the product_info.php link in the listings.

In: mobile/includes/modules/products.php:

    $path = '<a data-ajax="false" href="' . tep_mobile_link(FILENAME_PRODUCT_INFO, 'products_id=' . $listing['products_id']) . '">';

If this doesn't help, you could try to place a copy of the colorbox and photoset-grid folders (in: catalog/ext/..) to the correspondent mobile folder (mobile-directory/ext/....

Then change in the mobile header the links to relative links:

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

so they will be loaded from the mobile folder.

 

regards

Rainer

Link to comment
Share on other sites

In case these have not been mentioned, this text in the mobile/includes/languages/english.php (and probably others)

define('TEXT_WELCOME', 'Welcome at our mobile shop!');

should be

define('TEXT_WELCOME', 'Welcome to our mobile shop!'); 

and this line

define('MOBILE_FOOTER_TEXT_BODY', 'Copyright © 2011 <a href="http://[YOUR SITE URL]" target="_blank">' . TITLE . '</a>');

should be

 
define('FOOTER_TEXT_BODY_MOBILE', 'Copyright © ' . date("Y") . ' <a href="' . tep_mobile_link(FILENAME_DEFAULT) . '">' . TITLE . '</a>');

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Thank you  Jack @@Jack_mcs,

 

I believe these are relicts from version 2 or 3 :)

I'll update this (if there will be any update any more)

 

regards

Rainer

Link to comment
Share on other sites

@@raiwa

 

Switching off Ajax did the trick but when I add $path = '<a data-ajax="false" href="' . tep_mobile_link(FILENAME_PRODUCT_INFO, 'products_id=' . $listing['products_id']) . '">'; to mobile/includes/modules/products.php the ajax is still enabled I assume since then image does not show on first load. Is their a specific line I should insert it into. A bit clueless, tried it at beginning of file. A bit clueless on the .php editing side. The 2nd seems a bit complex for my skills but will give it a try if above needs to be inserted at a specific line. products.php is stock standard Mobile_OsC_7.5.8r2. Is there any benefit to Ajax page loads (not sure what this is) or can I just switch it off in Admin panel for all pages ?

Link to comment
Share on other sites

@@thiartj,

 

It's supposed to be somewhat faster with ajax.

 

For more information please see the Add-On Support doc Point 11.

 

You could add product_info.php to the ajax excluded list:

In mobile/includes/header.php:

if (AJAX_ENABLED != 'true' || substr(basename($PHP_SELF), 0, 8) == 'checkout' || basename($PHP_SELF) == FILENAME_CATALOG_MB || substr(basename($PHP_SELF), 0, 7) == 'account' || substr(basename($PHP_SELF), 0, 12) == 'address_book' || basename($PHP_SELF) == FILENAME_LOGIN || basename($PHP_SELF) == FILENAME_CREATE_ACCOUNT)

add:

|| basename($PHP_SELF) == FILENAME_PRODUCT_INFO

so it should be:

if (AJAX_ENABLED != 'true' || substr(basename($PHP_SELF), 0, 8) == 'checkout' || basename($PHP_SELF) == FILENAME_CATALOG_MB || substr(basename($PHP_SELF), 0, 7) == 'account' || substr(basename($PHP_SELF), 0, 12) == 'address_book' || basename($PHP_SELF) == FILENAME_LOGIN || basename($PHP_SELF) == FILENAME_CREATE_ACCOUNT || basename($PHP_SELF) == FILENAME_PRODUCT_INFO)

See also:

http://view.jquerymobile.com/1.3.2/dist/demos/widgets/links/

Link to comment
Share on other sites

@@raiwa, I Added the code as above to mobile/includes/header.php but somehow ajax still active since image only appear after page reload. For now I will disable Ajax page loads since we have a small website and I did not notice any performace issues after change. I really appreciate your help and I will watch this thread for any other suggestions.

Link to comment
Share on other sites

@@Jack_mcs,

 

Had a look now and found that "MOBILE_FOOTER_TEXT_BODY" is not in use any more.

It should be removed from the language files.

FOOTER_TEXT_BODY from the main language file is used in the actual mobile footer.

 

TEXT_WELCOME it's supposed to be customized in any case for each store.

Link to comment
Share on other sites

Hello @@raiwa

 

I just noticed, the site being online, the link is at the bottom in the footer "Site mobile",

that on iPhone some products, not all,  are redirected to "HTTP error, 0 unknown error" when I clic on "Classic View" .

 

I cleared the seo url cache and also applied the 7.5.8r2 redirect patch btw,

but still the problem remains. Would you have an idea why ?

 

Best regards

david

Link to comment
Share on other sites

Hello David@@Eim2,

 

Does this happen only from mobile or also from desktop.

If it only happens with some products I should have the URL of an example product. Could you PM some examples.

 

regards

Rainer

Link to comment
Share on other sites

Hello David@@Eim2,

 

Does this happen only from mobile or also from desktop.

If it only happens with some products I should have the URL of an example product. Could you PM some examples.

 

regards

Rainer

 

 Actually I tested on both Desktop and mobile Online and local :( Same thing but only some products !

 

It say on IE HTTP 410, for example  you can try product ID 3749

Edited by Eim2

david

Link to comment
Share on other sites

Hello David @@Eim2,

 

The problem seems for me the name of the products which include "-mp-" which is used for the mobile product number delimiter.

You should avoid using the letter combinations which are used in the rewrite rules to mark up the product numbering.

 

You could for example remove in the character conversion list "mp" and other problematic combinations or replace them by something else.

 

regards

Rainer

Link to comment
Share on other sites

Hi Rainer,

 

In light of Google's recent decision to penalize sites that aren't mobile friendly (https://www.google.com/webmasters/tools/mobile-friendly/), this contribution is going to be a site life saver!!

 

I have set up on a version 2.3.3 system.  When selecting the menu choices across the top they point to a file which may or may not be present in the root of my store. -- catalog_mb.php, account.php, search.php, about.php.  When the file is present, I am taken back to the classic version; when not present, it says the file is not found.

 

Out of desperation, I edited FILENAME_CATALOG_MB, FILENAME_SEARCH and FILENAME_ABOUT in /includes/filenames.php to include "mobile/".  Since then, when I select one of them, the proper page is displayed (i.e. the Store categories list).  However, subsequent selections want to revert to back to the root file name (/catalog_mb.php), which causes the file not to be found like at first.

 

Also, since there isn't a filename definition set for Account, I did not change anything, causing the classic account.php page to be displayed.  Like with the other links, they end with "?redirectCancelled=true"  Even for account.php?redirectCancelled=true, is that supposed to cause the program to automatically execute the file in the /mobile folder?

 

 

I must be missing something, and will be very grateful if you will tell me what it is!.

 

Thanks,

 

 

Russ

Link to comment
Share on other sites

Hello Russ @@rsthomas,

 

You do not need to modify the filename definitions, leave it like given in the installation instructions.

 

Please check the following in that order:

- if you are using SEO URLs, check if you added the appropiate SEU URL support (and correct SEO URL version) and check all modifications.

  Mobile SEO URL support is included in the iosc Mobile Contribution support package:

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

- check the modifications in tep_href_link function in includes/funktions/html_output.php

- check the modifications in tep_redirect function in includes/functions/general.php

- check the modifications in includes/configure.php

 

If you still have troubles, you can post all the relevant parts of these files here or in a private message

and I'll have a look.

 

 

Kindest regards

Rainer

Edited by raiwa
Link to comment
Share on other sites

For me it is important to know if a client is in the PC version or mobile version.

 

Search the file footer.php Mobile version

  require(DIR_WS_INCLUDES . 'counter.php');

Add below

  require(DIR_WS_FUNCTIONS . 'whos_online.php');
  tep_update_whos_online();

Thus will on whos_online admin who is viewing the products and that version. Just look at the difference between product-p-123.html and product-mp-123.html for instance.

 

 

Link to comment
Share on other sites

@@raiwa Comments not meant for the customer can be seen by the customer. To fix that, in mobile/account_history_info.php, this line

  $statuses_query = tep_db_query("select os.orders_status_name, osh.date_added, osh.comments from " . TABLE_ORDERS_STATUS . " os, " . TABLE_ORDERS_STATUS_HISTORY . " osh where osh.orders_id = '" . (int)$HTTP_GET_VARS['order_id'] . "' and osh.orders_status_id = os.orders_status_id and os.language_id = '" . (int)$languages_id . "' order by osh.date_added");


should be changed to

  $statuses_query = tep_db_query("select os.orders_status_name, osh.date_added, osh.comments from " . TABLE_ORDERS_STATUS . " os, " . TABLE_ORDERS_STATUS_HISTORY . " osh where osh.customer_notified = '1' and osh.orders_id = '" . (int)$HTTP_GET_VARS['order_id'] . "' and osh.orders_status_id = os.orders_status_id and os.language_id = '" . (int)$languages_id . "' order by osh.date_added");

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

 

@@raiwa Comments not meant for the customer can be seen by the customer. To fix that, in mobile/account_history_info.php, this line

  $statuses_query = tep_db_query("select os.orders_status_name, osh.date_added, osh.comments from " . TABLE_ORDERS_STATUS . " os, " . TABLE_ORDERS_STATUS_HISTORY . " osh where osh.orders_id = '" . (int)$HTTP_GET_VARS['order_id'] . "' and osh.orders_status_id = os.orders_status_id and os.language_id = '" . (int)$languages_id . "' order by osh.date_added");


should be changed to

  $statuses_query = tep_db_query("select os.orders_status_name, osh.date_added, osh.comments from " . TABLE_ORDERS_STATUS . " os, " . TABLE_ORDERS_STATUS_HISTORY . " osh where osh.customer_notified = '1' and osh.orders_id = '" . (int)$HTTP_GET_VARS['order_id'] . "' and osh.orders_status_id = os.orders_status_id and os.language_id = '" . (int)$languages_id . "' order by osh.date_added");

 

 

This worked better for me, so it doesn't show the "Authorize.net" status (or whatever payment module you use) for example to the customer:

$statuses_query = tep_db_query("select os.orders_status_name, osh.date_added, osh.comments from " . TABLE_ORDERS_STATUS . " os, " . TABLE_ORDERS_STATUS_HISTORY . " osh where osh.orders_id = '" . (int)$HTTP_GET_VARS['order_id'] . "' and osh.orders_status_id = os.orders_status_id and os.language_id = '" . (int)$languages_id . "' and os.public_flag = '1' order by osh.date_added");
Link to comment
Share on other sites

Hello Jack @@Jack_mcs,

 

Yes, this is also a relict from the old versions, based on the query used until 2.2rc1 and which has not been discovered until now.

public_flag was introduced in 2.2rc2.

Thank you.

I consider the query posted by @@phi148 the correct one, its what is used in the main store account_history_info.php files of all versions 2.2rc2a to 2.3.4.

Your modification might be a customization of your store.

 

I'll include the "official" version in the next update.

 

regards

Rainer

Edited by raiwa
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...