Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Salesforce B2B Commerce for Developers Accredited Professional (AP-202) Exam - Topic 1 Question 90 Discussion

When a user buys 10 units of product B, the user wants 1 unit of Product A to beautomatically added to the cart. How can this requirement be fulfilled?
D) Override the prepareToAdd method in ccrz.cc_api_CartExtension
A) Override the AllowCheckout method in ccrz.cc_api_CartExtension
B) Override the prepareForSave method in ccrz.cc_api_CartExtension
C) Override the preprocess method in ccrz.cc_api_CartExtension

Salesforce B2B Commerce for Developers Accredited Professional (AP-202) Exam - Topic 1 Question 90 Discussion

Actual exam question for Salesforce's B2B Commerce for Developers Accredited Professional (AP-202) exam
Question #: 90
Topic #: 1
[All B2B Commerce for Developers Accredited Professional (AP-202) Questions]

When a user buys 10 units of product B, the user wants 1 unit of Product A to be

automatically added to the cart. How can this requirement be fulfilled?

Show Suggested Answer Hide Answer

Contribute your Thoughts:

0/2000 characters
Luke
4 days ago
I prefer option D. It directly relates to adding items.
upvoted 0 times
...
Lavera
9 days ago
I think option B is the best choice. It prepares the cart before saving.
upvoted 0 times
...
Paz
14 days ago
Why would you need to add A only when buying 10 of B? Seems odd.
upvoted 0 times
...
Lezlie
19 days ago
I agree with B, makes the most sense for saving the cart.
upvoted 0 times
...
Rosio
24 days ago
Wait, can we really override those methods? Sounds tricky!
upvoted 0 times
...
Josphine
2 months ago
Nah, I’m pretty sure it’s D.
upvoted 0 times
...
Aaron
3 months ago
I think option B is the right choice.
upvoted 0 times
...
Clemencia
3 months ago
I’m leaning towards the preprocess method, but I can't recall exactly how it fits into the cart logic.
upvoted 0 times
...
Barrett
3 months ago
I feel like the AllowCheckout method wouldn't be the right choice here since it’s more about the checkout process, not adding items.
upvoted 0 times
...
Cristal
4 months ago
I remember practicing a similar question where we had to modify cart behavior, and I think the prepareForSave method was involved.
upvoted 0 times
...
Graciela
4 months ago
I think we might need to override the prepareToAdd method since it deals with adding items to the cart, but I'm not entirely sure.
upvoted 0 times
...

Save Cancel