Podcast #128: We chat with Kent C Dodds about why he loves React and discuss what life was like in the dark days before Git. Listen now.

Questions tagged [rules]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
15
votes
3answers
10k views

Catalog rules daily update doesn't work

I face with problem that Magento's Catalog rules daily update doesn't work. This means that there are no products price changes when catalog rule's expire date comes, so I have to press rule apply ...
8
votes
2answers
6k views

Magento Add Condition Rule In A Custom Form in magento 2

I want to add condition action in custom module admin form. How can I achieve this? Refer link for Magento 1.9 Replacement of above link for Magento 2.
8
votes
1answer
459 views

Restricting customers to max of (some number) purchases for a certain product in Magento

Is there any good modules out there that can handle this? Or would this be a custom event / observer that needs to be written? Here's an image on a non magento site that shows specifically what i'm ...
5
votes
2answers
4k views

do catalog price rules carry over when added to the cart?

I have a catalog price rule - which appears to look correct when viewing the products in the catalog. however, when I add to the cart - the price goes back up to the full amount. Is this price rule ...
5
votes
3answers
8k views

Apply price rule to variants of a configurable product?

Our apparel store is built with configurable products. We'd like to create a Catalog Price Rule that targets only specific variants of a configurable product. For example, all 'Guys' shirts. It doesn'...
4
votes
1answer
2k views

How to get maching products based on rule conditions

how to get matching products based on rule conditions i need to filter product grid according to rule condition in my custom module I have used it as a filter Array ( [conditions] => Array ...
4
votes
2answers
357 views

Magento 2 Can't get the sales rules conditions in my ui form submit

I have a UI form which contains 2 fields one is 'name' and the other is the 'conditions'. I have tried the below code to display the conditions section and it is working fine. But I did not get the ...
3
votes
1answer
3k views

How to apply simpler password constraints for customers in magento 2

When setting up a new password, a customer may read the following message : Minimum of different classes of characters in password is 3. Classes of characters: Lower Case, Upper Case, Digits, Special ...
3
votes
1answer
57 views

Apply discount for For every $X spent Programatically in magento 2

I want to apply the discount on every $X spent amount. For example, if $5 discount for every $10, and my cart total is $34 then, I will get the discount of $15. Is it possible by programmatically ...
3
votes
4answers
2k views

Catalog Price Rules Contains Condition

I need to make discount oin several product wich skus contain "1513437" like sku1 = 1513437_01 sku2 = 1513437_02 etc... So i set a new rule setting condition as sku contains 1513437 but it doesn't ...
3
votes
2answers
557 views

Are shopping cart rules applied to recurring orders

My question is really the title. But here are the details we have behind the question. Shopping cart has a configured subscription item in the cart and the cart subtotal is >= $50, gets free shipping ...
3
votes
1answer
661 views

What are the differences between the promotion actions?

I've two location to set my cart promotion rules, what are the differences? I can set the rules in Conditions and Actions. For example: Conditions tab Actions Tab
3
votes
1answer
1k views

How to extend rules.js in magento 2?

I try to overwrite rules.js from vendor/Magento_Ui/web/js/lib/validation/rules.js in my custom theme but it dosen't work. I found this solution but it's not working for me : Magento 2 How to extend ...
3
votes
1answer
790 views

Programmatically create a Smart Category Rules

I was following this guide from inchoo for programmatically creating 50+ categories, but then I discovered this Enterprise feature, “Smart Category Rules”, and would like to use this approach instead. ...
3
votes
1answer
376 views

Magento2: custom validation Error “Uncaught TypeError: Cannot read property 'call' of undefined”

In my custom validation rules shows ' Uncaught TypeError: Cannot read property 'call' of undefined' errors!!!... . how can i do custom logic and proper validation ? Here is my Code app/...
3
votes
2answers
3k views

How do I programmatically load a specified sales rule in Magento 2?

In Magento 1 EE, I was able to get sales rule information from product list page with the following: $rule = Mage::getModel('salesrule/rule')->load($ruleId); $isActive = $rule->getIsActive(); $...
3
votes
0answers
33 views

Different discount for category products

I want to know is there a way to get different discount for the products in the same category if quantity exceeds a limit. For example: I have these products with these prices: A=10 B=15 C=12 And ...
3
votes
0answers
220 views

How to create a Shopping Cart Price rule for free shipping for all items, with some exclusions?

I have a clean build of CE 1.9.1.1 and have loaded the sample data provided by Magento. I want to set up a Shopping Cart Price Rule for free shipping on all items except 2 SKUs (one simple SKU and it'...
2
votes
1answer
114 views

How to duplicate sales rule programmatically in Magento2

Im try to duplicate some salesrule exist, i can duplicate this, but i can't use setConditionsSerialized and setActionsSerialized with getCondition and getActionCondition, its dont working use ...
2
votes
1answer
195 views

How to make Shopping Cart Rule work with Configurable Product in Magento?

Shopping Cart Rule in Magento doesn't allow the condition custom attribute of product . I want to make rule with condition size 8 , men. I found some solutions on Internet but they don't work. Thank ...
2
votes
2answers
869 views

Customer Can Buy a Product Once and Can be Purchased alone [closed]

In Magento, I have some products, which can be purchased only once by a customer, and this products can be purchased alone not combined with any products. Eg. 1) If the Product X purchased by a ...
2
votes
1answer
117 views

catalog price rules gap

I have a 10% discount rule applied on a specific category. Everything works fine, but costumers who buy between 0h00m and 1h00m dont get the discount which is annoying because they are expecting the ...
2
votes
1answer
940 views

Retrieving grainular discount information for multiple qty of one item ordered

I have an problem retrieving specific discount information for an item of ordered with multiple qty. Here's the scenario. An item with a price of $100. A shopping cart price rule of $10 off that ...
2
votes
0answers
15 views

Magento 2 : Category products dynamic rules get scope between 10% and 20% discount

We have a category where we need to add all products from another category with between 10% and 20% discount. The problem is that some of the products have a special price AND a price-rule which ...
2
votes
1answer
318 views

How to Reset Magento Admin Permission

Admin role have no permissions, when I log in I just see only a extensions. How to reset permission in database MAGENTO 2 version?
2
votes
0answers
146 views

Magento 2: How to validate cart price rule in product view?

I'm trying to show the price rules in the product view, but I can not find a way to validate if a product meets the rule... At the moment I just get all the rules. Block: class RuleDescription ...
2
votes
0answers
726 views

How to set shipping rule in magento2?

How to set below rule? Shipping & Handling Fee is 20% if the order is between $50 to $150, 15% if the order is between $150 to $300.
2
votes
0answers
122 views

Magento salesrule override not working

I want to override the SalesRule model for my custom module, but it already used in another third party module. But the problem is my override is loading always first. And the third party module's ...
2
votes
0answers
168 views

Apply Catalog Price Rules on MSRP

Is there any chance to apply Catalog Price Rules on MSRP[Manufacturer's Suggested Retail Price] by adding option By Percentage on MSRP in the catalog price rules actions
2
votes
1answer
765 views

Magento Rule Based Related Products

We are attempting to set up Rule Based Relations, a feature of Magento Enterprise. Specific Magento version is EE 1.13.1.0 So basically you set which products are the related products, and which ...
1
vote
1answer
2k views

How to create Tax rule programmatically in controller magento 2

I have try with this code make tax rule programmatically. but it's not working infact model not loaded. you can see this code : $objectManagers = \Magento\TestFramework\Helper\Bootstrap::...
1
vote
2answers
6k views

Create a Shopping Cart Rule - To offer 5% discount for two products or more

I am trying to create shopping cart rule: Two or more DIFFERENT products should be added to a cart Include Products only from categories "6 & 8" Apply 5% discount Any help appreciated. Thanks
1
vote
1answer
137 views

How to create 2 shopping cart rule in magento 1.9.3.2

We are selling dress where with different Category A and B. Category A need to give buy 2 or more to get 15% Off. Category B is flat 10% off on all products. If people buy Category A 1 product and ...
1
vote
1answer
1k views

Magento 2: Cart Price Rules - Buy X get Y free (discount amount is Y) is Not Working

I'm using Magento 2 CE Version 2.12 I have followed the below one, as well other tutorials. https://www.mageplaza.com/kb/how-setup-buy-x-get-y-free-in-magento-2.html Still, it's not working.
1
vote
1answer
653 views

Custom product choices with shopping cart rules

I'm running Magento 1.8 Community edition. I have a product with one custom choice. So I add the choices and give them SKU NO INSTALLATION with SKU:TILLV000 INSTALLATION with SKU: TILLV001 SUPER ...
1
vote
1answer
167 views

How to set admin user permission for root category?

I have three webstores. Also I hired one manager for one webstore. So, I have three managers and three root categories in admin panel. Let's name manager1, manager2, manager3 and webstore1, webstore2,...
1
vote
1answer
178 views

Shopping Cart Price Rule for European Union Countries

In Shopping Cart Price Rule I can set condition as "Shipping Country" "is" or "is not". I need to extend this condition to all European Union Countries. Since Magento has this configuration in ...
1
vote
1answer
2k views

How to get total price for product with qty before adding to cart in Magento

I have shopping cart promotion rules which gives discount for buying 4 products. This works fine on shopping cart page. I mean it applies discount and shows discounted price in TOTAL row. I want to ...
1
vote
1answer
2k views

Magento 2 - Cart price rules promotion rule based on specific category products added specified

I am new to Magento 2 and working with cart price rules but unable to get the required results. 1- I would like to apply 5% discount if more than 30 and less than 60 units added from specified ...
1
vote
1answer
378 views

How to filter Products with activated Flag?

I use the Use for Promo Rule Conditions flag. How can I filter only products having this flag set to yes? Is there a table where it is set so that I can use it for filtering?
1
vote
1answer
2k views

How to give user agent rule for iPad and Tablet in Magento 2.1?

I have two themes, one for mobile and other for desktop. I have created 2 user agent rules for Mobile and iPad. All mobiles are showing mobile theme. But iPad and Tablets are also showing mobile theme....
1
vote
2answers
681 views

Excluding new items from a discount in Catalog Price Rules

I work in a boutique and am adding new season merchandise to the site. We have a sale running for all previous season items. When I am adding a new item [say a handbag], there is a Catalog Price ...
1
vote
2answers
2k views

Magento Shopping Cart Price Rule - Discounting the wrong amount

We have a Magento store running 1.9 Community version. We have a number of discount codes we publish in magazines, this morning we noticed however instead of giving a 10% discount it's giving a ...
1
vote
1answer
84 views

Disallow invoice option when organisation in billing post array is not set to 1

I have a custom value 'organisation_type' that will be 1,2 or 3. If this is 1 I want to modify the existing code in the PurchaseOrder.php below to set canUseCheckout to true. so for instance in the ...
1
vote
0answers
20 views

Custom shipping rate logic

I have created a custom shipping method. I need to implement the following logic: Shipping rate = Item weight * Item quantity * Zone rate How to get zone rates in collectRates method?
1
vote
0answers
48 views

100% Discount for matching products with discount code, Max qty 1 per product, Maximum fixed total, with 5 items

We have a clothing shop and are offering the following discount with a code to select customers only... 1 Free Sweatshirt (any size) 1 Free Polo (any size) 1 Free Fleece (any size) 1 Free Coat (any ...
1
vote
0answers
154 views

Magento 2.3.0 How to display only product attribute in custom rule condition into the custom admin form using the ui component

I have implement custom condition Rule to my custom module Take refrance from this link and it is working fine. But it is display also other rule like cart attribute, customer attribute, other ...
1
vote
0answers
62 views

How to get acting to product price rule in Magento 2

/magento-catalog/templates/product/price/final_price.phtml <span class="old-price"> <?php /* @escapeNotVerified */ echo $block->renderAmount($priceModel->getAmount(), [ '...
1
vote
1answer
352 views

Magento 1.9 : How to add product with discount automatically in the shopping cart?

Hope you're all doing well. I need some guidance in how or if some tool already exist for this: If an specific product enters the shopping cart, automatically one other specific product appears in ...
1
vote
0answers
34 views

Using QTY in Rule-Based Product Relations

Using Magento EE 1.14 and would like to be able to use the inventory quantity for rule-based product relations (related, upsell, cross sell). However, I don't see a way to make the quantity available ...