e69acf Posted August 2, 2006 Share Posted August 2, 2006 Looking for a solution to let me give a discount based on the purchase of two items where each is from a different category. I did find the "together module" but this is based on product not category. Example: item 1 from category X and item 2 from category Y gives a discount of $$. Any help would be super. Link to comment Share on other sites More sharing options...
boxtel Posted August 3, 2006 Share Posted August 3, 2006 Looking for a solution to let me give a discount based on the purchase of two items where each is from a different category. I did find the "together module" but this is based on product not category. Example: item 1 from category X and item 2 from category Y gives a discount of $$. Any help would be super. well, good idea but it needs a little more detail. what if the order is 1 item from x, 2 items from y and 3 items from z, etc.? what is the discount then? Treasurer MFC Link to comment Share on other sites More sharing options...
e69acf Posted August 3, 2006 Author Share Posted August 3, 2006 There has to be a 1 to 1 relationship. So one item from category X and one from category Y. The only way another discount of the same type if there is another one to one relationship Why I need this. I sell belts and buckles. So if a person buys a belt and a buckle I give $$ off the belt (in turn the overall sale price). I only give the same discount if another buckle and belt are purchased. So this discount would have to work from the top level category and include all sub categories. My other option at this time is to use the 2gether discount and run a sql query to match all buckles to every belt in the discount table. Easy hack, but there should be an easier solution. Link to comment Share on other sites More sharing options...
boxtel Posted August 3, 2006 Share Posted August 3, 2006 There has to be a 1 to 1 relationship. So one item from category X and one from category Y. The only way another discount of the same type if there is another one to one relationship Why I need this. I sell belts and buckles. So if a person buys a belt and a buckle I give $$ off the belt (in turn the overall sale price). I only give the same discount if another buckle and belt are purchased. So this discount would have to work from the top level category and include all sub categories. My other option at this time is to use the 2gether discount and run a sql query to match all buckles to every belt in the discount table. Easy hack, but there should be an easier solution. well, I would use easy discount and borrow a small part of category discount (the part which determines what category tree the items comes from). then in the cart you count the number of items from category tree x (belts) and the number of items from category y (buckles). then you say : if x > 0 and y > 0 { if x = y number of discounts = x elseif x > y number of discounts = y else number of discounts = x } and set an easy discount. so: 1 belt and 2 buckles -> 1 discount 2 belts and 2 buckles -> 2 discounts 2 belts and 1 buckle -> 1 discount 2 belts and 8 buckles -> 2 discounts etc. assuming that any belt/buckle combination is a discount. Treasurer MFC Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.