How would I create a rule where if I buy M of X product or category I would get N of Y product or category for free (if it was present in the cart). I can't seem to figure out the logic of it with the discount rules as "Discount each cart item" doesn't seem to give you enough control and "Buy M get N free" doesn't allow you to specify action level rules.
Thanks,
L
Page 1 of 1
Discount: Buy M of X get N of Y free
#2
Posted 31 August 2010 - 04:02 PM
Hi, L!
I created a pilot implementation of the extended "Buy M of X get N of Y free" rule for you. Please download the PHP file and put to the /modules/shop/price_rule_actions directory in your LemonStand installation. The difference between this action and the standard "Buy N get M free" action is that the new action allows to apply discounts to different products, while the standard action always works with a same product.
You can configure products which should be presented in the cart on the Conditions tab of the action setup for. And you can configure products to apply the action to in the Product Filter on the Action tab. For example, the screenshot display the following action: "If there are 3 Batman Hats in the cart, make the Gun product free".
But there are some limitations. The action cannot work with categories (you need to specify products instead of categories), because there is no way to determine the quantity condition on per-category level. You cannot create a condition which would say "there should be 2 items of any products from the Art category, so there, for example, could be 1 "Apple Tree" item, and 1 "Believe Collage" item in the cart in order to activate the action. ". This is a limitation of the discount engine. Maybe we will create a special type of conditions for solving such tasks, in the future.
Another limitation is that you cannot use categories in the product filter, you always should specify a specific product, because otherwise LemonStand will apply the discount to all products which satisfy the filter. For example, if you create a filter "Any product from the Art category", it will apply the filter to all products from the Art category which are presented in the cart.
So, it seems, now the rule can only work on the product level. But I think it is better than nothing. Please play with it and let me know what do you think.
Thank you
I created a pilot implementation of the extended "Buy M of X get N of Y free" rule for you. Please download the PHP file and put to the /modules/shop/price_rule_actions directory in your LemonStand installation. The difference between this action and the standard "Buy N get M free" action is that the new action allows to apply discounts to different products, while the standard action always works with a same product.
You can configure products which should be presented in the cart on the Conditions tab of the action setup for. And you can configure products to apply the action to in the Product Filter on the Action tab. For example, the screenshot display the following action: "If there are 3 Batman Hats in the cart, make the Gun product free".
But there are some limitations. The action cannot work with categories (you need to specify products instead of categories), because there is no way to determine the quantity condition on per-category level. You cannot create a condition which would say "there should be 2 items of any products from the Art category, so there, for example, could be 1 "Apple Tree" item, and 1 "Believe Collage" item in the cart in order to activate the action. ". This is a limitation of the discount engine. Maybe we will create a special type of conditions for solving such tasks, in the future.
Another limitation is that you cannot use categories in the product filter, you always should specify a specific product, because otherwise LemonStand will apply the discount to all products which satisfy the filter. For example, if you create a filter "Any product from the Art category", it will apply the filter to all products from the Art category which are presented in the cart.
So, it seems, now the rule can only work on the product level. But I think it is better than nothing. Please play with it and let me know what do you think.
Thank you
Attached File(s)
-
shop_cartbuymgetnfreeext_action.php.zip (1.51K)
Number of downloads: 33
Share this topic:
Page 1 of 1

Help













