Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

price calculation


Darklings

Recommended Posts

Posted

Can anyone tell me where osc does his calculation for the price??

 

in the shopping_cart.php i got this:

 

 $info_box_contents[$cur_row][] = array('align' => 'right',
                                            'params' => 'class="productListing-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>');

 

so he displays the final price .. but how or where does he calculate it? meaning (price x qty)

 

Can anyone tell me pls?

 

 

Thnx

kind regards,

Tom

Even in this dark place, yes, I am afraid of my own shadow.

 

 

 

Contributions | KnowledgeBase | osCommerce 2.2 pdf

Posted
Can anyone tell me where osc does his calculation for the price??

 

in the shopping_cart.php i got this:

 

 $info_box_contents[$cur_row][] = array('align' => 'right',
                                            'params' => 'class="productListing-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>');

 

so he displays the final price .. but how or where does he calculate it? meaning (price x qty)

 

Can anyone tell me pls?

Thnx

kind regards,

Tom

 

Tom,

 

Most of the calculations is done from within the shopping cart class (includes/classes/shopping_cart.php).

A little above where you quote the catalog/shopping_cart.php code you have

    $products = $cart->get_products();

This fills an array with the needed values for every product inside the shopping cart and is a function inside the shopping cart class.

 

HTH

Posted

Thnx wheeloftime,

 

But i'm using the contrib: SPPC (seperate pricing per customer), i did find the subtotal price calculation, but i think the prices in the shoppingcart (the 'price * qty' one) should be somewhere in the new made 'priceformatter'?

 

I'll have a look,

 

if anyone is familier with sppc en the priceformatter, could he tell me how the calc for the total price in shoppingcart is done?

 

Thnx

 

kind regards

tom

Even in this dark place, yes, I am afraid of my own shadow.

 

 

 

Contributions | KnowledgeBase | osCommerce 2.2 pdf

Archived

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

×
×
  • Create New...