10

I'm interested in running a promotion ...

I'd like to make a product free if the customer's cart total is $10.

I was able to do that with this module: http://drupal.org/project/uc_discounts_alt

Everything is working great, but I don't want my customer to be able to add the product to their cart unless they are buying $10 worth of regular products.

The products I'm giving away could be placed in another ubercart class, but I can't find a module that will allow me to prevent the node from being sold unless the cart total is $10 or more.

Any ideas or help would be greatly appreciated.

I've already explored the "free" checkout options; I'm really simply looking how to make a product not sellable unless the cart total has a minimum of $10.

1
  • There are also conditional actions that might be useful.
    – Drupac
    Commented Dec 6, 2011 at 17:05

6 Answers 6

1

To prevent your customers to add the product to their cart if it's $10 with regular products, You can use ubercart hook_add_to_cart .

for example:

function MODULENAME_add_to_cart($nid, $qty, $data) {


 $contents= uc_cart_get_contents();
 //check your condition such as total, and product type based on cart contents
  if (condition true) {
    $result[] = array(
      'success' => FALSE, 
      'message' => t('Sorry, you can not add this product now!.'),
    );
  }

  return $result;
}
0

This link setting_minimum_price_order_can_be_submitted mentions that you can go to admin/store/settings/cart/edit. This might also help as it gives more details of achieving the task you require. I am not sure if your using drupal 6 or 7. This link is the url for the module ProductMin . I found uc_product_minmax module. Let me know if you need something more specific or if these are useful.

0

Rules can be the better solution to it as you don't want to restrict the user every time but just on some special products. Here is a general flow of what you can do.

  1. Add a cck/ubercart class to the products that you want to add to the promotion
  2. Then create a rule, and in there, add a condition to check whether that field which you added is set. If so, don't, add an action to not allow user to proceed to checkout.

This should work as far as I know.

0
0

Take a look at the Ubercart Restrictions module.

This module will do its best to prevent the wrong sort of people from ordering the wrong sort of goods, or to ship them to the wrong kinds of places.

For example, some products cannot be ordered by minors, or some products cannot be shipped to certain states

0

Learning the Rules framework could really help you here.

there is an excellent tutorial here by Johan Falk just follow along and you will be able to do the above in no time.

0

I suppose Minimum order subtotal to $10 admin/store/settings/cart/edit/basic and Conditional Action/Rule for that product is not an option because you still want to sell other products...

Try uc_discount module and setup Conditional Action with Check an order's product condition and Apply a discount action.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.