Forums / All Other Contributions/Addons / Attribute image replaces main product image on select [Support Thread]

Attribute image replaces main product image on select [Support Thread]

Views: 44,652

Results 161 to 177 of 177
28 Oct 2024, 9:50 PM
#161
mc12345678 avatar

mc12345678

Totally Zenned

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

Attribute image replaces main product image on select [Support Thread]

Cath:

Good morning!

I'm working locally.

I renamed the template and admin folders in 1_Main_Files and 2_ZC_Version.

I copied the contents of both folders to my ZC folder. I used ZC156 from the 2_ZC_Version folder.

When I checked Option Name Manager, there were no options (the page was blank).

I then ran the following (and it said it was successful):

SELECT @products_options_types_id := pot.products_options_types_id+1 FROM products_options_types pot order by pot.products_options_types_id desc limit 1;

> 
> When I ran the following, I received the message: WARNING: An Error occurred, please let us know! If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you entered valid data.
> 
> ```
INSERT INTO `products_options_types` (products_options_types_id, products_options_types_name) VALUES (@products_options_types_id, 'Link');

INSERT INTO `configuration` (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added, use_function, set_function) VALUES ('Link product option type', 'PRODUCTS_OPTIONS_TYPE_LINK', @products_options_types_id, 'Numeric value of the link product option type', 6, 0, now(), NULL, NULL);

and my Option Name Manager screen was still blank.

Backup to the rescue!

Can anyone tell me where I've gone wrong?

Thanks in advance.

Well a couple of things at least to try to help. It's hard to say what if anything was done wrong without first knowing what version of Zen cart is involved. Then there is the question of what else might have been installed as an edit or additional plugin. Lastly and perhaps most helpful if attempting to again apply the files, is to report back what information is provided in the debug logs when either experiencing a black screen, partial blank or one of those errors in the SQL statement reports.

Ultimately what is needed to be applied for this module should be commented in the file(s) that are merged with original Zen cart code.

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

21 Jun 2025, 10:30 PM
#162
techiant avatar

techiant

New Zenner

Join Date:
Oct 2008
Posts:
82
Plugin Contributions:
0

Re: Attribute image replaces main product image on select [Support Thread]

Will this work with ZenCart 2.0/2.1? What are the options?

**Case Badges** by Techiant

25 Jun 2025, 9:12 PM
#163
mc12345678 avatar

mc12345678

Totally Zenned

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

Re: Attribute image replaces main product image on select [Support Thread]

Techiant:

Will this work with ZenCart 2.0/2.1? What are the options?
Unfortunately, because of changes to ZC 2.1.0 in the following PR: Additional sanitization by lat9 · Pull Request #6652 · zencart/zencart (https://github.com/zencart/zencart/pull/6652), changes are needed for this plugin to function in ZC 2.1.0. There is also the small amount of code needed in the applicable admin file that would need to be merged.

I have it working on my test ZC 2.1.0 site and am looking to more formally report this issue in github here in a moment, but wanted to report what had been found in attempting to answer the question since no one else had yet.

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

25 Jun 2025, 9:33 PM
#164
techiant avatar

techiant

New Zenner

Join Date:
Oct 2008
Posts:
82
Plugin Contributions:
0

Re: Attribute image replaces main product image on select [Support Thread]

Well, wish I knew you were working on it, but this thread has been so quiet that I had no hope and just went with it. :)
I just have the product_info page finished with a fully encapsulated version working on a local 2.1 install, and really close to the shopping cart update.
Would love to collab unless yours is already done and dusted. If you want to DM me your public IP address, I'll open up the firewall for you to take a look.

Plus, I would love to see your feedback on how I did with the new standards, as I had to dig through encapsulated plug-in info at different places, including existing plug-ins.

Thanks!

**Case Badges** by Techiant

25 Jun 2025, 9:54 PM
#165
mc12345678 avatar

mc12345678

Totally Zenned

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

Re: Attribute image replaces main product image on select [Support Thread]

Techiant:

Well, wish I knew you were working on it, but this thread has been so quiet that I had no hope and just went with it. :)
I just have the product_info page finished with a fully encapsulated version working on a local 2.1 install, and really close to the shopping cart update.
Would love to collab unless yours is already done and dusted. If you want to DM me your public IP address, I'll open up the firewall for you to take a look.

Plus, I would love to see your feedback on how I did with the new standards, as I had to dig through encapsulated plug-in info at different places, including existing plug-ins.

Thanks!

Well, happened to see your post in passing a while ago, but have had to work through some core problems with ZC 2.1.0 to gain functionality then had two other plugins to look into before attempting this one. I didn't/haven't gone to making the plugin encapsulated as there's already/still 3+ year old uncorrected issues with the way it operates. So I'm not a fan yet of trying to use that broken/unstable environment.

I didn't have to do much tweaking to at least make/get it to work. I started a few hours ago, found a few minor updates desirable and then discovered the above bug introduced to 2.1.0.

Otherwise, you'll note I don't post here much these days (result of management not wanting to address problems).

I'll be updating my github site in a moment once I capture the changes where applicable... Need to remember to update "versioning". :/

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

25 Jun 2025, 9:59 PM
#166
techiant avatar

techiant

New Zenner

Join Date:
Oct 2008
Posts:
82
Plugin Contributions:
0

Re: Attribute image replaces main product image on select [Support Thread]

I have a ZC_plugins package if you want to take a look. Just lmk, otherwise I guess it's just going on the production site after some testing.
It takes so much effort to override everything during updates, I made a conscious decision to make everything encapsulated even if for own use.

This one loosely uses the same logic as yours but it's completely redesigned for encapsulation support - should not be any major issues.

**Case Badges** by Techiant

25 Jun 2025, 10:43 PM
#167
mc12345678 avatar

mc12345678

Totally Zenned

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

Re: Attribute image replaces main product image on select [Support Thread]

Techiant:

I have a ZC_plugins package if you want to take a look. Just lmk, otherwise I guess it's just going on the production site after some testing.
It takes so much effort to override everything during updates, I made a conscious decision to make everything encapsulated even if for own use.

This one loosely uses the same logic as yours but it's completely redesigned for encapsulation support - should not be any major issues.
Be glad to (Can contact me through the site on my current posting signature until the day I remove it from my profile). I've also just pushed version 1.5.12 to github.

Includes either of two fixes, change to ajax.php which would support continued operation; however, I believe the new language files (prefix including "lang.") would be necessary and the minor incorporation of the change to options name manager (though probably could increase some of the complexity, coming up with an ajax call to not need touching the file). Or, load all the files now included in the v210 folder, some of which replace files already loaded for the plugin but at least allow it to operate under the base/core installation.

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

25 Jun 2025, 10:50 PM
#168
techiant avatar

techiant

New Zenner

Join Date:
Oct 2008
Posts:
82
Plugin Contributions:
0

Re: Attribute image replaces main product image on select [Support Thread]

mc12345678:

Be glad to (Can contact me through the site on my current posting signature until the day I remove it from my profile). I've also just pushed version 1.5.12 to github.

Includes either of two fixes, change to ajax.php which would support continued operation; however, I believe the new language files (prefix including "lang.") would be necessary and the minor incorporation of the change to options name manager (though probably could increase some of the complexity, coming up with an ajax call to not need touching the file). Or, load all the files now included in the v210 folder, some of which replace files already loaded for the plugin but at least allow it to operate under the base/core installation.

Dropped you a line through your contact form. Thanks!

**Case Badges** by Techiant

3 Nov 2025, 5:27 PM
#169
jimmie avatar

jimmie

Totally Zenned

Join Date:
Jan 2013
Location:
New Port Richey, Florida
Posts:
971
Plugin Contributions:
0

Re: Attribute image replaces main product image on select [Support Thread]

installed newest version today 1_5_12 on version 2.10 and i cannot seem to get images to change on select, ( i did see it happen once, but not again.)
my theme has many ways to display product images, ive tried them all, nothing is working.
here is product https://jnsflooringandsupplies.com/tools-equipment/trowels/gundlach-680-notch-versablade-trowel-blade
not all attributes have images. i have it set on 8 to see which one have them.

3 Nov 2025, 6:12 PM
#170
techiant avatar

techiant

New Zenner

Join Date:
Oct 2008
Posts:
82
Plugin Contributions:
0

Re: Attribute image replaces main product image on select [Support Thread]

jimmie:

installed newest version today 1_5_12 on version 2.10 and i cannot seem to get images to change on select, ( i did see it happen once, but not again.)
my theme has many ways to display product images, ive tried them all, nothing is working.
here is product https://jnsflooringandsupplies.com/tools-equipment/trowels/gundlach-680-notch-versablade-trowel-blade
not all attributes have images. i have it set on 8 to see which one have them.

I made an encapsulated version in June that is working for me in v2.1 and submitted it for the author's review. I'm not sure if they will take action on it, though.

**Case Badges** by Techiant

3 Nov 2025, 6:26 PM
#171
jimmie avatar

jimmie

Totally Zenned

Join Date:
Jan 2013
Location:
New Port Richey, Florida
Posts:
971
Plugin Contributions:
0

Re: Attribute image replaces main product image on select [Support Thread]

Not sure if its my template or the module, so not sure if yours is any better. but am willing to try? i suppose id have to uninstall this one?

3 Nov 2025, 6:34 PM
#172
techiant avatar

techiant

New Zenner

Join Date:
Oct 2008
Posts:
82
Plugin Contributions:
0

Re: Attribute image replaces main product image on select [Support Thread]

jimmie:

Not sure if its my template or the module, so not sure if yours is any better. but am willing to try? i suppose id have to uninstall this one?

I just submitted it via the plugin page, and hopefully it gets reviewed and approved soon. Sorry, don't want to release it to the public until the authors approve.

**Case Badges** by Techiant

4 Nov 2025, 1:38 AM
#173
jimmie avatar

jimmie

Totally Zenned

Join Date:
Jan 2013
Location:
New Port Richey, Florida
Posts:
971
Plugin Contributions:
0

Re: Attribute image replaces main product image on select [Support Thread]

i think this is the error im am getting TypeError: Cannot read properties of null (reading 'innerHTML')
at ais_init (gundlach-680-notch-versablade-trowel-blade:6930:60)
at onload (gundlach-680-notch-versablade-trowel-blade:435:3)

5 Nov 2025, 12:29 AM
#174
jimmie avatar

jimmie

Totally Zenned

Join Date:
Jan 2013
Location:
New Port Richey, Florida
Posts:
971
Plugin Contributions:
0

Re: Attribute image replaces main product image on select [Support Thread]

ok progress, this part in zen colorbox Include Main Image in Gallery if set to true, images do not swap.
but i dont want to use zen colorbox id rather use elevate zoom but images dont swap

7 Nov 2025, 4:26 AM
#175
mc12345678 avatar

mc12345678

Totally Zenned

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

Re: Attribute image replaces main product image on select [Support Thread]

Techiant:

I made an encapsulated version in June that is working for me in v2.1 and submitted it for the author's review. I'm not sure if they will take action on it, though.
And I provided comment back and asked questions which went unanswered. Action was taken, still waiting, though looks like it doesn't matter as already submitted. Cool, there's only like three maybe four other plugins just ready for someone to replace without discussion or community consideration.

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

14 Nov 2025, 3:04 AM
#176
chuckrey avatar

chuckrey

Zen Follower

Join Date:
Aug 2020
Location:
Richarson
Posts:
160
Plugin Contributions:
0

Re: Attribute image replaces main product image on select [Support Thread]

I am using 2.1.0 with bootstrap template 8.3php and iH 5.4

Has anyone attempted to make the swatch image below the options clickable? I understand the options changing the image, I was curious as to whether anyone has had any success in clicking the small swatch image to display the medium image in the main pic.

Thanks.

13 Dec 2025, 11:55 PM
#177
travbow avatar

travbow

New Zenner

Join Date:
Apr 2016
Location:
Tucson, AZ
Posts:
2
Plugin Contributions:
0

Re: Attribute image replaces main product image on select [Support Thread]

Using the latest version 2.10 from Techiant on ZC 2.10. No install instructions. I put the unzipped directory into the zc-plugins directory and it showed up in the Plugin Manager. I installed/enabled it. The notes on the download page say "copy this module and run the sql query using admin sql patches" but there are no sql files in the download. I selected option 6 on the Attribute Image Layout Style of the Option Name and set Radio on the Option Type and 4 on Attribute Images per row but no options appear. I changed to Dropdown and options appear but don't change the main image. No errors in the logs and the page renders completely. I used to use the old version with ZC 1.5.7 and drop downs and it worked ok.