[-] FO: Fix #PSCFV-7600 display accessory in the product page even if there are no stock for the default combination (on the default theme)
This commit is contained in:
@@ -540,7 +540,7 @@ var fieldRequired = '{l s='Please fill in all the required fields before saving
|
|||||||
<div class="block_content">
|
<div class="block_content">
|
||||||
<ul>
|
<ul>
|
||||||
{foreach from=$accessories item=accessory name=accessories_list}
|
{foreach from=$accessories item=accessory name=accessories_list}
|
||||||
{if ($accessory.allow_oosp || $accessory.quantity > 0) AND $accessory.available_for_order AND !isset($restricted_country_mode)}
|
{if ($accessory.allow_oosp || $accessory.quantity_all_versions > 0) AND $accessory.available_for_order AND !isset($restricted_country_mode)}
|
||||||
{assign var='accessoryLink' value=$link->getProductLink($accessory.id_product, $accessory.link_rewrite, $accessory.category)}
|
{assign var='accessoryLink' value=$link->getProductLink($accessory.id_product, $accessory.link_rewrite, $accessory.category)}
|
||||||
<li class="ajax_block_product {if $smarty.foreach.accessories_list.first}first_item{elseif $smarty.foreach.accessories_list.last}last_item{else}item{/if} product_accessories_description">
|
<li class="ajax_block_product {if $smarty.foreach.accessories_list.first}first_item{elseif $smarty.foreach.accessories_list.last}last_item{else}item{/if} product_accessories_description">
|
||||||
<p class="s_title_block">
|
<p class="s_title_block">
|
||||||
@@ -557,7 +557,7 @@ var fieldRequired = '{l s='Please fill in all the required fields before saving
|
|||||||
|
|
||||||
<p class="clearfix" style="margin-top:5px">
|
<p class="clearfix" style="margin-top:5px">
|
||||||
<a class="button" href="{$accessoryLink|escape:'htmlall':'UTF-8'}" title="{l s='View'}">{l s='View'}</a>
|
<a class="button" href="{$accessoryLink|escape:'htmlall':'UTF-8'}" title="{l s='View'}">{l s='View'}</a>
|
||||||
{if !$PS_CATALOG_MODE}
|
{if !$PS_CATALOG_MODE && ($accessory.allow_oosp || $accessory.quantity > 0)}
|
||||||
<a class="exclusive button ajax_add_to_cart_button" href="{$link->getPageLink('cart', true, NULL, "qty=1&id_product={$accessory.id_product|intval}&token={$static_token}&add")}" rel="ajax_id_product_{$accessory.id_product|intval}" title="{l s='Add to cart'}">{l s='Add to cart'}</a>
|
<a class="exclusive button ajax_add_to_cart_button" href="{$link->getPageLink('cart', true, NULL, "qty=1&id_product={$accessory.id_product|intval}&token={$static_token}&add")}" rel="ajax_id_product_{$accessory.id_product|intval}" title="{l s='Add to cart'}">{l s='Add to cart'}</a>
|
||||||
{/if}
|
{/if}
|
||||||
</p>
|
</p>
|
||||||
|
|||||||
Reference in New Issue
Block a user