Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

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


bumbarash

Recommended Posts

hi thanks

 

so the current version, what functionality is missing from it?

 

there is another mobile version here

 

http://www.css-oscommerce.com/mobile-oscommerce/

 

is that related to yours or a different one?

 

 

The main new features of iOSC 6.0 are:

 

- possibility to install mobile site under subdomain (m.yourshop.com)

- installation of all mobile files in the mobile/ directory or subdomain instead of the main shop directory

- same filenames for mobile pages like the standard filenames (catalog/mobile/index.php instead of catalog/mobile_index.php)

- simplified redirect scripts

- jquery ui buttons

- bigger touch screen friendly link areas in mobile-header and footer.

- full category paths like in desktop site

- .................

 

the other mobile version you mention is not related to iOSC and I have no information about.

Link to comment
Share on other sites

The main new features of iOSC 6.0 are:

 

- possibility to install mobile site under subdomain (m.yourshop.com)

- installation of all mobile files in the mobile/ directory or subdomain instead of the main shop directory

- same filenames for mobile pages like the standard filenames (catalog/mobile/index.php instead of catalog/mobile_index.php)

- simplified redirect scripts

- jquery ui buttons

- bigger touch screen friendly link areas in mobile-header and footer.

- full category paths like in desktop site

- .................

 

the other mobile version you mention is not related to iOSC and I have no information about.

 

ok thanks

 

what if i have a plugin such as "better checkout" installed on my 2.3.3?

 

how does the checkout process work on the mobile version? would i have to specifically modify my mobile version to have the new checkout?

Link to comment
Share on other sites

ok thanks

 

what if i have a plugin such as "better checkout" installed on my 2.3.3?

 

how does the checkout process work on the mobile version? would i have to specifically modify my mobile version to have the new checkout?

 

 

Most internal processes and functions are identical to the desktop site, it's just a different presentation of the content. So each add on which has been added on your desktop pages (public side not admin) must be installed and adjusted on the mobile pages.

There is a contribution support package available here:

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

which includes instructions to do this for a group of common add-ons ("better checkout" is not yet included).

other add-ons must be adapted by yourself.

Link to comment
Share on other sites

Hello Raiwa,

 

Thank you very, very much for your reply. Here is the URL for the mobile version:

 

http://www.tonyshoes.com/mobile_index.php

 

It works perfectly but when you click on the language at the bottom and then click the FRANCAIS, the page will become blank.

 

Thank you very much again.

 

Hello @@TONYSHOES,

 

You have SEO URLs In your shop installed and the SEO URL support for iOSC mobile is not added.

Download the contripution support package here:

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

 

And install the support for your SEO URL add-on.

 

You can also disable the multi language support in your SEO URL configuration, this should resolve the problem in 2 seconds until you add the support.

 

regards

Rainer

Edited by raiwa
Link to comment
Share on other sites

Hello Raiwa,

 

Thank you very much for your quick and amazing reply.

 

We have actually downloaded the contribution support for SEO URL. Inside the folder named "SEO URLs USU5_vers2rev1" we followed the instruction contained in the file "install seo urls usu 5".

 

Was it the right file or instruction that we should follow with the SEO URL that we have?

 

Thank you again.

Link to comment
Share on other sites

Wondering if anybody was working on a "Reponsive Design" version? Would be so much simpler than this redirecting version that seems to be quite demanding in terms of scalability.

 

I'm ready to start working on such a version myself, just wondering if anybody had something in the works...

 

Thanks!

Link to comment
Share on other sites

Hello Raiwa,

 

Thank you very much for your quick and amazing reply.

 

We have actually downloaded the contribution support for SEO URL. Inside the folder named "SEO URLs USU5_vers2rev1" we followed the instruction contained in the file "install seo urls usu 5".

 

Was it the right file or instruction that we should follow with the SEO URL that we have?

 

Thank you again.

 

I suppose it is, SEO URLs_2.2._by_chemo doesn't include language support, but you should know better then me which version you are using :)

regards

raiwa

Link to comment
Share on other sites

Wondering if anybody was working on a "Reponsive Design" version? Would be so much simpler than this redirecting version that seems to be quite demanding in terms of scalability.

 

I'm ready to start working on such a version myself, just wondering if anybody had something in the works...

 

Thanks!

 

Hello @@pixclinic,

 

I was thinking sometimes too about responsive design and I think it makes sense for powerful mobile devices like last generation ipads, iphones and other smart phones and maybe in the future it will be the best solution.

For now there are still a lot of memory, processor and connection speed limited devices in use.

So it is not only a css and design question, but also a question to present simplified content with simplified pages.

Think about all the content of the main structure, boxes etc of OSC desktop pages and some add-ons like "one-page checkout" which include even more content in one and the same page.

Maybe I'm wrong and responsive design can do more than I suppose.

 

regards

Rainer

Edited by raiwa
Link to comment
Share on other sites

I'm having a problem with PayPal Express integration (PayPal Express Checkout v1.2) -- I can go through the mobile store fine but when I hit the continue button on mobile_checkout_payment.php, I get redirected to mobile_express.php, which doesn't exist. If I disable the mobile site and go through the mobile pages manually, it correctly redirects to PayPal. Help!

Link to comment
Share on other sites

I'm having a problem with PayPal Express integration (PayPal Express Checkout v1.2) -- I can go through the mobile store fine but when I hit the continue button on mobile_checkout_payment.php, I get redirected to mobile_express.php, which doesn't exist. If I disable the mobile site and go through the mobile pages manually, it correctly redirects to PayPal. Help!

 

Hello @@mike@rentageekme.com,

 

Did you add the support for PayPal express included in the support package:

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

 

regards

Rainer

Link to comment
Share on other sites

I'm not using the WPP plugin that's mentioned in the support package; I'm using this one: http://addons.oscommerce.com/service/paypal

 

I added the code anyways and now I have a "Fatal error: Call to undefined function tep_paypal_wpp_ep_button()" error.

 

The site is located at http://www.insightful-products.com/buy/mobile_index.php

 

Thanks for the quick response!!

Link to comment
Share on other sites

I'm not using the WPP plugin that's mentioned in the support package; I'm using this one: http://addons.oscommerce.com/service/paypal

 

I added the code anyways and now I have a "Fatal error: Call to undefined function tep_paypal_wpp_ep_button()" error.

 

The site is located at http://www.insightful-products.com/buy/mobile_index.php

 

Thanks for the quick response!!

 

It's this you should add:

 

Discount_Code_for_osCommerce_231_paypal_express

 

The discount code part is not necessary to add.

Link to comment
Share on other sites

  • 3 weeks later...

Raiwa,

 

I have a different problem now, and I saw that Ranier had a similar problem -- but mine is slightly different than his was.

 

When I try to add an item to cart, it will not add to the cart. I saw what you had responded to Ranier -- and I tried adding the product on the desktop side, and then going back to the mobile side and trying to add a product after that, but only the desktop side added the product -- the mobile side did not.

 

Furthermore, on my desktop side, I have the ability to enter a quantity for each product, but on my mobile side, the quantity option disappears.

 

The add the cart issue is definitely the bigger issue, as my mobile site is unable to accept orders without it, but if you happen to know both fixes, that would be great.

Link to comment
Share on other sites

I also just noticed that my update and remove buttons don't work on the shopping_cart page when in internet explorer, but it does work in mozilla firefox. Very confusing -- Any ideas?

Edited by bandmans
Link to comment
Share on other sites

I also just noticed that my update and remove buttons don't work on the shopping_cart page when in internet explorer, but it does work in mozilla firefox. Very confusing -- Any ideas?

 

Hello Eric @@bandmans,

 

Please:

 

- which exact mobile osc version do you have installed?

- can you post your store url to see what happens?

- can you post the source code of your shopping_cart.php?

 

Thanks and kind regards

Rainer (raiwa)

Link to comment
Share on other sites

Ranier,

 

Thank you for the response.

 

- I have the version IOSC3 v5.4.rev2 installed

 

- My store url is www.bandmans.com. I currently have the mobile site off, so it won't automatically redirect on cell phones, but you can see the mobile site at www.bandmans.com/mobile_index.php.

 

- Source code of shopping_cart.php:

 

<?php

/*

$Id: shopping_cart.php 1739 2007-12-20 00:52:16Z hpdl $

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

Copyright © 2007 osCommerce

Released under the GNU General Public License

*/

require("includes/application_top.php");

if ($cart->count_contents() > 0) {

include(DIR_WS_CLASSES . 'payment.php');

$payment_modules = new payment;

}

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

$breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_SHOPPING_CART));

?>

<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">

<html <?php echo HTML_PARAMS; ?>>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">

<title><?php echo TITLE; ?></title>

<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">

<script type="text/javascript" src="iepngfix_tilebg.js"></script>

<link rel="stylesheet" type="text/css" href="stylesheet.css">

<style type="text/css">

.ie6_png {behavior: url("iepngfix.htc") }

.ie6_png img {behavior: url("iepngfix.htc") }

.ie6_png input {behavior: url("iepngfix.htc") }

</style>

</head>

<body>

<!-- header //-->

<?php require(DIR_WS_INCLUDES . 'header.php'); ?>

<!-- header_eof //-->

<!-- body //-->

<table border="0" class="<?php echo MAIN_TABLE; ?>" cellspacing="0" cellpadding="0">

<tr>

<td class="<?php echo BOX_WIDTH_TD_LEFT; ?>"><table border="0" class="<?php echo BOX_WIDTH_LEFT; ?>" cellspacing="0" cellpadding="0">

<!-- left_navigation //-->

<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>

<!-- left_navigation_eof //-->

</table></td>

<!-- body_text //-->

<td class="<?php echo CONTENT_WIDTH_TD; ?>"><?php echo panel_top(); ?><?php echo tep_draw_form('cart_quantity', tep_href_link(FILENAME_SHOPPING_CART, 'action=update_product')); ?>

 

<?php echo tep_draw_top();?>

<?php echo tep_draw_title_top();?>

<?php echo HEADING_TITLE; ?>

 

<?php echo tep_draw_title_bottom();?>

 

<?php

if ($cart->count_contents() > 0) {

?>

 

<?php echo tep_draw1_top();?>

<?php

$info_box_contents = array();

$info_box_contents[0][] = array('align' => 'center',

'params' => ' class="s_cart_head s_cart_head_padd remove"',

'text' => ''.TABLE_HEADING_REMOVE.'');

$info_box_contents[0][] = array('align' => 'center',

'params' => ' class="s_cart_head s_cart_head_padd products"',

'text' => ''.TABLE_HEADING_PRODUCTS.'');

$info_box_contents[0][] = array('align' => 'center',

'params' => ' class="s_cart_head s_cart_head_padd quantity"',

'text' => ''.TABLE_HEADING_QUANTITY.'');

$info_box_contents[0][] = array('align' => 'center',

'params' => ' class="s_cart_head s_cart_head_padd total"',

'text' => ''.TABLE_HEADING_TOTAL.'');

 

$any_out_of_stock = 0;

$products = $cart->get_products();

 

/* MPQM */

$uniqueProductArray["pId"] = array();

$uniqueProductArray["pQty"] = array();

 

foreach($products as $tempContents) {

$justpId = intval($tempContents['id']);

if (!in_array($justpId, $uniqueProductArray["pId"])) {

$uniqueProductArray["pId"][$justpId] = $justpId;

$uniqueProductArray["pQty"][$justpId] = $tempContents['quantity'];

} else {

$uniqueProductArray["pQty"][$justpId] += $tempContents['quantity'];

}

}

/* MPQM */

 

for ($i=0, $n=sizeof($products); $i<$n; $i++) {

// Push all attributes information in an array

if (isset($products[$i]['attributes']) && is_array($products[$i]['attributes'])) {

while (list($option, $value) = each($products[$i]['attributes'])) {

echo tep_draw_hidden_field('id[' . $products[$i]['id'] . '][' . $option . ']', $value);

$attributes = tep_db_query("select popt.products_options_name, poval.products_options_values_name, pa.options_values_price, pa.price_prefix

from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_OPTIONS_VALUES . " poval, " . TABLE_PRODUCTS_ATTRIBUTES . " pa

where pa.products_id = '" . (int)$products[$i]['id'] . "'

and pa.options_id = '" . (int)$option . "'

and pa.options_id = popt.products_options_id

and pa.options_values_id = '" . (int)$value . "'

and pa.options_values_id = poval.products_options_values_id

and popt.language_id = '" . (int)$languages_id . "'

and poval.language_id = '" . (int)$languages_id . "'");

$attributes_values = tep_db_fetch_array($attributes);

$products[$i][$option]['products_options_name'] = $attributes_values['products_options_name'];

$products[$i][$option]['options_values_id'] = $value;

$products[$i][$option]['products_options_values_name'] = $attributes_values['products_options_values_name'];

$products[$i][$option]['options_values_price'] = $attributes_values['options_values_price'];

$products[$i][$option]['price_prefix'] = $attributes_values['price_prefix'];

}

}

}

for ($i=0, $n=sizeof($products); $i<$n; $i++) {

if (($i/2) == floor($i/2)) {

$info_box_contents[] = array('params' => '');

} else {

$info_box_contents[] = array('params' => '');

}

$cur_row = sizeof($info_box_contents) - 1;

$p_cart_pic = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products[$i]['id']) . '">' . tep_image(DIR_WS_IMAGES . $products[$i]['image'], $products[$i]['name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a>';

$info_box_contents[$cur_row][] = array('align' => 'center',

'params' => ' class="s_cart_td"',

'text' => tep_draw_checkbox_field('cart_delete[]', $products[$i]['id']));

$products_name = '<table border="0" cellspacing="10" cellpadding="0" align="center" class="main">' .

'<tr><td colspan="2" align="center" class="name name3_padd"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products[$i]['id']) . '">' . $products[$i]['name'] . '</a></td></tr>'.

'<tr><td align="center" height="220">'.tep_draw_prod_pic_top().''.$p_cart_pic.''.tep_draw_prod_pic_bottom().'</td></tr>';

if (STOCK_CHECK == 'true') {

$stock_check = tep_check_stock($products[$i]['id'], $products[$i]['quantity']);

if (tep_not_null($stock_check)) {

$any_out_of_stock = 1;

$products_name .= $stock_check;

}

}

 

/* MPQM */

$productMinimQtyCost = "";

$justpId = intval($products[$i]['id']);

if (in_array($justpId, $uniqueProductArray["pId"])) {

if ($products[$i]['mpenalty'] > 0 &&

$products[$i]['mqty'] > $uniqueProductArray["pQty"][$justpId]

) {

$products_name .= '<tr><td class="main" align="left">Quantity less than '.$products[$i]['mqty']." </td></tr>\n" ;

$productMinimQtyCost = $currencies->format($products[$i]['mpenalty']);

 

/* Removing this product from the Penalty */

$uniqueProductArray["pId"][$justpId] = "";

$uniqueProductArray["pQty"][$justpId] = "";

}

}

/* MPQM */

 

if (isset($products[$i]['attributes']) && is_array($products[$i]['attributes'])) {

reset($products[$i]['attributes']);

$products_name .= '';

while (list($option, $value) = each($products[$i]['attributes'])) {

$products_name .= '<tr><td align="center"><i> - ' . $products[$i][$option]['products_options_name'] . ' ' . $products[$i][$option]['products_options_values_name'] . '</i><br>';

}

// denuz text attr

$b = strpos($products[$i]['id'], '{');

if ($b === false) {

$pid = $products[$i]['id'];

} else {

$pid = substr($products[$i]['id'], 0, $B);

}

$attr_q = tep_db_query("select cbta.*, pta.products_text_attributes_name from customers_basket_text_attributes as cbta, products_text_attributes as pta where cbta.products_text_attributes_id = pta.products_text_attributes_id and cbta.products_id = " . $pid . " and cbta.session_id = '" . $osCsid . "'");

while ($attr = tep_db_fetch_array($attr_q)) {

$products_name .= '<br><small><i> - ' . $attr['products_text_attributes_name'] . ' ' . stripslashes($attr['products_text_attributes_text']) . '</i></small>';

}

// eof denuz text attr

$products_name .= '</td></tr>';

 

}

$products_name .= '</table>';

$info_box_contents[$cur_row][] = array('params' => '',

'text' => $products_name);

$info_box_contents[$cur_row][] = array('align' => 'center',

'params' => 'class="s_cart_td"',

'text' => tep_draw_input_field('cart_quantity[]', $products[$i]['quantity'], 'size="2"') . tep_draw_hidden_field('products_id[]', $products[$i]['id']));

$info_box_contents[$cur_row][] = array('align' => 'center',

'params' => 'class="s_cart_td"',

'text' => '<table><tr><td align="center"><span class="productSpecialPrice">' .

$currencies->display_price($products[$i]['final_price'],

tep_get_tax_rate($products[$i]['tax_class_id']), $products[$i]['quantity']) .

'</span></td></tr>' .

'<span style="color:black;"><tr><td align="center" style="height:266px; vertical-align:bottom" >' . $productMinimQtyCost .

'</span></td></tr>' . "</table>"

);

}

new productListingBox($info_box_contents);

?>

<?php

if ($any_out_of_stock == 1) {

if (STOCK_ALLOW_CHECKOUT == 'true') {

?>

 

<table cellpadding="0" cellspacing="0" border="0">

<tr><td class="stockWarning" align="center"><br><?php echo OUT_OF_STOCK_CAN_CHECKOUT; ?></td></tr>

</table>

<?php

} else {

?>

<table cellpadding="0" cellspacing="0" border="0">

<tr><td class="stockWarning" align="center"><br><?php echo OUT_OF_STOCK_CANT_CHECKOUT; ?></td></tr>

</table>

<?php

}

}

?>

<?php

// Begin Free Gift Mod

if(defined(MODULE_FREEGIFT_STATUS) && MODULE_FREEGIFT_STATUS === 'true') {

?>

<tr>

<td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">

<tr class="infoBoxContents">

<td>

<?

$info_box_contents = array();

$freegifts_available_query = tep_db_query("SELECT COUNT(*) FROM " . TABLE_PRODUCTS . " p Inner Join " . TABLE_PRODUCTS_TO_CATEGORIES . " ptc ON p.products_id = ptc.products_id WHERE ptc.categories_id = '". MODULE_FREEGIFT_CATEGORY . "'");

$freegifts_available = tep_db_fetch_array($freegifts_available_query);

if (sizeof(($freegifts_available) > 0)) {

if ($cart->show_total() >= MODULE_FREEGIFT_MINIMUM_SPEND) {

$info_box_contents[0][] = array('align' => 'left',

'params' => 'class="productListing-heading"',

'text' => (($cart->get_freegift() > 0) ? TEXT_CURRENT_CHOICE . tep_get_products_name($cart->get_freegift()) . ' ' : TEXT_NO_SELECTED));

// Display Dropdown box full of products in free gifts category

$freegifts_query = tep_db_query("SELECT p.products_id, pd.products_name FROM " . TABLE_PRODUCTS . " p Inner Join " . TABLE_PRODUCTS_TO_CATEGORIES . " ptc ON p.products_id = ptc.products_id Inner Join " . TABLE_PRODUCTS_DESCRIPTION . " pd ON p.products_id = pd.products_id WHERE ptc.categories_id = '". MODULE_FREEGIFT_CATEGORY . "'");

$freegifts_array[] = array( 'id' => 0,

'text' => TEXT_SELECT_GIFT);

while ($freegifts = tep_db_fetch_array($freegifts_query)) {

$freegifts_array[] = array('id' => $freegifts['products_id'],

'text' => $freegifts['products_name']);

}

 

$info_box_contents[1][] = array('align' => 'center',

'params' => 'class="productListing-data" valign="top"',

'text' => '<b>' . TEXT_GIFT_CHOICE . '</b>' . tep_draw_pull_down_menu('freegift_id', $freegifts_array, $cart->get_freegift()) . '<br><br><font color="Red">' . TEXT_CLICK . ' ' .tep_draw_form('freegift', tep_href_link(FILENAME_SHOPPING_CART, 'action=update_product')) . '<input type="submit" style="background-color: transparent;border: none;cursor: pointer;cursor: hand;" value="Here"> </form>' . TEXT_CONFIRM_SELECT . '</font>');

 

} else {

$cart->set_freegift(0);

$info_box_contents[0][] = array('align' => 'left',

'params' => 'class="productListing-heading"',

'text' => TEXT_FREE_GIFT);

$info_box_contents[1][] = array('align' => 'center',

'params' => 'class="productListing-data" valign="top"',

'text' => '<b><font color="Red">' . TEXT_SPEND_EXTRA . $currencies->format(-$cart->show_total()+MODULE_FREEGIFT_MINIMUM_SPEND) . ' ' . TEXT_RECEIVE_GIFT . '</font></b>');

}

new productListingBox($info_box_contents);

}

?><br><center><font color="#000000"><a href="http://www.bandmans.com/bandmans-free-offers-c-282.html" target="_blank">Click here</a> to see free gifts</font>

</td>

</tr>

</table></td>

</tr>

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

<?php

// End Free Gift Mod

}

?>

<?php /* echo tep_draw_infoBox2_top(); */ ?>

<div class="cart_line_x padd2_gg"><?php echo tep_draw_separator('spacer.gif', '1', '1'); ?></div>

 

<table cellspacing="0" cellpadding="0" border="0">

<tr>

<td width="80%" align="right" class="cart_total_left"><?php echo SUB_TITLE_SUB_TOTAL; ?></td>

<td width="20%" align="center" class="cart_total_right main">

<span class="productSpecialPrice"><?php echo $currencies->format($cart->show_total()); ?></span>

</td>

</tr>

</table>

<div class="cart_line_x padd2_gg"><?php echo tep_draw_separator('spacer.gif', '1', '1'); ?></div>

 

<table cellspacing="0" cellpadding="0" border="0" >

<tr>

<td style="padding:15px 20px 9px 20px;" class="button2_marg bg_input"><?php echo tep_image_submit('button_update_cart1.gif', IMAGE_BUTTON_UPDATE_CART); ?>   <?php

 

$back = sizeof($navigation->path)-2;

if (isset($navigation->path[$back])) {

echo '<a href="' . tep_href_link($navigation->path[$back]['page'], tep_array_to_string($navigation->path[$back]['get'], array('action')), $navigation->path[$back]['mode']) . '">' . tep_image_button('button_continue_shopping.gif', IMAGE_BUTTON_CONTINUE_SHOPPING) . '</a>';

}

?>   <?php echo '<a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '">' . tep_image_button('button_checkout1.gif', IMAGE_BUTTON_CHECKOUT) . '</a>'; ?></td>

</tr>

</table>

 

<?php /* echo tep_draw_infoBox2_bottom(); */ ?>

 

<?php

$initialize_checkout_methods = $payment_modules->checkout_initialization_method();

if (!empty($initialize_checkout_methods)) {

?>

<table cellpadding="0" cellspacing="0" border="0">

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

<tr>

<td align="right" class="main" style="padding-right:50px;"><?php echo TEXT_ALTERNATIVE_CHECKOUT_METHODS; ?></td>

</tr>

<?php

reset($initialize_checkout_methods);

while (list(, $value) = each($initialize_checkout_methods)) {

?>

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

<tr>

<td align="right" class="main"><?php echo $value; ?></td>

</tr>

</table>

<?php echo tep_draw4_bottom();?>

 

<?php

}

}

}else {

?>

<?php echo tep_draw1_top();?>

<?php echo tep_draw_infoBox_top();?>

<?php new infoBox_search_criteria(array(array('text' => TEXT_CART_EMPTY))); ?>

<?php echo tep_draw_infoBox_bottom();?>

<?php echo tep_pixel_trans();?>

 

<?php /* echo tep_draw_infoBox2_top(); */ ?>

<table border="0" width="100%" cellspacing="0" cellpadding="2"><tr>

<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>

<td align="right" class="main"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . '</a>'; ?></td>

<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>

</tr>

</table>

 

<?php /* echo tep_draw_infoBox2_bottom(); */ ?>

<?php

}

?>

 

<?php echo tep_draw1_bottom();?>

 

<?php echo tep_draw_bottom();?>

</form></td>

<!-- body_text_eof //-->

<td class="<?php echo BOX_WIDTH_TD_RIGHT; ?>"><table border="0" class="<?php echo BOX_WIDTH_RIGHT; ?>" cellspacing="0" cellpadding="0">

<!-- right_navigation //-->

<?php require(DIR_WS_INCLUDES . 'column_right.php'); ?>

<!-- right_navigation_eof //-->

</table></td>

</tr>

</table>

<!-- body_eof //-->

<!-- footer //-->

<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>

<!-- footer_eof //-->

</body>

</html>

<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

 

Thanks again! Let me know if you need anything else from me.

Link to comment
Share on other sites

Ranier,

 

Thank you for the response.

 

- I have the version IOSC3 v5.4.rev2 installed

 

- My store url is www.bandmans.com. I currently have the mobile site off, so it won't automatically redirect on cell phones, but you can see the mobile site at www.bandmans.com/mobile_index.php.

 

- Source code of shopping_cart.php:

 

<?php

/*

$Id: shopping_cart.php 1739 2007-12-20 00:52:16Z hpdl $

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

Copyright © 2007 osCommerce

Released under the GNU General Public License

*/

require("includes/application_top.php");

if ($cart->count_contents() > 0) {

include(DIR_WS_CLASSES . 'payment.php');

$payment_modules = new payment;

}

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

$breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_SHOPPING_CART));

?>

<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">

<html <?php echo HTML_PARAMS; ?>>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">

<title><?php echo TITLE; ?></title>

<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">

<script type="text/javascript" src="iepngfix_tilebg.js"></script>

<link rel="stylesheet" type="text/css" href="stylesheet.css">

<style type="text/css">

.ie6_png {behavior: url("iepngfix.htc") }

.ie6_png img {behavior: url("iepngfix.htc") }

.ie6_png input {behavior: url("iepngfix.htc") }

</style>

</head>

<body>

<!-- header //-->

<?php require(DIR_WS_INCLUDES . 'header.php'); ?>

<!-- header_eof //-->

<!-- body //-->

<table border="0" class="<?php echo MAIN_TABLE; ?>" cellspacing="0" cellpadding="0">

<tr>

<td class="<?php echo BOX_WIDTH_TD_LEFT; ?>"><table border="0" class="<?php echo BOX_WIDTH_LEFT; ?>" cellspacing="0" cellpadding="0">

<!-- left_navigation //-->

<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>

<!-- left_navigation_eof //-->

</table></td>

<!-- body_text //-->

<td class="<?php echo CONTENT_WIDTH_TD; ?>"><?php echo panel_top(); ?><?php echo tep_draw_form('cart_quantity', tep_href_link(FILENAME_SHOPPING_CART, 'action=update_product')); ?>

 

<?php echo tep_draw_top();?>

<?php echo tep_draw_title_top();?>

<?php echo HEADING_TITLE; ?>

 

<?php echo tep_draw_title_bottom();?>

 

<?php

if ($cart->count_contents() > 0) {

?>

 

<?php echo tep_draw1_top();?>

<?php

$info_box_contents = array();

$info_box_contents[0][] = array('align' => 'center',

'params' => ' class="s_cart_head s_cart_head_padd remove"',

'text' => ''.TABLE_HEADING_REMOVE.'');

$info_box_contents[0][] = array('align' => 'center',

'params' => ' class="s_cart_head s_cart_head_padd products"',

'text' => ''.TABLE_HEADING_PRODUCTS.'');

$info_box_contents[0][] = array('align' => 'center',

'params' => ' class="s_cart_head s_cart_head_padd quantity"',

'text' => ''.TABLE_HEADING_QUANTITY.'');

$info_box_contents[0][] = array('align' => 'center',

'params' => ' class="s_cart_head s_cart_head_padd total"',

'text' => ''.TABLE_HEADING_TOTAL.'');

 

$any_out_of_stock = 0;

$products = $cart->get_products();

 

/* MPQM */

$uniqueProductArray["pId"] = array();

$uniqueProductArray["pQty"] = array();

 

foreach($products as $tempContents) {

$justpId = intval($tempContents['id']);

if (!in_array($justpId, $uniqueProductArray["pId"])) {

$uniqueProductArray["pId"][$justpId] = $justpId;

$uniqueProductArray["pQty"][$justpId] = $tempContents['quantity'];

} else {

$uniqueProductArray["pQty"][$justpId] += $tempContents['quantity'];

}

}

/* MPQM */

 

for ($i=0, $n=sizeof($products); $i<$n; $i++) {

// Push all attributes information in an array

if (isset($products[$i]['attributes']) && is_array($products[$i]['attributes'])) {

while (list($option, $value) = each($products[$i]['attributes'])) {

echo tep_draw_hidden_field('id[' . $products[$i]['id'] . '][' . $option . ']', $value);

$attributes = tep_db_query("select popt.products_options_name, poval.products_options_values_name, pa.options_values_price, pa.price_prefix

from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_OPTIONS_VALUES . " poval, " . TABLE_PRODUCTS_ATTRIBUTES . " pa

where pa.products_id = '" . (int)$products[$i]['id'] . "'

and pa.options_id = '" . (int)$option . "'

and pa.options_id = popt.products_options_id

and pa.options_values_id = '" . (int)$value . "'

and pa.options_values_id = poval.products_options_values_id

and popt.language_id = '" . (int)$languages_id . "'

and poval.language_id = '" . (int)$languages_id . "'");

$attributes_values = tep_db_fetch_array($attributes);

$products[$i][$option]['products_options_name'] = $attributes_values['products_options_name'];

$products[$i][$option]['options_values_id'] = $value;

$products[$i][$option]['products_options_values_name'] = $attributes_values['products_options_values_name'];

$products[$i][$option]['options_values_price'] = $attributes_values['options_values_price'];

$products[$i][$option]['price_prefix'] = $attributes_values['price_prefix'];

}

}

}

for ($i=0, $n=sizeof($products); $i<$n; $i++) {

if (($i/2) == floor($i/2)) {

$info_box_contents[] = array('params' => '');

} else {

$info_box_contents[] = array('params' => '');

}

$cur_row = sizeof($info_box_contents) - 1;

$p_cart_pic = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products[$i]['id']) . '">' . tep_image(DIR_WS_IMAGES . $products[$i]['image'], $products[$i]['name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a>';

$info_box_contents[$cur_row][] = array('align' => 'center',

'params' => ' class="s_cart_td"',

'text' => tep_draw_checkbox_field('cart_delete[]', $products[$i]['id']));

$products_name = '<table border="0" cellspacing="10" cellpadding="0" align="center" class="main">' .

'<tr><td colspan="2" align="center" class="name name3_padd"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products[$i]['id']) . '">' . $products[$i]['name'] . '</a></td></tr>'.

'<tr><td align="center" height="220">'.tep_draw_prod_pic_top().''.$p_cart_pic.''.tep_draw_prod_pic_bottom().'</td></tr>';

if (STOCK_CHECK == 'true') {

$stock_check = tep_check_stock($products[$i]['id'], $products[$i]['quantity']);

if (tep_not_null($stock_check)) {

$any_out_of_stock = 1;

$products_name .= $stock_check;

}

}

 

/* MPQM */

$productMinimQtyCost = "";

$justpId = intval($products[$i]['id']);

if (in_array($justpId, $uniqueProductArray["pId"])) {

if ($products[$i]['mpenalty'] > 0 &&

$products[$i]['mqty'] > $uniqueProductArray["pQty"][$justpId]

) {

$products_name .= '<tr><td class="main" align="left">Quantity less than '.$products[$i]['mqty']." </td></tr>\n" ;

$productMinimQtyCost = $currencies->format($products[$i]['mpenalty']);

 

/* Removing this product from the Penalty */

$uniqueProductArray["pId"][$justpId] = "";

$uniqueProductArray["pQty"][$justpId] = "";

}

}

/* MPQM */

 

if (isset($products[$i]['attributes']) && is_array($products[$i]['attributes'])) {

reset($products[$i]['attributes']);

$products_name .= '';

while (list($option, $value) = each($products[$i]['attributes'])) {

$products_name .= '<tr><td align="center"><i> - ' . $products[$i][$option]['products_options_name'] . ' ' . $products[$i][$option]['products_options_values_name'] . '</i><br>';

}

// denuz text attr

$b = strpos($products[$i]['id'], '{');

if ($b === false) {

$pid = $products[$i]['id'];

} else {

$pid = substr($products[$i]['id'], 0, $ B);

}

$attr_q = tep_db_query("select cbta.*, pta.products_text_attributes_name from customers_basket_text_attributes as cbta, products_text_attributes as pta where cbta.products_text_attributes_id = pta.products_text_attributes_id and cbta.products_id = " . $pid . " and cbta.session_id = '" . $osCsid . "'");

while ($attr = tep_db_fetch_array($attr_q)) {

$products_name .= '<br><small><i> - ' . $attr['products_text_attributes_name'] . ' ' . stripslashes($attr['products_text_attributes_text']) . '</i></small>';

}

// eof denuz text attr

$products_name .= '</td></tr>';

 

}

$products_name .= '</table>';

$info_box_contents[$cur_row][] = array('params' => '',

'text' => $products_name);

$info_box_contents[$cur_row][] = array('align' => 'center',

'params' => 'class="s_cart_td"',

'text' => tep_draw_input_field('cart_quantity[]', $products[$i]['quantity'], 'size="2"') . tep_draw_hidden_field('products_id[]', $products[$i]['id']));

$info_box_contents[$cur_row][] = array('align' => 'center',

'params' => 'class="s_cart_td"',

'text' => '<table><tr><td align="center"><span class="productSpecialPrice">' .

$currencies->display_price($products[$i]['final_price'],

tep_get_tax_rate($products[$i]['tax_class_id']), $products[$i]['quantity']) .

'</span></td></tr>' .

'<span style="color:black;"><tr><td align="center" style="height:266px; vertical-align:bottom" >' . $productMinimQtyCost .

'</span></td></tr>' . "</table>"

);

}

new productListingBox($info_box_contents);

?>

<?php

if ($any_out_of_stock == 1) {

if (STOCK_ALLOW_CHECKOUT == 'true') {

?>

 

<table cellpadding="0" cellspacing="0" border="0">

<tr><td class="stockWarning" align="center"><br><?php echo OUT_OF_STOCK_CAN_CHECKOUT; ?></td></tr>

</table>

<?php

} else {

?>

<table cellpadding="0" cellspacing="0" border="0">

<tr><td class="stockWarning" align="center"><br><?php echo OUT_OF_STOCK_CANT_CHECKOUT; ?></td></tr>

</table>

<?php

}

}

?>

<?php

// Begin Free Gift Mod

if(defined(MODULE_FREEGIFT_STATUS) && MODULE_FREEGIFT_STATUS === 'true') {

?>

<tr>

<td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">

<tr class="infoBoxContents">

<td>

<?

$info_box_contents = array();

$freegifts_available_query = tep_db_query("SELECT COUNT(*) FROM " . TABLE_PRODUCTS . " p Inner Join " . TABLE_PRODUCTS_TO_CATEGORIES . " ptc ON p.products_id = ptc.products_id WHERE ptc.categories_id = '". MODULE_FREEGIFT_CATEGORY . "'");

$freegifts_available = tep_db_fetch_array($freegifts_available_query);

if (sizeof(($freegifts_available) > 0)) {

if ($cart->show_total() >= MODULE_FREEGIFT_MINIMUM_SPEND) {

$info_box_contents[0][] = array('align' => 'left',

'params' => 'class="productListing-heading"',

'text' => (($cart->get_freegift() > 0) ? TEXT_CURRENT_CHOICE . tep_get_products_name($cart->get_freegift()) . ' ' : TEXT_NO_SELECTED));

// Display Dropdown box full of products in free gifts category

$freegifts_query = tep_db_query("SELECT p.products_id, pd.products_name FROM " . TABLE_PRODUCTS . " p Inner Join " . TABLE_PRODUCTS_TO_CATEGORIES . " ptc ON p.products_id = ptc.products_id Inner Join " . TABLE_PRODUCTS_DESCRIPTION . " pd ON p.products_id = pd.products_id WHERE ptc.categories_id = '". MODULE_FREEGIFT_CATEGORY . "'");

$freegifts_array[] = array( 'id' => 0,

'text' => TEXT_SELECT_GIFT);

while ($freegifts = tep_db_fetch_array($freegifts_query)) {

$freegifts_array[] = array('id' => $freegifts['products_id'],

'text' => $freegifts['products_name']);

}

 

$info_box_contents[1][] = array('align' => 'center',

'params' => 'class="productListing-data" valign="top"',

'text' => '<b>' . TEXT_GIFT_CHOICE . '</b>' . tep_draw_pull_down_menu('freegift_id', $freegifts_array, $cart->get_freegift()) . '<br><br><font color="Red">' . TEXT_CLICK . ' ' .tep_draw_form('freegift', tep_href_link(FILENAME_SHOPPING_CART, 'action=update_product')) . '<input type="submit" style="background-color: transparent;border: none;cursor: pointer;cursor: hand;" value="Here"> </form>' . TEXT_CONFIRM_SELECT . '</font>');

 

} else {

$cart->set_freegift(0);

$info_box_contents[0][] = array('align' => 'left',

'params' => 'class="productListing-heading"',

'text' => TEXT_FREE_GIFT);

$info_box_contents[1][] = array('align' => 'center',

'params' => 'class="productListing-data" valign="top"',

'text' => '<b><font color="Red">' . TEXT_SPEND_EXTRA . $currencies->format(-$cart->show_total()+MODULE_FREEGIFT_MINIMUM_SPEND) . ' ' . TEXT_RECEIVE_GIFT . '</font></b>');

}

new productListingBox($info_box_contents);

}

?><br><center><font color="#000000"><a href="http://www.bandmans.com/bandmans-free-offers-c-282.html" target="_blank">Click here</a> to see free gifts</font>

</td>

</tr>

</table></td>

</tr>

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

<?php

// End Free Gift Mod

}

?>

<?php /* echo tep_draw_infoBox2_top(); */ ?>

<div class="cart_line_x padd2_gg"><?php echo tep_draw_separator('spacer.gif', '1', '1'); ?></div>

 

<table cellspacing="0" cellpadding="0" border="0">

<tr>

<td width="80%" align="right" class="cart_total_left"><?php echo SUB_TITLE_SUB_TOTAL; ?></td>

<td width="20%" align="center" class="cart_total_right main">

<span class="productSpecialPrice"><?php echo $currencies->format($cart->show_total()); ?></span>

</td>

</tr>

</table>

<div class="cart_line_x padd2_gg"><?php echo tep_draw_separator('spacer.gif', '1', '1'); ?></div>

 

<table cellspacing="0" cellpadding="0" border="0" >

<tr>

<td style="padding:15px 20px 9px 20px;" class="button2_marg bg_input"><?php echo tep_image_submit('button_update_cart1.gif', IMAGE_BUTTON_UPDATE_CART); ?>   <?php

 

$back = sizeof($navigation->path)-2;

if (isset($navigation->path[$back])) {

echo '<a href="' . tep_href_link($navigation->path[$back]['page'], tep_array_to_string($navigation->path[$back]['get'], array('action')), $navigation->path[$back]['mode']) . '">' . tep_image_button('button_continue_shopping.gif', IMAGE_BUTTON_CONTINUE_SHOPPING) . '</a>';

}

?>   <?php echo '<a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '">' . tep_image_button('button_checkout1.gif', IMAGE_BUTTON_CHECKOUT) . '</a>'; ?></td>

</tr>

</table>

 

<?php /* echo tep_draw_infoBox2_bottom(); */ ?>

 

<?php

$initialize_checkout_methods = $payment_modules->checkout_initialization_method();

if (!empty($initialize_checkout_methods)) {

?>

<table cellpadding="0" cellspacing="0" border="0">

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

<tr>

<td align="right" class="main" style="padding-right:50px;"><?php echo TEXT_ALTERNATIVE_CHECKOUT_METHODS; ?></td>

</tr>

<?php

reset($initialize_checkout_methods);

while (list(, $value) = each($initialize_checkout_methods)) {

?>

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

<tr>

<td align="right" class="main"><?php echo $value; ?></td>

</tr>

</table>

<?php echo tep_draw4_bottom();?>

 

<?php

}

}

}else {

?>

<?php echo tep_draw1_top();?>

<?php echo tep_draw_infoBox_top();?>

<?php new infoBox_search_criteria(array(array('text' => TEXT_CART_EMPTY))); ?>

<?php echo tep_draw_infoBox_bottom();?>

<?php echo tep_pixel_trans();?>

 

<?php /* echo tep_draw_infoBox2_top(); */ ?>

<table border="0" width="100%" cellspacing="0" cellpadding="2"><tr>

<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>

<td align="right" class="main"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . '</a>'; ?></td>

<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>

</tr>

</table>

 

<?php /* echo tep_draw_infoBox2_bottom(); */ ?>

<?php

}

?>

 

<?php echo tep_draw1_bottom();?>

 

<?php echo tep_draw_bottom();?>

</form></td>

<!-- body_text_eof //-->

<td class="<?php echo BOX_WIDTH_TD_RIGHT; ?>"><table border="0" class="<?php echo BOX_WIDTH_RIGHT; ?>" cellspacing="0" cellpadding="0">

<!-- right_navigation //-->

<?php require(DIR_WS_INCLUDES . 'column_right.php'); ?>

<!-- right_navigation_eof //-->

</table></td>

</tr>

</table>

<!-- body_eof //-->

<!-- footer //-->

<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>

<!-- footer_eof //-->

</body>

</html>

<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

 

Thanks again! Let me know if you need anything else from me.

 

 

OK I see,

 

You have a lot of modifications related to product options and attributes in your standard shopping_cart.php, which for sure are not applied to the mobile_shopping_cart.php.

 

I found a product with no options and could add it to the mobile shopping cart without any problem:

http://www.bandmans.com/mobile_product_info.php?products_id=9135

 

So what you should do is to apply the same modifications you did in your standard shopping cart to the mobile shopping cart.

The same in includes/modules/product_listing.php (for: mobile/includes/modules/products.php) and product_info.php (for: mobile_product_info.php) if there are modifications related to product options and attributes done.

 

Kind regards

Rainer

Edited by raiwa
Link to comment
Share on other sites

Ranier,

 

I tried to add the item that you suggested to my shopping cart, but it is still not adding to cart for me. It keeps saying my shopping cart is empty, even when I add the item with no attributes.

 

This is very strange, I tried to add now the same product again and it doesn't work, but if I try another instrument it works.

However this is all related to the same as I explained before.

I had the same problem reported by another user who used the QTPro add-on.

You MUST add the additional code of any Add-On which affects the product options/attributes on the catalog side of your store to the mobile pages.

 

Check this add-on: /* MPQM */

Edited by raiwa
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...