• Closed by: Fred
  • Closed on: 11.03.21, 11:23
  • Reason: Closed
  • Comment: Glad to help!

Ticket #20537 - Availability date under Add to cart button

Hi, how to move Availability date from Product page Tab to place under the Add to cart button (the RED circles).

Also I like to vove the Reference data from Tab to place under Product Title (BLUE one)

https://people-fashion.dk/horgarn/733-1702-horgarn-218-sartbla.html#/206-storrelse-56x1_1605/327-farve-218_sartbla

Attachments:

Screenshot 2021-01-22 at 10.4... (1.07 MiB)

Comments

Fred 22 Jan 2021, 13:36

I can try to move it there, but from my experience, those value will not be updated when you change product’s attributes, for example color

Vidmantas Dapkus 22 Jan 2021, 13:46

I had testes and it changes. You can see - the first three attributes have date 2021-01-30 and the last one 2021-01-31, only that tab is not opening after you change the attribute so you need to click on another tab and then click it once again.

By the way, if you tell me what files has these data, I will try to move it myself.

Fred 26 Jan 2021, 18:06

you can try to copy that from the file

/themes/alysum/templates/catalog/_partials/product-details.tpl
{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}
{block name='product_availability_date'}
  {if $product.availability_date}
    <div class="product-availability-date">
      <label>{l s='Availability date:' d='Shop.Theme.Catalog'} </label>
      <span>{$product.availability_date}</span>
    </div>
  {/if}
{/block}
{block name='product_out_of_stock'}
  <div class="product-out-of-stock">
    {hook h='actionProductOutOfStock' product=$product}
  </div>
{/block}

and paste it to the file

/themes/alysum/templates/catalog/product.tpl

after the line

<div class="product-information">
Vidmantas Dapkus 11 Mar 2021, 11:06

Thanks. Did a bit different. Inserted this code


{block name='product_availability_date'} 
{if $product.availability_date}
<span class="product-availability-date">
{l s='Availability date:' d='Shop.Theme.Catalog'} {$product.availability_date}
</span>
{/if} 
{/block}

under

{$product.availability_message}

in to file

themes/alysum/templates/catalog/_partials/product-add-to-cart.tpl