kosmolog Posted June 10, 2013 Share Posted June 10, 2013 (edited) Witam polskich forumowiczów prestashop.com Proszę o pomoc w przybliżeniu modyfikacji product-list.tpl Potrzebuję umieścić szczegółowy opis stanów na liście produktów, ten sam który jest w karcie produktu product.tpl Coś takiego jak na obrazku: stan:3-5dni Edited June 10, 2013 by kosmolog (see edit history) Link to comment Share on other sites More sharing options...
Krystian Podemski Posted June 12, 2013 Share Posted June 12, 2013 Wrzuć sobie na początku product-list.tpl kodzik: <pre> {$products|@print_r} </pre> i zobacz czy masz dostęp do takich danych, oczywiście powinno być wypełnione pole "available_date" dla danego produktu. Nie jestem przy komputerze gdzie mogę to sprawdzić i nie pamiętam czy do listy produktów jest to przekazywane Link to comment Share on other sites More sharing options...
vekia Posted June 12, 2013 Share Posted June 12, 2013 z tego co pamiętam obiekt $product ma dwie zmienne: available_now available_later available_now przyjmuje wartość in stock a available_later to czego kosmolog poszukuje Link to comment Share on other sites More sharing options...
kosmolog Posted June 13, 2013 Author Share Posted June 13, 2013 (edited) Po wstawieniu <pre> {$products|@print_r} </pre> zaproponowanego kodu w product-list.tpl wyświetla się: Array ( [0] => Array ( [id_product] => 3362 [id_supplier] => 0 [id_manufacturer] => 61 [id_category_default] => 61 [id_shop_default] => 1 [on_sale] => 0 [online_only] => 0 [ean13] => [upc] => [ecotax] => 0.000000 [quantity] => 0 [minimal_quantity] => 1 [price] => 55.9 [wholesale_price] => 30.110000 [unit_price_ratio] => 0.000000 [additional_shipping_cost] => 0.00 [unity] => [reference] => [supplier_reference] => 1370 [location] => [width] => 0.000000 [height] => 0.000000 [depth] => 0.000000 [weight] => 0.550000 [out_of_stock] => 2 [quantity_discount] => 0 [customizable] => 0 [uploadable_files] => 0 [text_fields] => 0 [active] => 1 [redirect_type] => 404 [id_product_redirected] => 0 [available_for_order] => 1 [available_date] => 0000-00-00 [condition] => new [show_price] => 1 [indexed] => 1 [visibility] => both [cache_is_pack] => 0 [cache_has_attachments] => 0 [is_virtual] => 0 [cache_default_attribute] => 0 [date_add] => 2013-02-07 20:42:49 [date_upd] => 2013-05-28 12:01:00 [advanced_stock_management] => 0 [id_tax_rules_group] => 2 [id_shop] => 1 [id_product_attribute] => 0 [product_attribute_minimal_quantity] => [description] => w kodzie w product.tpl za wyświetlanie statusu dostępności odpowiada takie cuś: <!-- availability --> <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_label">{l s='Availability:'}</span> <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> </p> i chciałbym coś podobnego osiągnąć w product-list.tpl jednak nie mam pomysłu :-( Edited June 13, 2013 by kosmolog (see edit history) 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