BlackFriday 2024! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Adobe Exam AD0-E704 Topic 13 Question 49 Discussion

Actual exam question for Adobe's AD0-E704 exam
Question #: 49
Topic #: 13
[All AD0-E704 Questions]

You are creating a module that creates a Catalog Price Rule. You have written this code to specify the conditions:

After saving the catalog rule, the second and third condition do not seem to fall under the combine condition.

How do you fix the issue?

Show Suggested Answer Hide Answer
Suggested Answer: D

Contribute your Thoughts:

Sommer
19 days ago
I bet the person who wrote this code was having a bad day. Or maybe they were just learning Magento. Either way, it's a good laugh for us now.
upvoted 0 times
Emeline
5 days ago
B) The array keys are incorrect they need to be 1--1 and 1--2
upvoted 0 times
...
Elbert
8 days ago
A) The type of the third condition needs to be Magento\CatalogRule\Model\Rule\Condition\Category since you are checking on category_ids
upvoted 0 times
...
...
Stefan
20 days ago
Ah, the joys of programming. Fixing bugs is like a treasure hunt, but without the actual treasure. Just a headache.
upvoted 0 times
...
Tamra
23 days ago
The () operator in the third condition is the culprit. Option D is the way to go, no doubt about it.
upvoted 0 times
...
Taryn
1 months ago
In my opinion, the () operator in the third condition is causing the problem, so it needs to be removed for the conditions to be saved correctly.
upvoted 0 times
...
Janna
1 months ago
The value field in the first condition is not the problem here. Option D seems to be the correct answer.
upvoted 0 times
Cecily
7 hours ago
B) The array keys are incorrect they need to be 1--1 and 1--2
upvoted 0 times
...
Lashawnda
17 days ago
A) The type of the third condition needs to be Magento\CatalogRule\Model\Rule\Condition\Category since you are checking on category_ids
upvoted 0 times
...
...
Bulah
1 months ago
I believe the array keys are incorrect and need to be adjusted to 1--1 and 1--2 for the conditions to work properly.
upvoted 0 times
...
Eun
1 months ago
The array keys are indeed incorrect. Option B looks like the way to go to fix that issue.
upvoted 0 times
...
Frederick
2 months ago
The third condition needs to be of the correct type, Magento\\CatalogRule\\Model\\Rule\\Condition\\Category, to work properly. Option A seems like the right fix.
upvoted 0 times
Mickie
26 days ago
Let's update the code with that fix and see if it works.
upvoted 0 times
...
Justa
27 days ago
Yes, the type of the third condition should be Magento\\CatalogRule\\Model\\Rule\\Condition\\Category.
upvoted 0 times
...
Karol
1 months ago
I think option A is the correct fix.
upvoted 0 times
...
...
Aja
2 months ago
I think the issue can be fixed by changing the type of the third condition to Magento\CatalogRule\Model\Rule\Condition\Category.
upvoted 0 times
...

Save Cancel