OrchardCMS / OrchardCore.Commerce

The commerce module for Orchard Core.
MIT License
219 stars 90 forks source link

Global setting to toggle if net or gross prices should be used (OCC-135) #265

Closed sarahelsaig closed 1 year ago

sarahelsaig commented 1 year ago

Is your feature request related to a problem? Please describe

Currently the prices with tax are displayed in the shopping cart. At least in the USA it's customary to display the net price instead.

Does this affect the total on the checkout screen too, or just the individual price labels?

Describe the solution you'd like

Describe alternatives you've considered

We may also display net and gross prices everywhere, but that's quite bloated.

Jira issue

Piedone commented 1 year ago

In the EU VAT system, both prices are needed, since as a private consumer you pay gross prices, as a company or other entity while you pay the gross price, in the end (to simplify a lot) it'll cost you the net price.

sarahelsaig commented 1 year ago

I think that's only applicable to the product display, where we already show both (in fact since #255 if there is a discount you can access all four: promo net price, promo gross price, old net price, old gross price). So the webshop developer can hide either by overriding the templates. But you shouldn't need both on summaries, like the tables on the Cart page and Order display.

Piedone commented 1 year ago

You don't need both of them every single time indeed, but at least on the product page and the final summary before payment it should be displayed.

porgabi commented 1 year ago
  1. If tax rate is provided, the Product page already shows both prices. I assume there's no changes needed to this: image

  2. PriceVariantProducts don't have tax rate properties, so if I understand correctly, this is not applicable to them. image

  3. The Cart page's Total line needs to show Net and Gross prices. Right now, the way it works is the relevant column either display Gross Price (if it's provided on the Product) or simply Price (if Gross price isn't specified). image image To show both prices when applicable, should another column be added conditionally, or should it only be displayed in the text within the Total row? The latter would be something like this: image

sarahelsaig commented 1 year ago
  1. Nothing to do here, the webshop developer can hide either fields by overriding the templates.
  2. Yes, it can be ignored for now.
  3. The TaxShoppingCartEvents.DisplayingAsync() method updates the table headers by replacing the "Price" header with "Gross Price". The cells are populated by ShoppingCartController.Index() using the "ShoppingCartCell_{headerName}.cshtml" shape (so ShoppingCartCell_Price.cshtml and ShoppingCartCell_GrossPrice.cshtml). You can change header updating logic in the event handler, to check the site setting and then leave the headers alone, do the substitution as it's done now, or insert the new column instead. The total is fine as you displayed, maybe place a separator (such as a fullwidth vertical line) between the net and gross if both are displayed.