Buy X Get Y Free rule is not working in magento - php

I have create a rule under Shopping Cart Price Rules.
In Actions
Apply: Buy X Get Y Free(discount amount is Y)
Discount Amount: 1
Discount Qty step(Buy X): 2
And provide condition
If ALL of these conditions are TRUE :
Category is 5
Note: 5 is category Mobiles
The rule is created successfully. But in home page nothing is displayed about this rule and nothing happened for this rule while shopping. That means it showing the rule is not working. How can i make it working, and what is wrong with my approach. Need your help...
Note: magento version is 1.7.0.2

In the admin panel, click on Promotions -> Shopping Cart Price Rules (because we are dealing with products in the cart)
In the Conditions tab,click the little plus symbol and select 'Product Attribute Combination'.
Select the new plus symbol and select category. Click on the '...' and select the category for the products you want to have in the basket for you to get the discount.
Now click on the Actions tab, in 'Apply' have 'Percent of product price discount'. In Discount Amount, enter 100 (for 100%). In the conditions at the bottom, click on the plus symbol and select Category. Click on the '...' to select the category for the products you want to apply the 100% discount to.
This will get you 100% off all products in cat b when you have >= 1 products from cat a in the cart.
NOTE: Test this functionality as many times you can.. Test it with adding multiple quantity of main product or by adding the multiple quantity of free product.

Related

Shopware 6: Promotion validation fails if another promotion is present at the same time

The goal is to have two promotions:
Promotion without a code => gives a 3% discount if the selected Payment Method is "Invoice/Vorkasse".
Second promotion is with a code, absolute 10€ discount, with two rules:
a) total value of the cart is bigger than 49,99 €
b) at least one product in the cart is not discounted product (with the list price).
Additional explanation:
That means that the promotion should be valid if at least one product in the cart is not discounted product, and total value of the cart is bigger than 49,99€. In that case, a fixed absolute 10€ discount is added. Promotion should be invalid if all products in the cart are discounted products (with the list price) or if total value of the cart is less than 49,99 €.
What have I done so far:
I have created a promotion that works correctly (second promotion with a code) by itself, but if I log in as a customer with selected 'Invoice' as a payment method, the first promotion is applied directly, and from that point, validation seems to fail, and second promotion becomes valid if code is entered.
How to replicate the behavior:
Clean Shopware environment and add list price to one product
Create two rules in Rule Builder:
a) Invoice 3% => Applied payment method > is one of > Invoice
b) Min. 49.99 & without disc.:
- Total > is greater than > 49.99
- Item with price/list price percentage ratio > At least one > is empty
Create two new Promotions
a) Invoice 3%:
- General => active, no code
- Conditions => Sales Channels: Storefront, Shopping cart rules: Invoice 3%
- Discounts => Apply to cart, percentage, 3
b) 10 Discount
- General => Max. uses per customer: 1, active, fixed promotion code: test10
- Conditions => Sales Channels: Storefront, Shopping cart rules: Min. 49.99 & without disc
- Discounts => Apply to cart, Absolute, 10
Add discounted product to the cart (with list price)
Add code
Question:
I was unable to find where the validation could possibly fail if another promotion is present.
Can anyone help me and point me to where the bug could be?
I was able to reproduce the issue. I was able to narrow the cause down to the list price condition. The percentual promotion adds a discount line item with the negative amount. Currently the condition for the list price checks all line items, including discounts, for their list price. A discount, not being a product, has no list price. Hence why the condition is met and the second promotion can be applied. This will be fixed with the upcoming major release 6.5 where conditions obviously meant to only regard products, will no longer match discount line items.
In the meantime you can use a filter condition to check that there is at least one actual product in the cart, that has no list price. When you choose the condition for total quantity of products there's a filter icon on the right. Click it and a modal will open. Within the modal then add the condition for the list price.

Programmatically don't apply the coupon code to x product in woocommerce php

1) A customer puts 5 products of category A in his cart. This means the rule is triggered and the price for these 5 products is now X euros. Now the customer puts two more products from category B in the cart and enters a coupon code that would give the customer 20% off. Is it possible that this coupon code is only applied to the additional two category B products and not to the other 5 category A products?

Magento - buy 1 product get another free

I have two categories, I am trying to make some thing like if some one buys a product from one category, customer will have a option to choose a free product from another category(like a gift).
I found some thing similar to this in admin -
Promotions -> shopping cart price rule
You can create a rule that buy X qty of one product and get Y quantity of same product free. How can I make it - get X qty of product and get Y qty of another product free. Is this feature available in magento feature or do I have to implement this. Thanks.
you can check the below links for this purpose
http://www.webguys.de/magento/turchen-21-kostenlose-produkte-uber-warenkorb-preisregeln/
http://blog.goods-pro.com/1733/magento-extension-buy-x-selection-of-products-get-another-y-selection-for-free/
http://www.magentocommerce.com/knowledge-base/entry/how-to-setup-buy-x-get-y-free

How do I create this rule in Magento, based on a particular product's quantity?

I need to make a single rule in magento that fulfills following conditions.
There are 10 products from which 3 products should have the following rules apply.
On their initial price, if the user buys 1 product they will get $20 off.
If the user buys more than 1 combination of products from that 3, then they will get $25 off each product.
I am not sure how to do this.
Take these three products, and recreate them in a new attribute set. We'll call it promo.
I would simply create a rule in "Shopping Cart Price Rules" stating this:
If ALL of these conditions are TRUE :
If total quantity is 2 for a subselection of items in cart matching ALL of these conditions: Attribute Set is Promo
Then discount the situation accordingly in the "Actions" Tab.
You can add another rule for three, four, five and so one within one rule.

How to create a coupon on specific product in Magento?

Let's say I have 10% off coupon code.
This coupon is applicable only to Product B
A customer have in its cart :
Product P1
Product B
Product P2
I don't want my 10% off coupon apply to other product but only to Product B.
Do you know how I can do that within Magento?
Here is the process to create Coupon Code for any particular product:-
Login to Admin
Go to Promotions -> Shopping Cart Price Rules
Click Add New Rule
Fill Rule Information
Set Conditions
On left sidebar, click Conditions tab
Click + button icon
Select Product attribute combination
Click + button icon
Select SKU
Now, you will see SKU is ...
Put your product SKU over there
Please note that the SKU option may not show up by default. (Go to: catalog -> attributes -> manage attributes. Then search for the ‘SKU’ attribute and set the drop down ‘Use for Promo Rule Conditions’ to YES and reindex if needed.)
Set Actions
You can set how much discount you want to give from here
Save Rule
Also as extra information, if you not found SKU in promotion tab you can do following.
Go to: catalog -> attributes -> manage attributes
Search for the ‘SKU’ attribute and set the drop down ‘Use for Promo Rule Conditions’ on YES.
That will solve the problem.
They are not exact answer for the question.
Most of all the right but you have to setup one more thing as below if you want to discount only specific items or specific items in category.
Do it as above
under Shopping Cart Price Rule
Go to Conditions > Remove all conditions
Go to Actions and setup under
"Apply the rule only to cart items matching the following conditions (leave blank for all items)"
If you want to discount specific items, select SKU and input the SKU #
If you want to discount Category items, select category
It will be discounted only setup items even if other items are in the cart.
Go to your shopping cart rules in Admin Panel of Magento. When you create new rule, under conditions tab you have great options to set.
For example you can that this rule will apply only to products of a one category, or product which has defined attribute.
You should check those option, because Magento has many possibilities here.
Login to Admin
Go to Promotions -> Shopping Cart Price Rules
Click Add New Rule
Fill Rule Information
Under Actions :
In Apply the rule only to cart items matching the following conditions (leave blank for all items)
Click on + button, under that select SKU
Now, you can see SKU is ...
Put your product SKU over there
The SKU option wont be there in default, to add that
Catalog -> attributes -> manage attributes
Find SKU
Set "Use for Promo Rule Conditions" to Yes

Categories