Jump to content

Can't click on products + bug undefined under cart button + aivailaibility color bug


Wbill

Recommended Posts

Hello;

 

I've some issues and I can't fix it (just upgrade new version, etc)

 

I've this issue on categories pages, and not on the home page.

 

When click on a product in sub-category, it's ok.

 

If I go back, or if I change the disposition of the page, i can't click anymore on the product.

 

There is the availaibility line (in 7 days) who come under the image (and in green color or 7day is yellow/orange) ...

 

And in the other view, (not grid but list) i've "undefinied" line under the cart button ;/ and twice "in 7 days" buttons

 

What can i do ?

post-1219623-0-07419600-1462788515_thumb.png

post-1219623-0-14181500-1462788516_thumb.png

post-1219623-0-71767500-1462788516_thumb.png

Link to comment
Share on other sites

Hello, thx

 

Please let me know if I can show you something

 

 

When i inspect the undefinied :

 

<div class="functional-buttons clearfix col-sm-12">undefined</div>

 

The label green is label success in css (green) but it has to be label-warning (orange) ... why bug ? :/

 

 

 

 

Product-list.tpl :

 

{if isset($products) && $products}

{*define numbers of product per line in other page for desktop*}

{if $page_name =='index' || $page_name =='product'}
{assign var='nbItemsPerLineXL' value=4}
{assign var='nbItemsPerLine' value=3}
{assign var='nbItemsPerLineTablet' value=2}
{assign var='nbItemsPerLineMobile' value=2}

{math equation="12/grid"  grid=$nbItemsPerLineXL assign=Collg}
{math equation="12/grid"  grid=$nbItemsPerLine assign=Colmd}
{math equation="12/grid"  grid=$nbItemsPerLineTablet assign=Colsm}
{math equation="12/grid"  grid=$nbItemsPerLineMobile assign=Colxs}

{else}
{assign var='nbItemsPerLineXL' value=3}
{assign var='nbItemsPerLine' value=3}
{assign var='nbItemsPerLineTablet' value=2}
{assign var='nbItemsPerLineMobile' value=2}

{math equation="12/grid"  grid=$nbItemsPerLineXL assign=Collg}
{math equation="12/grid"  grid=$nbItemsPerLine assign=Colmd}
{math equation="12/grid"  grid=$nbItemsPerLineTablet assign=Colsm}
{math equation="12/grid"  grid=$nbItemsPerLineMobile assign=Colxs}
{/if}

{if $Collg == 2.4}{assign var='Collg' value=five}{/if}

<!-- Products list -->
<ul{if isset($id) && $id} id="{$id}"{/if} class="product_list grid  row{if isset($class) && $class} {$class}{/if} {if !isset($display_grid_style) || !$display_grid_style}with-padding{else}without-padding{/if}">
    {foreach from=$products item=product name=products}
    {math equation="(total%perLineXL)" total=$smarty.foreach.products.total perLineXL=$nbItemsPerLineXL assign=totModuloXL}
    {math equation="(total%perLine)" total=$smarty.foreach.products.total perLine=$nbItemsPerLine assign=totModulo}
    {math equation="(total%perLineT)" total=$smarty.foreach.products.total perLineT=$nbItemsPerLineTablet assign=totModuloTablet}
    {math equation="(total%perLineM)" total=$smarty.foreach.products.total perLineM=$nbItemsPerLineMobile assign=totModuloMobile}
    {if $totModuloXL == 0}{assign var='totModuloXL' value=$nbItemsPerLineXL}{/if}
    {if $totModulo == 0}{assign var='totModulo' value=$nbItemsPerLine}{/if}
    {if $totModuloTablet == 0}{assign var='totModuloTablet' value=$nbItemsPerLineTablet}{/if}
    {if $totModuloMobile == 0}{assign var='totModuloMobile' value=$nbItemsPerLineMobile}{/if}
    <li class="ajax_block_product{if $page_name == 'index' || $page_name == 'product'} col-xs-{$Colxs} col-sm-{$Colsm} col-md-{$Colmd} col-lg-{$Collg}{else} col-xs-{$Colxs} col-sm-{$Colsm} col-md-{$Colmd} col-lg-{$Collg}{/if}
               {if $smarty.foreach.products.iteration%$nbItemsPerLineXL == 0} last-item-of-XL-line{elseif $smarty.foreach.products.iteration%$nbItemsPerLineXL == 1} first-item-of-xl-line{/if}
               {if $smarty.foreach.products.iteration > ($smarty.foreach.products.total - $totModuloXL)} last-line-XL{/if}
               {if $smarty.foreach.products.iteration%$nbItemsPerLine == 0} last-in-line{elseif $smarty.foreach.products.iteration%$nbItemsPerLine == 1} first-in-line{/if}
               {if $smarty.foreach.products.iteration > ($smarty.foreach.products.total - $totModulo)} last-line{/if}                   
               {if $smarty.foreach.products.iteration%$nbItemsPerLineTablet == 0} last-item-of-tablet-line{elseif $smarty.foreach.products.iteration%$nbItemsPerLineTablet == 1} first-item-of-tablet-line{/if}
               {if $smarty.foreach.products.iteration > ($smarty.foreach.products.total - $totModuloTablet)} last-tablet-line{/if}
               {if $smarty.foreach.products.iteration%$nbItemsPerLineMobile == 0} last-item-of-mobile-line{elseif $smarty.foreach.products.iteration%$nbItemsPerLineMobile == 1} first-item-of-mobile-line{/if}
               {if $smarty.foreach.products.iteration > ($smarty.foreach.products.total - $totModuloMobile)} last-mobile-line{/if}
               {if isset($display_grid_border) && $display_grid_border}grid-border{/if}">
        <article class="product-container">
            <a class="article-block" href="{$product.link|escape:'html':'UTF-8'}" title="{$product.name|escape:'html':'UTF-8'}">
                <div class="left-block">
                    <div class="product-image-container">

                        <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($product.new) && $product.new == 1}
                        <span class="new-label label label-primary">{l s='New'}</span>
                        {/if}
                        {if isset($product.on_sale) && $product.on_sale && isset($product.show_price) && $product.show_price && !$PS_CATALOG_MODE}
                        <span class="sale-label label label-danger">{l s='Sale!'}</span>
                        {/if}
                    </div>

                </div>

                <div class="center-block">

                    <h5>
                        {if isset($product.pack_quantity) && $product.pack_quantity}{$product.pack_quantity|intval|cat:' x '}{/if}
                        {$product.name|truncate:45:'...'|escape:'html':'UTF-8'}
                    </h5>

                    <p class="product-desc">
                        {$product.description_short|strip_tags:'UTF-8'|truncate:360:'...'}
                    </p>

                    {if isset($product.is_virtual) && !$product.is_virtual}{hook h="displayProductDeliveryTime" product=$product}{/if}
                    {hook h="displayProductPriceBlock" product=$product type="weight"}

                    {hook h='displayProductListReviews' product=$product}


                    <div class="product-flags">
                        {if isset($product.new) && $product.new == 1}
                        <span class="new-label label label-primary">{l s='New'}</span>
                        {/if}
                        {if isset($product.on_sale) && $product.on_sale && isset($product.show_price) && $product.show_price && !$PS_CATALOG_MODE}
                        <span class="sale-label label label-danger">{l s='Sale!'}</span>
                        {/if}

                        {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)}
                        <div class="availability">
                            {if ($product.allow_oosp || $product.quantity > 0)}
                            <span class="label {if $product.quantity <= 0 && !$product.allow_oosp}out-of-stock label-warning{else}available-now 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}
                                                             </span>
                                {elseif (isset($product.quantity_all_versions) && $product.quantity_all_versions > 0)}
                                <span class="available-dif label label-warning">
                                    {l s='Product available with different options'}
                                </span>
                                {else}
                                <span class="out-of-stock label label-danger">
                                    {l s='Out of stock'}
                                </span>
                                {/if}
                                </div>
                            {/if}
                            {/if}

                            {if (!$PS_CATALOG_MODE AND ((isset($product.show_price) && $product.show_price) || (isset($product.available_for_order) && $product.available_for_order)))}
                            {if isset($product.online_only) && $product.online_only}
                            <span class="label label-info online_only ">{l s='Online only'}</span>
                            {/if}
                            {/if}
                            {if isset($product.on_sale) && $product.on_sale && isset($product.show_price) && $product.show_price && !$PS_CATALOG_MODE}
                            {elseif isset($product.reduction) && $product.reduction && isset($product.show_price) && $product.show_price && !$PS_CATALOG_MODE}
                            <span class="label label-danger discount">{l s='Reduced price!'}</span>
                            {/if}


                        </div>
                        {if isset($product.color_list) && (isset($display_declinaisons) && $display_declinaisons)}
                        <div class="color-list-container">{$product.color_list}</div>
                        {/if}

                    </div>
                    </a>
                <div class="right-block">

                    {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">
                        {if isset($product.show_price) && $product.show_price && !isset($restricted_country_mode)}
                        <span class="price product-price">
                            {hook h="displayProductPriceBlock" product=$product type="before_price"}
                            {if !$priceDisplay}{convertPrice price=$product.price}{else}{convertPrice price=$product.price_tax_exc}{/if}
                            {hook h="displayProductPriceBlock" product=$product type="price"}
                        </span>
                        {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>
                        {hook h="displayProductPriceBlock" id_product=$product.id_product type="old_price"}
                        {if $product.specific_prices.reduction_type == 'percentage'}
                        <span class="price-percent-reduction label label-reduction">-{$product.specific_prices.reduction * 100}%</span>
                        {/if}
                        {/if}
                        {hook h="displayProductPriceBlock" product=$product type="unit_price"}
                        {hook h="displayProductPriceBlock" product=$product type='after_price'}
                        {/if}
                    </div>
                    {/if}

                    {capture name="functionalbuttons"}{hook h="displayProductListFunctionalButtons"}{/capture}    
                    <div class="button-container button-product-list {if (isset($quick_view) && $quick_view) ||  (isset($comparator_max_item) && $comparator_max_item) || $smarty.capture.functionalbuttons}bt-options{/if}">
                        {if ($product.id_product_attribute == 0 || (isset($add_prod_display) && ($add_prod_display == 1))) && $product.available_for_order && !isset($restricted_country_mode) && $product.customizable != 2 && !$PS_CATALOG_MODE}
                        {if (!isset($product.customization_required) || !$product.customization_required) && ($product.allow_oosp || $product.quantity > 0)}
                        {capture}add=1&id_product={$product.id_product|intval}{if isset($static_token)}&token={$static_token}{/if}{/capture}
                        <div class="btn-group">
                            <a class="button ajax_add_to_cart_button btn btn-primary" href="{$link->getPageLink('cart', true, NULL, $smarty.capture.default, false)|escape:'html':'UTF-8'}" rel="nofollow" title="{l s='Add to cart'}" data-id-product="{$product.id_product|intval}" data-minimal_quantity="{if isset($product.product_attribute_minimal_quantity) && $product.product_attribute_minimal_quantity >= 1}{$product.product_attribute_minimal_quantity|intval}{else}{$product.minimal_quantity|intval}{/if}">
                                <span>{l s='Add to cart'}</span>
                            </a>          
                            <button type="button" class="btn btn-primary dropdown-toggle" {if (isset($quick_view) && $quick_view) ||  (isset($comparator_max_item) && $comparator_max_item) || $smarty.capture.functionalbuttons} data-toggle="dropdown" aria-expanded="false" {/if}>
                                <i class="icon-shopping-cart"></i>
                            </button>
                            <ul class="dropdown-menu" role="menu">

                                {if isset($quick_view) && $quick_view}
                                <li class="hidden-xs">
                                    <a class="quick-view " href="{$product.link|escape:'html':'UTF-8'}" rel="{$product.link|escape:'html':'UTF-8'}" title="{l s='Quick view'}">
                                        <i class="icon-search i-left"></i><span>{l s='Quick view'}</span>
                                    </a>

                                </li>
                                {/if}
                                {if $page_name != 'index'}
                                {if isset($comparator_max_item) && $comparator_max_item}
                                <li>
                                    <a class="add_to_compare" href="{$product.link|escape:'html':'UTF-8'}" title="{l s='Add to Compare'}" data-id-product="{$product.id_product}"><i class="icon-tasks i-left"></i><span>{l s='Add to Compare'}</span></a></li>
                                {/if}
                                {/if}
                                {hook h='displayProductListFunctionalButtons' product=$product}
                            </ul>
                        </div>
                        {else}
                        <div class="btn-group">
                            <a  class="button btn btn-default" href="{$product.link|escape:'html':'UTF-8'}" title="{l s='View'}">
                                <span>{l s='More'}</span>
                            </a>
                            <button type="button" class="btn btn-default dropdown-toggle" {if (isset($quick_view) && $quick_view) ||  (isset($comparator_max_item) && $comparator_max_item) || $smarty.capture.functionalbuttons} data-toggle="dropdown" aria-expanded="false" {/if}>
                                <i class="icon-plus"></i>
                            </button>
                            <ul class="dropdown-menu" role="menu">

                                {if isset($quick_view) && $quick_view}
                                <li class="hidden-xs">
                                    <a class="quick-view " href="{$product.link|escape:'html':'UTF-8'}" rel="{$product.link|escape:'html':'UTF-8'}" title="{l s='Quick view'}">
                                        <i class="icon-search i-left"></i><span>{l s='Quick view'}</span>
                                    </a>

                                </li>
                                {/if}
                                {if $page_name != 'index'}
                                {if isset($comparator_max_item) && $comparator_max_item}
                                <li>
                                    <a class="add_to_compare" href="{$product.link|escape:'html':'UTF-8'}" title="{l s='Add to Compare'}" data-id-product="{$product.id_product}"><i class="icon-tasks i-left"></i><span>{l s='Add to Compare'}</span></a></li>
                                {/if}
                                {/if}
                                {hook h='displayProductListFunctionalButtons' product=$product}
                            </ul>
                        </div>

                        {/if}
                        {else}
                        <div class="btn-group">
                            <a  class="button btn btn-default" href="{$product.link|escape:'html':'UTF-8'}" title="{l s='View'}">
                                <span>{l s='More'}</span>
                            </a>
                            <button type="button" class="btn btn-default dropdown-toggle" {if (isset($quick_view) && $quick_view) ||  (isset($comparator_max_item) && $comparator_max_item) || $smarty.capture.functionalbuttons} data-toggle="dropdown" aria-expanded="false" {/if}>
                                <i class="icon-plus"></i>
                            </button>
                            <ul class="dropdown-menu" role="menu">

                                {if isset($quick_view) && $quick_view}
                                <li class="hidden-xs">
                                    <a class="quick-view " href="{$product.link|escape:'html':'UTF-8'}" rel="{$product.link|escape:'html':'UTF-8'}" title="{l s='Quick view'}">
                                        <i class="icon-search i-left"></i><span>{l s='Quick view'}</span>
                                    </a>

                                </li>
                                {/if}
                                {if $page_name != 'index'}
                                {if isset($comparator_max_item) && $comparator_max_item}
                                <li>
                                    <a class="add_to_compare" href="{$product.link|escape:'html':'UTF-8'}" title="{l s='Add to Compare'}" data-id-product="{$product.id_product}"><i class="icon-tasks i-left"></i><span>{l s='Add to Compare'}</span></a></li>
                                {/if}
                                {/if}
                                {hook h='displayProductListFunctionalButtons' product=$product}
                            </ul>
                        </div>
                        <p class="option-alert">
                            {if (isset($product.customization_required) && $product.customization_required)}
                            <span>{l s='Customize'}</span>
                            {else}
                            <span>{l s='Options'}</span>                      
                            {/if}
                        </p>
                        {/if}


                    </div>

                    {if (!isset($display_addcart) || !$display_addcart) && (isset($comparator_max_item) && $comparator_max_item) && $page_name != 'index' }
                    <a class="add_to_compare only-grid btn btn-light" href="{$product.link|escape:'html':'UTF-8'}" title="{l s='Add to Compare'}" data-id-product="{$product.id_product}"><i class="icon-tasks i-left"></i><span>{l s='Add to Compare'}</span></a>
                    {/if}

                </div>

                </article><!-- .product-container> -->
            </li>
        {/foreach}
    </ul>
{addJsDefL name=min_item}{l s='Please select at least one product' js=1}{/addJsDefL}
{addJsDefL name=max_item}{l s='You cannot add more than %d product(s) to the product comparison' sprintf=$comparator_max_item js=1}{/addJsDefL}
{addJsDef comparator_max_item=$comparator_max_item}
{addJsDef comparedProductsIds=$compared_products}
{/if}
 

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...