Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Shopping Cart Problem


NathanP

Recommended Posts

Posted

Hello,

 

I have a problem with my oscommerce shopping cart.

 

When there's nothing in the cart it says " Sub-Total: £0.00 " instead of " Your Shopping Cart is empty!"

 

It allows me to checkout when there's nothing in the cart. This messes up postage (my postage is set at £1.75 per item) as it always adds an extra £1.75 to the total. I guess this is to do with it saying " Sub-Total: £0.00 "

 

Does anyone know how this can be fixed? I would be grateful if someone could pm me about this.

 

 

Nathan

Posted
Hello,

 

I have a problem with my oscommerce shopping cart.

 

When there's nothing in the cart it says " Sub-Total: £0.00 " instead of " Your Shopping Cart is empty!"

 

It allows me to checkout when there's nothing in the cart. This messes up postage (my postage is set at £1.75 per item) as it always adds an extra £1.75 to the total. I guess this is to do with it saying " Sub-Total: £0.00 "

 

Does anyone know how this can be fixed? I would be grateful if someone could pm me about this.

Nathan

If you've never modified the shopping_car.php page, just reupload it. If you've modified it, you probably messed around with this part of the code:

 

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

 

 

Make sure it says >0 then else....

 

 

{

?>

<tr>

<td align="center" class="main"><?php new infoBox(array(array('text' => TEXT_CART_EMPTY))); ?></td>

</tr>

<tr>

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

</tr>

<tr>

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

<tr class="infoBoxContents">

<td><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></td>

</tr>

</table></td>

</tr>

<?php

}

 

 

If that's not it, make sure your sub-total code is this:

<td align="right" class="main"><b><?php echo SUB_TITLE_SUB_TOTAL; ?> <?php echo $currencies->format($cart->show_total()); ?></b></td>

Posted
If you've never modified the shopping_car.php page, just reupload it. If you've modified it, you probably messed around with this part of the code:

 

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

Make sure it says >0 then else....

{

?>

<tr>

<td align="center" class="main"><?php new infoBox(array(array('text' => TEXT_CART_EMPTY))); ?></td>

</tr>

<tr>

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

</tr>

<tr>

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

<tr class="infoBoxContents">

<td><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></td>

</tr>

</table></td>

</tr>

<?php

}

If that's not it, make sure your sub-total code is this:

<td align="right" class="main"><b><?php echo SUB_TITLE_SUB_TOTAL; ?> <?php echo $currencies->format($cart->show_total()); ?></b></td>

 

 

 

Hello,

 

Thanks for the information.

 

All the things you've suggested have been tried and I still have the same problem.

 

Does anyone else know anything that might correct this?

 

Nathan

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...