Jump to content
Latest News: (loading..)
bumbarash

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

Recommended Posts

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

Share this post


Link to post
Share on other sites

@@raiwa  and @@Jack_mcs

 

In regards to meta names in the header for Header Tags SEO.

 

I just want to verify that you feel this is accurate.  I'd like to make sure my site is indexed correctly for both the non-mobile and mobile sites.

 

My MOBILE header has:

<meta name="Description" content="blah blah blah" />
<meta name="Keywords" content="blah blah blah" />
<meta name="googlebot" content="noindex, nofollow" />
<meta name="bingbot" content="noindex, nofollow" />
<meta name="slurp" content="noindex, nofollow" />
<meta name="robots" content="noodp" />
<meta name="robots" content="noydir" />
<link rel="canonical" href="http://www.mysite.com/" />

And the NON-MOBILE version:

<meta name="Description" content="blah blah blah">
 <meta name="Keywords" content="blah blah blah">
 <meta name="googlebot-mobile" content="noindex, nofollow">
 <meta name="MSNBOT_Mobile" content="noindex, nofollow">
 <meta name="YahooSeeker/M1A1-R2D2" content="noindex, nofollow">
 <meta name="robots" content="noodp">
 <meta name="robots" content="noydir">
 <link rel="alternate" media="only screen and (max-width: 640px)" href="http://www.mysite.com/mobile/?redirectCancelled=true" >

Does that appear to be correct?  I just get worried when I see "noindex, nofollow" and I want to make sure I'm getting crawled correctly.

 

Thanks!! :)

Edited by phi148

Share this post


Link to post
Share on other sites

Hello Rainer,

 

Thanks for the wonderful contribution!

 

I installed the Header Tags SEO add on Ver5.2 and activated the header tags for a few pages that do not have an equivalent in the classic store, ex about.php.  When I checked Admin > Header Tags SEO > page control, these pages are not listed.  They were not excluded in /catalog/admin/includes/functions/header_tags.php so I am not sure what I need to do to have these pages to show in Admin so I can change the default header tags.  I double checked the install instructions but have come up with the same result.

 

What do I need to do to have this pages listed?

 

Best regards,

Joe

Share this post


Link to post
Share on other sites

Hello Joe @@catlover,

 

The mobile pages are not added as separate pages in the header tags page list, individual tags are not supported for these files.

The mobile index page and catalog_mb.php use the same tags as the main index Homepage (no category selected)

When inside a category in catalog_mb.php, the correspondent category tags are used, same for manufacturers.

On about.php and search.php the default tags are used. I believe there is no need to use specific tags on these pages.

 

Regards

Rainer

Share this post


Link to post
Share on other sites

@@phi148,

 

As far as I know it is correct. The tags say:

generic search engines: index only the main store pages

mobile specific search engines: index only the mobile site pages.

The only point I'm not sure is the canonical link:

google says: use it only on the mobile site and use the alternate tag on the main site (if mobile site exists)

others say: use canonical always on both sites.

 

@@Jack_mcs for sure knows more about that.

 

regards

Rainer

Share this post


Link to post
Share on other sites

I have installed Osc 7.5.9 in my Osc 2.3.3.4 shop with MTS

 

My Desktop version works ok.

When I open my shop on mobile then it opens ok,  when I go to store > catalog  i see manufacturers and specials but not categories.

Other thing I over write paypal_express.php which is in the Full 7.5.9 package and then I get the follwoing error:

 

Warning: include() [function.include]: Unable to access /public/sites/www.myshop.com/includes/apps/paypal/OSCOM_PayPal.php in /public/sites/www.myshop.com/includes/modules/payment/paypal_express.php on line 14

Warning: include(/public/sites/www./public/sites/www.myshop.com/includes/apps/paypal/OSCOM_PayPal.php/includes/apps/paypal/OSCOM_PayPal.php) [function.include]: failed to open stream: No such file or directory in /public/sites/www.myshop.com/includes/modules/payment/paypal_express.php on line 14

 

/public/sites/www.myshop.com/includes/apps/paypal/OSCOM_PayPal.php  is ofcourse not in my shop or I find in the 7.5.9 pack , its from the developer I suppose ?
I'm not a coder but I can add OSC addons or make changes which is in the addon manual.


Any Clue ?

Jan
 

Edited by Boldman

Share this post


Link to post
Share on other sites

@@phi148,

 

As far as I know it is correct. The tags say:

generic search engines: index only the main store pages

mobile specific search engines: index only the mobile site pages.

The only point I'm not sure is the canonical link:

google says: use it only on the mobile site and use the alternate tag on the main site (if mobile site exists)

others say: use canonical always on both sites.

 

@@Jack_mcs for sure knows more about that.

 

regards

Rainer

 

Gotcha, do you think the alternate tag should have the:  ?redirectCancelled=true at the end, or should it be this instead?

 <link rel="alternate" media="only screen and (max-width: 640px)" href="http://www.mysite.com/mobile/" >
Edited by phi148

Share this post


Link to post
Share on other sites

@@raiwa For the meta tags code, I don't think it is right. But part of that is how the googlebot option is setup in Header Tags SEO.  In a shop without the mobile addon installed, if the googlebot meta tag option in Page Control isn't checked, then a googlebot meta tag isn't displayed and the default value of all, meaning no restrictions, is assumed by google. But the same is true if that that checkbox is checked. I had originally meant to add options to choose the parameters for that tag but it got lost along the way.

 

So as it is now with the mobile code as it is, if the checkbox is not checked in Page Control, then the default value of all is assumed. If the box is checked, the pages are not indexed at all. To have it work as mentioned, the code should be changed to

  if ($defaultTags['meta_google']) { echo (defined('MOBILE_SESSION')? ' <meta name="googlebot" content="noindex, nofollow" />' . "\n" : '' }

 But I don't think having the no index, no follow is right. It means that if a search engine ends up on a product page, among others, that page won't be listed and any links on it won't be followed. With googles new ranking system for mobile pages, I'm not sure that is right. If they link to a product page and are redirected to a mobile page, is a 301 issued? If not, that may cause a duplicate content situation.  

 

I think the best solution is to not check the google meta tag box in Page Control. I also suggest being sure to use the latest google sitemap addon which includes the option to build mobile sitemaps.

 

For the canonical tag, they now want next prev to be used instead of the rel and alt tags but I've not been able to figure out a good way to do that so that it doesn't slow the site down. As you mentioned, there should be an alternate tag used but I haven't made that change for the same reason. Though I've not seen anything that indicates it matters. 

Share this post


Link to post
Share on other sites

@@phi148,

 

I think "?redirectCancelled=true" should be removed

 

Raiwa, would you know how to fix this?  I think the code is here:   /includes/header_tags.php

if ($defaultTags['meta_canonical']) { echo (defined('MOBILE_SESSION')? html_entity_decode(str_replace($str_replace_from, $str_replace_to, (tep_not_null($canonical_url) ? ' <link rel="canonical" href="'.$canonical_url.'" />'. "\n" : ' <link rel="canonical" href="'.GetCanonicalURL().'" />'. "\n"))) : ( ' <link rel="alternate" media="only screen and (max-width: 640px)" href="'. $mobile_url .'" >'. "\n")); }

$mobile_url is getting populated with the ?redirectCancelled=true 

 

Do you know where I could fix that at?

 

Thanks!

Share this post


Link to post
Share on other sites

Raiwa, would you know how to fix this?  I think the code is here:   /includes/header_tags.php

if ($defaultTags['meta_canonical']) { echo (defined('MOBILE_SESSION')? html_entity_decode(str_replace($str_replace_from, $str_replace_to, (tep_not_null($canonical_url) ? ' <link rel="canonical" href="'.$canonical_url.'" />'. "\n" : ' <link rel="canonical" href="'.GetCanonicalURL().'" />'. "\n"))) : ( ' <link rel="alternate" media="only screen and (max-width: 640px)" href="'. $mobile_url .'" >'. "\n")); }

$mobile_url is getting populated with the ?redirectCancelled=true 

 

Do you know where I could fix that at?

 

Thanks!

 

For now I just did a quick fix, but I'm not sure it is the right way to do it.  :)

if ($defaultTags['meta_canonical']){
    $new_mobile_url = str_replace('?redirectCancelled=true', '', $mobile_url);  
}

if ($defaultTags['meta_canonical']) { echo (defined('MOBILE_SESSION')? html_entity_decode(str_replace($str_replace_from, $str_replace_to, (tep_not_null($canonical_url) ? ' <link rel="canonical" href="'.$canonical_url.'" />'. "\n" : ' <link rel="canonical" href="'.GetCanonicalURL().'" />'. "\n"))) : ( ' <link rel="alternate" media="only screen and (max-width: 640px)" href="'. $new_mobile_url .'" >'. "\n")); }

Share this post


Link to post
Share on other sites

@@raiwa

 

Hi I noticed after installing Mobile Site under header tags for alternate mobile links that the source for alternate is generated for desktop version e.g. http://www.hdcabling.co.za/hdmi-inline-extender-repeater-active-equalizer-extend-hdmi-hdmi-cable-signal-meters-p-78.html?MredirectCancelled=true as mobile version / alternate link

http://mobile.hdcabling.co.za/hdmi-inline-extender-repeater-active-equalizer-extend-hdmi-hdmi-cable-signal-meters-p-78.html

 

When I copy and paste this into a browser it does not work and gives a NOT Found page error, the actual link on mobile site is http://mobile.hdcabling.co.za/hdmi-inline-extender-repeater-active-equalizer-extend-hdmi-hdmi-cable-signal-meters-mp-78.html?redirectCancelled=true where the -p- in SEO URL is changed to -mp-.

 

Is this normal and is the -mp- generated when switched to mobile view and will this affect google crawling ?

Share this post


Link to post
Share on other sites

@@raiwa,

 

I do not know the OSCommerce very well but I do not have a header_tags.php in includes/ only header.php, please advise another folder ?

Share this post


Link to post
Share on other sites

@@raiwa,

 

Hi I am using modular_seo_header_tags_1.4.6_min as at http://addons.oscommerce.com/info/7646 with the Mobile add-on v1.0 on the same add-on page. I also notice on mobile site that the canonical tags point to mobile site version -mp- where it should point to desktop version -p- product page e.g

<link rel="canonical" href="http://mobile.hdcabling.co.za/hdmi-inline-extender-repeater-active-equalizer-extend-hdmi-to-hdmi-cable-signal-up-to-40-meters-mp-78.html"

 

/> is shown on mobile product pages and on desktop version as explained above the alternate mobile link shows

<link rel="alternate" media="only screen and (max-width: 640px)" href="http://mobile.hdcabling.co.za/hdmi-inline-extender-repeater-active-equalizer-extend-hdmi-to-hdmi-cable-signal-up-to-40-meters-p-78.html" /> which should include the -mp- to mobile website since

Share this post


Link to post
Share on other sites

Rainer and other what is your opinion about this ? redirectCancelled=true  with canonical on mobile page. Recomendation from Google is that rel=”canonical” tag on the mobile URL pointing to the desktop page is required. I checked some source of other web pages and they have on desktop and on mobile version the same cannonical.

 
jack_mcs @ in mobile/header.php  I added your add-ons Header Tags SEO. It worked but I moved it away because of caution and because there is so many unknown things around this. What do you think or suggest it makes sense at all that mobile version is connected to this your perfect addons that I am using from beginning for many years now?

Share this post


Link to post
Share on other sites

@@Matjaz,

 

 

 

Recomendation from Google is that rel=”canonical” tag on the mobile URL pointing to the desktop page is required. I checked some source of other web pages and they have on desktop and on mobile version the same cannonical.

 

That's the same what I know about that. I believe that canonical also on the main site can be useful for other kind of variation like other language maybe.

Let's see what Jack says about.

Share this post


Link to post
Share on other sites

Hello Johan @@thiartj,

 

Please address to the author @@Gergely in the correspondent support thread:

http://forums.oscommerce.com/topic/367607-addon-modular-seo-header-tags/

 

regards

Rainer

Edited by raiwa

Share this post


Link to post
Share on other sites

@@raiwa and @@Matjaz: I don't think using rel or alt makes too much of a difference. Google does recommend using them. though, so it might be best to use them. But I am not familiar enough with the mobile code to provide a good example. But roughly, currently the canonical code is something like

 

if (defined mobile) {

 canonical link = rel

 canonical url = mobile page

} else {

 canonical link = rel

 canonical url = desktop page

}

 

That should be changed to something like:

 

if (defined mobile) {

 canonical link = rel

 canonical url = desktop page

} else {

 canonical link = alt

 canonical url = mobile page

}

 

But on the mobile side, a category page uses category_mb.php while it is index.php on the desktop side and I don't know of a way to detect what the other page should be. Rainer, is there a way to know which page to link to? If there is a generic way to do that so it catches all of the pages, then I think the above would switch correctly.

Share this post


Link to post
Share on other sites

Hi

I have problem in shopping cart. I installed mobile osc 7 on osCommerce 2.2-MS2. I used the folder 'for_OsC_2.2rc2a' to install mobile version. The problem is my shopping cart is always empty on the mobile version. It is working fine on desktop side.

I worked with application_top.php of the desktop side and printed $_SESSION, which resulted in an empty array in case of mobile version while the desktop side printed the array fine( that is array has the cart items in desktop side).

The code "if ($cart->count_contents() > 0) {" is not working for mobile version.

Please let me know about solution. Store is http://apopular.com.br/ .

Thanks

Adnan

Share this post


Link to post
Share on other sites

Hello @@adnan_osc,

 

Yes, it is like you say, iosc mobile is written for at least osc2.2rc2a. You can get it to work with 2.2ms2, but you need to "downgrade" the coding of several files to ensure it will work flawless with osc2.2ms2.

You should compare an unmodified osc2.2ms2 file package with an unmodified 2.2rc2a file package and apply the differences (obviously functional differences in the public store only, not admin, design or layout differences) to the mobile files.

 

However it is also possible that the problem you report is related to an add-on or customization which has been applied to your main store.

Most typical would be in that case QTpro or any other add-on which is related to product attributes and/or stock control. Any functional add-on/customization of the public store side needs to be applied to the mobile files.

 

regards

Rainer

Edited by raiwa

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×