Magento cart price custom rule is cycled - magento2

I created custom Amasty cart price rule BuyxgetyAutomatically, when I add X product it applies rule and adds y however it gets applied infinitely until it gives error "The requested qty is not available", what might be causing it?

Related

WorkFlow Doesn't Update CheckBox On opportunity Object

The request is this: If the discount entered on the single product is higher than 10%, the Discount checkbox on the Opportunity object is updated. I created a Percentage field on the product object(Discouynt__c) and a discount checkbox field on the opportunity object. I have created a WorkFlow that updates the Opportunity Discount CheckBox.
The work flow does not work. When I enter a value greater than 10 in the discount field of the product object, the checkbox on the opportunity does not update.![enter image description here]()
The request is this: If the discount entered on the single product is higher than 10%, the Discount checkbox on the Opportunity object is updated. I created a Percentage field on the product object(Discouynt__c) and a discount checkbox field on the opportunity object. I have created a WorkFlow that updates the Opportunity Discount CheckBox.
The work flow does not work. When I enter a value greater than 10 in the discount field of the product object, the checkbox on the opportunity does not update.

Apply Discount to Products in Magento Cart page

I wanted to know how can I give discount value/percentage on cart page for specific product's quantity dynamically via OBSERVER.
Discount can be given on same product's with different quantities.
EX:
Customer add 4 QTY from Product A and I should be able to give 10% discount on 2 QTYs and the discount value should be shown after subtotal (as normal cart rule applied in Magento)
If I can create dynamic cart rule and apply that to products which I wanted that also useful in this case.
http://excellencemagentoblog.com/magento-add-fee-discount-order-total
this is good link to give discount for order , we can modified for particular product & product qty. calculate discount for different product and its qty. add it and setFeeAmount.

How to add dynamic discount amount for one coupon in Magento

How to set dynamic discount amount if an coupon is applied.
For this i have created a shopping cart price rule and send this promo coupon to some customers and when they purchase products from my site and applied this coupon every customers get different discount amount based on the products in their shopping cart so how i can set this dynamic discount amount ?
I have already make some research on salesrule/rule module but getting confused so please help me...
Just for some your knowledge or someone needy finally i have found solution for my question for dynamic discount amount.
to achieve this you need to change in two methods first one is process(Mage_Sales_Model_Quote_Item_Abstract $item) under Mage_SalesRule_Model_Validator class in which you need to change the rule discount amount and set it to any dynamic calculated value like
$rule->setDiscountAmount($dynamicDiscountAmount);
and in the collect method just update the discount amount for display purpose in totals block
$address->setDiscountAmount(-$discountAmount);
$address->setBaseDiscountAmount(-$discountAmount);

Paypal IPN using PHP to get customized Quantity and Amount

I have downloaded the sample paypal IPN script using php and customised with the email for the buyout option and it has also some hidden paramaters such as amount, quantity,return_url, notify_url like this. My main idea is to do the buyout option for the product purchase in my website.The current calculation for the product purchase is as follows:
Item Price:$20
Quantity :10
Total amount $200
I need the calculation to some different way as our site have some static set of quantities and prices, so our point of calculation is as follows:
Item Price:$20
Quantity :10
Total amount:$20
So, the total amount needs to be the same for the given number of quantities.The IPN configuration doesn't allow me to change the quantity field by this way, please suggest some ideas to overcome this issue.
The item price is price per item, the quantity is of course multiplied by the item price. Your second example should have $2 as the --Item-- price. If you want to sell "10 items for $20", I think you will need to make a new item for that combo and just but the actual quantity in a custom field.
If you want to use the same item and paypal's quantity field, I think you need to look into calculating a discount and making that part of the parameters (discount_amount_cart or discount_amount_X for item X I think).

Paypal Discount When purchasing two + items (not two instances of same object)

Paypal has listed out methods for discounts such as :
discount_amount
Optional
Discount amount associated with an item.
It must be less than the selling price of the item. If you specify discount_amount and discount_amount2 is not defined, then this flat amount is applied regardless of the quantity of items purchased.
Valid only for Buy Now and Add to Cart buttons.
discount_amount2
Optional
Discount amount associated with each additional quantity of the item.
It must be equal to or less than the selling price of the item. A discount_amount must also be specified as greater than or equal to 0 for discount_amount2 to take effect.
Valid only for Buy Now and Add to Cart buttons.
I understand that you can have a discount associated with the amount of the same object inside of the cart. I'm wondering if anyone knows a way or method to allow a discount to show up if you say add 3 items or 5 items. Basically the situation is users have the option of signing up for either 1-4 courses. If a user signs up for 1 normal price(lets say 30) occurs. If a second is added they would receive a 10 dollar discount on the tuition(50). Than if a third is added it would show up as the regular method (resulting in 90) However if a fourth is added it would be a charge of 3 courses plus 50. (95). Is there any solution to presenting this to paypal to update based on amount of items (each being different items[different course dates and names]) included in your cart?
If it's for the whole cart and not just the item use discount_amount_cart
Remember discount_amount_1 has to be less in value than amount_1