I have an issue on PS 1.7; I'm trying to display {$product.availability_message} (shipping delay message) depending on stock on cart and order confirmation. It works well on cart but doesn't display on order-confirmation (order-confirmation-table.tpl). Any idea to make this work ?
Here is my code :
{if (isset($product.quantity_all_versions) && $product.quantity_all_versions < 0)}
<div>
<span class="red icon--pulsing"></span>
<span class="msg">{$product.availability_message}</span>
</div>
{else}
<div>
<span class="icon--pulsing"></span>
<span class="msg">Available</span>
</div>
{/if}
Krystian Podemski's answer is absolutely correct. I used the same approach before. However I used different product's properties than you and I was not able to reproduce it using the
quantity_all_versionsandavailability_messageproperties. I usedquantity_availableandavailable_laterproperties instead.Anyway you have to create a new file
PaymentModule.phpin\override\classes\folder.There you have to create a new class
PaymentModulewith the functionvalidateOrder.Then find the array
$product_var_tpland add the properties you need. In my case:Then you can display the
available_latermessage in your/themes/<your theme>/templates/checkout/_partials/order-confirmation-table.tpllike this: