Wednesday, December 11, 2024
1 change · saas-17.2
Resolved issues and error corrections
Customers choosing a non-default subscription plan on a product with variants will now have that selected plan correctly added to their cart. This prevents accidental purchases of the wrong subscription plan and reduces checkout confusion.
Original PR description
### Steps to reproduce: - Create a subscription product with two or more plans and two or more variants - Go to the product's page on eCommerce - Choose another plan than the default one - Add it to the cart - Notice the default plan is the one added to the cart ### Current behavior before PR: This is happening because if the product has variants the pricing select will get re-rendered before we get the selected plan_id https://github.com/odoo/odoo/blob/17.0/addons/website_sale/static/src/js/website_sale.js#L444:L456 so when getting the plan_id after this render of the <select> it will be the default plan. **### Desired behavior after PR is merged:** We are passing the selected plan_id to the call of get_combination_info so when re-render the <select> we will set the one that was selected as the default one. opw-4296527