Jump to content

move product quantities


stefano7

Recommended Posts

  • 8 months later...

hi,

add this code in product-add-to-cart in folder /yourtheme/ /templates/catalog/_partials

 

 {block name='product_quantities'}
    {if $product.show_quantities}
      <div class="product-quantities">
        <label class="label">{l s='In stock' d='Shop.Theme.Catalog'}</label>
        <span data-stock="{$product.quantity}" data-allow-oosp="{$product.allow_oosp}">{$product.quantity} {$product.quantity_label}</span>
      </div>
    {/if}
  {/block}

 


bye

  • Thanks 1
Link to comment
Share on other sites

  • 1 year later...
  • 11 months later...
On 11/16/2020 at 3:08 PM, Nickovitshj said:

How do get this to update itself when a different combination with another stock quantity is selected?

for 1.7.8

I know this is late but maybe she helps others who are using variants

place this  code

{block name='product_quantities'}
    {if $product.show_quantities}
        <div class="product-quantities">
            <label class="label">{l s='In stock' d='Shop.Theme.Catalog'}</label>
            <span data-stock="{$product.quantity}" data-allow-oosp="{$product.allow_oosp}">{$product.quantity} {$product.quantity_label}</span>
        </div>
    {/if}
{/block}

Into 

/themes/THEMENAME/templates/catalog/_partials/product-variants.tpl above the last div

seems to work well for me but I  use variants for everything

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...