feat(catalog): model availability as global decisions
This commit is contained in:
@@ -2,37 +2,32 @@
|
||||
|
||||
return [
|
||||
'stock_reservation_expiration_minutes' => (int) env('STOCK_RESERVATION_EXPIRATION_MINUTES', 30),
|
||||
'availability_policies' => [
|
||||
'user_quota_reached' => [
|
||||
'product' => [
|
||||
'display' => true,
|
||||
'select_variant' => false,
|
||||
'change_quantity' => false,
|
||||
'add_to_cart' => false,
|
||||
'buy_now' => false,
|
||||
],
|
||||
'variant' => [
|
||||
'display' => true,
|
||||
'select_variant' => false,
|
||||
'change_quantity' => false,
|
||||
'add_to_cart' => false,
|
||||
'buy_now' => false,
|
||||
],
|
||||
'availability' => [
|
||||
'default_actions' => [
|
||||
'select_variant',
|
||||
'change_quantity',
|
||||
'add_to_cart',
|
||||
'buy_now',
|
||||
],
|
||||
'out_of_stock' => [
|
||||
'product' => [
|
||||
'display' => false,
|
||||
'select_variant' => false,
|
||||
'change_quantity' => false,
|
||||
'add_to_cart' => false,
|
||||
'buy_now' => false,
|
||||
'rules' => [
|
||||
'user_quota_reached' => [
|
||||
'effect' => 'restrict',
|
||||
'denied_actions' => [
|
||||
'select_variant',
|
||||
'change_quantity',
|
||||
'add_to_cart',
|
||||
'buy_now',
|
||||
],
|
||||
],
|
||||
'variant' => [
|
||||
'display' => false,
|
||||
'select_variant' => false,
|
||||
'change_quantity' => false,
|
||||
'add_to_cart' => false,
|
||||
'buy_now' => false,
|
||||
'out_of_stock' => [
|
||||
'effect' => 'hide',
|
||||
],
|
||||
'requested_quantity_exceeds_user_quota' => [
|
||||
'effect' => 'restrict',
|
||||
'denied_actions' => [
|
||||
'add_to_cart',
|
||||
'buy_now',
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user