Community Forums

Gettting and setting cart Properties

Support for Order Total extensions

Gettting and setting cart Properties

Postby road2one » Tue Jan 17, 2012 10:21 am

To get cart Properties I use
Code: Select all
foreach ($this->cart->getProducts() as $product){
               echo 'total from Item: '.$product['total'].'<br>';
               echo 'total qty Item: '.$product['quantity'].'<br>';
               echo 'total : '.$subtotal.'<br>';               
               echo 'prod: '.$product['product_id'].'<br>';   
}

that all works great. Now I need to be able to add a product for free to the cart
Code: Select all
$this->cart->add( $freeItem, $qty = 1);

The code above adds the product but I need to set the dollar amount to zero that where I'm stock.
I should be able to add a product with something like
Code: Select all
$this->cart->setProduct(product id,price) or something similar
road2one
 
Posts: 2
Joined: Mon Jan 09, 2012 10:29 am

Return to Order Totals

Who is online

Users browsing this forum: No registered users and 7 guests

Hosted by Arvixe Web Hosting