Jump to content

[SOLVED]insert code from product.tpl


Recommended Posts

Hi all, it is possible insert this code from product.tpl to product-list.tpl?

<span id="availability_value"{if $product->quantity <= 0} class="warning_inline"{/if}>{if $product->quantity <= 0}{if $allow_oosp}{$product->available_later}{else}{l s='This product is no longer in stock'}{/if}{else}{$product->available_now}{/if}</span>

I need this availability value. I tried but it did not work.

Edited by tozi (see edit history)
Link to comment
Share on other sites

Milos in modul homefeatured does not appear "This product is no longer in stock". Any idea?

  		<p id="availability_statut"{if ($product.quantity <= 0 && !$product.available_later && $allow_oosp) OR ($product.quantity > 0 && !$product.available_now) OR !$product.available_for_order OR $PS_CATALOG_MODE} style="display: none;"{/if}>
				<span id="availability_value"{if $product.quantity <= 0} class="warning_inline"{/if}>{if $product.quantity <= 0}{if $allow_oosp}{$product.available_later}{else}<span class="no_skladem"><img src="{$img_dir}sklad_no.png" alt="{$shop_name|escape:'htmlall':'UTF-8'}" width="14" height="14" class="ico_skladem"/>{l s='This product is no longer in stock'}</span>{/if}{else}<img src="{$img_dir}ico_skladem.png" alt="{$shop_name|escape:'htmlall':'UTF-8'}" width="15" height="14" class="ico_skladem"/><span class="je_skladem">{$product.available_now}</span>{/if}</span>				
			</p>   
Link to comment
Share on other sites

I delete it {if $allow_oosp} . But I got only a blank page.

  		<p id="availability_statut"{if ($product.quantity <= 0 && !$product.available_later && $allow_oosp) OR ($product.quantity > 0 && !$product.available_now) OR !$product.available_for_order OR $PS_CATALOG_MODE} style="display: none;"{/if}>
<span id="availability_value"{if $product.quantity <= 0} class="warning_inline"{/if}>{if $product.quantity <= 0}{$product.available_later}{else}<span class="no_skladem"><img src="{$img_dir}sklad_no.png" alt="{$shop_name|escape:'htmlall':'UTF-8'}" width="14" height="14" class="ico_skladem"/>{l s='This product is no longer in stock'}</span>{/if}{else}<img src="{$img_dir}ico_skladem.png" alt="{$shop_name|escape:'htmlall':'UTF-8'}" width="15" height="14" class="ico_skladem"/><span class="je_skladem">{$product.available_now}</span>{/if}</span>				
			</p>
Link to comment
Share on other sites

Here is whole code:

{if ($product.id_product_attribute == 0 OR (isset($add_prod_display) AND ($add_prod_display == 1))) AND $product.available_for_order AND !isset($restricted_country_mode) AND $product.minimal_quantity == 1 AND $product.customizable != 2 AND !$PS_CATALOG_MODE}
							{if ($product.quantity > 0 OR $product.allow_oosp)}
    <div class="obal">
                   <div class="cenuska">
  		<p id="availability_statut"{if ($product.quantity <= 0 && !$product.available_later && $allow_oosp) OR ($product.quantity > 0 && !$product.available_now) OR !$product.available_for_order OR $PS_CATALOG_MODE} style="display: none;"{/if}>
<span id="availability_value"{if $product.quantity <= 0} class="warning_inline"{/if}>{if $product.quantity <= 0}{if $allow_oosp}{$product.available_later}{else}<span class="no_skladem"><img src="{$img_dir}sklad_no.png" alt="{$shop_name|escape:'htmlall':'UTF-8'}" width="14" height="14" class="ico_skladem"/>{l s='This product is no longer in stock'}</span>{/if}{else}<img src="{$img_dir}ico_skladem.png" alt="{$shop_name|escape:'htmlall':'UTF-8'}" width="15" height="14" class="ico_skladem"/><span class="je_skladem">{$product.available_now}</span>{/if}</span>				
			</p>             
               </div> <!--konec cenuska -->
               
               
        <input style="padding: 0 3px; text-align:center; height: 21px; border: 1px solid #ccc; display:inline-block; width:22px; float:left" type="text" name="quantity_to_cart_{$product.id_product|intval}" id="quantity_to_cart_{$product.id_product|intval}" value="1"/>
        <a style="width:60px; display:inline-block; float:left" class="exclusive ajax_add_to_cart_button" rel="ajax_id_product_{$product.id_product}" href="{$link->getPageLink('cart')}?qty=1&id_product={$product.id_product}&token={$static_token}&add" title="{l s='Add to cart' mod='homefeatured'}">{l s='Add to cart' mod='homefeatured'}</a>
    </div>
{else}
						
							{/if}
						{else}
							<div style="height:23px;"></div>
						{/if}
				
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...