Gettting and setting cart Properties
1 post
• Page 1 of 1
Gettting and setting cart Properties
To get cart Properties I use
that all works great. Now I need to be able to add a product for free to the cart
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
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 3:29 pm
1 post
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 4 guests













