New Year Sale 2026! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Adobe AD0-E704 Exam - 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:

0/2000 characters
Lashawnda
3 months ago
Wait, are we sure about A? That seems a bit too specific.
upvoted 0 times
...
Jillian
3 months ago
D seems like a valid point, that operator could mess things up.
upvoted 0 times
...
Malissa
3 months ago
C sounds weird, why would you change that value?
upvoted 0 times
...
Leonor
4 months ago
I think B makes more sense, the array keys seem off.
upvoted 0 times
...
Annamae
4 months ago
A is definitely the right choice, you need the correct model type!
upvoted 0 times
...
Mica
4 months ago
I vaguely recall that using invalid operators can cause issues, so option D might be the one to look into.
upvoted 0 times
...
Brianne
4 months ago
I feel like the value in the first condition being '2. 3' could be a formatting issue, but I'm not confident about that.
upvoted 0 times
...
Sylvia
4 months ago
I'm not entirely sure, but I think the array keys could be important. Option B sounds familiar from a practice question.
upvoted 0 times
...
Jade
5 months ago
I remember something about condition types needing to match, so option A might be right.
upvoted 0 times
...
Gianna
5 months ago
Hmm, the value field in the first condition looks a bit strange. Maybe changing it to '2, 3' will help the conditions combine properly.
upvoted 0 times
...
Celestine
5 months ago
The array keys look a bit off to me. They need to be 1--1 and 1--2 instead of the current format. I'll try that and see if it resolves the problem.
upvoted 0 times
...
Kattie
5 months ago
Ah, I think I see the problem. The third condition is checking on category_ids, so the condition type needs to be Magento\CatalogRule\Model\Rule\Condition\Category. That should fix the issue.
upvoted 0 times
...
Quinn
5 months ago
Okay, let's see here. The issue seems to be with the second and third conditions not being combined correctly. I'll need to double-check the condition types and array keys to see what's going wrong.
upvoted 0 times
...
Alana
5 months ago
Hmm, this looks like a tricky one. I'll need to carefully review the code and the question to figure out the best approach.
upvoted 0 times
...
Sommer
1 year 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
Casie
1 year ago
D) The () operator in the third condition is invalid, which prevents the conditions from being saved correctly
upvoted 0 times
...
Delsie
1 year ago
C) The value field in the first condition is changed to '2. 3'
upvoted 0 times
...
Emeline
1 year ago
B) The array keys are incorrect they need to be 1--1 and 1--2
upvoted 0 times
...
Elbert
1 year 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
1 year 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
1 year ago
The () operator in the third condition is the culprit. Option D is the way to go, no doubt about it.
upvoted 0 times
Fanny
1 year ago
Let's go with Option D to fix the problem with the conditions.
upvoted 0 times
...
Charlie
1 year ago
Yes, you're right. Option D mentions that the () operator is invalid.
upvoted 0 times
...
Virgina
1 year ago
I think the issue is with the () operator in the third condition.
upvoted 0 times
...
...
Taryn
1 year 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 year ago
The value field in the first condition is not the problem here. Option D seems to be the correct answer.
upvoted 0 times
Gerri
1 year ago
D) The () operator in the third condition is invalid, which prevents the conditions from being saved correctly
upvoted 0 times
...
Cecily
1 year ago
B) The array keys are incorrect they need to be 1--1 and 1--2
upvoted 0 times
...
Lashawnda
1 year 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 year 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 year ago
The array keys are indeed incorrect. Option B looks like the way to go to fix that issue.
upvoted 0 times
...
Frederick
1 year 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
1 year ago
Let's update the code with that fix and see if it works.
upvoted 0 times
...
Justa
1 year ago
Yes, the type of the third condition should be Magento\\CatalogRule\\Model\\Rule\\Condition\\Category.
upvoted 0 times
...
Karol
1 year ago
I think option A is the correct fix.
upvoted 0 times
...
...
Aja
1 year 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