0 is out of stock and nothing is available from now on
This commit is contained in:
@@ -34,6 +34,8 @@ pub fn product_card(
|
||||
"currency": product.currency,
|
||||
"sku": representative.sku,
|
||||
"stock": representative.stock,
|
||||
"tracked": representative.tracked(),
|
||||
"in_stock": representative.in_stock(),
|
||||
"variant_count": variant_count,
|
||||
"has_options": variant_count > 1,
|
||||
"published": product.published,
|
||||
@@ -49,7 +51,8 @@ pub fn variant_option(variant: &product_variants::Model, priced: &PricedProduct)
|
||||
"label": variant.label,
|
||||
"sku": variant.sku,
|
||||
"stock": variant.stock,
|
||||
"in_stock": variant.stock > 0,
|
||||
"tracked": variant.tracked(),
|
||||
"in_stock": variant.in_stock(),
|
||||
"price": format_price(priced.price_cents),
|
||||
"on_sale": priced.is_reduced(),
|
||||
"regular_price": format_price(priced.regular_cents),
|
||||
|
||||
Reference in New Issue
Block a user