fix
This commit is contained in:
@@ -139,7 +139,7 @@ const minGlassArea = 0.4 // m²
|
||||
// areaFromItem derives the main article's *visible glass* surface in m² from a
|
||||
// resolved configurator selection. The catalog width/height are facet codes;
|
||||
// the outer (karmytter) size is `code × 100 − margin` mm and the visible glass
|
||||
// is that minus the frame border per axis, e.g. width 4, widthMargin 20,
|
||||
// is that minus the frame border per axis, e.g. width 4, marginWidth 20,
|
||||
// borderWidth 194 → 400 − 20 − 194 = 186 mm. Area = glassW(mm) × glassH(mm) /
|
||||
// 1e6, clamped up to the minGlassArea billing floor. Returns 0 when a dimension
|
||||
// is missing/non-numeric (non-window PDP, or no product resolved yet).
|
||||
@@ -193,14 +193,14 @@ func ToItemAddMessage(item *ProductItem, parent *ProductItem, storeId *string, q
|
||||
}
|
||||
|
||||
msg := &messages.AddItem{
|
||||
ItemId: uint32(item.Id),
|
||||
Quantity: int32(qty),
|
||||
Price: price,
|
||||
OrgPrice: orgPriceFromDiscount(price, item.Discount),
|
||||
Sku: item.Sku,
|
||||
Name: item.Title,
|
||||
Image: item.Img,
|
||||
Stock: stock,
|
||||
ItemId: uint32(item.Id),
|
||||
Quantity: int32(qty),
|
||||
Price: price,
|
||||
OrgPrice: orgPriceFromDiscount(price, item.Discount),
|
||||
Sku: item.Sku,
|
||||
Name: item.Title,
|
||||
Image: item.Img,
|
||||
Stock: stock,
|
||||
// item.Vat is the product's VAT as a raw integer percent (e.g. 25);
|
||||
// ×100 converts to the platform basis-point scale (2500). This is the
|
||||
// single conversion boundary — everything downstream is basis points.
|
||||
|
||||
Reference in New Issue
Block a user