tozi Posted January 22, 2014 Share Posted January 22, 2014 (edited) 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 January 22, 2014 by tozi (see edit history) Link to comment Share on other sites More sharing options...
tozi Posted January 22, 2014 Author Share Posted January 22, 2014 No one help? Link to comment Share on other sites More sharing options...
vekia Posted January 22, 2014 Share Posted January 22, 2014 instead of -> between $product->quantity use dot . $product.quantity do the same for all other variables with $product 1 Link to comment Share on other sites More sharing options...
tozi Posted January 22, 2014 Author Share Posted January 22, 2014 Works great. Thanks. Link to comment Share on other sites More sharing options...
tozi Posted January 24, 2014 Author Share Posted January 24, 2014 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 More sharing options...
vekia Posted January 24, 2014 Share Posted January 24, 2014 $allow_oosp have you got this variable defined? you use it in if conditions above Link to comment Share on other sites More sharing options...
tozi Posted January 24, 2014 Author Share Posted January 24, 2014 I dont know what is it. I only copy and paste code Link to comment Share on other sites More sharing options...
vekia Posted January 24, 2014 Share Posted January 24, 2014 so don't use this variable if it doesn't exist this is probably why it doesn't work for you :-) Link to comment Share on other sites More sharing options...
tozi Posted January 24, 2014 Author Share Posted January 24, 2014 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 More sharing options...
vekia Posted January 25, 2014 Share Posted January 25, 2014 and removed also closing {/if} ? in addition ...}</span>{/if}{else}<img src="{$img_d.... it looks like you've got some chaos there (with if and else conditions) Link to comment Share on other sites More sharing options...
tozi Posted January 25, 2014 Author Share Posted January 25, 2014 Yes i also removing closing /if...But effect is the same (blank page). Link to comment Share on other sites More sharing options...
tozi Posted January 25, 2014 Author Share Posted January 25, 2014 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 More sharing options...
tozi Posted January 26, 2014 Author Share Posted January 26, 2014 I have still no solution. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now