Jump to content

Zagęszczona Lista produktów bez zdjęć z możliwością dodania pola z ilością zamawianych produktów.


johnykavangah

Recommended Posts

Witam

 

Jestem nowym użytkownikiem. Moj Prestashop to 1.5.6.0 szablon default. Potrzebuję zmienić standardowe wyświetlanie się listy produktów, tak aby była ona w formie rekordów o jak najmniejszej wysokości i najlepiej bez zdjęć. Dodatkowo potrzebne jest pole z ilością produktów dodawanych do koszyka. Znalazłem podobne rozwiązanie (chodzi o pole z ilością), ale kod nie zgadza się z moim chodzi o plik product-list.tpl,

 

W moim kod wygląda tak:

 

{if ($product.allow_oosp || $product.quantity > 0)}
{if isset($static_token)}
<a class="button ajax_add_to_cart_button exclusive" rel="ajax_id_product_{$product.id_product|intval}" href="{$link->getPageLink('cart',false, NULL, "add=1&id_product={$product.id_product|intval}&token={$static_token}", false)|escape:'html'}" title="{l s='Add to cart'}"><span></span>{l s='Add to cart'}</a>
{else}
<a class="button ajax_add_to_cart_button exclusive" rel="ajax_id_product_{$product.id_product|intval}" href="{$link->getPageLink('cart',false, NULL, "add=1&id_product={$product.id_product|intval}", false)|escape:'html'}" title="{l s='Add to cart'}"><span></span>{l s='Add to cart'}</a>
{/if}
{else}
<span class="exclusive"><span></span>{l s='Add to cart'}</span><br />
 
A powinien wyglądać tak wg osoby udzielającej porady:
 

{if ($product.allow_oosp OR $product.quantity > 0) && $product.customizable != 2}    <a class="button ajax_add_to_cart_button exclusive" rel="ajax_id_product_{$product.id_product|intval}" href="{$base_dir}cart.php?add&id;_product={$product.id_product|intval}&token;={$static_token}">{l s='Add to cart'}</a>{else}

 

 

Czy można prosić kogoś o poradę jak zabrać się do tematu?
 
Pozdrawiam, JK
 

 

 

Link to comment
Share on other sites

  • 6 months later...

ja się przyłączam do pytania. Też mam taki sam problem.

 

usunąłem z produkt-list.tpl 

 

<div class="left-block">
<div class="product-image-container">
<a class="product_img_link" href="{$product.link|escape:'html':'UTF-8'}" title="{$product.name|escape:'html':'UTF-8'}" itemprop="url">
<img class="replace-2x img-responsive" src="{$link->getImageLink($product.link_rewrite, $product.id_image, 'home_default')|escape:'html':'UTF-8'}" alt="{if !empty($product.legend)}{$product.legend|escape:'html':'UTF-8'}{else}{$product.name|escape:'html':'UTF-8'}{/if}" title="{if !empty($product.legend)}{$product.legend|escape:'html':'UTF-8'}{else}{$product.name|escape:'html':'UTF-8'}{/if}" {if isset($homeSize)} width="{$homeSize.width}" height="{$homeSize.height}"{/if} itemprop="image" />
</a>
{if isset($quick_view) && $quick_view}
<div class="quick-view-wrapper-mobile">
<a class="quick-view-mobile" href="{$product.link|escape:'html':'UTF-8'}" rel="{$product.link|escape:'html':'UTF-8'}">
<i class="icon-eye-open"></i>
</a>
</div>
<a class="quick-view" href="{$product.link|escape:'html':'UTF-8'}" rel="{$product.link|escape:'html':'UTF-8'}">
<span>{l s='Quick view'}</span>
</a>
{/if}
{if (!$PS_CATALOG_MODE AND ((isset($product.show_price) && $product.show_price) || (isset($product.available_for_order) && $product.available_for_order)))}
<div class="content_price" itemprop="offers" itemscope itemtype="http://schema.org/Offer">
{if isset($product.show_price) && $product.show_price && !isset($restricted_country_mode)}
<span itemprop="price" class="price product-price">
{if !$priceDisplay}{convertPrice price=$product.price}{else}{convertPrice price=$product.price_tax_exc}{/if}
</span>
<meta itemprop="priceCurrency" content="{$currency->iso_code}" />
{if isset($product.specific_prices) && $product.specific_prices && isset($product.specific_prices.reduction) && $product.specific_prices.reduction > 0}
{hook h="displayProductPriceBlock" product=$product type="old_price"}
<span class="old-price product-price">
{displayWtPrice p=$product.price_without_reduction}
</span>
{if $product.specific_prices.reduction_type == 'percentage'}
<span class="price-percent-reduction">-{$product.specific_prices.reduction * 100}%</span>
{/if}
{/if}
{hook h="displayProductPriceBlock" product=$product type="price"}
{hook h="displayProductPriceBlock" product=$product type="unit_price"}
{/if}
</div>
{/if}
{if isset($product.new) && $product.new == 1}
<a class="new-box" href="{$product.link|escape:'html':'UTF-8'}">
<span class="new-label">{l s='New'}</span>
</a>
{/if}
{if isset($product.on_sale) && $product.on_sale && isset($product.show_price) && $product.show_price && !$PS_CATALOG_MODE}
<a class="sale-box" href="{$product.link|escape:'html':'UTF-8'}">
<span class="sale-label">{l s='Sale!'}</span>
</a>
{/if}
</div>
{hook h="displayProductDeliveryTime" product=$product}
{hook h="displayProductPriceBlock" product=$product type="weight"}
</div>
 
 
a po odpaleniu sklepu nie ma już co prawda zdjęć ale jest napis UNDEFINE. 
tak to wygląda
<div class="left-block col-xs-4 col-xs-5 col-md-1">undefined</div>
 
dlaczego się to generuje ?
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...