Skip to content

Commit

Permalink
PR-47 #0007008 Fix removal of items from basket on pressing Enter
Browse files Browse the repository at this point in the history
Reversed the order of the remove and update buttons in the html code so that hitting the enter key doesn't remove items from the cart

Related #47
  • Loading branch information
martin-hofer authored and Sieg committed Jul 23, 2019
1 parent 98921e0 commit 58287f7
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions tpl/page/checkout/inc/basketcontents_list.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -182,15 +182,7 @@
</div>

<div class="row collapse mt-3" id="basketItem-[{$smarty.foreach.basketContents.iteration}]">
<div class="col-3">
[{block name="checkout_basketcontents_basketitem_removecheckbox"}]
[{if $editable}]
<input type="hidden" name="aproducts[[{$basketindex}]][remove]" id="aproducts_[{$basketindex}]_remove" value="0">
<button type="submit" name="removeBtn" class="btn btn-sm btn-outline-danger" onclick="document.getElementById( 'aproducts_[{$basketindex}]_remove' ).value = '1';">&times; [{oxmultilang ident="REMOVE"}]</button>
[{/if}]
[{/block}]
</div>
<div class="col-9 col-md-3 offset-md-6">
<div class="col-9 col-md-3 offset-md-6 order-2">
[{block name="checkout_basketcontents_basketitem_quantity"}]
[{* product quantity manager *}]
<div class="quantity">
Expand Down Expand Up @@ -228,6 +220,14 @@
</div>
[{/block}]
</div>
<div class="col-3 order-1">
[{block name="checkout_basketcontents_basketitem_removecheckbox"}]
[{if $editable}]
<input type="hidden" name="aproducts[[{$basketindex}]][remove]" id="aproducts_[{$basketindex}]_remove" value="0">
<button type="submit" name="removeBtn" class="btn btn-sm btn-outline-danger" onclick="document.getElementById( 'aproducts_[{$basketindex}]_remove' ).value = '1';">&times; [{oxmultilang ident="REMOVE"}]</button>
[{/if}]
[{/block}]
</div>
</div>

<hr/>
Expand Down

0 comments on commit 58287f7

Please sign in to comment.