Tier prices and tier prices customer groups #554
Description
Hello. When I tried to enable tier prices, I faced some problems.
In the next list the first 3 items are about vue-storefront-api exactly, and the last 2 are about vue-storefront in general.
- Tier prices for "any" customer group (code 32000 in magento) are being ignored. Seems like at this line condition should also check if tier.customer_group_id === 32000.
- Tier prices are being loaded for logged in customer like for not logged in customer. If the product is requested through "api/catalog/vue_storefront_catalog/product/_search", the customer group is taken around this line:
vue-storefront-api/src/api/catalog.ts
Line 115 in 1e62369
vue-storefront-api/src/api/catalog.ts
Line 58 in 1e62369
vue-storefront-api/src/api/catalog.ts
Line 70 in 1e62369
- If product is loaded through "/api/url/map", then the passed groupId is always null:
vue-storefront-api/src/api/url/map.ts
Line 102 in 1e62369
- When product page is rendered on server, then there are anyway no customer group id is available, so if you open the app directly from product page in new tab, the tier prices would be shown for not logged in user even if the user is already logged in from current browser.
- If alwaysSyncPlatformPricesOver option is enabled, then the prices are being downloaded from magento as for not logged in user, and even if vuestorefront-api calculated tier prices for current user correctly (with some fixes of previous paragraphs), then those prices are being rewritten with prices for not logged in customer.
So I wonder how is it supposed to work, can it work at all (and with which configuration and on which version), and where I might be wrong?
Unfortunately, here is written only that I have to enable the options usePriceTiers, and seems like after that all should work right away.