Open lbirkert opened 1 year ago
We should also consider adding VAT fields (Steuern)
GET /product/{key:string}?ram=1&key=value
->
{
currency: "EUR",
total: 1027.3,
vat: 0.19,
total_vat: 1027.3 * 1.19
}
Currently planned is following:
GET /product?currency=EUR
[ Product ]
GET /product/{key:string}?currency=EUR&ram=1&key=value
->
{
currency: "EUR",
total: 1027.3,
vat: 0.19,
total_vat: 1027.3 * 1.19
}
This however needs further thinking as i don't know if i am happy with the ?currency yet, also needs aproval from @CraftingDragon007
For now Im ok with this, maybe we'll change this in the future
I think the vat fields should only contain the multiplier/percentage, that is used and not the full calculation
I think the vat fields should only contain the multiplier/percentage, that is used and not the full calculation
I understand where you are comming from but you need to consider that this is critical information, you know how javascript sometimes tends to be, it would be safer.
Then I would create a seperate field for this information instead of packing it into an arbitary string
Then I would create a seperate field for this information instead of packing it into an arbitary string
What do you mean? total_vat is an extra field
An API that helps fetching product configurations and prices.
Product Object
We'd add currency headers to all these Requests, including the Cart API. (As we do not want bring our site between a paywall just for the users to see the prices)
When configuring these values will be shown to the user as + price and - price values dynamically.
The config payload (in Cart API terms data payload) will look like this:
Note that not the prices are used in the payload as these might change while the website is running.