My want is to move the "In stock" part in between the "Qty" and "Add to Cart" button; However this is made hard by the fact that these two components are in the same template and not wrapped in a container or block, so I can't use the xml to move the "stock" before or after these elements.
Open product/view/addtocart.phtml
file of your theme and add below code snippet between qty and action button div :
<?php if ($block->displayProductStockStatus()): ?>
<?php if ($_product->isAvailable()): ?>
<div class="stock available" title="<?= /* @escapeNotVerified */ __('Availability') ?>">
<span><?= /* @escapeNotVerified */ __('In stock') ?></span>
</div>
<?php else: ?>
<div class="stock unavailable" title="<?= /* @escapeNotVerified */ __('Availability') ?>">
<span><?= /* @escapeNotVerified */ __('Out of stock') ?></span>
</div>
<?php endif; ?>
<?php endif; ?>
it will show stock availability status between qty and add to cart button
-
That actually did it; I was afraid this might conflict with removing it in the .xml but not calling the child html must mean it stays there separately. Thanks Naveed! – Nub Nub Mar 16 '18 at 8:43
list.phtml
? – Evgeny Levinsky Mar 15 '18 at 16:29