I am having issues and I hope this is the right spot to get answers.
I have a product that has a dynamic price based on the user using a slider to determine much of the product they wish to purchase. As the move the jQuery slider the price increases. Once they decide which price they want to buy I have a button on the page that they click to purchase the package.
When the submit the form I run this code to determine what product id to add to the cart since the price of the package also determines what product they receive which I do on the backend.
uc_cart_empty(uc_cart_get_id());
uc_cart_add_item($nid, $qty); // the node id is determined by what package they pick
So my question is how do I pass the POST value of the price into the custom price box. I've tried $item->price = $form_state['values']['package_price']; and get a price of $0.00 in my cart.