Post by vimal » Wed Aug 26, 2009 9:30 am

Hi All,

I have just installed the electronics template from

http://www.opencart.com/index.php?route ... ion_id=191

I have been playing around with it and have made a decent looking template which I will update in the community. However, I am getting a bit of an error in the shopping cart. Please see the image below. Any ideas what it could be?

Image

The code in the cart.tpl file is as below.

------------------------------------------------------------------------------------------------------------------------------------
<div class="top">
<h1><?php echo $heading_title; ?></h1>
</div>
<div class="middle">
<?php if ($error) { ?>
<div class="warning"><?php echo $error; ?></div>
<?php } ?>
<form action="<?php echo $action; ?>" method="post" enctype="multipart/form-data" id="cart">
<table class="cart">
<tr>
<th align="center"><?php echo $column_remove; ?></th>
<th align="center"><?php echo $column_image; ?></th>
<th align="left"><?php echo $column_name; ?></th>
<th align="left"><?php echo $column_model; ?></th>
<th align="right"><?php echo $column_quantity; ?></th>
<th align="right"><?php echo $column_price; ?></th>
<th align="right"><?php echo $column_total; ?></th>
</tr>
<?php $class = 'odd'; ?>
<?php foreach ($products as $product) { ?>
<?php $class = ($class == 'even' ? 'odd' : 'even'); ?>
<tr class="<?php echo $class; ?>">
<td align="center"><input type="checkbox" name="remove[<?php echo $product['key']; ?>]" /></td>
<td align="center"><a href="<?php echo $product['href']; ?>"><img src="<?php echo $product['thumb']; ?>" alt="<?php echo $product['name']; ?>" /></a></td>
<td align="left" valign="top"><a href="<?php echo $product['href']; ?>"><?php echo $product['name']; ?></a>
<?php if (!$product['stock']) { ?>
<span style="color: #FF0000; font-weight: bold;">***</span>
<?php } ?>
<div>
<?php foreach ($product['option'] as $option) { ?>
- <small><?php echo $option['name']; ?> <?php echo $option['value']; ?></small><br />
<?php } ?>
</div></td>
<td align="left" valign="top"><?php echo $product['model']; ?></td>
<td align="right" valign="top"><input type="text" name="quantity[<?php echo $product['key']; ?>]" value="<?php echo $product['quantity']; ?>" size="3" /></td>
<td align="right" valign="top"><?php if (!$product['discount']) { ?>
<?php echo $product['price']; ?>
<?php } else { ?>
<u style="color: #F00; text-decoration: line-through;"><?php echo $product['price']; ?></u><br />
<?php echo $product['discount']; ?>
<?php } ?></td>
<td align="right" valign="top"><?php echo $product['total']; ?></td>
</tr>
<?php } ?>
<tr>
<td colspan="7" align="right"><b><?php echo $text_subtotal; ?></b> <?php echo $subtotal; ?></td>
</tr>
</table>
<div class="buttons">
<table>
<tr>
<td align="left"><a onclick="$('#cart').submit();" class="button"><span><?php echo $button_update; ?></span></a></td>
<td align="center"><a onclick="location='<?php echo $continue; ?>'" class="button"><span><?php echo $button_shopping; ?></span></a></td>
<td align="right"><a onclick="location='<?php echo $checkout; ?>'" class="button"><span><?php echo $button_checkout; ?></span></a></td>
</tr>
</table>
</div>
</form>
</div>
<div class="bottom">&nbsp;</div>
------------------------------------------------------------------------------------------------------------------------------------


Thanks a million!
Vimal

www.beeshop.se
Starta webbshop, Starta e-butik, Starta e-handel


Active Member

Posts

Joined
Wed Aug 26, 2009 8:54 am
Location - Sweden

Post by vimal » Wed Aug 26, 2009 9:44 am

After a bit or more testing, found a dirty ssolution...

Replace the cart.tpl in the electronics template with cart.tpl from the default template. It works. :)

Hope it helps someone.
Vimal.

www.beeshop.se
Starta webbshop, Starta e-butik, Starta e-handel


Active Member

Posts

Joined
Wed Aug 26, 2009 8:54 am
Location - Sweden
Who is online

Users browsing this forum: No registered users and 3 guests