Skip to content
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

[4.x]: Altered unit price for lineItem resets after recalculating order #3361

Closed
nilsenpaul opened this issue Jan 10, 2024 · 1 comment
Closed
Labels
bug commerce4 Issues related to Commerce v4

Comments

@nilsenpaul
Copy link
Contributor

What happened?

Description

One of our clients needed a way to use 'variable' products from within Commerce's control panel. To facilitate this, we added a product with a €0,- price. Once the order has been completed (somehow this is not allowed before order completion), the client can alter the price for the line item. So far, so good.

Now, two things happen:

  • The tax for that line item does not get set automatically, but has to be entered by the client, even though the product has a 21% tax rate.
  • Whenever the client chooses to recalculate the order, the lineItem price gets reset to €0,-.

Steps to reproduce

  1. Create a product with a tax category, and set its price to €0,- / $0,-
  2. Create a new order from the CP, add the product and then complete the order
  3. Edit the lineItem and set the price to €20,- (notice how no tax is added to the lineItem)
  4. Recalculate the order and see how the price gets reset to €0,-

Expected behavior

  1. I'd expect the tax input to be automatically set to the right tax amount
  2. I'd expect the altered price to stay altered whenever the order is recalculated

I can use an adjuster to add the tax myself, but not if the price is reset on recalculation.

Schermopname.2024-01-10.om.09.06.07.mov

Craft CMS version

4.5.13

Craft Commerce version

4.3.3

PHP version

8.0

Operating system and version

No response

Database type and version

No response

Image driver and version

No response

Installed plugins and versions

No response

@nilsenpaul nilsenpaul added commerce4 Issues related to Commerce v4 bug labels Jan 10, 2024
@lukeholder
Copy link
Member

Custom line items in Commerce 5.1 supports custom prices before the order is complete as well as your choice of tax categories. This should be a solution to your use-case. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug commerce4 Issues related to Commerce v4
Projects
None yet
Development

No branches or pull requests

2 participants