-
Notifications
You must be signed in to change notification settings - Fork 2.1k
add fixes for 'productChecksum', 'productsEquals', lazy cart creation, qty for all product types #4128
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
add fixes for 'productChecksum', 'productsEquals', lazy cart creation, qty for all product types #4128
Conversation
…wait for cart sync
…products types. Remove 'checksum' when editing product. Remove and add coupon when user login.
| } | ||
|
|
||
| // 'checksum' check | ||
| const getChecksum = (product: CartItem) => { |
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.
| const getChecksum = (product: CartItem) => { | |
| const getChecksum = (product: CartItem) => product.checksum ? product.checksum : productChecksum(product) |
mayby shorter form, wdyt? :)
| const getServerItemId = (product: CartItem): string | number => | ||
| product.server_item_id || product.item_id | ||
|
|
||
| const isServerIdsEquals = (product1: CartItem, product2: CartItem): boolean => { |
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.
Why types are removed?
|
|
||
| // 'sku' check | ||
| const isSkuEqual = (product1: CartItem, product2: CartItem): boolean => | ||
| String(product1.sku) === String(product2.sku) |
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.
Can be sku another type than string?
|
|
||
| // 'sku' check | ||
| const isSkuEqual = (product1: CartItem, product2: CartItem): boolean => | ||
| String(product1.sku) === String(product2.sku) |
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.
Can be sku another type than string?
| case 'checksum': { | ||
| return isChecksumEquals | ||
| } | ||
| case 'sku': { |
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.
shouldn't it be remove if it is the same as default?
|
@gibkigonzo |

Related Issues
closes #4123, #4118, #4104
onload.Short Description and Why It's Useful
Screenshots of Visual Changes before/after (if There Are Any)
Which Environment This Relates To
Check your case. In case of any doubts please read about Release Cycle
developbranch and want to merge it back todevelopreleasebranch and want to merge it back toreleasehotfixormasterbranch and want to merge it back tohotfixUpgrade Notes and Changelog
IMPORTANT NOTICE - Remember to update
CHANGELOG.mdwith description of your changeContribution and Currently Important Rules Acceptance