Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

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


bumbarash

Recommended Posts

pretty much what i'm noticing is once a redirect occurs - say product to mobile product - the links in the also purchased module are sometimes correct, and sometimes opposite.

Site is here

 

@@Roaddoctor

 

I found this happens in my shop with the also purchased products module too (with Ultimate Seo Urls 5 PRO).

Didn't notice until now, I'll work on this.

 

Contribution support 1.8 uploaded.

 

regards

Rainer

Link to comment
Share on other sites

@@raiwa

 

Just curious/verifying why the below is needed?

 

4d. /catalog/includes/header_tags.php

FIND
	 $canonical_url = StripSID(tep_href_link(basename($_SERVER['PHP_SELF']), $args, 'NONSSL', false) );
REPLACE WITH
	 $args = str_replace('-mp-', '-p-', $args);
	 $canonical_url = StripSID(tep_href_link(str_replace('mobile_', '', basename($_SERVER['PHP_SELF'])), $args, 'NONSSL', false) );

 

 

Thank you

-Dave

Link to comment
Share on other sites

@@raiwa

 

Just curious/verifying why the below is needed?

 

4d. /catalog/includes/header_tags.php

FIND
	 $canonical_url = StripSID(tep_href_link(basename($_SERVER['PHP_SELF']), $args, 'NONSSL', false) );
REPLACE WITH
	 $args = str_replace('-mp-', '-p-', $args);
	 $canonical_url = StripSID(tep_href_link(str_replace('mobile_', '', basename($_SERVER['PHP_SELF'])), $args, 'NONSSL', false) );

 

 

Thank you

 

@@Roaddoctor

 

The desktop URL should be shown,in the canonical URL Tag also on the mobile page. So as the canonical URL shown in the header tag is set up by the actual page URL, the mobile page URL is corrected here to the correspondent Desktop URL.

 

Rainer

Edited by raiwa
Link to comment
Share on other sites

@@raiwa

That is what I thought. I asked because my shop, as far as I can tell, is already doing the canonical correctly and it seemed possibly redundant. This may not be nescessary for 2.2d seo url users?? or do it anyway?....

 

 

@@Roaddoctor

 

The desktop URL should be shown,in the canonical URL Tag also on the mobile page. So as the canonical URL shown in the header tag is set up by the actual page URL, the mobile page URL is corrected here to the correspondent Desktop URL.

 

Rainer

-Dave

Link to comment
Share on other sites

@@raiwa

That is what I thought. I asked because my shop, as far as I can tell, is already doing the canonical correctly and it seemed possibly redundant. This may not be nescessary for 2.2d seo url users?? or do it anyway?....

 

@@Roaddoctor

 

Yes, it is possible that it isn't necessary for SEO URLs, but for standard URLs.

 

Another issue:

 

I began to work on iOSC 6.0:

 

main features:

 

- all mobile files moved to mobile/ directory.

- can be installed in subdomain/different domain.

- much easier redirect scripts

- same mobile filenames as desktop filenames

- no additional filename definitions needed

(except files which doesn't exist on desktop version like: catalogue.php, search.php, about.php

- no additional SEO URL support needed.

 

What do you think about?

If you like I can send you a beta version for testing.

 

Regards

Rainer

Edited by raiwa
Link to comment
Share on other sites

@@raiwa

I've noticed that on the mobile side that header tags do not work correctly in product reviews (displays the generics rather than product name, specifics...)

I think this change needs is needed in /includes/header_tags.php

 

1. Make sure your local file matches your stores version, make a safe backup, then

 

FIND

// PRODUCT_INFO.PHP
// PRODUCT_REVIEWS.PHP
// PRODUCT_REVIEWS_INFO.PHP
// PRODUCT_REVIEWS_WRITE.PHP
case (basename($_SERVER['PHP_SELF']) === FILENAME_PRODUCT_INFO):
case (basename($_SERVER['PHP_SELF']) === FILENAME_PRODUCT_REVIEWS):
case (basename($_SERVER['PHP_SELF']) === FILENAME_PRODUCT_REVIEWS_INFO):
case (basename($_SERVER['PHP_SELF']) === FILENAME_PRODUCT_REVIEWS_WRITE):
switch (true)
{
 case (basename($_SERVER['PHP_SELF']) === FILENAME_PRODUCT_INFO):		 $filename = FILENAME_PRODUCT_INFO;		 break;
 case (basename($_SERVER['PHP_SELF']) === FILENAME_PRODUCT_REVIEWS):	 $filename = FILENAME_PRODUCT_REVIEWS;	 break;
 case (basename($_SERVER['PHP_SELF']) === FILENAME_PRODUCT_REVIEWS_INFO): $filename = FILENAME_PRODUCT_REVIEWS_INFO; break;
 case (basename($_SERVER['PHP_SELF']) === FILENAME_PRODUCT_REVIEWS_WRITE): $filename = FILENAME_PRODUCT_REVIEWS_WRITE; break;
 default: $filename = FILENAME_PRODUCT_INFO;
}

 

Replace with

// PRODUCT_INFO.PHP
// PRODUCT_REVIEWS.PHP
// PRODUCT_REVIEWS_INFO.PHP
// PRODUCT_REVIEWS_WRITE.PHP
// MOBILE_PRODUCT_REVIEWS.PHP
// MOBILE_PRODUCT_REVIEWS_INFO.PHP
// MOBILE_PRODUCT_REVIEWS_WRITE.PHP
case (basename($_SERVER['PHP_SELF']) === FILENAME_PRODUCT_INFO):
case (basename($_SERVER['PHP_SELF']) === FILENAME_PRODUCT_REVIEWS):
case (basename($_SERVER['PHP_SELF']) === FILENAME_PRODUCT_REVIEWS_INFO):
case (basename($_SERVER['PHP_SELF']) === FILENAME_PRODUCT_REVIEWS_WRITE):
// Begin iOSC
case (basename($_SERVER['PHP_SELF']) === FILENAME_MOBILE_PRODUCT_REVIEWS):
case (basename($_SERVER['PHP_SELF']) === FILENAME_MOBILE_PRODUCT_REVIEWS_INFO):
case (basename($_SERVER['PHP_SELF']) === FILENAME_MOBILE_PRODUCT_REVIEWS_WRITE):
// End iOSC
switch (true)
{
 case (basename($_SERVER['PHP_SELF']) === FILENAME_PRODUCT_INFO):		 $filename = FILENAME_PRODUCT_INFO;		 break;
 case (basename($_SERVER['PHP_SELF']) === FILENAME_PRODUCT_REVIEWS):	 $filename = FILENAME_PRODUCT_REVIEWS;	 break;
 case (basename($_SERVER['PHP_SELF']) === FILENAME_PRODUCT_REVIEWS_INFO): $filename = FILENAME_PRODUCT_REVIEWS_INFO; break;
 case (basename($_SERVER['PHP_SELF']) === FILENAME_PRODUCT_REVIEWS_WRITE): $filename = FILENAME_PRODUCT_REVIEWS_WRITE; break;
// Begin iOSC
 case (basename($_SERVER['PHP_SELF']) === FILENAME_MOBILE_PRODUCT_REVIEWS):	 $filename = FILENAME_MOBILE_PRODUCT_REVIEWS;	 break;
 case (basename($_SERVER['PHP_SELF']) === FILENAME_MOBILE_PRODUCT_REVIEWS_INFO): $filename = FILENAME_MOBILE_PRODUCT_REVIEWS_INFO; break;
 case (basename($_SERVER['PHP_SELF']) === FILENAME_MOBILE_PRODUCT_REVIEWS_WRITE): $filename = FILENAME_MOBILE_PRODUCT_REVIEWS_WRITE; break;
// Begin iOSC
 default: $filename = FILENAME_PRODUCT_INFO;
}

 

Then, if exists, delete or comment out the following 3 bits

 

// mobile_product_reviews_write.php
case (basename($_SERVER['PHP_SELF']) === FILENAME_MOBILE_PRODUCT_REVIEWS_WRITE):
if (! ReadCacheHeaderTags($header_tags_array, basename($_SERVER['PHP_SELF']), '')) {
 $header_tags_array = tep_header_tag_page(FILENAME_MOBILE_PRODUCT_REVIEWS_WRITE);
 WriteCacheHeaderTags($header_tags_array, basename($_SERVER['PHP_SELF']), '');
}
break;

 

// mobile_product_reviews.php
case (basename($_SERVER['PHP_SELF']) === FILENAME_MOBILE_PRODUCT_REVIEWS):
if (! ReadCacheHeaderTags($header_tags_array, basename($_SERVER['PHP_SELF']), '')) {
 $header_tags_array = tep_header_tag_page(FILENAME_MOBILE_PRODUCT_REVIEWS);
 WriteCacheHeaderTags($header_tags_array, basename($_SERVER['PHP_SELF']), '');
}
break;

 

// mobile_product_reviews_info.php
case (basename($_SERVER['PHP_SELF']) === FILENAME_MOBILE_PRODUCT_REVIEWS_INFO):
if (! ReadCacheHeaderTags($header_tags_array, basename($_SERVER['PHP_SELF']), '')) {
 $header_tags_array = tep_header_tag_page(FILENAME_MOBILE_PRODUCT_REVIEWS_INFO);
 WriteCacheHeaderTags($header_tags_array, basename($_SERVER['PHP_SELF']), '');
}
break;

 

Could you test this please. There might be more todo - not sure

-Dave

Link to comment
Share on other sites

@@raiwa

I've noticed that on the mobile side that header tags do not work correctly in product reviews (displays the generics rather than product name, specifics...)

I think this change needs is needed in /includes/header_tags.php

 

1. Make sure your local file matches your stores version, make a safe backup, then

 

FIND

// PRODUCT_INFO.PHP
// PRODUCT_REVIEWS.PHP
// PRODUCT_REVIEWS_INFO.PHP
// PRODUCT_REVIEWS_WRITE.PHP
case (basename($_SERVER['PHP_SELF']) === FILENAME_PRODUCT_INFO):
case (basename($_SERVER['PHP_SELF']) === FILENAME_PRODUCT_REVIEWS):
case (basename($_SERVER['PHP_SELF']) === FILENAME_PRODUCT_REVIEWS_INFO):
case (basename($_SERVER['PHP_SELF']) === FILENAME_PRODUCT_REVIEWS_WRITE):
switch (true)
{
 case (basename($_SERVER['PHP_SELF']) === FILENAME_PRODUCT_INFO):		 $filename = FILENAME_PRODUCT_INFO;		 break;
 case (basename($_SERVER['PHP_SELF']) === FILENAME_PRODUCT_REVIEWS):	 $filename = FILENAME_PRODUCT_REVIEWS;	 break;
 case (basename($_SERVER['PHP_SELF']) === FILENAME_PRODUCT_REVIEWS_INFO): $filename = FILENAME_PRODUCT_REVIEWS_INFO; break;
 case (basename($_SERVER['PHP_SELF']) === FILENAME_PRODUCT_REVIEWS_WRITE): $filename = FILENAME_PRODUCT_REVIEWS_WRITE; break;
 default: $filename = FILENAME_PRODUCT_INFO;
}

 

Replace with

// PRODUCT_INFO.PHP
// PRODUCT_REVIEWS.PHP
// PRODUCT_REVIEWS_INFO.PHP
// PRODUCT_REVIEWS_WRITE.PHP
// MOBILE_PRODUCT_REVIEWS.PHP
// MOBILE_PRODUCT_REVIEWS_INFO.PHP
// MOBILE_PRODUCT_REVIEWS_WRITE.PHP
case (basename($_SERVER['PHP_SELF']) === FILENAME_PRODUCT_INFO):
case (basename($_SERVER['PHP_SELF']) === FILENAME_PRODUCT_REVIEWS):
case (basename($_SERVER['PHP_SELF']) === FILENAME_PRODUCT_REVIEWS_INFO):
case (basename($_SERVER['PHP_SELF']) === FILENAME_PRODUCT_REVIEWS_WRITE):
// Begin iOSC
case (basename($_SERVER['PHP_SELF']) === FILENAME_MOBILE_PRODUCT_REVIEWS):
case (basename($_SERVER['PHP_SELF']) === FILENAME_MOBILE_PRODUCT_REVIEWS_INFO):
case (basename($_SERVER['PHP_SELF']) === FILENAME_MOBILE_PRODUCT_REVIEWS_WRITE):
// End iOSC
switch (true)
{
 case (basename($_SERVER['PHP_SELF']) === FILENAME_PRODUCT_INFO):		 $filename = FILENAME_PRODUCT_INFO;		 break;
 case (basename($_SERVER['PHP_SELF']) === FILENAME_PRODUCT_REVIEWS):	 $filename = FILENAME_PRODUCT_REVIEWS;	 break;
 case (basename($_SERVER['PHP_SELF']) === FILENAME_PRODUCT_REVIEWS_INFO): $filename = FILENAME_PRODUCT_REVIEWS_INFO; break;
 case (basename($_SERVER['PHP_SELF']) === FILENAME_PRODUCT_REVIEWS_WRITE): $filename = FILENAME_PRODUCT_REVIEWS_WRITE; break;
// Begin iOSC
 case (basename($_SERVER['PHP_SELF']) === FILENAME_MOBILE_PRODUCT_REVIEWS):	 $filename = FILENAME_MOBILE_PRODUCT_REVIEWS;	 break;
 case (basename($_SERVER['PHP_SELF']) === FILENAME_MOBILE_PRODUCT_REVIEWS_INFO): $filename = FILENAME_MOBILE_PRODUCT_REVIEWS_INFO; break;
 case (basename($_SERVER['PHP_SELF']) === FILENAME_MOBILE_PRODUCT_REVIEWS_WRITE): $filename = FILENAME_MOBILE_PRODUCT_REVIEWS_WRITE; break;
// Begin iOSC
 default: $filename = FILENAME_PRODUCT_INFO;
}

 

Then, if exists, delete or comment out the following 3 bits

 

// mobile_product_reviews_write.php
case (basename($_SERVER['PHP_SELF']) === FILENAME_MOBILE_PRODUCT_REVIEWS_WRITE):
if (! ReadCacheHeaderTags($header_tags_array, basename($_SERVER['PHP_SELF']), '')) {
 $header_tags_array = tep_header_tag_page(FILENAME_MOBILE_PRODUCT_REVIEWS_WRITE);
 WriteCacheHeaderTags($header_tags_array, basename($_SERVER['PHP_SELF']), '');
}
break;

 

// mobile_product_reviews.php
case (basename($_SERVER['PHP_SELF']) === FILENAME_MOBILE_PRODUCT_REVIEWS):
if (! ReadCacheHeaderTags($header_tags_array, basename($_SERVER['PHP_SELF']), '')) {
 $header_tags_array = tep_header_tag_page(FILENAME_MOBILE_PRODUCT_REVIEWS);
 WriteCacheHeaderTags($header_tags_array, basename($_SERVER['PHP_SELF']), '');
}
break;

 

// mobile_product_reviews_info.php
case (basename($_SERVER['PHP_SELF']) === FILENAME_MOBILE_PRODUCT_REVIEWS_INFO):
if (! ReadCacheHeaderTags($header_tags_array, basename($_SERVER['PHP_SELF']), '')) {
 $header_tags_array = tep_header_tag_page(FILENAME_MOBILE_PRODUCT_REVIEWS_INFO);
 WriteCacheHeaderTags($header_tags_array, basename($_SERVER['PHP_SELF']), '');
}
break;

 

Could you test this please. There might be more todo - not sure

 

@@Roaddoctor

 

Thank you!

 

I tested this and it seems to be fine.

Uploaded already the update.

 

Regards

Rainer

Link to comment
Share on other sites

Raiwa your too quick too post updates :) lol I never thought I would ever say that.. Anyway the following needs to be added to that update.

 

In /admin/includes/functions/header_tags.php

FIND

 

				 5 => 'specials.php');

 

REPLACE WITH

 

				 5 => 'specials.php',
// Begin iOSC
6 => 'mobile_catalogue.php',
7 => 'mobile_product_reviews.php',
8 => 'mobile_product_reviews_info.php',
9 => 'mobile_product_reviews_write.php');
// End iOSC

 

In /includes/header_tags.php

 

if exists, also comment out or remove:

// mobile_catalogue.php
case (basename($_SERVER['PHP_SELF']) === FILENAME_MOBILE_CATALOGUE):
if (! ReadCacheHeaderTags($header_tags_array, basename($_SERVER['PHP_SELF']), '')) {
 $header_tags_array = tep_header_tag_page(FILENAME_MOBILE_CATALOGUE);
 WriteCacheHeaderTags($header_tags_array, basename($_SERVER['PHP_SELF']), '');
}
break;

 

after changes, upload the admin file first, then the other, to prevent auto re-detection of the basefiles.

 

Thanks to Jack_mcs for the guidance. There "might" be more needed to perfect...

-Dave

Link to comment
Share on other sites

Raiwa your too quick too post updates :) lol I never thought I would ever say that.. Anyway the following needs to be added to that update.

 

In /admin/includes/functions/header_tags.php

FIND

 

				 5 => 'specials.php');

 

REPLACE WITH

 

				 5 => 'specials.php',
// Begin iOSC
6 => 'mobile_catalogue.php',
7 => 'mobile_product_reviews.php',
8 => 'mobile_product_reviews_info.php',
9 => 'mobile_product_reviews_write.php');
// End iOSC

 

In /includes/header_tags.php

 

if exists, also comment out or remove:

// mobile_catalogue.php
case (basename($_SERVER['PHP_SELF']) === FILENAME_MOBILE_CATALOGUE):
if (! ReadCacheHeaderTags($header_tags_array, basename($_SERVER['PHP_SELF']), '')) {
 $header_tags_array = tep_header_tag_page(FILENAME_MOBILE_CATALOGUE);
 WriteCacheHeaderTags($header_tags_array, basename($_SERVER['PHP_SELF']), '');
}
break;

 

after changes, upload the admin file first, then the other, to prevent auto re-detection of the basefiles.

 

Thanks to Jack_mcs for the guidance. There "might" be more needed to perfect...

 

 

@@Roaddoctor

 

Very sorry, I'm on a trip and can sit with the computer only in the evening for a very short time, so I thought to update this fast yesterday.

Now I uploaded this fix and if there is anything more missing=another update.

 

Regards

Rainer

Link to comment
Share on other sites

@@raiwa

 

I hope your enjoying your trip!

 

When you get back there is something not right with the manufacturer drop down. When I select a manufacturer the link looks like

 

domain.com/-mm-14.html

 

where it should read

 

domain.com/ManufacturerName-mm-14.html

 

and if you select Back to categories you get

 

domain.com/-mm-.html instead of mobile_catalogue.php

 

I'm assuming this is a SEO URL 2.2d issue but haven't studied the problem yet.

 

And for the time being I've removed also_purchased until we can sort that out as well.

 

-Dave

-Dave

Link to comment
Share on other sites

@@raiwa

 

I hope your enjoying your trip!

 

When you get back there is something not right with the manufacturer drop down. When I select a manufacturer the link looks like

 

domain.com/-mm-14.html

 

where it should read

 

domain.com/ManufacturerName-mm-14.html

 

and if you select Back to categories you get

 

domain.com/-mm-.html instead of mobile_catalogue.php

 

I'm assuming this is a SEO URL 2.2d issue but haven't studied the problem yet.

 

And for the time being I've removed also_purchased until we can sort that out as well.

 

-Dave

@@Roaddoctor

 

I just checked the manufacturer menu in my SEO URL 2.2d Testshop and everythin seems to work correct.

So please send me a copy of your relevant files:

- includes/application_top.php

- includes/classes/seo_class.php

- includes/footer.php

- mobile/includes/footer.ph

- .htaccess

- mobile_catalogue.php

 

I assume you have still my mail

I'll do some research, maybe there is missing something in the update/install instr.

 

For the also_purchased_products:

Can't find a rule when this error appears and recreate it.

So it's very difficult to research.

As it is a very minor problem in my opinion, I would ask you to wait for iOSC6 which will resolve any redirect problem since it will use a different approach.

The only thing what could be tried is to change the filename definition from:

define ('FILENAME_PRODUCT_INFO', 'mobile_product_info.php');

 

to

define ('FILENAME_MOBILE_PRODUCT_INFO', 'mobile_product_info.php');

 

and then do a search for:

FILENAME_PRODUCT_INFO

and replace with:

FILENAME_MOBILE_PRODUCT_INFO

in all mobile files.

 

regards

Rainer

Link to comment
Share on other sites

Hi there i was hoping someone could help me out. When you view my mobile site on an iphone device it does not display correctly. https://www.theonlinefurniturestore.org.uk/mobile_login.php As you can see the please log in is getting cut off. This is happening on all pages including the product info page. How can i solve this? In addition is there any way to automatically resize all images on the product info page to fit inside the designated box. I have been trying for a few days to do this and cant find a way. If you view the following page on a mobile browser u will see what i am talking about : http://www.theonlinefurniturestore.org.uk/mobile_product_info.php/set-arc-bamboo-laundry-bins-mp-979 Thanks alot for your help i really appreciate it!

Link to comment
Share on other sites

Hi there i was hoping someone could help me out. When you view my mobile site on an iphone device it does not display correctly. https://www.theonlinefurniturestore.org.uk/mobile_login.php As you can see the please log in is getting cut off. This is happening on all pages including the product info page. How can i solve this? In addition is there any way to automatically resize all images on the product info page to fit inside the designated box. I have been trying for a few days to do this and cant find a way. If you view the following page on a mobile browser u will see what i am talking about : http://www.theonlinefurniturestore.org.uk/mobile_product_info.php/set-arc-bamboo-laundry-bins-mp-979 Thanks alot for your help i really appreciate it!

 

For the please log in getting cutoff - adjusting your font size in /mobile/inludes.iphone.css should fix that.

find

#headerTitle h1{
font-size: 16px;
}

 

For your image sizes you are using fancybox addon and need to modify that to use the mobile_ image sizes vs the desktop sizes.

-Dave

Link to comment
Share on other sites

Hi there i fixed that problem. sorry to bother u guys with that. However i am having a small problem when i use the mobile site to make a payment. The pay pal express does not work. I have not installed the pay pal module in the contributions mobile add ons supplied. As i cannot get the full version to work on my site. The other weird thing is that i can complete the checkout when using the mobile site on a laptop but not on a mobile this is the module it comes up with on the laptop: https://www.theonlinefurniturestore.org.uk/images/pay%20pal.png . Is there any way to just change the link from ww.theonlinefurniturestore.org.uk/mobile_express.php . to one that will work? thanks alot for all your help guys i really appreciate it!!

Edited by alexpacteau
Link to comment
Share on other sites

Got it solved all i needed to do is install the mobile_express file from the discount code add on.

Edited by alexpacteau
Link to comment
Share on other sites

One last quick thing and this will be me how can i set an image size in my mobile_product_info.php file? i want all my images to be able to fit on the screen how can i get this to work? I apparently have fancybox installed but i have no idea how to adapt that to a mobile site. can anyone help me? many thanks incase ur wondering my site is www.theonlinefurniturestore.org.uk

Edited by alexpacteau
Link to comment
Share on other sites

One last quick thing and this will be me how can i set an image size in my mobile_product_info.php file? i want all my images to be able to fit on the screen how can i get this to work? I apparently have fancybox installed but i have no idea how to adapt that to a mobile site. can anyone help me? many thanks incase ur wondering my site is www.theonlinefurniturestore.org.uk

 

you got the answer here (instead of checkout mobile_files compare mobile_product_info and mobile_catalogue to your standard files):

 

@@alexpacteau compare your checkouts mobile_ files to your standard files. Make sure all paypal related changes made to standard files are also made in the mobile_ files. Paypal express should work once that is done.

Link to comment
Share on other sites

@@raiwa

 

I'm noticing that links built like this are no longer working. I'm guessing due to the latest changes with getting rid of the redirectcancelled stuff.

 

define('TEXT_CALL_FOR_PRICE', '<a title="Call for Quote" href="' . ((mobile_session() == true) ?FILENAME_MOBILE_CONTACT_US: FILENAME_CONTACT_US . '?redirectCancelled=true') . '"> <b>Call for Quote!</b></a>');

 

How would I fix these?

 

Thanks

Edited by Roaddoctor

-Dave

Link to comment
Share on other sites

@@raiwa

 

I'm noticing that links built like this are no longer working. I'm guessing due to the latest changes with getting rid of the redirectcancelled stuff.

 

define('TEXT_CALL_FOR_PRICE', '<a title="Call for Quote" href="' . ((mobile_session() == true) ?FILENAME_MOBILE_CONTACT_US: FILENAME_CONTACT_US . '?redirectCancelled=true') . '"> <b>Call for Quote!</b></a>');

 

How would I fix these?

 

Thanks

 

@@Roaddoctor

 

try this:

 

define('TEXT_CALL_FOR_PRICE', '<a title="Call for Quote" href="' . ((mobile_session() == true) ?FILENAME_MOBILE_CONTACT_US: FILENAME_CONTACT_US) . '"> <b>Call for Quote!</b></a>');

 

or this:

 

define('TEXT_CALL_FOR_PRICE', '<a title="Call for Quote" href="' . (defined('FILENAME_MOBILE_CONTACT_US') ? FILENAME_MOBILE_CONTACT_US : FILENAME_CONTACT_US) . '"> <b>Call for Quote!</b></a>');

 

regards

Rainer

Link to comment
Share on other sites

@@raiwa

 

Had to use this style only in the main language file. Everywhere else the simpler edit worked fine. I have no clue why the difference. Thanks though! all is better

 

define('TEXT_CALL_FOR_PRICE', '<a title="Call for Quote" href="' . (defined('FILENAME_MOBILE_CONTACT_US') ? FILENAME_MOBILE_CONTACT_US : FILENAME_CONTACT_US) . '"> <b>Call for Quote!</b></a>');

-Dave

Link to comment
Share on other sites

pretty much what i'm noticing is once a redirect occurs - say product to mobile product - the links in the also purchased module are sometimes correct, and sometimes opposite.

Site is here

 

@@Roaddoctor

Working on the 6.0 update I found the reason for the also purchased modules link problem:

 

It's the cache option.

 

When "use cache" is set to "true" in "Admin-cache" the also purchased module is cached, so if you visit first the desktop page and then the mobile page it shows the cached desktop content.

 

Here the fix:

 

In: catalog/includes/functions/cache.php

 

add this at the end before the closing ?>: (this is a duplicated and renamed "tep_cache_also_purchased" function)

 

////
//! Cache the mobile also purchased module
// Cache the mobile also purchased module
function tep_cache_mobile_also_purchased($auto_expire = false, $refresh = false) {
global $HTTP_GET_VARS, $language, $languages_id;
$cache_output = '';
if (isset($HTTP_GET_VARS['products_id']) && is_numeric($HTTP_GET_VARS['products_id'])) {
 if (($refresh == true) || !read_cache($cache_output, 'also_purchased-' . $language . '.cache' . $HTTP_GET_VARS['products_id'], $auto_expire)) {
 ob_start();
 include(DIR_MOBILE_MODULES . FILENAME_ALSO_PURCHASED_PRODUCTS);
 $cache_output = ob_get_contents();
 ob_end_clean();
 write_cache($cache_output, 'mobile_also_purchased-' . $language . '.cache' . $HTTP_GET_VARS['products_id']);
 }
}
return $cache_output;
}

 

In: mobile_product_info.php

find:

 

if (tep_not_null(tep_cache_also_purchased(3600))) {
echo tep_cache_also_purchased(3600);

 

and replace with:

if (tep_not_null(tep_cache_mobile_also_purchased(3600))) {
echo tep_cache_mobile_also_purchased(3600);

 

That's it

Edited by raiwa
Link to comment
Share on other sites

In mobile_product _info If I remove the cache from the process and just use

 include(DIR_MOBILE_MODULES . FILENAME_ALSO_PURCHASED_PRODUCTS);

 

also purchased products works correctly. So its cache related..... might be just my site. I've had other cache issues.

-Dave

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