Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

COM-8087: Consider future inventory for back order and out of stock behavior #464

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions templates/modules/cart/cart-table-item.hypr.live
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@
</dd>
{% endfor %}

{% if item.product.stock and item.product.stock.isOnBackOrder and item.product.stock.manageStock and Math.max(item.product.stock.aggregateInventory, item.product.stock.stockAvailable) < item.quantity %}
{% if item.product.stock and item.product.stock.isOnBackOrder and item.product.stock.manageStock and Math.max(item.product.stock.aggregateInventory, item.product.stock.totalAvailableStock) < item.quantity %}
<dt class="mz-cart-backorder-list">
<div class="mz-product-backorder">
<div class="is-warning mz-product-backorder-warning">
{% if item.product.stock.aggregateInventory > item.product.stock.stockAvailable %}
{% if item.product.stock.aggregateInventory > item.product.stock.totalAvailableStock %}
{{ labels.qty }} {{ item.quantity|subtract(item.product.stock.aggregateInventory) }} {{ labels.itemOnBackorder }}
{% else %}
{{ labels.qty }} {{ item.quantity|subtract(item.product.stock.stockAvailable) }} {{ labels.itemOnBackorder }}
{{ labels.qty }} {{ item.quantity|subtract(item.product.stock.totalAvailableStock) }} {{ labels.itemOnBackorder }}
{% endif %}

{% if item.product.stock.availableDate %}
Expand All @@ -46,13 +46,13 @@
<dt>{{ bundledProduct.productCode }}</dt>&nbsp;
<dd>{{ bundledProduct.name }} ({{ bundledProduct.quantity }})</dd>
<dd>
{% if bundledProduct.stock and bundledProduct.stock.isOnBackOrder and bundledProduct.stock.manageStock and bundledProduct.stock.stockAvailable < item.quantity|multiply(bundledProduct.quantity) %}
{% if bundledProduct.stock and bundledProduct.stock.isOnBackOrder and bundledProduct.stock.manageStock and bundledProduct.stock.totalAvailableStock < item.quantity|multiply(bundledProduct.quantity) %}
<div class="mz-cart-backorder-list">
<div class="mz-product-backorder">
<div class="is-warning mz-product-backorder-warning">
{{ labels.qty }} {{ bundledProduct.stock.stockAvailable }} {{ labels.productBackorderAvailable }}
{{ labels.qty }} {{ bundledProduct.stock.totalAvailableStock }} {{ labels.productBackorderAvailable }}
{% if bundledProduct.stock.availableDate %}. {% else %}, {% endif %}
<br />{{ labels.qty }} {{ item.quantity|multiply(bundledProduct.quantity)|subtract(bundledProduct.stock.stockAvailable) }} {{ labels.itemOnBackorder }}
<br />{{ labels.qty }} {{ item.quantity|multiply(bundledProduct.quantity)|subtract(bundledProduct.stock.totalAvailableStock) }} {{ labels.itemOnBackorder }}

{% if bundledProduct.stock.availableDate %}
,<br /> {{ labels.productBackorderAvailableDate }} {{bundledProduct.stock.availableDate | date("m/d/Y")}}
Expand Down
12 changes: 6 additions & 6 deletions templates/modules/common/order-summary.hypr.live
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@
{% for bundledProduct in item.product.bundledProducts %}
<dt>{{ bundledProduct.productCode }}</dt>&nbsp;
<dd>{{ bundledProduct.name }} ({{ bundledProduct.quantity }})</dd>
{% if bundledProduct.stock and bundledProduct.stock.isOnBackOrder and bundledProduct.stock.manageStock and bundledProduct.stock.stockAvailable < item.quantity|multiply(bundledProduct.quantity) %}
{% if bundledProduct.stock and bundledProduct.stock.isOnBackOrder and bundledProduct.stock.manageStock and bundledProduct.stock.totalAvailableStock < item.quantity|multiply(bundledProduct.quantity) %}
<br/> <dd>
<div class="mz-product-backorder">
<div class="is-warning mz-product-backorder-warning">
{{ labels.qty }} {{ bundledProduct.stock.stockAvailable }} {{ labels.productBackorderAvailable }}
{{ labels.qty }} {{ bundledProduct.stock.totalAvailableStock }} {{ labels.productBackorderAvailable }}
{% if bundledProduct.stock.availableDate %}. {% else %}, {% endif %}
<br />{{ labels.qty }} {{ item.quantity|multiply(bundledProduct.quantity)|subtract(bundledProduct.stock.stockAvailable) }} {{ labels.itemOnBackorder }}
<br />{{ labels.qty }} {{ item.quantity|multiply(bundledProduct.quantity)|subtract(bundledProduct.stock.totalAvailableStock) }} {{ labels.itemOnBackorder }}

{% if bundledProduct.stock.availableDate %}
,<br /> {{ labels.productBackorderAvailableDate }} {{bundledProduct.stock.availableDate | date("m/d/Y")}}
Expand All @@ -35,13 +35,13 @@
{% endfor %}
</dl>
{% else %}
{% if item.product.stock and item.product.stock.isOnBackOrder and item.product.stock.manageStock and Math.max(item.product.stock.aggregateInventory, item.product.stock.stockAvailable) < item.quantity %}
{% if item.product.stock and item.product.stock.isOnBackOrder and item.product.stock.manageStock and Math.max(item.product.stock.aggregateInventory, item.product.stock.totalAvailableStock) < item.quantity %}
<div class="mz-product-backorder">
<div class="is-warning mz-product-backorder-warning">
{% if item.product.stock.aggregateInventory > item.product.stock.stockAvailable %}
{% if item.product.stock.aggregateInventory > item.product.stock.totalAvailableStock %}
{{ labels.qty }} {{ item.quantity|subtract(item.product.stock.aggregateInventory) }} {{ labels.itemOnBackorder }}
{% else %}
{{ labels.qty }} {{ item.quantity|subtract(item.product.stock.stockAvailable) }} {{ labels.itemOnBackorder }}
{{ labels.qty }} {{ item.quantity|subtract(item.product.stock.totalAvailableStock) }} {{ labels.itemOnBackorder }}
{% endif %}
{% if item.product.stock.availableDate %}
.<br /> {{ labels.productBackorderAvailableDate }} {{item.product.stock.availableDate | date("m/d/Y")}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@
{% for bundledProduct in item.product.bundledProducts %}
<dt>{{ bundledProduct.productCode }}</dt>&nbsp;
<dd>{{ bundledProduct.name }} ({{ bundledProduct.quantity }})</dd>
{% if bundledProduct.stock and bundledProduct.stock.isOnBackOrder and bundledProduct.stock.manageStock and bundledProduct.stock.stockAvailable < item.quantity|multiply(bundledProduct.quantity) %}
{% if bundledProduct.stock and bundledProduct.stock.isOnBackOrder and bundledProduct.stock.manageStock and bundledProduct.stock.totalAvailableStock < item.quantity|multiply(bundledProduct.quantity) %}
<br/> <dd>
<div class="mz-product-backorder">
<div class="is-warning mz-product-backorder-warning">
{{ labels.qty }} {{ bundledProduct.stock.stockAvailable }} {{ labels.productBackorderAvailable }}
{{ labels.qty }} {{ bundledProduct.stock.totalAvailableStock }} {{ labels.productBackorderAvailable }}
{% if bundledProduct.stock.availableDate %}. {% else %}, {% endif %}
<br />{{ labels.qty }} {{ item.quantity|multiply(bundledProduct.quantity)|subtract(bundledProduct.stock.stockAvailable) }} {{ labels.itemOnBackorder }}
<br />{{ labels.qty }} {{ item.quantity|multiply(bundledProduct.quantity)|subtract(bundledProduct.stock.totalAvailableStock) }} {{ labels.itemOnBackorder }}

{% if bundledProduct.stock.availableDate %}
,<br /> {{ labels.productBackorderAvailableDate }} {{bundledProduct.stock.availableDate | date("m/d/Y")}}
Expand All @@ -38,13 +38,13 @@
{% endfor %}
</dl>
{% else %}
{% if item.product.stock and item.product.stock.isOnBackOrder and item.product.stock.manageStock and Math.max(item.product.stock.aggregateInventory, item.product.stock.stockAvailable) < item.quantity %}
{% if item.product.stock and item.product.stock.isOnBackOrder and item.product.stock.manageStock and Math.max(item.product.stock.aggregateInventory, item.product.stock.totalAvailableStock) < item.quantity %}
<div class="mz-product-backorder">
<div class="is-warning mz-product-backorder-warning">
{% if item.product.stock.aggregateInventory > item.product.stock.stockAvailable %}
{% if item.product.stock.aggregateInventory > item.product.stock.totalAvailableStock %}
{{ labels.qty }} {{ item.quantity|subtract(item.product.stock.aggregateInventory) }} {{ labels.itemOnBackorder }}
{% else %}
{{ labels.qty }} {{ item.quantity|subtract(item.product.stock.stockAvailable) }} {{ labels.itemOnBackorder }}
{{ labels.qty }} {{ item.quantity|subtract(item.product.stock.totalAvailableStock) }} {{ labels.itemOnBackorder }}
{% endif %}
{% if item.product.stock.availableDate %}
.<br /> {{ labels.productBackorderAvailableDate }} {{item.product.stock.availableDate | date("m/d/Y")}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@
{% for bundledProduct in item.product.bundledProducts %}
<dt>{{ bundledProduct.productCode }}</dt>&nbsp;
<dd>{{ bundledProduct.name }} ({{ bundledProduct.quantity }})</dd>
{% if bundledProduct.stock and bundledProduct.stock.isOnBackOrder and bundledProduct.stock.manageStock and bundledProduct.stock.stockAvailable < item.quantity|multiply(bundledProduct.quantity) %}
{% if bundledProduct.stock and bundledProduct.stock.isOnBackOrder and bundledProduct.stock.manageStock and bundledProduct.stock.totalAvailableStock < item.quantity|multiply(bundledProduct.quantity) %}
<br/> <dd>
<div class="mz-product-backorder">
<div class="is-warning mz-product-backorder-warning">
{{ labels.qty }} {{ bundledProduct.stock.stockAvailable }} {{ labels.productBackorderAvailable }}
{{ labels.qty }} {{ bundledProduct.stock.totalAvailableStock }} {{ labels.productBackorderAvailable }}
{% if bundledProduct.stock.availableDate %}. {% else %}, {% endif %}
<br />{{ labels.qty }} {{ item.quantity|multiply(bundledProduct.quantity)|subtract(bundledProduct.stock.stockAvailable) }} {{ labels.itemOnBackorder }}
<br />{{ labels.qty }} {{ item.quantity|multiply(bundledProduct.quantity)|subtract(bundledProduct.stock.totalAvailableStock) }} {{ labels.itemOnBackorder }}

{% if bundledProduct.stock.availableDate %}
,<br /> {{ labels.productBackorderAvailableDate }} {{bundledProduct.stock.availableDate | date("m/d/Y")}}
Expand All @@ -41,13 +41,13 @@
{% endfor %}
</dl>
{% else %}
{% if item.product.stock and item.product.stock.isOnBackOrder and item.product.stock.manageStock and Math.max(item.product.stock.aggregateInventory, item.product.stock.stockAvailable) < item.quantity%}
{% if item.product.stock and item.product.stock.isOnBackOrder and item.product.stock.manageStock and Math.max(item.product.stock.aggregateInventory, item.product.stock.totalAvailableStock) < item.quantity%}
<div class="mz-product-backorder">
<div class="is-warning mz-product-backorder-warning">
{% if item.product.stock.aggregateInventory > item.product.stock.stockAvailable %}
{% if item.product.stock.aggregateInventory > item.product.stock.totalAvailableStock %}
{{ labels.qty }} {{ item.quantity|subtract(item.product.stock.aggregateInventory) }} {{ labels.itemOnBackorder }}
{% else %}
{{ labels.qty }} {{ item.quantity|subtract(item.product.stock.stockAvailable) }} {{ labels.itemOnBackorder }}
{{ labels.qty }} {{ item.quantity|subtract(item.product.stock.totalAvailableStock) }} {{ labels.itemOnBackorder }}
{% endif %}
{% if item.product.stock.availableDate %}
.<br /> {{ labels.productBackorderAvailableDate }} {{item.product.stock.availableDate | date("m/d/Y")}}
Expand Down