lupradoa Posted February 14, 2017 Share Posted February 14, 2017 (edited) Hi! The green label with the text "In Stock" inside is now a small green rectangle with no text on it on the product-list page, and if you go to the product page, there are no labels at all to confirm availability. I have added the text "En Stock (In Stock)" at the back office to one product, but the label now shows the text twice. I think that the translations are OK. product-list.tpl {if (!$PS_CATALOG_MODE && $PS_STOCK_MANAGEMENT && ((isset($product.show_price) && $product.show_price) || (isset($product.available_for_order) && $product.available_for_order)))} {if isset($product.available_for_order) && $product.available_for_order && !isset($restricted_country_mode)} <span class="availability"> {if ($product.allow_oosp || $product.quantity > 0)} <span class="{if $product.quantity <= 0 && isset($product.allow_oosp) && !$product.allow_oosp} label-danger{elseif $product.quantity <= 0} label-warning{else} label-success{/if}"> {if $product.quantity <= 0} {if $product.allow_oosp} {if isset($product.available_later) && $product.available_later}{$product.available_later}{else}{l s='Disponible en 7 dias'} {/if} {else} {l s='Out of stock'} {/if} {else} {if isset($product.available_now) && $product.available_now}{$product.available_now}{ else}{l s='En Stock'} {/if} {/if} </span> {elseif (isset($product.quantity_all_versions) && $product.quantity_all_versions > 0)} <span class="label-warning"> {l s='Product available with different options'} </span> {else} <span class="label-danger"> <!--{l s='This product is no longer in stock'}--> {l s='Descatalogado'} <!— ‘Discontinued’—> </span> {/if} </span> {/if} {/if} product.tpl <div class="pb-center-column col-xs-12 col-sm-4"> {if $product->online_only} <p class="online_only">{l s='Online only'}</p> {/if} <h1 itemprop="name">{$product->name|escape:'html':'UTF-8'}</h1> <!--******** ISBN *********--> <p id="product_reference"{if empty($product->reference) || !$product->reference} style="display: none;"{/if}> <!--<label>{l s='Reference:'} </label>--> <label>{l s='ISBN:'} </label> <span class="editable" itemprop="sku"{if !empty($product->reference) && $product->reference} content="{$product->reference}"{/if}>{if !isset($groups)}{$product->reference|escape:'html':'UTF-8'}{/if}</span> </p> <!--****** AUTOR *******--> {if $product->description_short || $packItems|@count > 0} <div id="short_description_block"> {if $product->description_short} <label>{l s='Autor/es:'} </label> <div id="short_description_content" class="rte align_justify" itemprop="description">{$product->description_short}</div> {/if} {if $product->description} <p class="buttons_bottom_block"> <a href="javascript:{ldelim}{rdelim}" class="button"> {l s='More details'} </a> </p> {/if} <!-- ************* FIN AUTOR***********--> <!--************EDITORIAL*************--> <p id="manufacturer" {if !$product_manufacturer->name}style="display: none;"{/if}> <label>{l s='Editorial: '} </label> <a href="{$link->getManufacturerLink($product_manufacturer->id_manufacturer, $product_manufacturer->link_rewrite)|escape:'html':'UTF-8'}"><span>{$product->manufacturer_name}</span></a> </p> <!--************FIN EDITORIAL********--> <!--**************COLACION Y EDICION *************--> <p id="product_reference"> <label>{l s='Colación:'} </label> <span class="editable" itemprop="sku" content="{$product->tapa}">{$product->tapa|escape:'html':'UTF-8'}</span> </p> <p id="product_reference"> <label>{l s='Edición:'} </label> <span class="editable" itemprop="sku" content="{$product->edc}">{$product->ean13|escape:'html':'UTF-8'} | {$product->upc|escape:'html':'UTF-8'}</span> </p> </div> <!-- end short_description_block --> {/if} {if ($display_qties == 1 && !$PS_CATALOG_MODE && $PS_STOCK_MANAGEMENT && $product->available_for_order)} <!-- number of item in stock --> <p id="pQuantityAvailable"{if $product->quantity <= 0} style="display: none;"{/if}> <span id="quantityAvailable">{$product->quantity|intval}</span> <span {if $product->quantity > 1} style="display: none;"{/if} id="quantityAvailableTxt">{l s='Item'}</span> <span {if $product->quantity == 1} style="display: none;"{/if} id="quantityAvailableTxtMultiple">{l s='Items'}</span> </p> {/if} <!-- availability or doesntExist --> <p id="availability_statut"{if !$PS_STOCK_MANAGEMENT || ($product->quantity <= 0 && !$product->available_later && $allow_oosp) || ($product->quantity > 0 && !$product->available_now) || !$product->available_for_order || $PS_CATALOG_MODE} style="display: none;"{/if}> {*<span id="availability_label">{l s='Availability:'}</span>*} <span id="availability_value" class="label{if $product->quantity <= 0 && !$allow_oosp} label-danger{elseif $product->quantity <= 0} label-warning{else} label-success{/if}">{if $product->quantity <= 0}{if $PS_STOCK_MANAGEMENT && $allow_oosp}{$product->available_later}{else}{l s='This product is no longer in stock'}{/if}{elseif $PS_STOCK_MANAGEMENT}{$product->available_now}{/if}</span> </p> {if $PS_STOCK_MANAGEMENT} {if !$product->is_virtual}{hook h="displayProductDeliveryTime" product=$product}{/if} <p class="warning_inline" id="last_quantities"{if ($product->quantity > $last_qties || $product->quantity <= 0) || $allow_oosp || !$product->available_for_order || $PS_CATALOG_MODE} style="display: none"{/if} >{l s='Warning: Last items in stock!'}</p> {/if} <p id="availability_date"{if ($product->quantity > 0) || !$product->available_for_order || $PS_CATALOG_MODE || !isset($product->available_date) || $product->available_date < $smarty.now|date_format:'%Y-%m-%d'} style="display: none;"{/if}> <span id="availability_date_label">{l s='Availability date:'}</span> <span id="availability_date_value">{if Validate::isDate($product->available_date)}{dateFormat date=$product->available_date full=false}{/if}</span> </p> <!-- Out of stock hook --> <div id="oosHook"{if $product->quantity > 0} style="display: none;"{/if}> {$HOOK_PRODUCT_OOS} </div> {if isset($HOOK_EXTRA_RIGHT) && $HOOK_EXTRA_RIGHT}{$HOOK_EXTRA_RIGHT}{/if} {if !$content_only} <!-- usefull links--> <ul id="usefull_link_block" class="clearfix no-print"> {if $HOOK_EXTRA_LEFT}{$HOOK_EXTRA_LEFT}{/if} <li class="print"> <a href="javascript:print();"> {l s='Print'} </a> </li> </ul> {/if} </div> <!-- end center infos--> Any suggestion? Cheers. Edited February 14, 2017 by lupradoa (see edit history) Link to comment Share on other sites More sharing options...
JeredBolton Posted February 14, 2017 Share Posted February 14, 2017 As a start, try getting rid of the space between the { and the else statement:in product-list.tpl: {else} {if isset($product.available_now) && $product.available_now}{$product.available_now}{ else}{l s='En Stock'} {/if} 1 Link to comment Share on other sites More sharing options...
lupradoa Posted February 14, 2017 Author Share Posted February 14, 2017 As a start, try getting rid of the space between the { and the else statement:in product-list.tpl: {else} {if isset($product.available_now) && $product.available_now}{$product.available_now}{ else}{l s='En Stock'} {/if} First part solved, thank your very much! I guess I better go to check my prescription lenses now. 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