Home / Prestashop Module Tutorials / Ap Page Builder / Fix error not show Texture in product list Ap Page builder

Fix error not show Texture in product list Ap Page builder

Hi

I’m so sorry about my bug.

Please follow my guide to fix:

1, open file module/apagebuilder/apagebuilder.php

find code in line 1727


if (Tools::isEmpty($row['color']) && !@filemtime(_PS_COL_IMG_DIR_ . $row['id_attribute'] . '.jpg')) {
continue;
} elseif (Tools::isEmpty($row['color']) && @filemtime(_PS_COL_IMG_DIR_ . $row['id_attribute'] . '.jpg')) {
$row['texture'] = _THEME_COL_DIR_ . $row['id_attribute'] . '.jpg';
}

replace it to

if (@filemtime(_PS_COL_IMG_DIR_ . $row['id_attribute'] . '.jpg')) {
$row['texture'] = _THEME_COL_DIR_ . $row['id_attribute'] . '.jpg';
} elseif (Tools::isEmpty($row['color'])) {
continue;
}

it will get texture if still have color code

2. if your theme show color in product list

Please access > Back-office > modules > appagebuilder > Ap Products List Builder

click on all product list builder or only product list builder you are using

in right column you will see widget: product full attribute

or you can edit it in file :

/modules/appagebuilder/views/templates/front/products/product_full_attribute.tpl

find code:
<ul>
<li class="color product_{$attr.group_name}" style="background-color: {$attr.color};"></li>
</ul>

replace it to

<li class="color product_{$attr.group_name}" {if $attr.texture} style="background-image: url({$attr.texture})"
{elseif $attr.html_color_code} style="background-color: {$attr.html_color_code}" {/if}>
<a class="{$attr.group_name}" title="{$attr.name}" href="{$attr.url}"></a>
</li>

3. the important

you have to save product list builder to generate tpl file

Please access > Back-office > modules > appagebuilder > Ap Products List Builder

Please open all product list then click save

 

 

 

About Leo Theme

Check Also

Leotheme Black Friday 2022

Prestashop Theme and Module Black Friday and Cyber Monday Sales Leotheme 2022 30% Off

Prestashop Leotheme Black Friday 2022 Promotion! Dear valued customers, Black Friday and Cyber Monday Sales …