If this is your first visit, check our documentation. To post, register or login.
Forums / Setting Up Categories, Products, Attributes / Any easy way to make attribute images clickable?

Any easy way to make attribute images clickable?

Started by helenewallis on 21 Jun 2023, 6:21 PM · Views: 1,443

Results 1 to 2 of 2
21 Jun 2023, 6:21 PM
#1
helenewallis avatar

helenewallis

Totally Zenned

Join Date:
Jun 2016
Location:
Suffolk VA
Posts:
625
Plugin Contributions:
0

Any easy way to make attribute images clickable?

I wanted to add images for all my different product attributes, but realized that they are not clickable for the customer. It's intuitive to click on the picture to choose the product, so I'd like to add that. Is there any relatively simple way to do it?

23 Jun 2023, 1:37 AM
#2
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Any easy way to make attribute images clickable?

Couple of "options" come to mind. But basically would want to copy includes/templates/template_default/templates/tpl_modules_attributes.php to your own template directory if not already there so that it can be modified to suit. Basically you would be grouping the image section with the associated attribute.

Alternatively, you could use an observer throughout the includes/modules/attributes.php file to couple the image with the desired selection.

Would be important in either of those or any other solution to recognize/control how the change would impact other operations. E.g., if only want radio buttons on particular product to work this way, but radio buttons on others to work differently.

Could also have a unique attribute type that is monitored by observer and only product with that attribute type would work the way you desire...

There's a lot of flexible opportunities now in zencart. Plan accordingly.

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...