Jump to content
bumbarash

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

Recommended Posts

After having issues I could not correct with Ultimate SEO URL support, I removed the support... looked like everything was working okay. However when I checked my error logs I am getting 404 errors for catalog urls. Took my quite awhile to be able to recreate the error...as everything does appear to work on the mobile site. Finally did from my android when I do a google search for a keyword and a catagory link comes up. Click the catagory link and I get the error. Only for catagories not for products. The keyword I used for a google search from android was "Rustic Outdoor Decorating" site is cabinfevergifts.com Any direction greatly appreciated!


Log Cabin Fever Gifts

Share this post


Link to post
Share on other sites

Found another issue. The mobile iphone.icon does not take you to the cooresponding product or catagory on the mobile site from the classic site. I have uploaded the original mobile_version.php but it is not redirecting to proper pages. From classic site index it will take you to mobile site index but from catagories and products on classic site it takes you to classic site catagories and products.


Log Cabin Fever Gifts

Share this post


Link to post
Share on other sites

@@Logcbnfvr

 

If you have SEO URLs on the Classic Side, you should (must) add the same to the Mobile Side... otherwise you will have the problems as you describe above. The module will work well once you get that sorted.

 

Other than that try restoring/comparing to the original files


-Dave

Share this post


Link to post
Share on other sites

Hey guys,

 

I installed this version of the iOsc contribution.

I work with 2.3.1

 

There is a little issue I'm struggling with.

My mobile site works perfectly AS LONG AS I don't change language. But when I swap to english, all off my pictures disappear.

 

I guess it's a directory or database problem, but I don't know where to change it?

 

Thank you for your answers, would be very appreciated

 

Ameli

Share this post


Link to post
Share on other sites

Hey guys,

 

I installed this version of the iOsc contribution.

I work with 2.3.1

 

There is a little issue I'm struggling with.

My mobile siteworks perfectly AS LONG AS I don't change language. But when I swap to english, all off my pictures disappear.

 

I guess it's a directory or database problem, but I don't know where to change it?

 

Thank you for your answers, would be very appreciated

 

Ameli

 

Hello Ameli,

 

I checked your store and found that you have SEO URLs add-on installed on your desktop site while on the mobile site the SEO URL support is missing.

So first you should install the support for iosc, which you can download here:

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

 

If you still have problems with the images then post again

 

regards

Rainer

Share this post


Link to post
Share on other sites

I use paypal express checkout to process my payments but the oringial ext/includes/modules/payment/express.php is not coded to redirect mobile users back to mobile_checkout_confirmation. I believe an if else statement can fix this, the code below is close to what i need to implement but i cant figure out where to put it, or even if it is gonna work without throwing syntax errors, i could use a little guidance.

if ($ref string) == mobile_checkout_process.php then {
tep_redirect(tep_mobile_link(FILENAME_MOBILE_CHECKOUT_CONFIRMATION, '', 'SSL'));
}else{
tep_redirect(tep_href_link(FILENAME_CHECKOUT_CONFIRMATION, '',, 'SSL'));
}

 

It's my understanding the placement of this code above, should be simple with the redirect. But being as theres an else clause pertaining to errors I cant figure it out.

 

...
...
if (!tep_session_is_registered('payment'))
			 tep_session_register('payment');
		 $payment = $paypal_express->code;
		 if (!tep_session_is_registered('ppe_token'))
			 tep_session_register('ppe_token');
		 $ppe_token = $response_array['TOKEN'];
		 if (!tep_session_is_registered('ppe_payerid'))
			 tep_session_register('ppe_payerid');
		 $ppe_payerid = $response_array['PAYERID'];
		 [color=#FF6600]tep_redirect(tep_href_link(FILENAME_CHECKOUT_CONFIRMATION, '', 'SSL'));[/color]
	 } else {
		 if (!tep_session_is_registered('shipping'))
			 tep_session_register('shipping');
		 $shipping = false;
		 $sendto = false;
		 if (!tep_session_is_registered('payment'))
			 tep_session_register('payment');
		 $payment = $paypal_express->code;
		 if (!tep_session_is_registered('ppe_token'))
			 tep_session_register('ppe_token');
		 $ppe_token = $response_array['TOKEN'];
		 if (!tep_session_is_registered('ppe_payerid'))
			 tep_session_register('ppe_payerid');
		 $ppe_payerid = $response_array['PAYERID'];

		 [color=#FF6600]tep_redirect(tep_href_link(FILENAME_CHECKOUT_CONFIRMATION, '', 'SSL'));
	 }
 } else {
	 tep_redirect(tep_href_link(FILENAME_SHOPPING_CART, 'error_message=' . stripslashes($response_array['L_LONGMESSAGE0']), 'SSL'));
 }[/color]
 break;

$params['METHOD'] = 'SetExpressCheckout';
 $params['PAYMENTREQUEST_0_PAYMENTACTION'] = ((MODULE_PAYMENT_PAYPAL_EXPRESS_TRANSACTION_METHOD == 'Sale') ? 'Sale' : 'Authorization');
 $params['RETURNURL'] = tep_href_link('ext/modules/payment/paypal/express.php', 'osC_Action=retrieve', 'SSL', true, false);
 $params['CANCELURL'] = tep_href_link(FILENAME_SHOPPING_CART, '', 'SSL', true, false);
 $params['PAYMENTREQUEST_0_CURRENCYCODE'] = $order->info['currency']; #AUD, CAD, EUR, GBP, JPY, USD
 if ($order->content_type == 'virtual') {
	 $params['NOSHIPPING'] = '1';
 }
 $nProd = sizeof($order->products);
 $subtotal = 0;
 for ($i = 0; $i < $nProd; ++$i) {
	 $subtotal += $paypal_express->format_raw($order->products[$i]['final_price']) * $order->products[$i]['qty'];
 }
 $difst = 0;
 if ($subtotal != $paypal_express->format_raw($order->info['subtotal'])) {
	 $difst = $paypal_express->format_raw($order->info['subtotal']) - $subtotal;
 }

 $order->products[$nProd-1]['final_price'] += $difst;
 for ($i = 0; $i < $nProd; ++$i) {
	 $params['L_PAYMENTREQUEST_0_NAME' . $i] = $order->products[$i]['name'];
	 $params['L_PAYMENTREQUEST_0_NUMBER' . $i] = $order->products[$i]['model'];
	 #$params['L_PAYMENTREQUEST_0_DESC' . $i] = $order->products[$i]['description'];
	 $params['L_PAYMENTREQUEST_0_AMT' . $i] = $paypal_express->format_raw($order->products[$i]['final_price']);
	 $params['L_PAYMENTREQUEST_0_QTY' . $i] = $order->products[$i]['qty'];
 }
 require_once(DIR_WS_CLASSES . 'order_total.php');
 $order_total_modules = new order_total;
 $order_totals = $order_total_modules->process();
 $order_details = array();
 $order_details['subtotal'] = 0;
 $order_details['shipping_cost'] = 0;
 $order_details['tax'] = 0;
 $order_details['discount'] = 0;
 $order_details['handling'] = 0;
 $order_details['total'] = 0;
 foreach ($order_totals as $order_total) {
	 if ($order_total['code'] == 'ot_subtotal') {
		 $order_details['subtotal'] += $order_total['value'];
	 } elseif ($order_total['code'] == 'ot_shipping') {
		 $order_details['shipping_cost'] += $order_total['value'];
	 } elseif ($order_total['code'] == 'ot_tax') {
		 $order_details['tax'] += $order_total['value'];
	 } elseif ($order_total['code'] == 'ot_total') {
		 $order_details['total'] += $order_total['value'];
	 } elseif ($order_total['code'] == 'ot_redemptions' || $order_total['code'] == 'ot_gv' || $order_total['code'] == 'ot_coupon') {
		 $order_details['discount'] += $order_total['value'];
	 } elseif ($order_total['code'] == 'ot_insurance') {
		 $order_details['handling'] += $order_total['value'];
	 } else {
		 if ($order_total['value'] > 0) {
			 $order_details['handling'] += $order_total['value'];
		 } else {
			 $order_details['discount'] += $order_total['value'];
		 }
	 }
 }
 $params['PAYMENTREQUEST_0_ITEMAMT'] = $paypal_express->format_raw($order_details['subtotal']);
 $params['PAYMENTREQUEST_0_TAXAMT'] = $paypal_express->format_raw($order_details['tax']);
 $params['PAYMENTREQUEST_0_SHIPPINGAMT'] = $paypal_express->format_raw($order_details['shipping_cost']);
 $params['PAYMENTREQUEST_0_SHIPDISCAMT'] = $paypal_express->format_raw($order_details['discount']);
 $params['PAYMENTREQUEST_0_HANDLINGAMT'] = $paypal_express->format_raw($order_details['handling']);
 $params['PAYMENTREQUEST_0_AMT'] = $paypal_express->format_raw($order_details['total']);
 $post_string = '';
 //print_r($params);
 //die();
 foreach ($params as $key => $value) {
	 $post_string .= $key . '=' . urlencode(trim($value)) . '&';
 }
 $post_string = substr($post_string, 0, -1);
 $response = $paypal_express->sendTransactionToGateway($api_url, $post_string);
 $response_array = array();
 parse_str($response, $response_array);
[color=#FF8C00]	 if (($response_array['ACK'] == 'Success') || ($response_array['ACK'] == 'SuccessWithWarning')) {
	 tep_redirect($paypal_url . '&token=' . $response_array['TOKEN']);
 } else {
	 tep_redirect(tep_href_link(FILENAME_SHOPPING_CART, 'error_message=' . stripslashes($response_array['L_LONGMESSAGE0']), 'SSL'));
 }[/color]
 break;
}

[color=#FF9900]tep_redirect(tep_href_link(FILENAME_SHOPPING_CART, '', 'SSL'));[/color]

I use paypal express checkout to process my payments but the oringial ext/includes/modules/payment/express.php is not coded to redirect mobile users back to mobile_checkout_confirmation. I believe an if else statement can fix this, the code below is close to what i need to implement but i cant figure out where to put it, or even if it is gonna work without throwing syntax errors, i could use a little guidance.

if ($ref string) == mobile_checkout_process.php then {
tep_redirect(tep_mobile_link(FILENAME_MOBILE_CHECKOUT_CONFIRMATION, '', 'SSL'));
}else{
tep_redirect(tep_href_link(FILENAME_CHECKOUT_CONFIRMATION, '',, 'SSL'));
}

 

It's my understanding the placement of this code above, should be simple with the redirect. But being as theres an else clause pertaining to errors I cant figure it out.

 

...
...
if (!tep_session_is_registered('payment'))
			 tep_session_register('payment');
		 $payment = $paypal_express->code;
		 if (!tep_session_is_registered('ppe_token'))
			 tep_session_register('ppe_token');
		 $ppe_token = $response_array['TOKEN'];
		 if (!tep_session_is_registered('ppe_payerid'))
			 tep_session_register('ppe_payerid');
		 $ppe_payerid = $response_array['PAYERID'];
		 [color=#FF6600]tep_redirect(tep_href_link(FILENAME_CHECKOUT_CONFIRMATION, '', 'SSL'));[/color]
	 } else {
		 if (!tep_session_is_registered('shipping'))
			 tep_session_register('shipping');
		 $shipping = false;
		 $sendto = false;
		 if (!tep_session_is_registered('payment'))
			 tep_session_register('payment');
		 $payment = $paypal_express->code;
		 if (!tep_session_is_registered('ppe_token'))
			 tep_session_register('ppe_token');
		 $ppe_token = $response_array['TOKEN'];
		 if (!tep_session_is_registered('ppe_payerid'))
			 tep_session_register('ppe_payerid');
		 $ppe_payerid = $response_array['PAYERID'];

		 [color=#FF6600]tep_redirect(tep_href_link(FILENAME_CHECKOUT_CONFIRMATION, '', 'SSL'));
	 }
 } else {
	 tep_redirect(tep_href_link(FILENAME_SHOPPING_CART, 'error_message=' . stripslashes($response_array['L_LONGMESSAGE0']), 'SSL'));
 }[/color]
 break;

$params['METHOD'] = 'SetExpressCheckout';
 $params['PAYMENTREQUEST_0_PAYMENTACTION'] = ((MODULE_PAYMENT_PAYPAL_EXPRESS_TRANSACTION_METHOD == 'Sale') ? 'Sale' : 'Authorization');
 $params['RETURNURL'] = tep_href_link('ext/modules/payment/paypal/express.php', 'osC_Action=retrieve', 'SSL', true, false);
 $params['CANCELURL'] = tep_href_link(FILENAME_SHOPPING_CART, '', 'SSL', true, false);
 $params['PAYMENTREQUEST_0_CURRENCYCODE'] = $order->info['currency']; #AUD, CAD, EUR, GBP, JPY, USD
 if ($order->content_type == 'virtual') {
	 $params['NOSHIPPING'] = '1';
 }
 $nProd = sizeof($order->products);
 $subtotal = 0;
 for ($i = 0; $i < $nProd; ++$i) {
	 $subtotal += $paypal_express->format_raw($order->products[$i]['final_price']) * $order->products[$i]['qty'];
 }
 $difst = 0;
 if ($subtotal != $paypal_express->format_raw($order->info['subtotal'])) {
	 $difst = $paypal_express->format_raw($order->info['subtotal']) - $subtotal;
 }

 $order->products[$nProd-1]['final_price'] += $difst;
 for ($i = 0; $i < $nProd; ++$i) {
	 $params['L_PAYMENTREQUEST_0_NAME' . $i] = $order->products[$i]['name'];
	 $params['L_PAYMENTREQUEST_0_NUMBER' . $i] = $order->products[$i]['model'];
	 #$params['L_PAYMENTREQUEST_0_DESC' . $i] = $order->products[$i]['description'];
	 $params['L_PAYMENTREQUEST_0_AMT' . $i] = $paypal_express->format_raw($order->products[$i]['final_price']);
	 $params['L_PAYMENTREQUEST_0_QTY' . $i] = $order->products[$i]['qty'];
 }
 require_once(DIR_WS_CLASSES . 'order_total.php');
 $order_total_modules = new order_total;
 $order_totals = $order_total_modules->process();
 $order_details = array();
 $order_details['subtotal'] = 0;
 $order_details['shipping_cost'] = 0;
 $order_details['tax'] = 0;
 $order_details['discount'] = 0;
 $order_details['handling'] = 0;
 $order_details['total'] = 0;
 foreach ($order_totals as $order_total) {
	 if ($order_total['code'] == 'ot_subtotal') {
		 $order_details['subtotal'] += $order_total['value'];
	 } elseif ($order_total['code'] == 'ot_shipping') {
		 $order_details['shipping_cost'] += $order_total['value'];
	 } elseif ($order_total['code'] == 'ot_tax') {
		 $order_details['tax'] += $order_total['value'];
	 } elseif ($order_total['code'] == 'ot_total') {
		 $order_details['total'] += $order_total['value'];
	 } elseif ($order_total['code'] == 'ot_redemptions' || $order_total['code'] == 'ot_gv' || $order_total['code'] == 'ot_coupon') {
		 $order_details['discount'] += $order_total['value'];
	 } elseif ($order_total['code'] == 'ot_insurance') {
		 $order_details['handling'] += $order_total['value'];
	 } else {
		 if ($order_total['value'] > 0) {
			 $order_details['handling'] += $order_total['value'];
		 } else {
			 $order_details['discount'] += $order_total['value'];
		 }
	 }
 }
 $params['PAYMENTREQUEST_0_ITEMAMT'] = $paypal_express->format_raw($order_details['subtotal']);
 $params['PAYMENTREQUEST_0_TAXAMT'] = $paypal_express->format_raw($order_details['tax']);
 $params['PAYMENTREQUEST_0_SHIPPINGAMT'] = $paypal_express->format_raw($order_details['shipping_cost']);
 $params['PAYMENTREQUEST_0_SHIPDISCAMT'] = $paypal_express->format_raw($order_details['discount']);
 $params['PAYMENTREQUEST_0_HANDLINGAMT'] = $paypal_express->format_raw($order_details['handling']);
 $params['PAYMENTREQUEST_0_AMT'] = $paypal_express->format_raw($order_details['total']);
 $post_string = '';
 //print_r($params);
 //die();
 foreach ($params as $key => $value) {
	 $post_string .= $key . '=' . urlencode(trim($value)) . '&';
 }
 $post_string = substr($post_string, 0, -1);
 $response = $paypal_express->sendTransactionToGateway($api_url, $post_string);
 $response_array = array();
 parse_str($response, $response_array);
[color=#FF8C00]	 if (($response_array['ACK'] == 'Success') || ($response_array['ACK'] == 'SuccessWithWarning')) {
	 tep_redirect($paypal_url . '&token=' . $response_array['TOKEN']);
 } else {
	 tep_redirect(tep_href_link(FILENAME_SHOPPING_CART, 'error_message=' . stripslashes($response_array['L_LONGMESSAGE0']), 'SSL'));
 }[/color]
 break;
}

[color=#FF9900]tep_redirect(tep_href_link(FILENAME_SHOPPING_CART, '', 'SSL'));[/color]

 

 

Hello Eric,

 

At the moment I've also some problem with Paypal Express Checkout Module (native payment module on v2.3) which is not work in mobile after page mobile_checkout_payment.php which is not redirecting to paypal website. Seems like I have similar problem you had.

Kindly ask you step by step the modification you've done to this add-on so the Paypal Express Checkout works also in mobile version?

 

rgds,

pit

Share this post


Link to post
Share on other sites

^^^^ I'm having similar issues in that after you click "continue" on mobile_checkout_payment.php, it tries to go to mobile_express.php which doesn't exist so I get a 404 error.

 

Anyone know what I need to do? I can't find any information anywhere about this file and am 100% lost on what to do.

 

Thanks for any advice!

Edited by fumalicious

Share this post


Link to post
Share on other sites

OK got my answer:

 

"then you need to install the support for paypal_express you can find in the contribution support package here:

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

 

Now after making sure that works, I'm having redirect issues... defaults to the mobile page even on a desktop so something is wrong. I read earlier in the thread and found this same issue but it was resolved so I'm going to just try a fresh install and see what happens.

Share this post


Link to post
Share on other sites

I've gotten '@@FWR Media' Image Thumbnailer to work finally. I've added

 

 <?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '" target="_blank" rel="fancybox">' . tep_image( DIR_WS_IMAGES . $product_info['products_image'], addslashes($product_info['products_name']), KISSIT_MAIN_MOBILE_IMAGE_WIDTH, KISSIT_MOBILE_PRODUCT_IMAGE_HEIGHT, 'hspace="5" vspace="5"' ) . '</a>'; ?>

to mobile_product_info.php

 

and I added

// Width and height of the main product_info.php image
define ( 'KISSIT_MOBILE_PRODUCT_IMAGE_WIDTH', 170 );
define ( 'KISSIT_MOBILE_PRODUCT_IMAGE_HEIGHT', 180 );

to /opt/store/mobile/includes/configure.php

 

If only there were separate options for Product Images and Category view Images. The default Admin Selection still handles the images for everywhere else.

 

Now, if only I could get my Header Image to show

Share this post


Link to post
Share on other sites

For Compatibility with http://addons.oscommerce.com/info/8664/v,23 (MATC: Must Agree To Terms and Conditions)

 

In catalog/mobile_checkout_confirmation.php

 

Find:

echo '<span style="float:right;"><input type="submit" value="' . IMAGE_BUTTON_CONFIRM_ORDER . '"></form></span>' .
	 '<span style="float:left;">' . tep_draw_form('back', tep_mobile_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL')) . tep_mobile_button(IMAGE_BUTTON_BACK) . '</form></span>'; ?> 
</div>

 

ADD BEFORE:

//BOF MATC mattjt83
echo '<div style="margin:5px 0 5px;">' . tep_draw_checkbox_field('matc', '', false, 'id="matc"') . MATC_TEXT . '</div>';
//EOF MATC mattjt83

 

End Result:

<div id="bouton" style="height:24px;">
  <?php
//BOF MATC mattjt83
echo '<div style="margin:5px 0 5px;">' . tep_draw_checkbox_field('matc', '', false, 'id="matc"') . MATC_TEXT . '</div>';
//EOF MATC mattjt83
  echo '<span style="float:right;"><input type="submit" value="' . IMAGE_BUTTON_CONFIRM_ORDER . '"></form></span>' .
	 '<span style="float:left;">' . tep_draw_form('back', tep_mobile_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL')) . tep_mobile_button(IMAGE_BUTTON_BACK) . '</form></span>'; ?> 
</div>

 

 

Don't know what to do after that

Share this post


Link to post
Share on other sites

I'm still looking for a solution to use MATC on iOSC with Oscommerce 2.3.3. Is this working? Or do I have to do something else? Anyone knows a solution.

Other contr for 2.2 doesn't seem to work on my 2.3.3.

I've installed the addon mentioned beneath on my 2.3.3.

 

 

For Compatibility with http://addons.oscommerce.com/info/8664/v,23 (MATC: Must Agree To Terms and Conditions)

 

In catalog/mobile_checkout_confirmation.php

 

Find:

echo '<span style="float:right;"><input type="submit" value="' . IMAGE_BUTTON_CONFIRM_ORDER . '"></form></span>' .
	 '<span style="float:left;">' . tep_draw_form('back', tep_mobile_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL')) . tep_mobile_button(IMAGE_BUTTON_BACK) . '</form></span>'; ?>
</div>

 

ADD BEFORE:

//BOF MATC mattjt83
echo '<div style="margin:5px 0 5px;">' . tep_draw_checkbox_field('matc', '', false, 'id="matc"') . MATC_TEXT . '</div>';
//EOF MATC mattjt83

 

End Result:

<div id="bouton" style="height:24px;">
 <?php
//BOF MATC mattjt83
echo '<div style="margin:5px 0 5px;">' . tep_draw_checkbox_field('matc', '', false, 'id="matc"') . MATC_TEXT . '</div>';
//EOF MATC mattjt83
echo '<span style="float:right;"><input type="submit" value="' . IMAGE_BUTTON_CONFIRM_ORDER . '"></form></span>' .
	 '<span style="float:left;">' . tep_draw_form('back', tep_mobile_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL')) . tep_mobile_button(IMAGE_BUTTON_BACK) . '</form></span>'; ?>
</div>

 

 

Don't know what to do after that

Share this post


Link to post
Share on other sites

@@raiwa or anyone,

 

I'm seeing a strange problem when a visitor visits the mobile side from a Google ad. The ?gclid parameter (Google click ID) seems to be doubling in length which each visitors click. Please see the picture below.

 

post-95644-0-39942400-1364052297_thumb.jpg

 

Any idea where to start?

 

Thank you

Edited by Roaddoctor

-Dave

Share this post


Link to post
Share on other sites

Hello Dave (@@Roaddoctor),

 

The language declaration looks like this because I have SEO URLs installed and it is included because english is not my shops default language.

 

In any case you put my nose to discover that the canonical link for index.php is not correct, it should be:

http://www.sarplataygemas.com/index.php/en

instead of:

http://www.sarplataygemas.com/en

This happens because of the SEO URL option "Force a redirect to www.mysite.com/ when www.mysite.com/index.php" is set to true.

 

So "index.php" is stripped from the URL.

 

Now this gave me a bit headache to correct it.

 

To get the language code which is used in SEO URL to define the language, I had to add this sql query to the top of header_tags.php:

 

$defaultTags_query = tep_db_query("select * from " . TABLE_HEADERTAGS_DEFAULT . " where language_id = '" . (int)$languages_id . "'");
$defaultTags = tep_db_fetch_array($defaultTags_query);
$tmpTags['def_title']	 = (tep_not_null($defaultTags['default_title'])) ? $defaultTags['default_title'] : '';
$tmpTags['def_desc']	 = (tep_not_null($defaultTags['default_description'])) ? $defaultTags['default_description'] : '';
$tmpTags['def_keywords'] = (tep_not_null($defaultTags['default_keywords'])) ? $defaultTags['default_keywords'] : '';
$tmpTags['def_logo_text'] = (tep_not_null($defaultTags['default_logo_text'])) ? $defaultTags['default_logo_text'] : '';
$languages_query = tep_db_query( "select code from " . TABLE_LANGUAGES . " where languages_id = '" . (int)$languages_id . "'");
$language_code = tep_db_fetch_array($languages_query);

 

Then I added this for the case "INDEX.PHP for SEO URLs and additional languages" below this block:

 

// INDEX.PHP
case (basename($_SERVER['PHP_SELF']) === FILENAME_DEFAULT):
.......
......
......
 WriteCacheHeaderTags($header_tags_array, basename($_SERVER['PHP_SELF']), $id);
}
break;

 

New code added:

 

// INDEX.PHP for SEO URLs and additional languages
case (basename($_SERVER['PHP_SELF']) == $language_code['code'] || basename($_SERVER['PHP_SELF']) == 'mobile_index.php'):
 if (USU5_ENABLED == 'true' || SEO_ENABLED == 'true'){
 if (!tep_not_null($cPath) || (isset($_GET['manufacturers_id']) && $category_depth == 'top'))
 {
	 $canonical_url = StripSID(tep_href_link(FILENAME_DEFAULT . '/' . $language_code['code'], $args, 'NONSSL', false));
 }
 }
break;

 

Here the new bottom part of header_tags.php with your suggestions included:

 

// MOBILE URLS REPLACEMENTS FOR CANONICAL URL
$str_replace_from = array('-mc-', '-mp-', '-mm-', 'mobile_catalogue.php', 'mobile_about.php', 'mobile_', '?redirectCancelled=true', '&redirectCancelled=true');
$str_replace_to = array('-c-', '-p-', '-m-', 'index.php', 'index.php');
$str_replace_alternate = array('?redirectCancelled=true', '&redirectCancelled=true');
echo (defined('DIR_MOBILE_INCLUDES')? ' <meta http-equiv="Content-Type" content="text/html; charset=' . CHARSET . '" />'."\n" : '<meta http-equiv="Content-Type" content="text/html; charset=' . CHARSET . '">'."\n");
echo ' <title>' . $header_tags_array['title'] . '</title>' . "\n";
echo (defined('DIR_MOBILE_INCLUDES')? ' <meta name="Description" content="' . $header_tags_array['desc'] . '" />' . "\n" : ' <meta name="Description" content="' . $header_tags_array['desc'] . '">' . "\n");
echo (defined('DIR_MOBILE_INCLUDES')? ' <meta name="Keywords" content="' . $header_tags_array['keywords'] . '" />' . "\n" : ' <meta name="Keywords" content="' . $header_tags_array['keywords'] . '">' . "\n");
if ($defaultTags['meta_language']) { $langName = explode(",", $_SERVER["HTTP_ACCEPT_LANGUAGE"]); echo (defined('DIR_MOBILE_INCLUDES')? ' <meta http-equiv="Content-Language" content="' . $langName[0] . '" />'."\n" : ' <meta http-equiv="Content-Language" content="' . $langName[0] . '">'."\n"); }
if ($defaultTags['meta_google']) { echo (defined('DIR_MOBILE_INCLUDES')? ' <meta name="googlebot-mobile" content="all" />' . "\n" : ' <meta name="googlebot" content="all">' . "\n"); }
if ($defaultTags['meta_google']) { echo (defined('DIR_MOBILE_INCLUDES')? ' <meta name="googlebot" content="noindex, nofollow" />' . "\n" : ' <meta name="googlebot-mobile" content="noindex, nofollow">' . "\n"); }
if ($defaultTags['meta_google']) { echo (defined('DIR_MOBILE_INCLUDES')? ' <meta name="MSNBOT_Mobile" content="all" />' . "\n" : ' <meta name="bingbot" content="all">' . "\n"); }
if ($defaultTags['meta_google']) { echo (defined('DIR_MOBILE_INCLUDES')? ' <meta name="bingbot" content="noindex, nofollow" />' . "\n" : ' <meta name="MSNBOT_Mobile" content="noindex, nofollow">' . "\n"); }
if ($defaultTags['meta_google']) { echo (defined('DIR_MOBILE_INCLUDES')? ' <meta name="YahooSeeker/M1A1-R2D2" content="all" />' . "\n" : ' <meta name="slurp" content="all">' . "\n"); }
if ($defaultTags['meta_google']) { echo (defined('DIR_MOBILE_INCLUDES')? ' <meta name="slurp" content="noindex, nofollow" />' . "\n" : ' <meta name="YahooSeeker/M1A1-R2D2" content="noindex, nofollow">' . "\n"); }
if ($defaultTags['meta_noodp']) { echo (defined('DIR_MOBILE_INCLUDES')? ' <meta name="robots" content="noodp" />' . "\n" : ' <meta name="robots" content="noodp">' . "\n"); }
if ($defaultTags['meta_noydir']) { echo (defined('DIR_MOBILE_INCLUDES')? ' <meta name="robots" content="noydir" />' . "\n" : ' <meta name="robots" content="noydir">' . "\n"); }
if ($defaultTags['meta_revisit']) { echo (defined('DIR_MOBILE_INCLUDES')? ' <meta name="revisit-after" content="1 days" />' . "\n" : ' <meta name="revisit-after" content="1 days">' . "\n"); }
if ($defaultTags['meta_robots']) { echo (defined('DIR_MOBILE_INCLUDES')? '' : ' <meta name="robots" content="index, follow">' . "\n"); }
if ($defaultTags['meta_unspam']) { echo (defined('DIR_MOBILE_INCLUDES')? ' <meta name="no-email-collection" content="http://www.unspam.com/noemailcollection" />' . "\n" : ' <meta name="no-email-collection" content="http://www.unspam.com/noemailcollection">' . "\n"); }
if ($defaultTags['meta_replyto']) { echo (defined('DIR_MOBILE_INCLUDES')? ' <meta name="Reply-to" content="' . STORE_OWNER_EMAIL_ADDRESS . '" />' . "\n" : ' <meta name="Reply-to" content="' . STORE_OWNER_EMAIL_ADDRESS . '">' . "\n"); }
if ($defaultTags['meta_canonical']) { echo (defined('DIR_MOBILE_INCLUDES')? 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")) : 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"))); }
	 echo (defined('DIR_MOBILE_INCLUDES')? '' : ( ' <link rel="alternate" media="only screen and (max-width: 640px)" href="'. HTTP_SERVER . str_replace($str_replace_alternate, '', $mobile_url) .'">'. "\n"));
echo '<!-- EOF: Header Tags SEO Generated Meta Tags -->' . "\n";								
?>

 

 

The changes are:

 

- canonical on both sides

- "?redirectCancelled=true" stripped from the canonical URLs

- mentioned language corrections for index.php when SEO URLs are used.

- "<meta name="robots" content="index, follow" />" removed from mobile pages

 

Here the new result for the desktop index.php (in german to make clear the language part):

 

<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html dir="LTR" lang="de">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title></title>
<meta name="Description" content="">
<meta name="Keywords" content="">
<meta http-equiv="Content-Language" content="es-ES">
<meta name="googlebot" content="all">
<meta name="googlebot-mobile" content="noindex, nofollow">
<meta name="bingbot" content="all">
<meta name="MSNBOT_Mobile" content="noindex, nofollow">
<meta name="slurp" content="all">
<meta name="YahooSeeker/M1A1-R2D2" content="noindex, nofollow">
<meta name="robots" content="noodp">
<meta name="robots" content="noydir">
<meta name="revisit-after" content="1 days">
<meta name="robots" content="index, follow">
<meta name="no-email-collection" content="http://www.unspam.com/noemailcollection">
<link rel="canonical" href="http://www.sarplataygemas.com/index.php/de" />
<link rel="alternate" media="only screen and (max-width: 640px)" href="http://www.sarplataygemas.com/mobile_index.php/de">
<!-- EOF: Header Tags SEO Generated Meta Tags -->

 

Here the result for mobile_index.php:

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="de">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<meta name="Description" content="" />
<meta name="Keywords" content="" />
<meta http-equiv="Content-Language" content="es-ES" />
<meta name="googlebot-mobile" content="all" />
<meta name="googlebot" content="noindex, nofollow" />
<meta name="MSNBOT_Mobile" content="all" />
<meta name="bingbot" content="noindex, nofollow" />
<meta name="YahooSeeker/M1A1-R2D2" content="all" />
<meta name="slurp" content="noindex, nofollow" />
<meta name="robots" content="noodp" />
<meta name="robots" content="noydir" />
<meta name="revisit-after" content="1 days" />
<meta name="no-email-collection" content="http://www.unspam.com/noemailcollection" />
<link rel="canonical" href="http://www.sarplataygemas.com/index.php/de" />
<!-- EOF: Header Tags SEO Generated Meta Tags -->

 

Now one question left:

Do you think it makes sense to include both Meta tags for each bot,

the positive and negative instructions?

 

Example for google in desktop page:

 

<meta name="googlebot" content="all">
<meta name="googlebot-mobile" content="noindex, nofollow">

 

Example for google in mobile page:

 

<meta name="googlebot-mobile" content="all" />
<meta name="googlebot" content="noindex, nofollow" />

 

Or would it be enough to include only the positive instructions:

 

Example for google in desktop page:

 

<meta name="googlebot" content="all">

 

Example for google in mobile page:

 

<meta name="googlebot-mobile" content="all" />

 

 

Would you agree to update your Header Tags contribution support for iOSC with this new version?

 

regards

Rainer

 

Rainer, did you ever determine the correct answer regarding the positive/negative vs just positive meta tags?

 

Thanks again for the awesome support and work you've put into iOSC.


-Dave

Share this post


Link to post
Share on other sites

Rainer, did you ever determine the correct answer regarding the positive/negative vs just positive meta tags?

 

Thanks again for the awesome support and work you've put into iOSC.

 

Hello Dave,

 

First to apologize if I missed the correct forum for this subject.

 

For now I found this page:

http://www.mcanerin.com/EN/search-engine/robots-meta-tag.asp

 

Which says this and it sounds logic to me:

 

Important Note: Robots will treat the absence of a specific disallowing tag ("noindex" and/or "nofollow") as permission. Therefore if you do not use "noindex" for example, the robots will assume you mean "index".

For this reason, it's usually a waste of time to use the "index,follow" or "all" directives, since they are assumed already as a default. These are only useful when you wish to specify, for example, that all robots are to noindex,nofollow, but a specific robot (ie googlebot) is allowed to. In this case, you would put in something like this:

<meta name="robots" content="noindex,nofollow">

<meta name="googlebot" content="index,follow">

If you did not specifically tell Googlebot to index and follow, it would in this case assume that you did not want it to. This is the only scenario where the index and follow (and ALL) directives are used. SEO's who misuse metatags are in danger of losing both respect from their peers, and savvy clients who are checking their basic SEO abilities before hiring.

It won't hurt you to use the ALL or index,follow robots meta directives by itself, but it makes you look bad. You should know how to your your own tools.

 

So I'll do a bit more research, but for no I think the positive instructions should be removed.

 

regards

Rainer

Share this post


Link to post
Share on other sites

Rainer,

Wanted to let you know that the meta code you wrote for USU5 is working (mostly) perfectly well within Ultimate SEO 2.2d package as well. good work. I did make changes to these two lines like so:

$str_replace_from = array('-mc-', '-mi-', '-mby-', '-mpr-', '-mp-', '-mm-', 'mobile_catalogue.php', 'mobile_about.php', 'mobile_', '?redirectCancelled=true', '&redirectCancelled=true');
$str_replace_to = array('-c-', '-i-', '-by-', '-pr-', '-p-', '-m-', 'index.php', 'index.php');

 

The only issue I am seeing is with the added manufacturers code in the 5.4 upgrade. I am seeing

 

Click a manufacturer dropdown:

 

On desktop http://www.domain.com/themanufacturername-m-15.html

On Mobile http://www.domain.com/-mm-15.html

Click "back to categories" I see http://www.domain.com/-mm-.html

 

Some tweaking to do here....not sure what

 

Also, with that added review files, should this be removed from application top?

 

   if ($url_basename == 'reviews.php') {
				    $mobile_site = str_replace('reviews.php', 'mobile_catalogue.php', $_SERVER['REQUEST_URI']); // mobile_product_reviews.php would not work
    }

Edited by Roaddoctor

-Dave

Share this post


Link to post
Share on other sites

Rainer,

Wanted to let you know that the meta code you wrote for USU5 is working (mostly) perfectly well within Ultimate SEO 2.2d package as well. good work. I did make changes to these two lines like so:

$str_replace_from = array('-mc-', '-mi-', '-mby-', '-mpr-', '-mp-', '-mm-', 'mobile_catalogue.php', 'mobile_about.php', 'mobile_', '?redirectCancelled=true', '&redirectCancelled=true');
$str_replace_to = array('-c-', '-i-', '-by-', '-pr-', '-p-', '-m-', 'index.php', 'index.php');

 

The only issue I am seeing is with the added manufacturers code in the 5.4 upgrade. I am seeing

 

Click a manufacturer dropdown:

 

On desktop http://www.domain.com/themanufacturername-m-15.html

On Mobile http://www.domain.com/-mm-15.html

Click "back to categories" I see http://www.domain.com/-mm-.html

 

Some tweaking to do here....not sure what

 

Also, with that added review files, should this be removed from application top?

 

if ($url_basename == 'reviews.php') {
				 $mobile_site = str_replace('reviews.php', 'mobile_catalogue.php', $_SERVER['REQUEST_URI']); // mobile_product_reviews.php would not work
 }

 

Hello Dave,

 

I was very busy this week and hadn't a time to finish the SEO URL support update which is necessary for iOSC 5.4.

Here a fast fix until the update will be uploaded:

 

the redirect script in includes/application_top.php

should be changed for SEO URLs USU5:

from:

 

 //BEGIN : MOBILE iOSC REDIRECT_SCRIPT   
   if (MOBILE_SITE=='True'){
	 $url_basename = basename($PHP_SELF);
	 if ($url_basename == 'index.php')  {
		  if (USU5_ENABLED == 'true'){
			   if (strpos($_SERVER['REQUEST_URI'], '-c-') == FALSE) {
				    $mobile_url = $_SERVER['REQUEST_URI'];
				    $url_pagename = basename($PHP_SELF);
				    $mobile_site =  str_replace($url_pagename, 'mobile_' . $url_pagename, $mobile_url);
			   } else {

 

to:

 

//BEGIN : MOBILE iOSC REDIRECT_SCRIPT   
   if (MOBILE_SITE=='True'){
	 $url_basename = basename($PHP_SELF);
	 if ($url_basename == 'index.php')  {
		  if (USU5_ENABLED == 'true'){
		    //BOF manufacturer
					    if (strpos($_SERVER['REQUEST_URI'], '-m-') == TRUE) {
							    $mobile_site = str_replace('-m-', '-mm-', $_SERVER['REQUEST_URI']);						   
					    } else if (strpos($_SERVER['REQUEST_URI'], '-c-') == FALSE) {
			   //EOF manufacturer
				    $mobile_url = $_SERVER['REQUEST_URI'];
				    $url_pagename = basename($PHP_SELF);
				    $mobile_site =  str_replace($url_pagename, 'mobile_' . $url_pagename, $mobile_url);
			   } else {

 

I suppose for Ultimate SEO 2.2d this line would be different:

 

		  if (USU5_ENABLED == 'true'){

 

 

in mobile/includes/footer.php

and

mobile/includes/classes/header_title.php

 

The changes are:

 

from:

 

  $url_replace_from = array('mobile_', '-mp-', '-mc-', '-mpr-');
  $url_replace_to = array('', '-p-', '-c-', '-pr-');

 

to:

 

  $url_replace_from = array('mobile_', '-mp-', '-mc-', 'mm', '-mpr-', '-mpri-');
  $url_replace_to = array('', '-p-', '-c-', '-m-', '-pr-', '-pri-');

 

and in .htaccess

 

should be added:

 

 RewriteRule ^([a-z0-9/-]+)-mm-([0-9_]+).html$ mobile_catalogue.php [NC,L,QSA]
 RewriteRule ^([a-z0-9/-]+)-mpri-([0-9]+).html$ mobile_product_reviews_info.php [NC,L,QSA]

 

I hope I can finish during next week the complete update for SEO URL contripution support.

 

For your observation to:

"Also, with that added review files, should this be removed from application top?"

 

Thanks, that's right I forgot this.

Just uploaded the fix.

 

regards

Rainer

Share this post


Link to post
Share on other sites

I do use Ultimate SEO 2.2d, I have this in application_top.php. How would you modify for the manufacturer change you posted above?

 

 //BEGIN : MOBILE iOSC REDIRECT_SCRIPT   SEO URLs 2.2d modified 12/3/2012 by Raiwa
    if (MOBILE_SITE=='True'){
			 $url_basename = basename($PHP_SELF);
			 if ($url_basename == 'index.php')  {
							 if (SEO_ENABLED == 'true'){
											 if (strpos($_SERVER['REQUEST_URI'], '-c-') == TRUE) {
															 $info_box_replace = array('?infoBox=0', '?infoBox=1', '?infoBox=2', '?infoBox=3', '?infoBox=4', '?infoBox=5', '?infoBox=6', '?infoBox=7', '?infoBox=8', '?infoBox=9');
															 $url = str_replace($info_box_replace, '', ($_SERVER['REQUEST_URI']));
															 $url_category_ids = str_replace('-', '', strrchr (basename($_SERVER['REQUEST_URI']), '-c-'));
															 $url_category_id = str_replace('_', '', strrchr (basename($_SERVER['REQUEST_URI']), '_'));
															 if (!empty($url_category_id)) {
																			 $url = str_replace($url_category_ids, '', $url);
															 }
															 $mobile_site = str_replace('-c-', '-mc-', $url) . $url_category_id;
											 } elseif (strpos($_SERVER['REQUEST_URI'], '-m-') == TRUE) {
															 $info_box_replace = array('?infoBox=0', '?infoBox=1', '?infoBox=2', '?infoBox=3', '?infoBox=4', '?infoBox=5', '?infoBox=6', '?infoBox=7', '?infoBox=8', '?infoBox=9');
															 $url = str_replace($info_box_replace, '', ($_SERVER['REQUEST_URI']));
															 $url_category_ids = str_replace('-', '', strrchr (basename($_SERVER['REQUEST_URI']) , '-m-'));
															 $url_category_id = str_replace('_', '', strrchr (basename($_SERVER['REQUEST_URI']) , '_'));
															 if (!empty($url_category_id)) {
																					 $url = str_replace($url_category_ids, '', $url);
															 }
															 $mobile_site = str_replace('-m-', '-mm-', $url) . $url_category_id;
											 } else {
															 $mobile_url = $_SERVER['REQUEST_URI'];
															 $url_pagename = basename($PHP_SELF);
															 $mobile_site =  str_replace($url_pagename, 'mobile_' . $url_pagename, $mobile_url);
											 }
							 } else {
											 if (strpos($_SERVER['REQUEST_URI'], 'cPath=') == FALSE) {
															 $mobile_site = 'mobile_index.php'; 
											 } else {
															 $info_box_replace = array('infoBox=0&', 'infoBox=1&', 'infoBox=2&', 'infoBox=3&', 'infoBox=4&', 'infoBox=5&', 'infoBox=6&', 'infoBox=7&', 'infoBox=8&', 'infoBox=9&');
															 $url = str_replace($info_box_replace, '', $_SERVER['REQUEST_URI']);
															 $url_category_ids = str_replace('cPath=', '', strrchr ($_SERVER['REQUEST_URI'] , 'cPath='));
															 $url_category_id = (strpos($url_category_ids,'_') > 0) ? str_replace('_', '', strrchr ($_SERVER['REQUEST_URI'] , '_')) : str_replace('cPath=', '', strrchr ($_SERVER['REQUEST_URI'] , 'cPath='));
															 $url = str_replace($url_category_ids, '', $url);
															 $mobile_site = str_replace('index.php', 'mobile_catalogue.php', $url) . $url_category_id;
											 }
							 }
							 if ($mobile_site == DIR_WS_HTTP_CATALOG){
											 $mobile_site .= 'mobile_index.php';
							 }													 
			 }	 

    if ($url_basename == 'product_info.php') {
		    if (SEO_ENABLED == 'true'){
										    $mobile_site = str_replace('-p-', '-mp-', $_SERVER['REQUEST_URI']);
		    }	  
    }	  
    if ($url_basename == 'product_reviews.php') {
		    if (SEO_ENABLED == 'true'){
										    $mobile_site = str_replace('-pr-', '-mpr-', $_SERVER['REQUEST_URI']);
		    }	  
    }	  
    if ($url_basename == 'information.php') {
		    if (SEO_ENABLED == 'true'){
										    $mobile_site = str_replace('-i-', '-mi-', $_SERVER['REQUEST_URI']);
		    }	  
    }	  
    if ($url_basename == 'all-products.php') {
		    if (SEO_ENABLED == 'true'){
								   $mobile_site = str_replace('all-products.php', 'mobile_all-products.php', $_SERVER['REQUEST_URI']);
										    $mobile_site = str_replace('-by-', '-mby-', $mobile_site);
		    }	  
    }	  
    if ($url_basename == 'featured_products.php') {
										    $mobile_site = str_replace('featured_products.php', 'mobile_index.php', $_SERVER['REQUEST_URI']);
		    }	  
    if ($url_basename == 'recently_viewed.php') {
										    $mobile_site = str_replace('recently_viewed.php', 'mobile_index.php', $_SERVER['REQUEST_URI']);
		    }

Edited by Roaddoctor

-Dave

Share this post


Link to post
Share on other sites

RewriteRule ^([a-z0-9/-]+)-mm-([0-9_]+).html$ mobile_catalogue.php [NC,L,QSA]
RewriteRule ^([a-z0-9/-]+)-mpri-([0-9]+).html$ mobile_product_reviews_info.php [NC,L,QSA]

 

I have this currently - your rewrite format looks different than anything I have in .htaccess so I want to confirm your change is correct for me....

 

RewriteBase /
RewriteRule ^(.*)-p-(.*).html$ product_info.php?products_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-c-(.*).html$ index.php?cPath=$2&%{QUERY_STRING}
RewriteRule ^(.*)-m-(.*).html$ index.php?manufacturers_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-pi-(.*).html$ popup_image.php?pID=$2&%{QUERY_STRING}
RewriteRule ^(.*)-by-(.*).html$ all-products.php?fl=$2&%{QUERY_STRING}
# IOSC mobile site
RewriteRule ^(.*)-mby-(.*).html$ mobile_all-products.php?fl=$2&%{QUERY_STRING}
RewriteRule ^(.*)-t-(.*).html$ articles.php?tPath=$2&%{QUERY_STRING}
RewriteRule ^(.*)-a-(.*).html$ article_info.php?articles_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-au-(.*).html$ articles.php?authors_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-pr-(.*).html$ product_reviews.php?products_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-pri-(.*).html$ product_reviews_info.php?products_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-f-(.*).html$ faqdesk_info.php?faqdesk_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-fc-(.*).html$ faqdesk_index.php?faqPath=$2&%{QUERY_STRING}
RewriteRule ^(.*)-fri-(.*).html$ faqdesk_reviews_info.php?faqdesk_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-fra-(.*).html$ faqdesk_reviews_article.php?faqdesk_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-i-(.*).html$ information.php?info_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-links-(.*).html$ links.php?lPath=$2&%{QUERY_STRING}
RewriteRule ^(.*)-pm-([0-9]+).html$ info_pages.php?pages_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-n-(.*).html$ newsdesk_info.php?newsdesk_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-nc-(.*).html$ newsdesk_index.php?newsPath=$2&%{QUERY_STRING}
RewriteRule ^(.*)-nri-(.*).html$ newsdesk_reviews_info.php?newsdesk_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-nra-(.*).html$ newsdesk_reviews_article.php?newsdesk_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-po-([0-9]+).html$ pollbooth.php?pollid=$2&%{QUERY_STRING}
# IOSC mobile site
RewriteRule ^(.*)-mp-(.*).html$ mobile_product_info.php?products_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-mc-(.*).html$ mobile_catalogue.php?cPath=$2&%{QUERY_STRING}
RewriteRule ^(.*)-mm-(.*).html$ mobile_catalogue.php?manufacturers_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-mpi-(.*).html$ mobile_popup_image.php?pID=$2&%{QUERY_STRING}
RewriteRule ^(.*)-mpr-(.*).html$ mobile_product_reviews.php?products_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-mprw-(.*).html$ mobile_product_reviews_write.php?products_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-mi-(.*).html$ mobile_information.php?info_id=$2&%{QUERY_STRING}

 

Do I add your two lines as suggested? or ??


-Dave

Share this post


Link to post
Share on other sites

Sorry - but does this look correct as well... just being careful here. (live site)

as revised:

  $url_replace_from = array('mobile_', '-mp-', '-mc-', '-mpr-', '-mprw-', '-mm-', '-mi-', '-mby-', '-mpri-');
  $url_replace_to = array('', '-p-', '-c-', '-pr-', '-pri-', '-m-', '-i-', '-by-', '-pri-');


-Dave

Share this post


Link to post
Share on other sites

Sorry - but does this look correct as well... just being careful here. (live site)

as revised:

$url_replace_from = array('mobile_', '-mp-', '-mc-', '-mpr-', '-mprw-', '-mm-', '-mi-', '-mby-', '-mpri-');
$url_replace_to = array('', '-p-', '-c-', '-pr-', '-pri-', '-m-', '-i-', '-by-', '-pri-');

 

The application top for your Ultimate SEO 2.2d should be already prepared for the manufacturer listings.

So no changes needed there.

The other changes seem fine for me.

Please try all redirects to be sure, I had no time for now to test everything.

 

regards

Rainer

Share this post


Link to post
Share on other sites

Hi there i was hoping someone could help me i have just installed this on my site and the mobile site works fine when viewing it on my laptop however whenever i try to view it on my iphone it automatically redirects to the page .org.uk/mobile_. what have i done wrong? please help many thanks.

Share this post


Link to post
Share on other sites

All my redirects seem to be working except:desktop to mobile from the individual review page

 

From Desktop url : /...-pri-28.html?reviews_id=33

Clicking Mobile loops back to desktop page

 

From mobile url:

/mobile_product_reviews_info.php?products_id=28&reviews_id=34

Clicking Classic goes to /...-pri-28.html?redirectCancelled=true&reviews_id=34 and works fine

 

pr to mpr and mpr to pr works fine

 

What did I miss?


-Dave

Share this post


Link to post
Share on other sites

Hi there i was hoping someone could help me i have just installed this on my site and the mobile site works fine when viewing it on my laptop however whenever i try to view it on my iphone it automatically redirects to the page .org.uk/mobile_. what have i done wrong? please help many thanks.

 

Check that you uploaded and updated /mobile/includes/classes/mobile_redirect.php

 

at line it 7 should look something like this

 

//BEGIN detectmobilebrowser 06 of january 2013 (copy and paste only line 3 from detectmobilebrowser.php)
 if(preg_match('/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i',$useragent)||preg_match('/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i',substr($useragent,0,4)))
//END detectmobilebrowser (copy and paste only line 3)


-Dave

Share this post


Link to post
Share on other sites

Check that you uploaded and updated /mobile/includes/classes/mobile_redirect.php

 

at line it 7 should look something like this

 

//BEGIN detectmobilebrowser 06 of january 2013 (copy and paste only line 3 from detectmobilebrowser.php)
 if(preg_match('/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i',$useragent)||preg_match('/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i',substr($useragent,0,4)))
//END detectmobilebrowser (copy and paste only line 3)

 

I just checked it i have done that bit correctly :( ive redone it to be sure and i get the same problem any other ideas? thanks for the help btw

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

×