Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Small error (I hope) with my shopping cart.


Guest

Recommended Posts

I have just installed the products attributes option contribution and everything is just fine except that I have this error in my shopping cart....it can't calculate the subtotal.

 

Sub-Total:

Fatal error: Call to undefined method currencies::calculate_price() in /home/firefly/public_html/store/includes/classes/shopping_cart.php on line 382

 

I have gone through the shopping_cart.php file and line 382 contains this code:

 

$this->total += $currencies->calculate_price($products_price, $products_tax, $qty);

$this->weight += ($qty * $products_weight);

 

I'm not really sure what I need to change or do. Can anyone help? Thanks in advance! Alex

 

Oh, the website is www.fireflybeadstore.com/store if anyone wants to see the error in 'action'. It's under the Engraveable Jewelry section.

Link to comment
Share on other sites

Sub-Total:

Fatal error: Call to undefined method currencies::calculate_price() in /home/firefly/public_html/store/includes/classes/shopping_cart.php on line 382

Try adding the following function to /catalog/includes/classes/currencies.php if it does not already exist.

function calculate_price($products_price, $products_tax, $quantity = 1) {
 global $currency;
 return tep_round(tep_add_tax($products_price, $products_tax), $this->currencies[$currency]['decimal_places']) * $quantity;
}

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...