V1.7 [REQUEST] Product Combination Images Swatch | Attributes Module

n1ghtdem0n

Member
XNullUser
Joined
Nov 17, 2021
Messages
78
Reaction score
4
Points
8
NullCash
38
Very useful addon, if anyone has it and share it will be more than perfect. 🙏
Post automatically merged:

You can download similar module. I shared on this link:

Combination images as textures PrestaShop 1.7 module​

Take the first image of every combination as textures, this module can save you a lot of time of uploading texture images one by one.

DEMO

Installation​

1. Use the "Upload a module" button on "BO > Modules" page to install the module.
2. Modify the \themes\your-theme-name\templates\catalog\_partials\product-variants.tpl file to add this code

Code:
{if isset($st_attr_img_as_texture) && isset($st_attr_img_as_texture[$id_attribute_group][$id_attribute])}{$group_attribute.texture=$st_attr_img_as_texture[$id_attribute_group][$id_attribute]}{$group_attribute.html_color_code=''}{/if}

Right above this one

Code:
{if $group_attribute.texture}
                    class="color texture" style="background-image: url({$group_attribute.texture})"
                  {elseif $group_attribute.html_color_code}
                    class="color" style="background-color: {$group_attribute.html_color_code}"
                  {/if}
You may need to clear the Smarty cache to make the modification work.

Should look like on the photo

View attachment 37687


Screenshots​

View attachment 37688View attachment 37689
 
Last edited:

apaz74

Member
XNullUser
Joined
Jan 18, 2021
Messages
55
Reaction score
0
Points
6
NullCash
21
Very useful addon, thank you for sharing
 

kickhat

Member
XNullUser
Joined
Nov 29, 2021
Messages
64
Reaction score
2
Points
8
NullCash
22
UP guys ❗ maybe someone bought and can drop it here?
 
Top