I am setting up a site that uses a custom module for adding products to the cart. It appears that items added to the cart with this custom module are not being shown as shippable.
When I take a look at the uc_cart_products table, the data for a product added without using the custom module appears like this:
Whereas, products added to the cart with the custom module don't include the shippable piece of information.
I've double checked, and the product has the shippable checkbox checked.
Does anyone have any thoughts on why this might be? It'd be great to know how to fix this as well.
Any help is greatly appreciated!
To solve the problem, in the custom module, just before the call to
uc_cart_add_item(), I manually set the shippable flag to true with the following code:
$itemdata['shippable'] = 1;
$itemdata is passed to the
uc_cart_add_item() function as the
$data argument. Of course, if you have products that are non-shippable in your carts, you will have to put in a check of some sort. In the case of this catalog, all products are shippable.