Jump to content
bumbarash

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

Recommended Posts

Why don't you require once both the includes/aplication_top and the mobile/includes/aplication_top ?

 

Should work, I tried it on one of my pages and it worked, but I had to eliminate the snapshot line cause it kept crashing when the clients weren't logged in.

 

http://absolutelyscooterparts.net

 

Does not work. Still have a blank page. This version really does not work with oscommerce version 2.3.3

 

 

The code now looks like this

 

require_once('mobile/includes/application_top.php');

require_once('includes/application_top.php');

if (!tep_session_is_registered('customer_id')) {

// $navigation->set_snapshot();

tep_redirect(tep_mobile_link(FILENAME_LOGIN, '', 'SSL'));

}

 

 

Any other suggestions??????????

 

If i load the require_once('includes/application_top.php'); first. Then I get this error

 

Fatal error: Cannot redeclare do_magic_quotes_gpc() (previously declared in /home/deb55833/domains/shoptuin.nl/public_html/includes/functions/compatibility.php:18) in /home/deb55833/domains/shoptuin.nl/public_html/includes/functions/compatibility.php on line 30

Edited by mbuist

Share this post


Link to post
Share on other sites

Does not work. Still have a blank page. This version really does not work with oscommerce version 2.3.3

 

 

The code now looks like this

 

require_once('mobile/includes/application_top.php');

require_once('includes/application_top.php');

if (!tep_session_is_registered('customer_id')) {

// $navigation->set_snapshot();

tep_redirect(tep_mobile_link(FILENAME_LOGIN, '', 'SSL'));

}

 

 

Any other suggestions??????????

 

If i load the require_once('includes/application_top.php'); first. Then I get this error

 

Fatal error: Cannot redeclare do_magic_quotes_gpc() (previously declared in /home/deb55833/domains/shoptuin.nl/public_html/includes/functions/compatibility.php:18) in /home/deb55833/domains/shoptuin.nl/public_html/includes/functions/compatibility.php on line 30

 

in version 5.0 there were some files that had blanks and blank lines after the the last ?> He changed that in the 5.1, maybe try installing that version.

Share this post


Link to post
Share on other sites

Have to check.

Is this contrib only for 2.2 or is it working in 2.3 also?


osCommerce 2.3.1 - QTPro 4.6.1 - Ultimate SEO URL's 5 Pro r205 - Discount Code 3.1 - Column listing with smart columns - Products Sort and some more

Share this post


Link to post
Share on other sites

@@Rainer

 

Please confirm you received my email with files

 

thx

 

Yes, and I sent the answer with results yesterday.

Share this post


Link to post
Share on other sites

Have to check.

Is this contrib only for 2.2 or is it working in 2.3 also?

 

Hello,

 

it is only tested with 2.2.

the users who tried to install in 2.3 reported incompatibilities.

See messages above.

 

regards

Rainer

Share this post


Link to post
Share on other sites

Hello,

 

it is only tested with 2.2.

the users who tried to install in 2.3 reported incompatibilities.

See messages above.

 

regards

Rainer

 

Maybe not the right thread but do anyone knwo of a similar contrib for 2.3?


osCommerce 2.3.1 - QTPro 4.6.1 - Ultimate SEO URL's 5 Pro r205 - Discount Code 3.1 - Column listing with smart columns - Products Sort and some more

Share this post


Link to post
Share on other sites

@@Rainer

 

I did not receive any email from you. Nothing in my spam folder either...

 

Thanks

Yes, and I sent the answer with results yesterday.

Share this post


Link to post
Share on other sites

OK, I got it to work with the main site still using Chemos seo URLs 2.2d.

 

You have to rename mobile_product_info.php to something different like mobile_producto_inform.php. Then give it a filename in includes/filenames.php like this

 

define('FILENAME_MPRODUCT_INFO', 'mobile_producto_inform.php');

 

 

Then in mobile/includes/modules/products.php change FILENAME_PRODUCT_INFO to FILENAME_MPRODUCT_INFO

 

do the same in catalog/mobile_shopping_cart.php

 

and only the second one in the file now called catalog/mobile_producto_inform.php (NOT THE REQUIRES STATEMENT AT THE TOP)

Share this post


Link to post
Share on other sites

I noticed a bug in mobile_checkout_shipping.php

 

If you have html in the language files of the shipping module descriptions, it totally rewrites each module over the top of each other. I could not figure out how to change it, think it is in the css, got tired of looking. So I just took the code out of my checkout_shipping.php and pasted it into mobile_checkout_shipping. Isn't as pretty as it should be, but it still works.

Share this post


Link to post
Share on other sites

I noticed a bug in mobile_checkout_shipping.php

 

If you have html in the language files of the shipping module descriptions, it totally rewrites each module over the top of each other. I could not figure out how to change it, think it is in the css, got tired of looking. So I just took the code out of my checkout_shipping.php and pasted it into mobile_checkout_shipping. Isn't as pretty as it should be, but it still works.

 

The reason is an error in the document construction in the checkout_shipping module that replaces tables by DIVs. a DIV is missing or closed to early or misplaced if I remember correctly.

 

Do a "view source" once the page is rendered, you will see that the DIV tags are not balanced properly

 

this is what works for me:

 

<?php
require_once('mobile/includes/application_top.php');
 require(DIR_WS_CLASSES.'http_client.php');
// if the customer is not logged on, redirect them to the login page
 if (!tep_session_is_registered('customer_id')) {
   $navigation->set_snapshot();
   tep_redirect(tep_mobile_link(FILENAME_LOGIN, '', 'SSL'));
 }
// if there is nothing in the customers cart, redirect them to the shopping cart page
 if ($cart->count_contents() < 1) {
   tep_redirect(tep_mobile_link(FILENAME_SHOPPING_CART));
 }

  //BOF WA State Tax Modification
 if (tep_session_is_registered('wa_dest_tax_rate')) tep_session_unregister('wa_dest_tax_rate');
 //EOF WA State Tax Modification
// if no shipping destination address was selected, use the customers own address as default
 if (!tep_session_is_registered('sendto')) {
   tep_session_register('sendto');
   $sendto = $customer_default_address_id;
 } else {
// verify the selected shipping address
   if ( (is_array($sendto) && empty($sendto)) || is_numeric($sendto) ) {
  $check_address_query = tep_db_query("select count(*) as total from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . (int)$customer_id . "' and address_book_id = '" . (int)$sendto . "'");
  $check_address = tep_db_fetch_array($check_address_query);
  if ($check_address['total'] != '1') {
    $sendto = $customer_default_address_id;
    if (tep_session_is_registered('shipping')) tep_session_unregister('shipping');
  }
   }
 }
 require(DIR_WS_CLASSES . 'order.php');
 $order = new order;
// register a random ID in the session to check throughout the checkout procedure
// against alterations in the shopping cart contents
 if (!tep_session_is_registered('cartID')) tep_session_register('cartID');
 $cartID = $cart->cartID;
// if the order contains only virtual products, forward the customer to the billing page as
// a shipping address is not needed
 if (($order->content_type == 'virtual') || ($order->content_type == 'virtual_weight') ) { // Edited for CCGV
 if (!tep_session_is_registered('shipping')) tep_session_register('shipping');
 $shipping = false;
   $sendto = false;
   tep_redirect(tep_mobile_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'));
 }
 $total_weight = $cart->show_weight();
 $total_count = $cart->count_contents();
// load all enabled shipping modules
 require(DIR_WS_CLASSES . 'shipping.php');
 $shipping_modules = new shipping;
 if ( defined('MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING') && (MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING == 'true') ) {
   $pass = false;
   switch (MODULE_ORDER_TOTAL_SHIPPING_DESTINATION) {
  case 'national':
    if ($order->delivery['country_id'] == STORE_COUNTRY) {
	  $pass = true;
    }
    break;
  case 'international':
    if ($order->delivery['country_id'] != STORE_COUNTRY) {
	  $pass = true;
    }
    break;
  case 'both':
    $pass = true;
    break;
   }
   $free_shipping = false;
   if ( ($pass == true) && ($order->info['total'] >= MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING_OVER) ) {
  $free_shipping = true;
  include(DIR_WS_LANGUAGES . $language . '/modules/order_total/ot_shipping.php');
   }
 } else {
   $free_shipping = false;
 }
// process the selected shipping method
 if ( isset($HTTP_POST_VARS['action']) && ($HTTP_POST_VARS['action'] == 'process') ) {
   if (!tep_session_is_registered('comments')) tep_session_register('comments');
   if (tep_not_null($HTTP_POST_VARS['comments'])) {
  $comments = tep_db_prepare_input($HTTP_POST_VARS['comments']);
   }
   if (!tep_session_is_registered('shipping')) tep_session_register('shipping');
   if ( (tep_count_shipping_modules() > 0) || ($free_shipping == true) ) {
  if ( (isset($HTTP_POST_VARS['shipping'])) && (strpos($HTTP_POST_VARS['shipping'], '_')) ) {
    $shipping = $HTTP_POST_VARS['shipping'];
    list($module, $method) = explode('_', $shipping);
    if ( is_object($$module) || ($shipping == 'free_free') ) {
	  if ($shipping == 'free_free') {
	    $quote[0]['methods'][0]['title'] = FREE_SHIPPING_TITLE;
	    $quote[0]['methods'][0]['cost'] = '0';
	  } else {
	    $quote = $shipping_modules->quote($method, $module);
	  }
	  if (isset($quote['error'])) {
	    tep_session_unregister('shipping');
	  } else {
	    if ( (isset($quote[0]['methods'][0]['title'])) && (isset($quote[0]['methods'][0]['cost'])) ) {
		  $shipping = array('id' => $shipping,
						    'title' => (($free_shipping == true) ?  $quote[0]['methods'][0]['title'] : $quote[0]['module'] . ' (' . $quote[0]['methods'][0]['title'] . ')'),
						    'cost' => $quote[0]['methods'][0]['cost']);
		  tep_redirect(tep_mobile_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'));
	    }
	  }
    } else {
	  tep_session_unregister('shipping');
    }
  }
   } else {
  $shipping = false;

  tep_redirect(tep_mobile_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'));
   }   
 }
// get all available shipping quotes
 $quotes = $shipping_modules->quote();
// if no shipping method has been selected, automatically select the cheapest method.
// if the modules status was changed when none were available, to save on implementing
// a javascript force-selection method, also automatically select the cheapest shipping
// method if more than one module is now enabled
 if ( !tep_session_is_registered('shipping') || ( tep_session_is_registered('shipping') && ($shipping == false) && (tep_count_shipping_modules() > 1) ) ) $shipping = $shipping_modules->cheapest();
 require(DIR_WS_LANGUAGES . $language . '/checkout_shipping.php');
 $breadcrumb->add(NAVBAR_TITLE_1, tep_mobile_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'));
 $breadcrumb->add(NAVBAR_TITLE_2, tep_mobile_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'));
require(DIR_MOBILE_INCLUDES . 'header.php');
$headerTitle->write();
?>
<div id="iphone_content">
<?php echo tep_draw_form('checkout_address', tep_mobile_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL')) . tep_draw_hidden_field('action', 'process'); ?>
<div id="checkout_shipping">
<div id="bouton"><input type="submit" value="<?php echo IMAGE_BUTTON_CONTINUE; ?>"></div>
<h1><?php //echo TABLE_HEADING_SHIPPING_ADDRESS; ?></h1>
  <div id="ship_add">
  <?php echo tep_address_label($customer_id, $sendto, true, ' ', '<br>'); ?>  
  <?php echo '<a href="' . tep_mobile_link(FILENAME_CHECKOUT_SHIPPING_ADDRESS, '', 'SSL') . '">' . IMAGE_BUTTON_CHANGE_ADDRESS . '</a>'; ?>
  </div>
  <hr />
  <div>
<?php
 if (tep_count_shipping_modules() > 0) {
?>
  <h1><?php echo TABLE_HEADING_SHIPPING_METHOD; ?></h1>

<?php
if (sizeof($quotes) > 1 && sizeof($quotes[0]) > 1) {
?>
		  <?php //echo TEXT_CHOOSE_SHIPPING_METHOD; ?>
<?php
   } elseif ($free_shipping == false) {
?>
		  <?php echo TEXT_ENTER_SHIPPING_INFORMATION; ?>

<?php
   }
   if ($free_shipping == true) {
?>
		  <?php echo $quotes[$i]['icon']; ?> <?php echo FREE_SHIPPING_TITLE; ?>
		  <?php echo sprintf(FREE_SHIPPING_DESCRIPTION, $currencies->format(MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING_OVER)) . tep_draw_hidden_field('shipping', 'free_free'); ?>

<?php
   } else {
  $radio_buttons = 0;
  for ($i=0, $n=sizeof($quotes); $i<$n; $i++) {
?>
 <div id="module">
 <?php echo $quotes[$i]['module']; ?></b> <?php if (isset($quotes[$i]['icon']) && tep_not_null($quotes[$i]['icon'])) { echo $quotes[$i]['icon']; } ?>

<?php
    if (isset($quotes[$i]['error'])) {
?>
			  <?php echo $quotes[$i]['error']; ?>
<?php
    } else {
	  for ($j=0, $n2=sizeof($quotes[$i]['methods']); $j<$n2; $j++) {
// set the radio button to be checked if it is the method chosen
	    $checked = (($quotes[$i]['id'] . '_' . $quotes[$i]['methods'][$j]['id'] == $shipping['id']) ? true : false);
/*		    if ( ($checked == true) || ($n == 1 && $n2 == 1) ) {
		  echo '<tr id="defaultSelected" class="moduleRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="selectRowEffect(this, ' . $radio_buttons . ')">' . "\n";
	    } else {
		  echo '<tr class="moduleRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="selectRowEffect(this, ' . $radio_buttons . ')">' . "\n";
	    }
*/
	    if ( ($n > 1) || ($n2 > 1) ) {
?>
 <div id="np-module">				   
 <?php echo tep_draw_radio_field('shipping', $quotes[$i]['id'] . '_' . $quotes[$i]['methods'][$j]['id'], $checked); ?>
 <?php echo $currencies->format(tep_add_tax($quotes[$i]['methods'][$j]['cost'], (isset($quotes[$i]['tax']) ? $quotes[$i]['tax'] : 0))); ?>
 <?php echo $quotes[$i]['methods'][$j]['title']; ?>
 </div>
<?php
	    } else {
?>
			    <?php echo $currencies->format(tep_add_tax($quotes[$i]['methods'][$j]['cost'], $quotes[$i]['tax'])) . tep_draw_hidden_field('shipping', $quotes[$i]['id'] . '_' . $quotes[$i]['methods'][$j]['id']); ?>
 <?php echo $quotes[$i]['methods'][$j]['title']; ?>
<?php
	    }
	    $radio_buttons++;
	  }
    }
  }
   }
?>
<?php
 }
?>
  </div>
  </div>

  </div>
  <div id="bouton"><input type="submit" value="<?php echo IMAGE_BUTTON_CONTINUE; ?>"></div>
  </div>
</form>
<?php require(DIR_MOBILE_INCLUDES . 'footer.php'); ?>
</div>

Share this post


Link to post
Share on other sites

@@Rainer

 

I did not receive any email from you. Nothing in my spam folder either...

 

Thanks

 

ok sent it again

Share this post


Link to post
Share on other sites

The reason is an error in the document construction in the checkout_shipping module that replaces tables by DIVs. a DIV is missing or closed to early or misplaced if I remember correctly.

 

Do a "view source" once the page is rendered, you will see that the DIV tags are not balanced properly

 

this is what works for me:

 

 

 

Thanks pix, I will check that out later.

 

I signed up for the site you're working on to see how your shipping module looked the other day, didn't know you had modded it.

 

I just added simple multi-images with fancybox popup to the mobile side, seams to work good. Might have to break down and get a smart phone to see how this stuff looks, LOL.

Share this post


Link to post
Share on other sites

The reason is an error in the document construction in the checkout_shipping module that replaces tables by DIVs. a DIV is missing or closed to early or misplaced if I remember correctly.

 

Do a "view source" once the page is rendered, you will see that the DIV tags are not balanced properly

 

this is what works for me:

 

<?php
require_once('mobile/includes/application_top.php');
require(DIR_WS_CLASSES.'http_client.php');
// if the customer is not logged on, redirect them to the login page
if (!tep_session_is_registered('customer_id')) {
$navigation->set_snapshot();
tep_redirect(tep_mobile_link(FILENAME_LOGIN, '', 'SSL'));
}
// if there is nothing in the customers cart, redirect them to the shopping cart page
if ($cart->count_contents() < 1) {
tep_redirect(tep_mobile_link(FILENAME_SHOPPING_CART));
}

//BOF WA State Tax Modification
if (tep_session_is_registered('wa_dest_tax_rate')) tep_session_unregister('wa_dest_tax_rate');
//EOF WA State Tax Modification
// if no shipping destination address was selected, use the customers own address as default
if (!tep_session_is_registered('sendto')) {
tep_session_register('sendto');
$sendto = $customer_default_address_id;
} else {
// verify the selected shipping address
if ( (is_array($sendto) && empty($sendto)) || is_numeric($sendto) ) {
 $check_address_query = tep_db_query("select count(*) as total from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . (int)$customer_id . "' and address_book_id = '" . (int)$sendto . "'");
 $check_address = tep_db_fetch_array($check_address_query);
 if ($check_address['total'] != '1') {
 $sendto = $customer_default_address_id;
 if (tep_session_is_registered('shipping')) tep_session_unregister('shipping');
 }
}
}
require(DIR_WS_CLASSES . 'order.php');
$order = new order;
// register a random ID in the session to check throughout the checkout procedure
// against alterations in the shopping cart contents
if (!tep_session_is_registered('cartID')) tep_session_register('cartID');
$cartID = $cart->cartID;
// if the order contains only virtual products, forward the customer to the billing page as
// a shipping address is not needed
if (($order->content_type == 'virtual') || ($order->content_type == 'virtual_weight') ) { // Edited for CCGV
if (!tep_session_is_registered('shipping')) tep_session_register('shipping');
$shipping = false;
$sendto = false;
tep_redirect(tep_mobile_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'));
}
$total_weight = $cart->show_weight();
$total_count = $cart->count_contents();
// load all enabled shipping modules
require(DIR_WS_CLASSES . 'shipping.php');
$shipping_modules = new shipping;
if ( defined('MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING') && (MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING == 'true') ) {
$pass = false;
switch (MODULE_ORDER_TOTAL_SHIPPING_DESTINATION) {
 case 'national':
 if ($order->delivery['country_id'] == STORE_COUNTRY) {
	 $pass = true;
 }
 break;
 case 'international':
 if ($order->delivery['country_id'] != STORE_COUNTRY) {
	 $pass = true;
 }
 break;
 case 'both':
 $pass = true;
 break;
}
$free_shipping = false;
if ( ($pass == true) && ($order->info['total'] >= MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING_OVER) ) {
 $free_shipping = true;
 include(DIR_WS_LANGUAGES . $language . '/modules/order_total/ot_shipping.php');
}
} else {
$free_shipping = false;
}
// process the selected shipping method
if ( isset($HTTP_POST_VARS['action']) && ($HTTP_POST_VARS['action'] == 'process') ) {
if (!tep_session_is_registered('comments')) tep_session_register('comments');
if (tep_not_null($HTTP_POST_VARS['comments'])) {
 $comments = tep_db_prepare_input($HTTP_POST_VARS['comments']);
}
if (!tep_session_is_registered('shipping')) tep_session_register('shipping');
if ( (tep_count_shipping_modules() > 0) || ($free_shipping == true) ) {
 if ( (isset($HTTP_POST_VARS['shipping'])) && (strpos($HTTP_POST_VARS['shipping'], '_')) ) {
 $shipping = $HTTP_POST_VARS['shipping'];
 list($module, $method) = explode('_', $shipping);
 if ( is_object($$module) || ($shipping == 'free_free') ) {
	 if ($shipping == 'free_free') {
	 $quote[0]['methods'][0]['title'] = FREE_SHIPPING_TITLE;
	 $quote[0]['methods'][0]['cost'] = '0';
	 } else {
	 $quote = $shipping_modules->quote($method, $module);
	 }
	 if (isset($quote['error'])) {
	 tep_session_unregister('shipping');
	 } else {
	 if ( (isset($quote[0]['methods'][0]['title'])) && (isset($quote[0]['methods'][0]['cost'])) ) {
		 $shipping = array('id' => $shipping,
						 'title' => (($free_shipping == true) ? $quote[0]['methods'][0]['title'] : $quote[0]['module'] . ' (' . $quote[0]['methods'][0]['title'] . ')'),
						 'cost' => $quote[0]['methods'][0]['cost']);
		 tep_redirect(tep_mobile_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'));
	 }
	 }
 } else {
	 tep_session_unregister('shipping');
 }
 }
} else {
 $shipping = false;

 tep_redirect(tep_mobile_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'));
}
}
// get all available shipping quotes
$quotes = $shipping_modules->quote();
// if no shipping method has been selected, automatically select the cheapest method.
// if the modules status was changed when none were available, to save on implementing
// a javascript force-selection method, also automatically select the cheapest shipping
// method if more than one module is now enabled
if ( !tep_session_is_registered('shipping') || ( tep_session_is_registered('shipping') && ($shipping == false) && (tep_count_shipping_modules() > 1) ) ) $shipping = $shipping_modules->cheapest();
require(DIR_WS_LANGUAGES . $language . '/checkout_shipping.php');
$breadcrumb->add(NAVBAR_TITLE_1, tep_mobile_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'));
$breadcrumb->add(NAVBAR_TITLE_2, tep_mobile_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'));
require(DIR_MOBILE_INCLUDES . 'header.php');
$headerTitle->write();
?>
<div id="iphone_content">
<?php echo tep_draw_form('checkout_address', tep_mobile_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL')) . tep_draw_hidden_field('action', 'process'); ?>
<div id="checkout_shipping">
<div id="bouton"><input type="submit" value="<?php echo IMAGE_BUTTON_CONTINUE; ?>"></div>
<h1><?php //echo TABLE_HEADING_SHIPPING_ADDRESS; ?></h1>
<div id="ship_add">
<?php echo tep_address_label($customer_id, $sendto, true, ' ', '<br>'); ?>
<?php echo '<a href="' . tep_mobile_link(FILENAME_CHECKOUT_SHIPPING_ADDRESS, '', 'SSL') . '">' . IMAGE_BUTTON_CHANGE_ADDRESS . '</a>'; ?>
</div>
<hr />
<div>
<?php
if (tep_count_shipping_modules() > 0) {
?>
 <h1><?php echo TABLE_HEADING_SHIPPING_METHOD; ?></h1>

<?php
if (sizeof($quotes) > 1 && sizeof($quotes[0]) > 1) {
?>
		 <?php //echo TEXT_CHOOSE_SHIPPING_METHOD; ?>
<?php
} elseif ($free_shipping == false) {
?>
		 <?php echo TEXT_ENTER_SHIPPING_INFORMATION; ?>

<?php
}
if ($free_shipping == true) {
?>
		 <?php echo $quotes[$i]['icon']; ?> <?php echo FREE_SHIPPING_TITLE; ?>
		 <?php echo sprintf(FREE_SHIPPING_DESCRIPTION, $currencies->format(MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING_OVER)) . tep_draw_hidden_field('shipping', 'free_free'); ?>

<?php
} else {
 $radio_buttons = 0;
 for ($i=0, $n=sizeof($quotes); $i<$n; $i++) {
?>
 <div id="module">
 <?php echo $quotes[$i]['module']; ?></b> <?php if (isset($quotes[$i]['icon']) && tep_not_null($quotes[$i]['icon'])) { echo $quotes[$i]['icon']; } ?>

<?php
 if (isset($quotes[$i]['error'])) {
?>
			 <?php echo $quotes[$i]['error']; ?>
<?php
 } else {
	 for ($j=0, $n2=sizeof($quotes[$i]['methods']); $j<$n2; $j++) {
// set the radio button to be checked if it is the method chosen
	 $checked = (($quotes[$i]['id'] . '_' . $quotes[$i]['methods'][$j]['id'] == $shipping['id']) ? true : false);
/*		 if ( ($checked == true) || ($n == 1 && $n2 == 1) ) {
		 echo '<tr id="defaultSelected" class="moduleRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="selectRowEffect(this, ' . $radio_buttons . ')">' . "\n";
	 } else {
		 echo '<tr class="moduleRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="selectRowEffect(this, ' . $radio_buttons . ')">' . "\n";
	 }
*/
	 if ( ($n > 1) || ($n2 > 1) ) {
?>
 <div id="np-module">				
 <?php echo tep_draw_radio_field('shipping', $quotes[$i]['id'] . '_' . $quotes[$i]['methods'][$j]['id'], $checked); ?>
 <?php echo $currencies->format(tep_add_tax($quotes[$i]['methods'][$j]['cost'], (isset($quotes[$i]['tax']) ? $quotes[$i]['tax'] : 0))); ?>
 <?php echo $quotes[$i]['methods'][$j]['title']; ?>
 </div>
<?php
	 } else {
?>
			 <?php echo $currencies->format(tep_add_tax($quotes[$i]['methods'][$j]['cost'], $quotes[$i]['tax'])) . tep_draw_hidden_field('shipping', $quotes[$i]['id'] . '_' . $quotes[$i]['methods'][$j]['id']); ?>
 <?php echo $quotes[$i]['methods'][$j]['title']; ?>
<?php
	 }
	 $radio_buttons++;
	 }
 }
 }
}
?>
<?php
}
?>
 </div>
 </div>

</div>
<div id="bouton"><input type="submit" value="<?php echo IMAGE_BUTTON_CONTINUE; ?>"></div>
</div>
</form>
<?php require(DIR_MOBILE_INCLUDES . 'footer.php'); ?>
</div>

 

 

I modified the mobile_checkout_shipping.php in the rev2 like this in order to keep the layou when only one shipping method is available:

 

find:

	 <?php echo $quotes[$i]['methods'][$j]['title']; ?>
<?php
				    }
				    $radio_buttons++;

 

and change to:

 <?php echo $quotes[$i]['methods'][$j]['title']; ?>
<?php
	    }
?>
</div>
<?php
	    $radio_buttons++;

 

hope this helps for your configuration too.

 

regards

Rainer

Share this post


Link to post
Share on other sites

I modified the mobile_checkout_shipping.php in the rev2 like this in order to keep the layou when only one shipping method is available:

 

find:

	 <?php echo $quotes[$i]['methods'][$j]['title']; ?>
<?php
				 }
				 $radio_buttons++;

 

and change to:

 <?php echo $quotes[$i]['methods'][$j]['title']; ?>
<?php
	 }
?>
</div>
<?php
	 $radio_buttons++;

 

hope this helps for your configuration too.

 

regards

Rainer

 

I already had that version in there and it didn't work.

Share this post


Link to post
Share on other sites

The reason is an error in the document construction in the checkout_shipping module that replaces tables by DIVs. a DIV is missing or closed to early or misplaced if I remember correctly.

 

Do a "view source" once the page is rendered, you will see that the DIV tags are not balanced properly

 

this is what works for me:

 

<?php
require_once('mobile/includes/application_top.php');
require(DIR_WS_CLASSES.'http_client.php');
// if the customer is not logged on, redirect them to the login page
if (!tep_session_is_registered('customer_id')) {
$navigation->set_snapshot();
tep_redirect(tep_mobile_link(FILENAME_LOGIN, '', 'SSL'));
}
// if there is nothing in the customers cart, redirect them to the shopping cart page
if ($cart->count_contents() < 1) {
tep_redirect(tep_mobile_link(FILENAME_SHOPPING_CART));
}

//BOF WA State Tax Modification
if (tep_session_is_registered('wa_dest_tax_rate')) tep_session_unregister('wa_dest_tax_rate');
//EOF WA State Tax Modification
// if no shipping destination address was selected, use the customers own address as default
if (!tep_session_is_registered('sendto')) {
tep_session_register('sendto');
$sendto = $customer_default_address_id;
} else {
// verify the selected shipping address
if ( (is_array($sendto) && empty($sendto)) || is_numeric($sendto) ) {
 $check_address_query = tep_db_query("select count(*) as total from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . (int)$customer_id . "' and address_book_id = '" . (int)$sendto . "'");
 $check_address = tep_db_fetch_array($check_address_query);
 if ($check_address['total'] != '1') {
 $sendto = $customer_default_address_id;
 if (tep_session_is_registered('shipping')) tep_session_unregister('shipping');
 }
}
}
require(DIR_WS_CLASSES . 'order.php');
$order = new order;
// register a random ID in the session to check throughout the checkout procedure
// against alterations in the shopping cart contents
if (!tep_session_is_registered('cartID')) tep_session_register('cartID');
$cartID = $cart->cartID;
// if the order contains only virtual products, forward the customer to the billing page as
// a shipping address is not needed
if (($order->content_type == 'virtual') || ($order->content_type == 'virtual_weight') ) { // Edited for CCGV
if (!tep_session_is_registered('shipping')) tep_session_register('shipping');
$shipping = false;
$sendto = false;
tep_redirect(tep_mobile_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'));
}
$total_weight = $cart->show_weight();
$total_count = $cart->count_contents();
// load all enabled shipping modules
require(DIR_WS_CLASSES . 'shipping.php');
$shipping_modules = new shipping;
if ( defined('MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING') && (MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING == 'true') ) {
$pass = false;
switch (MODULE_ORDER_TOTAL_SHIPPING_DESTINATION) {
 case 'national':
 if ($order->delivery['country_id'] == STORE_COUNTRY) {
	 $pass = true;
 }
 break;
 case 'international':
 if ($order->delivery['country_id'] != STORE_COUNTRY) {
	 $pass = true;
 }
 break;
 case 'both':
 $pass = true;
 break;
}
$free_shipping = false;
if ( ($pass == true) && ($order->info['total'] >= MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING_OVER) ) {
 $free_shipping = true;
 include(DIR_WS_LANGUAGES . $language . '/modules/order_total/ot_shipping.php');
}
} else {
$free_shipping = false;
}
// process the selected shipping method
if ( isset($HTTP_POST_VARS['action']) && ($HTTP_POST_VARS['action'] == 'process') ) {
if (!tep_session_is_registered('comments')) tep_session_register('comments');
if (tep_not_null($HTTP_POST_VARS['comments'])) {
 $comments = tep_db_prepare_input($HTTP_POST_VARS['comments']);
}
if (!tep_session_is_registered('shipping')) tep_session_register('shipping');
if ( (tep_count_shipping_modules() > 0) || ($free_shipping == true) ) {
 if ( (isset($HTTP_POST_VARS['shipping'])) && (strpos($HTTP_POST_VARS['shipping'], '_')) ) {
 $shipping = $HTTP_POST_VARS['shipping'];
 list($module, $method) = explode('_', $shipping);
 if ( is_object($$module) || ($shipping == 'free_free') ) {
	 if ($shipping == 'free_free') {
	 $quote[0]['methods'][0]['title'] = FREE_SHIPPING_TITLE;
	 $quote[0]['methods'][0]['cost'] = '0';
	 } else {
	 $quote = $shipping_modules->quote($method, $module);
	 }
	 if (isset($quote['error'])) {
	 tep_session_unregister('shipping');
	 } else {
	 if ( (isset($quote[0]['methods'][0]['title'])) && (isset($quote[0]['methods'][0]['cost'])) ) {
		 $shipping = array('id' => $shipping,
						 'title' => (($free_shipping == true) ? $quote[0]['methods'][0]['title'] : $quote[0]['module'] . ' (' . $quote[0]['methods'][0]['title'] . ')'),
						 'cost' => $quote[0]['methods'][0]['cost']);
		 tep_redirect(tep_mobile_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'));
	 }
	 }
 } else {
	 tep_session_unregister('shipping');
 }
 }
} else {
 $shipping = false;

 tep_redirect(tep_mobile_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'));
}
}
// get all available shipping quotes
$quotes = $shipping_modules->quote();
// if no shipping method has been selected, automatically select the cheapest method.
// if the modules status was changed when none were available, to save on implementing
// a javascript force-selection method, also automatically select the cheapest shipping
// method if more than one module is now enabled
if ( !tep_session_is_registered('shipping') || ( tep_session_is_registered('shipping') && ($shipping == false) && (tep_count_shipping_modules() > 1) ) ) $shipping = $shipping_modules->cheapest();
require(DIR_WS_LANGUAGES . $language . '/checkout_shipping.php');
$breadcrumb->add(NAVBAR_TITLE_1, tep_mobile_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'));
$breadcrumb->add(NAVBAR_TITLE_2, tep_mobile_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'));
require(DIR_MOBILE_INCLUDES . 'header.php');
$headerTitle->write();
?>
<div id="iphone_content">
<?php echo tep_draw_form('checkout_address', tep_mobile_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL')) . tep_draw_hidden_field('action', 'process'); ?>
<div id="checkout_shipping">
<div id="bouton"><input type="submit" value="<?php echo IMAGE_BUTTON_CONTINUE; ?>"></div>
<h1><?php //echo TABLE_HEADING_SHIPPING_ADDRESS; ?></h1>
<div id="ship_add">
<?php echo tep_address_label($customer_id, $sendto, true, ' ', '<br>'); ?>
<?php echo '<a href="' . tep_mobile_link(FILENAME_CHECKOUT_SHIPPING_ADDRESS, '', 'SSL') . '">' . IMAGE_BUTTON_CHANGE_ADDRESS . '</a>'; ?>
</div>
<hr />
<div>
<?php
if (tep_count_shipping_modules() > 0) {
?>
 <h1><?php echo TABLE_HEADING_SHIPPING_METHOD; ?></h1>

<?php
if (sizeof($quotes) > 1 && sizeof($quotes[0]) > 1) {
?>
		 <?php //echo TEXT_CHOOSE_SHIPPING_METHOD; ?>
<?php
} elseif ($free_shipping == false) {
?>
		 <?php echo TEXT_ENTER_SHIPPING_INFORMATION; ?>

<?php
}
if ($free_shipping == true) {
?>
		 <?php echo $quotes[$i]['icon']; ?> <?php echo FREE_SHIPPING_TITLE; ?>
		 <?php echo sprintf(FREE_SHIPPING_DESCRIPTION, $currencies->format(MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING_OVER)) . tep_draw_hidden_field('shipping', 'free_free'); ?>

<?php
} else {
 $radio_buttons = 0;
 for ($i=0, $n=sizeof($quotes); $i<$n; $i++) {
?>
 <div id="module">
 <?php echo $quotes[$i]['module']; ?></b> <?php if (isset($quotes[$i]['icon']) && tep_not_null($quotes[$i]['icon'])) { echo $quotes[$i]['icon']; } ?>

<?php
 if (isset($quotes[$i]['error'])) {
?>
			 <?php echo $quotes[$i]['error']; ?>
<?php
 } else {
	 for ($j=0, $n2=sizeof($quotes[$i]['methods']); $j<$n2; $j++) {
// set the radio button to be checked if it is the method chosen
	 $checked = (($quotes[$i]['id'] . '_' . $quotes[$i]['methods'][$j]['id'] == $shipping['id']) ? true : false);
/*		 if ( ($checked == true) || ($n == 1 && $n2 == 1) ) {
		 echo '<tr id="defaultSelected" class="moduleRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="selectRowEffect(this, ' . $radio_buttons . ')">' . "\n";
	 } else {
		 echo '<tr class="moduleRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="selectRowEffect(this, ' . $radio_buttons . ')">' . "\n";
	 }
*/
	 if ( ($n > 1) || ($n2 > 1) ) {
?>
 <div id="np-module">				
 <?php echo tep_draw_radio_field('shipping', $quotes[$i]['id'] . '_' . $quotes[$i]['methods'][$j]['id'], $checked); ?>
 <?php echo $currencies->format(tep_add_tax($quotes[$i]['methods'][$j]['cost'], (isset($quotes[$i]['tax']) ? $quotes[$i]['tax'] : 0))); ?>
 <?php echo $quotes[$i]['methods'][$j]['title']; ?>
 </div>
<?php
	 } else {
?>
			 <?php echo $currencies->format(tep_add_tax($quotes[$i]['methods'][$j]['cost'], $quotes[$i]['tax'])) . tep_draw_hidden_field('shipping', $quotes[$i]['id'] . '_' . $quotes[$i]['methods'][$j]['id']); ?>
 <?php echo $quotes[$i]['methods'][$j]['title']; ?>
<?php
	 }
	 $radio_buttons++;
	 }
 }
 }
}
?>
<?php
}
?>
 </div>
 </div>

</div>
<div id="bouton"><input type="submit" value="<?php echo IMAGE_BUTTON_CONTINUE; ?>"></div>
</div>
</form>
<?php require(DIR_MOBILE_INCLUDES . 'footer.php'); ?>
</div>

 

That works perfectly, Thank you!!!!

Share this post


Link to post
Share on other sites

That works perfectly, Thank you!!!!

 

Ok I'll include this solution in the next update

 

regards

Rainer

Share this post


Link to post
Share on other sites

Hello!

 

I have installed version Iphone-Mobil phones Oscomerce 4

Version for vanilla store of Oscommerce. tested on oscommerce-2.2rc2a

and have the problem that when a categorie has more than one page, the

first page is displayed correctly but the second page and others are missing

the pictures and every formatting of the pages.

 

Some help about this?

 

Greetings

 

Andreas

Share this post


Link to post
Share on other sites

Hello!

 

I have installed version Iphone-Mobil phones Oscomerce 4

Version for vanilla store of Oscommerce. tested on oscommerce-2.2rc2a

and have the problem that when a categorie has more than one page, the

first page is displayed correctly but the second page and others are missing

the pictures and every formatting of the pages.

 

Some help about this?

 

Greetings

 

Andreas

 

Hello,

 

consider to update to iOSC 5.1

 

regards

Rainer

Share this post


Link to post
Share on other sites

in version 5.0 there were some files that had blanks and blank lines after the the last ?> He changed that in the 5.1, maybe try installing that version.

 

I already did that but no results. It would be great if somebody could take a look and make this 2.3.3 compatible. The only thing that does not work is redirect if user is no logged in

Share this post


Link to post
Share on other sites

I already did that but no results. It would be great if somebody could take a look and make this 2.3.3 compatible. The only thing that does not work is redirect if user is no logged in

 

Hello,

 

did you check this:

Edit your php.ini and set output_buffering to 4096

 

regards

Rainer

Share this post


Link to post
Share on other sites

Hello,

 

consider to update to iOSC 5.1

 

regards

Rainer

ok, installed a fresh iOSC 5.1

In the install.txt there is a section saying "2. in: Admin/Configuration/Mobile Site"

I don' know what this means because the is no Admin and no Configuration/Mobile Site.

So where do I set this:

define ('MOBILE_PRODUCT_NAME_LENGTH', 55);

define ('FOOTER_DATE_ENABLED', false);

define ('FOOTER_SITE_STATS_ENABLED', false);

 

Another issue is I get the following in the apache error.log:

[Tue Oct 16 11:51:23 2012] [error] [client 84.179.89.21] File does not exist: /vwww/bitcorner.de/root/shop/includes/ajax.js, referer: http://www.bitcorner.de/shop/mobile_catalogue.php?cPath=537

[Tue Oct 16 11:51:23 2012] [error] [client 84.179.89.21] File does not exist: /vwww/bitcorner.de/root/shop/includes/split_page_results_ajax.js, referer: http://www.bitcorner.de/shop/mobile_catalogue.php?cPath=537

 

This ajax.js resides in mobile/includes. Is this wrongly referenced somewhere?

 

And again, the productimages are not shown if a categorie has more than one page. The

images are not there on the second and ulterior pages.

 

Andreas

Share this post


Link to post
Share on other sites

ok, installed a fresh iOSC 5.1

In the install.txt there is a section saying "2. in: Admin/Configuration/Mobile Site"

I don' know what this means because the is no Admin and no Configuration/Mobile Site.

So where do I set this:

define ('MOBILE_PRODUCT_NAME_LENGTH', 55);

define ('FOOTER_DATE_ENABLED', false);

define ('FOOTER_SITE_STATS_ENABLED', false);

 

Another issue is I get the following in the apache error.log:

[Tue Oct 16 11:51:23 2012] [error] [client 84.179.89.21] File does not exist: /vwww/bitcorner.de/root/shop/includes/ajax.js, referer: http://www.bitcorner.de/shop/mobile_catalogue.php?cPath=537

[Tue Oct 16 11:51:23 2012] [error] [client 84.179.89.21] File does not exist: /vwww/bitcorner.de/root/shop/includes/split_page_results_ajax.js, referer: http://www.bitcorner.de/shop/mobile_catalogue.php?cPath=537

 

This ajax.js resides in mobile/includes. Is this wrongly referenced somewhere?

 

And again, the productimages are not shown if a categorie has more than one page. The

images are not there on the second and ulterior pages.

 

Andreas

 

The configuration settings are moved to the administration area of your shop.

If you run the sql script you should have one new configuration group called 'mobile site'.

There you will find now all configuration entries (and some new for advanced search) which were in iOSC 5.0 in mobile/includes/configuration.php

 

Then make shure there that 'Ajax enabled' is set to 'false'.

Ajax dosn't work yet in this version.

 

regards

Rainer

Edited by raiwa

Share this post


Link to post
Share on other sites

The configuration settings are moved to the administration area of your shop.

If you run the sql script you should have one new configuration group called 'mobile site'.

There you will find now all configuration entries (and some new for advanced search) which were in iOSC 5.0 in mobile/includes/configuration.php

 

Then make shure there that 'Ajax enabled' is set to 'false'.

Ajax dosn't work yet in this version.

 

regards

Rainer

ok, found the configuration in admin and set ''Ajax enabeld to false.

A problem with the icons in the header.php, they are not shown also the path in header.php seems to be correct.

 

Andreas

Share this post


Link to post
Share on other sites

ok, found the configuration in admin and set ''Ajax enabeld to false.

A problem with the icons in the header.php, they are not shown also the path in header.php seems to be correct.

 

Andreas

 

Try to add a banner to the header

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

×