-
-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[16.0][ADD] website_sale_loyalty_suggestion_wizard_multi_gift: New Module #211
base: 16.0
Are you sure you want to change the base?
[16.0][ADD] website_sale_loyalty_suggestion_wizard_multi_gift: New Module #211
Conversation
c92edbd
to
8873474
Compare
8873474
to
7001873
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Functionally tested, just a minor change to make it clearer which product is selected when using variants.
t-call="website_sale_loyalty_suggestion_wizard.promotion_wizard_reward_product" | ||
> | ||
<t | ||
t-set="reward_qty" | ||
t-value="multi_gift_line.reward_product_quantity" | ||
/> | ||
<t t-set="product" t-value="product" /> | ||
<t t-set="id" t-value="multi_gift_line.id" /> | ||
<t | ||
t-set="optional_product" | ||
t-value="len(multi_gift_line.reward_product_ids) > 1" | ||
/> | ||
<t | ||
t-set="option_checked" | ||
t-value="product == multi_gift_line.reward_product_ids[:1]" | ||
/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for i in range(len(selected_product_ids)): | ||
wizard_id.loyalty_gift_line_ids[i].selected_gift_id = int( | ||
selected_product_ids[i] | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This loop feels a little bit weird. Without knowing the precise internals I'd say you could better use zip
for the task.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done, thanks!
When setting up a multi-gift promotion or even in a simple promotion, showing the product name without differentiating that it may be a variant, the customer does not know exactly what gift they are receiving. To avoid this confusion and also when choosing alternatives in a multi-gift promotion, the full name is shown with its attributes but omitting the reference.
cfc03e9
to
50b2686
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
cc @Tecnativa TT48349
@chienandalu @carlos-lopez-tecnativa please review