Friday, December 20, 2024
2 changes · saas-17.4
Resolved issues and error corrections
This fix ensures that when restaurant staff transfer an order to another table, all order lines move with it. It also improves screen navigation during order synchronization so the point of sale does not get stuck on an empty screen.
Original PR description
When transfering table some orderlines were not transfered to the new table. The showScreen method was not working properly when the next screen was an empty screen, that can happen when synching orders. opw-4186184
Subscription products now keep the correct recurring price when shoppers switch variants and reopen the product configuration dialog. This prevents customers from seeing the standard sales price instead of the intended subscription price, improving pricing accuracy during checkout.
Original PR description
Steps to reproduce the issue: 1) Open the create new product page 2) From the "General Information" tab, set the "Product Type" to "Goods", and set a "Sales Price" 3) Check the "Subscriptions" 4)…
Steps to reproduce the issue: 1) Open the create new product page 2) From the "General Information" tab, set the "Product Type" to "Goods", and set a "Sales Price" 3) Check the "Subscriptions" 4) From the "Recurring Prices" tab, create 2 different pricing rules, for different variants (like one for size S, and one for size M) 5) From the "Sales" tab, set an "Optional Product" 6) On the website's product page, keep the default variant and click "Add to cart", the modal "Configure your product" will open 7) Close the modal by clicking "X" or "Esc" 8) Choose another variant that results in a different price (from the prices configured in step 4) 9) Click "Add to cart" again -> Notice that the product's price is no longer the expected recurring price, but it's the "Sales Price" configured in step 2. Reason: When opening the modal, we query the `data-subscription-plan-id` attribute from the DOM using JQuery's `data` method. However, this latter is not meant to querying data attributes from DOM. Its usage is to actually store data associated with the JQuery objects it's associated with. It worked the first time when we opened the modal, as the first call for it will try to initialize the internal store, if empty, with the value of the appropriate `data-*` attribute from DOM, but any subsequent updates to the underlying `data-*` attribute won't be seen by a new call to this function. Fix: Use `attr` instead of `data`, as the former reads directly from the DOM, every time it's invoked. Refs: https://api.jquery.com/data/ https://api.jquery.com/data/#data-html5 https://api.jquery.com/attr/ opw-4369487