acbatchelor Posted March 20, 2009 Share Posted March 20, 2009 the total in the shopping cart box shows the original price of the product without the attributes, but at the bottom the sub-total shows the correct price with the attributes. how do i make the price in the box the same as the sub-total. if (isset($products[$i]['attributes']) && is_array($products[$i]['attributes'])) { reset($products[$i]['attributes']); while (list($option, $value) = each($products[$i]['attributes'])) { $products_name .= '<br><small><i> - ' . $products[$i][$option]['products_options_name'] . ' ' . $products[$i][$option]['products_options_values_name'] . '</i></small>'; } } $products_name .= ' </td>' . ' </tr>' . '</table>'; $info_box_contents[$cur_row][] = array('params' => 'class="CartListing-data"', 'text' => $products_name); $info_box_contents[$cur_row][] = array('align' => 'center', 'params' => 'class="CartListing-data" valign="top"', 'text' => tep_draw_input_field('cart_quantity[]', $products[$i]['quantity'], 'size="4" onFocus="advisecustomer();"') . tep_draw_hidden_field('products_id[]', $products[$i]['id'])); $info_box_contents[$cur_row][] = array('align' => 'right', 'params' => 'class="CartListing-data" valign="top"', 'text' => '<b>' . $currencies->display_price($products[$i]['final_price'], tep_get_tax_rate($products[$i]['tax_class_id']), $products[$i]['quantity']) . '</b>'); } new productListingBox($info_box_contents); ?> </td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <?php // {{ buySAFE Module if (is_array($buysafe_result) && $buysafe_result['IsBuySafeEnabled'] == 'true') { ?> <script src="<?php echo MODULE_BUYSAFE_BUYSAFE_ROLLOVER_URL; ?>" type="text/javascript" language="javascript" charset="utf-8"></script> <script language="JavaScript" type="text/javascript"> <!-- function buySAFEOnClick() { if (document.cart_quantity.WantsBond.value == 'false') { document.cart_quantity.WantsBond.value = 'true'; } else { document.cart_quantity.WantsBond.value = 'false'; } document.cart_quantity.submit(); } //--> </script> <tr> <td align="right"><?php echo tep_draw_hidden_field('WantsBond', ($WantsBond ? $WantsBond : 'false')); ?><table cellspacing="2" cellpadding="2" border="0"> <tr> <td class="main" align="right"><b><?php echo SUB_TITLE_SUB_TOTAL; ?></b></td> <td class="main" align="right"><b><?php echo $currencies->format($cart->show_total()); ?></b></td> </tr> <tr> <td class="main" align="right"><b><?php echo $buysafe_result['BondingSignal']; ?></b></td> <td class="main" align="right"><b><?php echo $buysafe_result['BondCostDisplayText']; ?></b></td> </tr> <tr> <td class="main" align="right"><b><?php echo SUB_TITLE_TOTAL; ?></b></td> <td class="main" align="right"><b><?php echo ($buysafe_result['BondCostDisplayText'] ? $currencies->format($cart->show_total() + $buysafe_result['TotalBondCost']) : $currencies->format($cart->show_total())); ?></b></td> </tr> </table></td> </tr> <?php } else { ?> <tr> <!-- start Customer Update Cart Reminder 2.0 --> <td class="main"> <table width="100%" cellpadding="1" cellspacing="0" border="0"> <tr> <td class="main"> <script type="text/javascript"> <!-- if (!(document.getElementById) && !(document.all)) { document.write("<b><span class=\"errorText\"><?php echo TEXT_UPDATE_WARNING; ?></span>"); } else { document.write("<span id=\"update_warning\" class=\"errorText\"> </span>"); } //--> </script> <noscript> <b><span class="errorText"><?php echo TEXT_UPDATE_WARNING; ?></span></b> </noscript> </td> <td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> <td align="right" class="main" valign="top" nowrap><b><?php echo SUB_TITLE_SUB_TOTAL; ?> <?php echo $currencies->format($cart->show_total()); ?></b></td> </tr> </table> </td> i think that is the right area of my code. i put the code for the box price and the sub-total price. i have several contributions installed so some of this may be different than other peoples code Link to comment Share on other sites More sharing options...
acbatchelor Posted March 21, 2009 Author Share Posted March 21, 2009 bump Link to comment Share on other sites More sharing options...
acbatchelor Posted March 21, 2009 Author Share Posted March 21, 2009 nevermind, i fixed it myself. can't believe i did that. i put up the code for the shopping_cart.php in the catalog folder but i found that the problem was in another file. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.