Skip to content

feat: adds priceTags as tax - SFS-2970 - #3144

Merged
eduardoformiga merged 5 commits into
devfrom
feat/my-account-price-tags-as-tax
Dec 10, 2025
Merged

eduardoformiga merged 5 commits into
devfrom
feat/my-account-price-tags-as-tax

Conversation

@eduardoformiga

@eduardoformiga eduardoformiga commented Dec 4, 2025 •

Copy link
Copy Markdown
Member

What's the purpose of this pull request?

This PR aims to consider the priceTags in the tax price calculations for my account order details, within the delivery options card.

How it works?

It includes the priceTags because previously, the sum was only considering the tax field. And by investigating the previous logic from the old my-orders, we should also consider the priceTags.

Before After
Screenshot 2025-12-04 at 20 28 34 Screenshot 2025-12-04 at 20 30 27

How to test it?

  • Ask me in slack how to test because you need to replicate some cookies from my user in a specific account, but:
  • You will need a user with an order placed and tax/price tags included.
  • You can see the order with tax on the orders page.
  • Check the delivery options cards, including the tax.

- Updated UserOrderDeliveryOptionsItems type to include sellingPrice, taxPriceTags, and taxPriceTagsTotal.
- Enhanced userOrder resolver to calculate item totals considering taxPriceTags.
- Introduced filterTaxPriceTags function to process tax-related price tags.
…riceTagsTotal

- Enhanced the ServerOrderDetailsQuery to include sellingPrice and taxPriceTagsTotal in the response.
- Updated the gql function to reflect these changes in the GraphQL schema.
- Adjusted the UserOrderDeliveryOptionsItems type to accommodate the new fields.
…ion components

- Added new types for UserOrderDeliveryOption and UserOrderDeliveryOptionsData to improve type safety.
- Updated deliveryOptionsData handling in MyAccountOrderDetails to cast to the new types.
- Modified MyAccountDeliveryOptionAccordion to calculate total tax correctly by summing tax and taxPriceTagsTotal.
- Adjusted item price handling to use sellingPrice instead of price for better accuracy.
@eduardoformiga
eduardoformiga requested a review from a team as a code owner December 4, 2025 23:32
@codesandbox-ci

codesandbox-ci Bot commented Dec 4, 2025 •

Copy link
Copy Markdown

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

@eduardoformiga eduardoformiga changed the title feat: adds priceTags as tax feat: adds priceTags as tax Dec 4, 2025
@eduardoformiga eduardoformiga changed the title feat: adds priceTags as tax feat: adds priceTags as tax - SFS-2970 Dec 4, 2025
@eduardoformiga
eduardoformiga merged commit d1b3869 into dev Dec 10, 2025
@eduardoformiga
eduardoformiga deleted the feat/my-account-price-tags-as-tax branch December 10, 2025 14:46
thiagopereira-vtex pushed a commit that referenced this pull request Jan 8, 2026
## What's the purpose of this pull request?

This PR aims to consider the `priceTags` in the tax price calculations
for my account order details, within the delivery options card.

## How it works?

It includes the `priceTags` because previously, the sum was only
considering the `tax` field. And by investigating the previous logic
from the old `my-orders`, we should also consider the `priceTags`.

| Before | After |
|--------|--------|
| <img width="905" height="672" alt="Screenshot 2025-12-04 at 20 28 34"
src="https://github.com/user-attachments/assets/554f1ae2-40f3-4328-b290-47d2df49b633"
/> | <img width="805" height="697" alt="Screenshot 2025-12-04 at 20 30
27"
src="https://github.com/user-attachments/assets/322d1dbc-fcd2-423a-9fad-139549296efa"
/> |

## How to test it?

- [Ask me in
slack](https://vtex.slack.com/archives/C03L3CRCDC4/p1764892639291049)
how to test because you need to replicate some cookies from my user in a
specific account, but:
- You will need a user with an order placed and tax/price tags included.
- You can see the order with tax on the orders page.
- Check the delivery options cards, including the tax.

---------

Co-authored-by: Larícia Mota <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants