Zen Cart 1.3.8a
I'm trying to update the qty of products in the shopping cart that contain attributes including a text attribute. After the update occurs, all attributes remain but the text attribute disappears. How do I pass the correct $attributes parameter in the update_quantity function to make this work.
My simplified observer class class.test.php
<?php
class test extends base {
function test() {
$_SESSION['cart']->attach($this,array('NOTIFIER_CART_ADD_CART_END', NOTIFIER_CART_REMOVE_END'));
}
function update(&$class, $eventID) {
$products = $_SESSION['cart']->get_products();
for ($i=0, $n=sizeof($products); $i<$n; $i++) {
$_SESSION['cart']->update_quantity($products[$i] ['id'],5,$products[$i]['attributes']);
}
}
}
?>



