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

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

Recommended Posts

 

Hello Fabio @@fozzo,

 

Ok i got it, it was because of the seo url.

 

You didn't read my Start Here doc??

 

IMPORTANT NOTE:

For installation in subdirectory “mobile/”, finish “Install_osc_2_2.doc” or Install_osc_2_3.doc” before testing the mobile files.

For installation under subdomain finish also “Configure_ subdomain.doc” before testing the mobile files.

If you are using SEO URL, finish also “SEO URL” support installation included in the Add-On support package before testing the mobile redirects.

If you are using an image thumbnail add-on, finish also “image thumbnail” add-on support installation included in the Add-On support package before testing the mobile images.

 

 

@@raiwa

Hi raiwa,

i'm testing the mobile site on some devices. Actually iPhone 6 have a little problem, the products page make the vertical view with three columns but all the cell are really screwed because they would need more space. How can i handle it to make it view only 1 column instead of 3?

 

Please see Install doc at the end:

Point 2. in: Admin/Configuration/Mobile Site

 

Columns in product listing

and

Responsive Breakpoint for product listing

 

However the product listing should be responsive and show always one column if the screen width is below the defined breakpoint width.

 

Kind regards

Rainer

Edited by raiwa

Share this post


Link to post
Share on other sites

Hello Fabio @@fozzo,

 

 

You didn't read my Start Here doc??

 

IMPORTANT NOTE:

For installation in subdirectory “mobile/”, finish “Install_osc_2_2.doc” or Install_osc_2_3.doc” before testing the mobile files.

For installation under subdomain finish also “Configure_ subdomain.doc” before testing the mobile files.

If you are using SEO URL, finish also “SEO URL” support installation included in the Add-On support package before testing the mobile redirects.

If you are using an image thumbnail add-on, finish also “image thumbnail” add-on support installation included in the Add-On support package before testing the mobile images.

 

 

 

Please see Install doc at the end:

Point 2. in: Admin/Configuration/Mobile Site

 

Columns in product listing

and

Responsive Breakpoint for product listing

 

However the product listing should be responsive and show always one column if the screen width is below the defined breakpoint width.

 

Kind regards

Rainer

 

Yeah i read the documentation, but i must have skipped a row where you explain about seo and support package.

 

I see the max width, i'm gonna play with it

Thanks.

Share this post


Link to post
Share on other sites

Thanks Rainer for your response. Here is the fifle "devicelist.php"

<?php
/* Update Instructions:
   - Download the newest version of detectmobilebrowser.php at:   
     http://detectmobilebrowsers.com/
     (click on the 'php'-button to start download)
   - open the file 'detectmobilebrowser.php.txt' you downloaded and copy only the 3rd line which begins with:
     if(preg_match('/android.+mobile|avantgo|bada\/|blackbe.........................bstr($useragent,0,4)))
   - replace line 15 of this file with the line you copied.
*/
// Detect Mobile Device
  function smartphone() {
    $smartphone = false;
    $useragent=$_SERVER['HTTP_USER_AGENT'];
//BEGIN detectmobilebrowser 04 september 2014 (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|mobile.+firefox|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|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)
	{
	  $smartphone = true;
	}
      return $smartphone;
  }
?>

Hello Kira @@Andromeda100,

 

Could you please post your modified file.

Share this post


Link to post
Share on other sites

Hello Kira @@Andromeda100,

 

This works for me without any problem and is identical with the devicelist included in the last version.

There must be another error.

Can you send me your store URL in a private message if you like, and I'll have a look on your store.

 

Kind regards

Rainer

Share this post


Link to post
Share on other sites

Hello @@raiwa

 

For clarifications:

 

 

PS. Installing SEO Support (5 min.) as per instructions did it, and could also turn on "ajax page load' in the mobile config ... Now lets look at SPPC ;-)

 

Hello @raiwa

 

All installed so far as per instruction including SPPC except a few little teawks.

It took some time updating Header Tags by reinstalling to full 3.3.0 version for now.

 

Now, remains the "images". Could you please give advice on why images in the catalog/images folder get

resized even on the classic shop ?

 

I cant get online because actually lots of original images get now resized even on the classic side

and get so small to almost invisible  by successive refresh of the pages (index / product_info)  :(

I think on this shop I ve nothing more than the  core Osc 2.2rc2a  image contribution, nothing really special,

except for additionnal images (ultra pics) that I can show underneath product descriptions:

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

 

Would very much appreciate your hint. Of course I read the instructions, but would really prefer

not having to change the image methods.

 

Thanks very much for you help + Kind regards


david

Share this post


Link to post
Share on other sites

Hello David @@Eim2,

 

Mobile installation should not have effect on your classic store side. Could you please post your store URL and I'll have a look on it.

You can send me a private message if you do not wish to publish your store URL.

 

regards

Rainer

Share this post


Link to post
Share on other sites

Hello

 

Hello David @@Eim2,

 

Mobile installation should not have effect on your classic store side. Could you please post your store URL and I'll have a look on it.

You can send me a private message if you do not wish to publish your store URL.

 

regards

Rainer

 

Hello@@raiwa

 

the url is w w w . b o u c l e s - en - l i g n e . c h   but as said iOSC is not uploaded yet

due to this resizing on catalog side. If needed I can PM the files you would like to

check and / or a print screen of categories listings which show quiet clearly the images

get near to microscopic size. Please dont look at the german front page it is too ugly ;-)

( language switch in the header far right ) I dont maintain the german side of the shop.

 

Thanks very much for you help + Kind regards


david

Share this post


Link to post
Share on other sites

Hello

 

 

Hello@@raiwa

 

the url is w w w . b o u c l e s - en - l i g n e . c h   but as said iOSC is not uploaded yet

due to this resizing on catalog side. If needed I can PM the files you would like to

check and / or a print screen of categories listings which show quiet clearly the images

get near to microscopic size. Please dont look at the german front page it is too ugly ;-)

( language switch in the header far right ) I dont maintain the german side of the shop.

 

Thanks very much for you help + Kind regards

 

 

Hello Rainer,

 

I think I found it, nothing to do with iOSC! I changed a ligne in functions/html_output to get rid of PHP errors on the  local server :

 //    $newName = eregi_replace( '\.([a-z]{3,4})', "-{$width}x{$height}.jpg", $src );
$newName = preg_replace( '/\.([a-z]{3,4})/', "-{$width}x{$height}.jpg", $src );

I apparently wrongly handled the preg_replace function  :blush:  !! I ll continue testing and revert if still problems and get it online asap.

 

Thanks anyways a lot for your help so far.

Kind regards, David

 


david

Share this post


Link to post
Share on other sites

First thanks to Rainer for his excellent contrib. Just going to post a workaround I found for SPPC with Hide Categories and Products as this has been the only thing stopping me using this in the past. Please note I am NOT a coder! All at your own risk! Additionally I can't get the search to work. it's too restrictive if anyone can help further with this please. So to ensure only the categories and products show per SPPC on 2.3.4.only:

 

In catalog_mb.php find first listing_sql and paste this above it as per current SPPC instructions:

 

// BOF Separate Price Per Customer
// global variable (session): $sppc_customers_group_id -> local variable $customer_group_id
if(!tep_session_is_registered('sppc_customer_group_id')) {$customer_group_id = '0';
} else {
$customer_group_id = $sppc_customer_group_id;
}
// EOF SPPC   

Then find this line:

$listing_sql .= " and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'";

and directly below it paste this line:

// BOF SPPC Hide products and categories from groups
        $listing_sql .= " and find_in_set('".$customer_group_id."', products_hide_from_groups) = 0 ";
// EOF SPPC Hide products and categories from groups

Do this for the other files mentioned: specials.php and products_new.php

 

Then in login.php compare your login file with one below and add the SPPC and Hide Categories bit:

<?php
require_once('includes/application_top.php');
// redirect the customer to a friendly cookie-must-be-enabled page if cookies are disabled (or the session has not started)
  if ($session_started == false) {
    tep_redirect(tep_mobile_link(FILENAME_COOKIE_USAGE));
  }

  require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_LOGIN);

  $error = false;
  if (isset($HTTP_GET_VARS['action']) && ($HTTP_GET_VARS['action'] == 'process')) {
    $email_address = tep_db_prepare_input($HTTP_POST_VARS['email_address']);
    $password = tep_db_prepare_input($HTTP_POST_VARS['password']);

// Check if email exists
// BOF Separate Pricing per Customer
    $check_customer_query = tep_db_query("select customers_id, customers_firstname, customers_group_id, customers_password, customers_email_address, customers_default_address_id, customers_specific_taxes_exempt from " . TABLE_CUSTOMERS . " where customers_email_address = '" . tep_db_input($email_address) . "'");
// EOF Separate Pricing Per Customer

    if (!tep_db_num_rows($check_customer_query)) {
      $error = true;
    } else {
      $check_customer = tep_db_fetch_array($check_customer_query);
// Check that password is good
      if (!tep_validate_password($password, $check_customer['customers_password'])) {
        $error = true;
      } else {
        if (SESSION_RECREATE == 'True') {
          tep_session_recreate();
        }
// BOF Separate Pricing Per Customer: choice for logging in under any customer_group_id
// note that tax rates depend on your registered address!
if ($_POST['skip'] != 'true' && $_POST['email_address'] == SPPC_TOGGLE_LOGIN_PASSWORD ) {
   $existing_customers_query = tep_db_query("select customers_group_id, customers_group_name from " . TABLE_CUSTOMERS_GROUPS . " order by customers_group_id ");
echo '<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">';
print ("\n<html ");
echo HTML_PARAMS;
print (">\n<head>\n<title>Choose a Customer Group</title>\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=");
echo CHARSET;
print ("\"\n<base href=\"");
echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG;
print ("\">\n<link rel=\"stylesheet\" type=\"text/css\" href=\"stylesheet.css\">\n");
echo '<body bgcolor="#ffffff" style="margin:0">';
print ("\n<table border=\"0\" width=\"100%\" height=\"100%\">\n<tr>\n<td style=\"vertical-align: middle\" align=\"middle\">\n");
echo tep_draw_form('login', tep_href_link(FILENAME_LOGIN, 'action=process', 'SSL'));
print ("\n<table border=\"0\" bgcolor=\"#f1f9fe\" cellspacing=\"10\" style=\"border: 1px solid #7b9ebd;\">\n<tr>\n<td class=\"main\">\n");
  $index = 0;
  while ($existing_customers =  tep_db_fetch_array($existing_customers_query)) {
 $existing_customers_array[] = array("id" => $existing_customers['customers_group_id'], "text" => " ".$existing_customers['customers_group_name']." ");
    ++$index;
  }
print ("<h1>Choose a Customer Group</h1>\n</td>\n</tr>\n<tr>\n<td align=\"center\">\n");
echo tep_draw_pull_down_menu('new_customers_group_id', $existing_customers_array, $check_customer['customers_group_id']);
print ("\n<tr>\n<td class=\"main\"> <br />\n ");
print ("<input type=\"hidden\" name=\"email_address\" value=\"".$_POST['email_address']."\">");
print ("<input type=\"hidden\" name=\"skip\" value=\"true\">");
print ("<input type=\"hidden\" name=\"password\" value=\"".$_POST['password']."\">\n</td>\n</tr>\n<tr>\n<td align=\"right\">\n");
echo tep_image_submit('button_continue.gif', IMAGE_BUTTON_CONTINUE);
print ("</td>\n</tr>\n</table>\n</form>\n</td>\n</tr>\n</table>\n</body>\n</html>\n");
exit;
}
// EOF Separate Pricing Per Customer: choice for logging in under any customer_group_id

// migrate old hashed password to new phpass password
        if (tep_password_type($check_customer['customers_password']) != 'phpass') {
          tep_db_query("update " . TABLE_CUSTOMERS . " set customers_password = '" . tep_encrypt_password($password) . "' where customers_id = '" . (int)$check_customer['customers_id'] . "'");
        }

        $check_country_query = tep_db_query("select entry_country_id, entry_zone_id from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . (int)$check_customer['customers_id'] . "' and address_book_id = '" . (int)$check_customer['customers_default_address_id'] . "'");
        $check_country = tep_db_fetch_array($check_country_query);

        $customer_id = $check_customer['customers_id'];
        $customer_default_address_id = $check_customer['customers_default_address_id'];
        $customer_first_name = $check_customer['customers_firstname'];
// BOF Separate Pricing Per Customer
	      $customers_specific_taxes_exempt = $check_customer['customers_specific_taxes_exempt'];
	if ($_POST['skip'] == 'true' && $_POST['email_address'] == SPPC_TOGGLE_LOGIN_PASSWORD && isset($_POST['new_customers_group_id']))  {
	  $sppc_customer_group_id = $_POST['new_customers_group_id'] ;
	  $check_customer_group_tax = tep_db_query("select customers_group_show_tax, customers_group_tax_exempt, group_specific_taxes_exempt from " . TABLE_CUSTOMERS_GROUPS . " where customers_group_id = '" .(int)$_POST['new_customers_group_id'] . "'");
	} else {
	  $sppc_customer_group_id = $check_customer['customers_group_id'];
	  $check_customer_group_tax = tep_db_query("select customers_group_show_tax, customers_group_tax_exempt, group_specific_taxes_exempt from " . TABLE_CUSTOMERS_GROUPS . " where customers_group_id = '" .(int)$check_customer['customers_group_id'] . "'");
	}
	$customer_group_tax = tep_db_fetch_array($check_customer_group_tax);
	$sppc_customer_group_show_tax = (int)$customer_group_tax['customers_group_show_tax'];
	$sppc_customer_group_tax_exempt = (int)$customer_group_tax['customers_group_tax_exempt'];
	$group_specific_taxes_exempt = $customer_group_tax['group_specific_taxes_exempt'];
	if (tep_not_null($customers_specific_taxes_exempt)) {
		$sppc_customer_specific_taxes_exempt = $customers_specific_taxes_exempt;
	} elseif (tep_not_null($group_specific_taxes_exempt)) {
		$sppc_customer_specific_taxes_exempt = $group_specific_taxes_exempt;
	} else {
		$sppc_customer_specific_taxes_exempt = '';
	}
	// EOF Separate Pricing Per Customer
        $customer_country_id = $check_country['entry_country_id'];
        $customer_zone_id = $check_country['entry_zone_id'];
        tep_session_register('customer_id');
        tep_session_register('customer_default_address_id');
        tep_session_register('customer_first_name');
// BOF Separate Pricing per Customer
	tep_session_register('sppc_customer_group_id');
	tep_session_register('sppc_customer_group_show_tax');
	tep_session_register('sppc_customer_group_tax_exempt');
	if (tep_not_null($sppc_customer_specific_taxes_exempt)) {
		tep_session_register('sppc_customer_specific_taxes_exempt');
	}
// EOF Separate Pricing per Customer
        tep_session_register('customer_country_id');
        tep_session_register('customer_zone_id');

        tep_db_query("update " . TABLE_CUSTOMERS_INFO . " set customers_info_date_of_last_logon = now(), customers_info_number_of_logons = customers_info_number_of_logons+1, password_reset_key = null, password_reset_date = null where customers_info_id = '" . (int)$customer_id . "'");

// reset session token
        $sessiontoken = md5(tep_rand() . tep_rand() . tep_rand() . tep_rand());

// restore cart contents
        $cart->restore_contents();

        if (sizeof($navigation->snapshot) > 0) {
          $origin_href = tep_mobile_link($navigation->snapshot['page'], tep_array_to_string($navigation->snapshot['get'], array(tep_session_name())), $navigation->snapshot['mode']);
          $navigation->clear_snapshot();
          tep_redirect($origin_href);
        } else {
          tep_redirect(tep_mobile_link(FILENAME_DEFAULT));
        }
      }
    }
  }

  if ($error == true) {
    $messageStack->add('login', TEXT_LOGIN_ERROR);
  }

  $breadcrumb->add(NAVBAR_TITLE, tep_mobile_link(FILENAME_LOGIN, '', 'SSL'));

  require(DIR_MOBILE_INCLUDES . 'header.php');
  $headerTitle->write();
?>
<div id="iphone_content">
	<div id="messageStack">
	<?php
	  if ($messageStack->size('login') > 0) {
		echo $messageStack->output('login');
	  }
	?>
	</div>
	<div id="returning_cust">
		<h1><?php echo HEADING_RETURNING_CUSTOMER; ?></h1>
		<?php echo tep_draw_form('login', tep_mobile_link(FILENAME_LOGIN, 'action=process', 'SSL')); ?>
	
			<label for="email_address"><?php echo ENTRY_EMAIL_ADDRESS; ?></label>
			<?php echo tep_input_jquery('email_address'); ?>

			<label for="password"><?php echo ENTRY_PASSWORD; ?></label>
			<?php echo tep_draw_password_field('password','','id="password" data-theme="a"'); ?>
		
		<div class="bouton">
		<?php
		echo  tep_button_jquery( IMAGE_BUTTON_FORGOT_PASS , tep_mobile_link(FILENAME_PASSWORD_FORGOTTEN, '', 'SSL') , 'b' , 'button' , 'data-icon="info" data-inline="true" data-ajax="false"' );
		echo  tep_button_jquery( IMAGE_BUTTON_LOGIN , '', 'b' , 'submit' , 'data-icon="arrow-r" data-iconpos="right" data-inline="true"' );
		?>
		</div>
		</form>
	</div>
	<div id="new_cust">
		<h1><?php echo HEADING_NEW_CUSTOMER; ?></h1>
		<?php echo TEXT_NEW_CUSTOMER_INTRODUCTION; ?>
		<div class="bouton">
		<?php echo  tep_button_jquery( IMAGE_BUTTON_CREATE_ACCOUNT , tep_mobile_link(FILENAME_CREATE_ACCOUNT, '', 'SSL'), 'b' , 'button' , 'data-icon="arrow-r" data-iconpos="right" data-inline="true" ' ); ?>
		</div>
	</div>
<?php
if( JQUERY_MOBILE_VALIDATE == 'True')
require(DIR_MOBILE_INCLUDES. 'form_check.js.php');
else
require(DIR_WS_INCLUDES . 'form_check.js.php');

 require(DIR_MOBILE_INCLUDES . 'footer.php');
?> 

Do the same for your logoff.php with this:

<?php
require_once('includes/application_top.php');
require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_LOGOFF);

  $breadcrumb->add(NAVBAR_TITLE);

  tep_session_unregister('customer_id');
  tep_session_unregister('customer_default_address_id');
  tep_session_unregister('customer_first_name');
// BOF Separate Pricing Per Customer
  tep_session_unregister('sppc_customer_group_id');
  tep_session_unregister('sppc_customer_group_show_tax');
  tep_session_unregister('sppc_customer_group_tax_exempt');
  if (tep_session_is_registered('sppc_customer_specific_taxes_exempt')) { tep_session_unregister('sppc_customer_specific_taxes_exempt');
  }
// EOF Separate Pricing Per Customer
  tep_session_unregister('customer_country_id');
  tep_session_unregister('customer_zone_id');

  if ( tep_session_is_registered('sendto') ) {
    tep_session_unregister('sendto');
  }

  if ( tep_session_is_registered('billto') ) {
    tep_session_unregister('billto');
  }

  if ( tep_session_is_registered('shipping') ) {
    tep_session_unregister('shipping');
  }

  if ( tep_session_is_registered('payment') ) {
    tep_session_unregister('payment');
  }

  if ( tep_session_is_registered('comments') ) {
    tep_session_unregister('comments');
  }

  if ( tep_session_is_registered('mobilesession') ) {
    tep_session_unregister('mobilesession');
  }

  $cart->reset();
require(DIR_MOBILE_INCLUDES . 'header.php');
$headerTitle->write();
?>
<div id="iphone_content">
	<div id="cms">
		<?php echo TEXT_MAIN; ?>
		<div id="bouton">
<?php 
			echo tep_button_jquery(IMAGE_BUTTON_CONTINUE , tep_mobile_link(FILENAME_DEFAULT, '', 'NONSSL'), 'b' , 'button' , ' data-icon="arrow-r" data-iconpos="right" data-ajax="false"' );
?>
		</div>
	</div>
<?php require(DIR_MOBILE_INCLUDES . 'footer.php');
?> 

You'll also have to make some changes to the mobile product_info.php file too just compare with your existing main catalog version.

 

It all works except advanced search/search. Hope this helps someone! 

 

Lorraine

 

Share this post


Link to post
Share on other sites

Hello Lorraine @@herbsandhelpers,

 

Thank you very much for sharing this. The changes for search and advanced search are in advanced_search_result.php.

Just compare with the SPPC changes made in the main advanced_search_result.php file.

If you get this to work, it would be great if you could update the SPPC Support in the iosc Contibution Support package with your work.

 

Thanks again

Rainer

Share this post


Link to post
Share on other sites

Hello again.

 

After being pulled away from this project for a while, I am back with another problem.  On the desktop version of my site, during checkout, I get:

 

Fatal error: Call to undefined function tep_mobile_link() in /mypath/catalog/checkout_payment.php on line 83

 

The offending code:

77:// load all enabled payment modules
78:  require(DIR_WS_CLASSES . 'payment.php');
79:  $payment_modules = new payment;
80:
81:  require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CHECKOUT_PAYMENT);
82:
83:  $breadcrumb->add(NAVBAR_TITLE_1, tep_mobile_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'));
84:  $breadcrumb->add(NAVBAR_TITLE_2, tep_mobile_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'));

I have gone through the installation instructions again (twice), verifying that everything is set up correctly, and I don't see any problems.  (Naturally, that doesn't mean this isn't some stupid mistake I've made.)

 

I do see that tep_mobile_link() is defined in mobile/includes/functions/general.php, and one version of general.php or the other is included from application_top.php.

I tried forcing the mobile version to be included, but that gave me other errors.  I tried copying the definition of tep_mobile_link (wrapped in "if (!function_exists...") into the other general.php, and even into checkout_payment.php, but those generated other errors as well.

 

The mobile version of the site seems to work OK.

 

Any help or thoughts would be much appreciated.

 

Thank you.

Share this post


Link to post
Share on other sites

 

After being pulled away from this project for a while, I am back with another problem.  On the desktop version of my site, during checkout, I get:

 

 

The offending code:

83:  $breadcrumb->add(NAVBAR_TITLE_1, tep_mobile_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'));
84:  $breadcrumb->add(NAVBAR_TITLE_2, tep_mobile_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'));

tep_mobile_link should not be used in any main store file. You may have copied a wrong file to your main store or made a modification in the wrong file.

It should be:

  $breadcrumb->add(NAVBAR_TITLE_1, tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'));
  $breadcrumb->add(NAVBAR_TITLE_2, tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'));

Share this post


Link to post
Share on other sites

@@raiwa

Hi Rayner

 

I'm experiencing the same problem as i had for multiple columns showing on iphone 6. Now it is happening when i search. The page which is used is number 0 so the same as product listing. Is there anything else that i didn't understand to let the view being only one column? the breakpoint is set to 25 but still i got three columns when searching from iphone. Any idea?

Thanks in advance.

Share this post


Link to post
Share on other sites

Hello,

 

I just installed this contribution and i really like it, but i have a problem with  includes/application_top.php

 

When i add the followng code to includes/application_top.php, nothng works at all - the site is a blank screen,

   define(DIR_MOBILE_CLASSES , 'mobile/includes/classes/');
   require(DIR_MOBILE_CLASSES . 'mobile_redirect.php');
   $mobileRedirect = new mobileRedirect;

 

but without these lines  everythng works except when I click on a product it goes to a non-moble site:
 

My site verson is v2.2 RC2a with Ultimate Seo Urls 5, canonical and SSL installed

I installed Support. 4.3.  MOsC 7.5.x   -->   standard_Ultimate Seo Urls 5 PRO ( r205 )

 

My .htaccess

 

Options +SymLinksIfOwnerMatch
RewriteEngine on
RewriteBase /
RewriteRule googlebaseOut.txt googlebase.php
# redirect
# For security reasons, Option followsymlinks cannot be overridden.
#Options +FollowSymLinks
Options +SymLinksIfOwnerMatch
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www.MYSITENAME\.com$ [NC]
RewriteRule ^(.*)$ http://MYSITENAME.com/$1 [R=301,L]
## end redirect

## Error process
ErrorDocument 404 /includes/modules/ultimate_seo_urls5/includes/notfound_404.php

## ULTIMATE SEO 5
## If you are getting errors you may need to comment this out like ..
## Options +FollowSymLinks
# For security reasons, Option followsymlinks cannot be overridden.
#Options +FollowSymLinks
Options +SymLinksIfOwnerMatch
<IfModule mod_rewrite.c>
  RewriteEngine On
#
RewriteBase /
#
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\ HTTP/
RewriteRule ^index\.php$ http://MYSITENAME/ [R=301,L]
#
RewriteRule ^(.*)-p-([0-9]+).html$ product_info.php?products_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-c-([0-9_]+).html$ index.php?cPath=$2&%{QUERY_STRING}
RewriteRule ^(.*)-m-([0-9]+).html$ index.php?manufacturers_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-pi-([0-9]+).html$ popup_image.php?pID=$2&%{QUERY_STRING}
RewriteRule ^(.*)-pr-([0-9]+).html$ product_reviews.php?products_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-pri-([0-9]+).html$ product_reviews_info.php?products_id=$2&%{QUERY_STRING}
# IOSC mobile site
RewriteRule ^([a-z0-9/-]+)-mp-([0-9]+).html$ mobile/product_info.php [NC,L,QSA]
RewriteRule ^([a-z0-9/-]+)-mc-([0-9_]+).html$ mobile/catalog_mb.php [NC,L,QSA]
RewriteRule ^([a-z0-9/-]+)-mm-([0-9_]+).html$ mobile/catalog_mb.php [NC,L,QSA]
RewriteRule ^([a-z0-9/-]+)-mpi-([0-9]+).html$ mobile/popup_image.php [NC,L,QSA]
RewriteRule ^([a-z0-9/-]+)-mpr-([0-9]+).html$ mobile/product_reviews.php [NC,L,QSA]
RewriteRule ^([a-z0-9/-]+)-mpri-([0-9]+).html$ mobile/product_reviews_info.php [NC,L,QSA]
## Articles contribution
RewriteRule ^(.*)-t-([0-9_]+).html$ articles.php?tPath=$2&%{QUERY_STRING}
RewriteRule ^(.*)-a-([0-9]+).html$ article_info.php?articles_id=$2&%{QUERY_STRING}
## Information pages
RewriteRule ^(.*)-i-([0-9]+).html$ information.php?info_id=$2&%{QUERY_STRING}
## Links contribution
RewriteRule ^(.*)-links-([0-9_]+).html$ links.php?lPath=$2&%{QUERY_STRING}
## Newsdesk contribution
RewriteRule ^(.*)-n-([0-9]+).html$ newsdesk_info.php?newsdesk_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-nc-([0-9]+).html$ newsdesk_index.php?newsPath=$2&%{QUERY_STRING}
RewriteRule ^(.*)-nri-([0-9]+).html$ newsdesk_reviews_info.php?newsdesk_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-nra-([0-9]+).html$ newsdesk_reviews_article.php?newsdesk_id=$2&%{QUERY_STRING}
# Mobile Articles contribution
RewriteRule ^([a-z0-9/-]+)-mt-([0-9_]+).html$ mobile/articles.php [NC,L,QSA]
RewriteRule ^([a-z0-9/-]+)-mau-([0-9]+).html$ mobile/articles.php [NC,L,QSA]
RewriteRule ^([a-z0-9/-]+)-ma-([0-9]+).html$ mobile/article_info.php [NC,L,QSA]
# Mobile Information pages
RewriteRule ^([a-z0-9/-]+)-mi-([0-9]+).html$ mobile/information.php [NC,L,QSA]
# Mobile Links contribution
RewriteRule ^([a-z0-9/-]+)-mlinks-([0-9_]+).html$ mobile/links.php [NC,L,QSA]
# Mobile Newsdesk contribution
RewriteRule ^([a-z0-9/-]+)-mn-([0-9]+).html$ mobile/newsdesk_info.php [NC,L,QSA]
RewriteRule ^([a-z0-9/-]+)-mnc-([0-9]+).html$ mobile/newsdesk_index.php [NC,L,QSA]
RewriteRule ^([a-z0-9/-]+)-mnri-([0-9]+).html$ mobile/newsdesk_reviews_info.php [NC,L,QSA]
RewriteRule ^([a-z0-9/-]+)-mnra-([0-9]+).html$ mobile/newsdesk_reviews_article.php [NC,L,QSA]
</IfModule>

### Error No Input File Specified
RewriteEngine On
RewriteCond %{REQUEST_URI} ^/system.*
RewriteRule ^(.*)$ index.php?/$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)$ index.php?/$1 [L]

### Auto redirect HTTP to HTTPS (SSL)
###RewriteEngine On
###RewriteCond %{HTTPS} off
###RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}

<FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)$">
Header set Cache-Control "public"
Header set Expires "Fri, 24 Apr 2015 23:59:00 GMT"
</FilesMatch>
 

Any HELP will be greatly appreciated.

Edited by Lary_an

Share this post


Link to post
Share on other sites

Hi Rainer,

thanks for your help with images.

My Oscommerce is with ultimate seo url by frw Media and all is working fine in desktop, but in mobile all the product page are redirect to index. I tried to install, ultimate seo url and ioscmobile in fresh 2.3.4 oscommerce and i have the same problem, I read all your instruction but i don't understand the problem. feel free to visit my website.

 

Any help is appreciate

Marco

Share this post


Link to post
Share on other sites

Hi Rainer,

thanks for your help with images.

My Oscommerce is with ultimate seo url by frw Media and all is working fine in desktop, but in mobile all the product page are redirect to index. I tried to install, ultimate seo url and ioscmobile in fresh 2.3.4 oscommerce and i have the same problem, I read all your instruction but i don't understand the problem. feel free to visit my website.

 

Any help is appreciate

Marco

 

Hello Marco@@marcochiana,

 

you added the SEO URLs support from the iosc mobile support package, didn't you??

Share this post


Link to post
Share on other sites

Hello

yes, I followed the instruction in support 4.4 mosc 7.5.x  about Ultimate Seo Url Standar until the point 2D

 

my mobile store is

 

www.mysite.com/mobile   (subdirectory)

 

thanks

Share this post


Link to post
Share on other sites

Does it work if you switch off SEO URLs?? If yes then I would say there is an error in the .htaccess rewrites for mobile.

However I couldn't check all your classic store, I get that error selecting any category:

Parse error: syntax error, unexpected '$listing_split' (T_VARIABLE) in /membri/enoprova/includes/modules/product_listing.php on line 1

And your subcategories do not show. Could be related to your category modifications.

Try for testing to use the standard category box.

Share this post


Link to post
Share on other sites

Okay thanks to the mighty Rainer all you need to do to make search work on 2.3.4 is add above the $listing_sql shown from the original instructions as here:

// BOF Separate Price Per Customer
// global variable (session): $sppc_customers_group_id -> local variable $customer_group_id
if(!tep_session_is_registered('sppc_customer_group_id')) {$customer_group_id = '0';
} else {
$customer_group_id = $sppc_customer_group_id;
}
// EOF SPPC
  $listing_sql = $select_str . $from_str . $where_str . $order_str; 

Then compare your advanced_search_result.php with the mobile version and ensure you compare and copy in every SPPC and Hide Categories changes exactly. I'm NOT a coder all at your own risk but it now seems to work perfectly for me ...

 

Best wishes,

 

Lorraine

Share this post


Link to post
Share on other sites

@@Lary_an,

 

it seems you installed an outdated iosc mobile version.

You should use iosc 7.5.7r2:

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

Thank you very much, for your help.

I installed a new version with Seo Urls 5 Support, but i still have problems, and have no idea on how to fix them.

Now when i upload catalog/includes/modules/ultimate_seo_urls5/includes/usu_general_functions.php file I only get the header picture everything else is blank on my classic site and mobile site doesn't work, otherwise my mobile site only shows home page and i can't switch to any page from there (links don't work properly, except some switch to my classic site and then i can't switch back). I went through all my changes but can't find what am missing. It looks like i am missing /mobile directory on redirects - when i test to go to store it it shows MYSITE.com/mobile/catalog_mb.php?redirectCancelled=true 

Any help would be greatly appreciated. Thank you.

 

I played a little with my htaccess and now looks like this:   

 

Options +SymLinksIfOwnerMatch

RewriteEngine on

RewriteCond %{HTTP_HOST} ^www.mysite\.com$ [NC]

RewriteRule ^(.*)$ http://mysite.com/$1 [R=301,L]

## end redirect

## Error process

ErrorDocument 404 /includes/modules/ultimate_seo_urls5/includes/notfound_404.php

## ULTIMATE SEO 5

## If you are getting errors you may need to comment this out like ..

## Options +FollowSymLinks

# For security reasons, Option followsymlinks cannot be overridden.

#Options +FollowSymLinks

Options +SymLinksIfOwnerMatch

<IfModule mod_rewrite.c>

  RewriteEngine On

#

RewriteBase /

#

RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\ HTTP/

RewriteRule ^index\.php$ http://mysite.com/ [R=301,L]

#

RewriteRule ^(.*)-p-([0-9]+).html$ product_info.php?products_id=$2&%{QUERY_STRING}

RewriteRule ^(.*)-c-([0-9_]+).html$ index.php?cPath=$2&%{QUERY_STRING}

RewriteRule ^(.*)-m-([0-9]+).html$ index.php?manufacturers_id=$2&%{QUERY_STRING}

RewriteRule ^(.*)-pi-([0-9]+).html$ popup_image.php?pID=$2&%{QUERY_STRING}

RewriteRule ^(.*)-pr-([0-9]+).html$ product_reviews.php?products_id=$2&%{QUERY_STRING}

RewriteRule ^(.*)-pri-([0-9]+).html$ product_reviews_info.php?products_id=$2&%{QUERY_STRING}

# IOSC mobile site

RewriteRule ^(.*)-p-([0-9]+).html$ mobile/product_info.php?products_id=$2&%{QUERY_STRING}

RewriteRule ^(.*)-c-([0-9_]+).html$ mobile/index.php?cPath=$2&%{QUERY_STRING}

RewriteRule ^(.*)-m-([0-9]+).html$ mobile/index.php?manufacturers_id=$2&%{QUERY_STRING}

RewriteRule ^(.*)-pi-([0-9]+).html$ mobile/popup_image.php?pID=$2&%{QUERY_STRING}

RewriteRule ^(.*)-pr-([0-9]+).html$ mobile/product_reviews.php?products_id=$2&%{QUERY_STRING}

RewriteRule ^(.*)-pri-([0-9]+).html$ mobile/product_reviews_info.php?products_id=$2&%{QUERY_STRING}

## Articles contribution

RewriteRule ^(.*)-t-([0-9_]+).html$ articles.php?tPath=$2&%{QUERY_STRING}

RewriteRule ^(.*)-a-([0-9]+).html$ article_info.php?articles_id=$2&%{QUERY_STRING}

## Information pages

RewriteRule ^(.*)-i-([0-9]+).html$ information.php?info_id=$2&%{QUERY_STRING}

## Links contribution

RewriteRule ^(.*)-links-([0-9_]+).html$ links.php?lPath=$2&%{QUERY_STRING}

## Newsdesk contribution

RewriteRule ^(.*)-n-([0-9]+).html$ newsdesk_info.php?newsdesk_id=$2&%{QUERY_STRING}

RewriteRule ^(.*)-nc-([0-9]+).html$ newsdesk_index.php?newsPath=$2&%{QUERY_STRING}

RewriteRule ^(.*)-nri-([0-9]+).html$ newsdesk_reviews_info.php?newsdesk_id=$2&%{QUERY_STRING}

RewriteRule ^(.*)-nra-([0-9]+).html$ newsdesk_reviews_article.php?newsdesk_id=$2&%{QUERY_STRING}

# Mobile Articles contribution

RewriteRule ^(.*)-t-([0-9_]+).html$ mobile/articles.php?tPath=$2&%{QUERY_STRING}

RewriteRule ^(.*)-a-([0-9]+).html$ mobile/article_info.php?articles_id=$2&%{QUERY_STRING}

## Information pages

RewriteRule ^(.*)-i-([0-9]+).html$ mobile/information.php?info_id=$2&%{QUERY_STRING}

## Links contribution

RewriteRule ^(.*)-links-([0-9_]+).html$ mobile/links.php?lPath=$2&%{QUERY_STRING}

## Newsdesk contribution

RewriteRule ^(.*)-n-([0-9]+).html$ mobile/newsdesk_info.php?newsdesk_id=$2&%{QUERY_STRING}

RewriteRule ^(.*)-nc-([0-9]+).html$ mobile/newsdesk_index.php?newsPath=$2&%{QUERY_STRING}

RewriteRule ^(.*)-nri-([0-9]+).html$ mobile/newsdesk_reviews_info.php?newsdesk_id=$2&%{QUERY_STRING}

RewriteRule ^(.*)-nra-([0-9]+).html$ mobile/newsdesk_reviews_article.php?newsdesk_id=$2&%{QUERY_STRING}

RewriteRule ^(.*)-pri-([0-9]+).html$ mobile/mobile/product_reviews_info.php?products_id=$2&%{QUERY_STRING}

</IfModule>

### Error No Input File Specified

RewriteEngine On

RewriteCond %{REQUEST_URI} ^/system.*

RewriteRule ^(.*)$ index.php?/$1 [L]

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule ^(.+)$ index.php?/$1 [L]

<FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)$">

Header set Cache-Control "public"

Header set Expires "Fri, 24 Apr 2015 23:59:00 GMT"

</FilesMatch>

 

Edited by Lary_an

Share this post


Link to post
Share on other sites

Hello Larry @@Lary_an,

 

Your mobile rewrite rules are wrong. It should be:

# IOSC mobile site
RewriteRule ^(.*)-mp-([0-9]+).html$ mobile/product_info.php?products_id=$2&%{QUERY_STRING}

and so on, always "m" in front of the mobile page code see SEO Support installation.

 

regards

Rainer

Share this post


Link to post
Share on other sites

@@raiwa

Hi Rayner

 

I'm experiencing the same problem as i had for multiple columns showing on iphone 6. Now it is happening when i search. The page which is used is number 0 so the same as product listing. Is there anything else that i didn't understand to let the view being only one column? the breakpoint is set to 25 but still i got three columns when searching from iphone. Any idea?

Thanks in advance.

 

Hello Fabio @@fozzo,

 

Does this happen only from your iPhone or also when you resize your desktop browser window?

 

Can you please check if the following styles are included in the html source code of your advanced_search_result page (in your browser select: "display source code" or similar):

<style type="text/css">
/* stack all grids below 40em (640px) */
@[member=media] all and (max-width: 25em) {
	.product-listing-breakpoint .ui-block-a,
	.product-listing-breakpoint .ui-block-b,
	.product-listing-breakpoint .ui-block-c,
	.product-listing-breakpoint .ui-block-d,
	.product-listing-breakpoint .ui-block-e {
		width: 100%;
		float: none;
	}
}
</style>
</head>
<body>

If it's not there, then check if in your mobile/includes/header.php line 54 includes the advanced search result filename:

if ( ((basename($PHP_SELF) == FILENAME_CATALOG_MB || basename($PHP_SELF) == FILENAME_NEW_PRODUCTS || basename($PHP_SELF) == FILENAME_SPECIALS || basename($PHP_SELF) == FILENAME_ADVANCED_SEARCH_RESULT) && MOBILE_PRODUCT_LISTING == 0) || (basename($PHP_SELF) == FILENAME_DEFAULT && (MOBILE_NEW_PRODUCTS_MODULE > 0 || MOBILE_SPECIALS_MODULE > 0 || MOBILE_UPCOMING_MODULE > 0)) )echo '<style type="text/css">

If this looks all ok, please post your store URL so I can have a look (send a private message if you don't wish to publish it).

 

regards

Rainer

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

×