Skip to content

Commit

Permalink
Merge pull request #4704 from belltzel/fix/admin-order-product-search
Browse files Browse the repository at this point in the history
受注登録で商品追加時、規格が登録され全ての規格の在庫がゼロの時、JavaScriptエラーになるのを修正
  • Loading branch information
okazy authored Sep 29, 2020
2 parents 52813cc + d57cc6b commit 85ab790
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions src/Eccube/Resource/template/admin/Order/search_product.twig
Original file line number Diff line number Diff line change
Expand Up @@ -174,11 +174,17 @@ file that was distributed with this source code.
</div>
{% endif %}
</td>
<td class="align-middle pr-3 text-right">
<button type="button" class="btn btn-ec-actionIcon" onclick="fnAddOrderItem($(this).parent().parent(), {{ Product.id }}, {{ constant('Eccube\\Entity\\Master\\OrderItemType::PRODUCT') }}, '{{ Product.name|escape('js') }}')" name="mode" value="modal">
<i class="fa fa-plus fa-lg font-weight-bold text-secondary"></i>
</button>
</td>
{% if Product.stock_find %}
<td class="align-middle pr-3 text-right">
<button type="button" class="btn btn-ec-actionIcon" onclick="fnAddOrderItem($(this).parent().parent(), {{ Product.id }}, {{ constant('Eccube\\Entity\\Master\\OrderItemType::PRODUCT') }}, '{{ Product.name|escape('js') }}')" name="mode" value="modal">
<i class="fa fa-plus fa-lg font-weight-bold text-secondary"></i>
</button>
</td>
{% else %}
<td class="align-middle pr-3 text-right">
{{ 'front.product.out_of_stock_label'|trans }}
</td>
{% endif %}
</tr>
</form>
{% endfor %}
Expand All @@ -189,4 +195,3 @@ file that was distributed with this source code.
{% include "@admin/pager.twig" with {'pages': pagination.paginationData, 'routes': 'admin_order_search_product_page'} %}
</div>
{% endif %}

0 comments on commit 85ab790

Please sign in to comment.