Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

running order total classes on the chopping cart?


Guest

Recommended Posts

I offer qty discounts (site wide, x amount of anything gets you x amount off)...

 

I would like to show these discounts in the users shopping cart, but for the life of me cannot figure out how I can process just one order total class on the shopping cart. I have done a $order_total_modules->process(); on the shopping cart page, which sort of works. it will return the order total and I've been able to semi show the discounts by using some fuzzy logic, which is getting really fuzzy because certain order total modules will only work if the user is logged in (tax is really throwing a loop)... so I've got all these ifs and elses and it seems to work OK unless they are logged in and reside in the state of the company.

 

is it possible for my to just process the qty discount module and not all of the order total modules?

Link to comment
Share on other sites

PS.

 

$order_total_modules->process(); returns an array, "return $order_total_array;" with each of the order total parts split up. how can I break this array up and pull out just the qty discount variables (value, text and title).

Link to comment
Share on other sites

yes I have got it...

 

$order_total_array = array();

$order_total_array = $order_total_modules->process();

echo $order_total_array[1]['title'];

 

could not think for a few seconds there... forgot you have to tell arrays that they are arrays :P

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...