Reviewed & tested by the community
Project:
Ubercart Discount Coupons
Version:
7.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
10 Jan 2013 at 08:36 UTC
Updated:
7 Apr 2016 at 13:59 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
panditvarun20 commentedI am having the same issues.
Comment #2
hoangd commentedBug at uc_cart.module line 1141
because Coupon code must not be a Product.
/**
* Adds an item to a user's cart.
*/
function uc_cart_add_item($nid, $qty = 1, $data = NULL, $cid = NULL, $msg = TRUE, $check_redirect = TRUE, $rebuild = TRUE) {
if (!uc_product_is_product($node->type)) {
..............
drupal_set_message(t('@title is not a product. Unable to add to cart.', array('@title' => $node->title)), 'error');
return;
}
Comment #3
nnason commentedHaving this problem as well. Has anyone created a fix for it?
Comment #4
bharat.kelotra commentedActually when an anonymous user applies a coupon code and then login, a hook_user_login in uc_cart.module is called which adds all the cart item to the authenticated user's cart. In the process it uses a function to add item to cart which checkes the node id of each item. As the coupon is not a node which have a node id 0 so it gives a error that is not a product. Unable to add to cart.
I have fixed this issue. I am uploading a patch for this issue.
Comment #5
bharat.kelotra commentedChanging status.