eXtronic Posted May 10, 2016 Share Posted May 10, 2016 Cześć Dopiero co konstruuję pierwszy sklep na Prestashopie i mam także pierwsze pytanie - co mam zrobić, żeby na liście produktów pokazywała się dokładna ilość jaka jest dostępna w magazynie? Chcę, żeby klient od razu widział ile towaru mogę mu wysłać natychmiast, a ile dopiero przyjedzie. Obecnie mam tylko napisy W magazynie lub Oczekiwanie na dostawę, a dokładna ilość dostępna jest tylko na stronach poszczególnych produktów. Presta 1.6.1.4 Próbowałem zarządzanie magazynem zwykłe i zaawansowane, ale jakoś nie widzę takiej opcji. Link to comment Share on other sites More sharing options...
vekia Posted May 10, 2016 Share Posted May 10, 2016 product-list.tpl zmiana {$product.name|truncate:45:'...'|escape:'html':'UTF-8'} na {$product.name|truncate:45:'...'|escape:'html':'UTF-8'} ({$product.quantity}) Link to comment Share on other sites More sharing options...
eXtronic Posted May 10, 2016 Author Share Posted May 10, 2016 Dzięki wstawiłem ({$product.quantity}) w nieco innym miejscu. Proszę o rzucenie okiem, czy nic nie zepsułem (to jest jakieś PHP? co to za język?) <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='In Stock'}{/if}{else}{l s='Out of stock'}{/if}{else}{if isset($product.available_now) && $product.available_now}{$product.available_now}{else}{l s='In Stock'}{/if}{/if} ({$product.quantity}) <<<<<<<<<<<<<<< tutaj dodałem </span> {elseif (isset($product.quantity_all_versions) && $product.quantity_all_versions > 0)} <span class="label-warning"> {l s='Product available with different options'} ({$product.quantity}) <<<<<<<<<<<<<<< tutaj dodałem </span> {else} <span class="label-danger"> {l s='Out of stock'} </span> {/if} </span> Tak wygląda efekt Link to comment Share on other sites More sharing options...
vekia Posted May 10, 2016 Share Posted May 10, 2016 wszystko gra - może być to nie php - to smarty - "język" tworzenia szablonów w prestashop 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