Hi,
First of all thanks for this wonderful module.

I would like to know if this module could help me in the following case:
I have an event product (lets say Camp) with an attribute Days and each option has a price of 30 pounds. The event's base price is 0.
I would like to set the discounts so that if the overall product price is over than 120 the customer gets a discount of 15 off that specific product.
so as you can see everything is product specific (not cart specific).
Is this something that can already be done with UD Alt ? Or maybe do you think there is a slight remote change of implementing it in the future.

thanks for your time,
Andreiashu

Comments

ryangroe’s picture

I think I understand but I need one small clarification. Which of the following cases (if either) best describes what you'd like to do:

1.
You have a single product (A) that triggers a discount when a person buys at least 120 pounds of it and you want to discount that product 15% (300 pounds of A will yield a discount of 45 pounds).

2.
You have multiple products (A, B & C) that can trigger the discount as long as a person buys at least 120 pounds of just these products (say A=20, B=60, C=40). You then want to discount 15% of just one product (say 15% off of A for a total discount of 3).

#1 is currently possible, #2 is not. However I can implement this.

andreiashu’s picture

Title: Discount based on product price » Discount based on product attributes price

Hi ryangroe,

I think I'm in an rather edge case that seems similar with #1: a customer can select attributes for product A worth of 120 pounds. If that happens he/she gets a discount of 15 pounds for example. But the same product A can be added to the cart with attributes worth of 100 pounds => he/she won't get any discount. Am I making any sense ?

Thanks for your time

ryangroe’s picture

The product attribute stuff always confuses me :) I'm not using that on my site so it's something I forget to test. I'll look into this over the weekend and see if there is a quick fix.

andreiashu’s picture

I'll look into it too and post back my findings.

Thanks

sgdev’s picture

Version: 6.x-1.0-beta28 » 6.x-1.0-beta36
Category: support » feature

I think this is a rather critical piece which is missing from the Discounts (Alternative) module. The UC Discount Coupons module does this without issue, and I see it as one of the major reasons why I would use the Discount Coupons module instead of Discount (Alternative). Let me explain an example, in case there still is any confusion about how product attributes work.

An attribute is very important for any retail product which has many variations. For example, say I am selling shirts online for $9.99. I have a particular style shirt which comes in blue, green, and black, and is available in sizes of small, medium, and large. "Color" is one attribute of the product, and "size" is a second attribute of the product. Users will select what color and size they want from the product page as attributes of the product.

And say that blue and green colors have been very popular this season, and I still have 100 blue shirts, 200 green shirts, and 1000 black shirts in stock. I want to offer a discount specifically on black shirts so I can reduce my inventory. In this case, I *only* want to target a discount on black shirts, not on blue or green, and sell them for $5.99.

Right now Discounts (Alternative) only allows me to apply a discount to the overall SKU for the product. However it is possible for me to assign separate SKUs for each color/size combination, which is exactly how major retailers would do it. This is available under the "Adjustments" sub-tab when editing a product (node/*/edit/adjustments, where "*" is the node ID).

I hope this provides additional clarity to the issue.

celia_ccs’s picture

Version: 6.x-1.0-beta36 » 6.x-2.x-dev

As far as I can see the module doesn't apply discounts on attributes options prices.

For instance I have a product class where the product price is set to 0, it is required to selected an option and the price is set in the option. I tried applying different SKU to each options, but the discount is not applied to the product option either.

Is this a known issue, or I'm just doing somethng wrong?

zkrebs’s picture

I have researched this thread and compared this module to uc_coupon and I find that uc_discount_alt is favorable in most ways, except for the purpose of applying discounts to product attributes (all attributes of a certain kind) or by specific adjustment SKU.

The interface to uc_coupon only allows 3 SKU's per discount code as far as I can tell, so it is limited with a very large product set.

Looking for a way to apply a discount code for all products that have a certain attribute. For example, all shirts that are RED. Not per SKU, maintaining a large discount list with all the SKU's would be a hassle. I don't want to make a different product class for each option, because its one product with 3 sizes, not 3 products.

My product base class has a price, with the options modifying (increasing) the price. Would the discount for the option then subtract from the base price?

Willing to donate to have this issue fixed. Would $50 do it?

in uc_discounts.module lines 838-854


/**
 * Returns SKUs for discount.
 */
function get_skus_for_discount($discount_id, $exclude_all_skus = FALSE) {
  $skus = array();

  //Get SKUs from database
  if ($exclude_all_skus) {
    $result = db_query("SELECT sku FROM {uc_discounts_skus} WHERE discount_id=%d AND sku<>%d",
      $discount_id, ALL_SKUS
    );
  }
  else $result = db_query("SELECT sku FROM {uc_discounts_skus} WHERE discount_id=%d", $discount_id);

  while ($row = db_fetch_array($result)) $skus[] = $row["sku"];
  return $skus;
}

Could this be modified to pick up all the options SKU's too?

Or ideally create a new option to apply discount to a product classes options.

ptoly’s picture

I made a patch do allow you to use the SKU's in the uc_discount_adjustments tables.

I rolled it into an update for the multi-tiered patch over here: http://drupal.org/node/540080#comment-3204042.

I tested it just a little bit, so please give me feedback and I'll do what I can to polish it!

zkrebs’s picture

I will do my best to test this in the upcoming day or two. Thanks ptoly.