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 121 to 140 of 177
4 Apr 2018, 11:01 AM
#121
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]

dvtalk:

Here is the way this code renders:

function init() {
var n=document.forms.length;
var i;
for (i = 0; i < n; i += 1) {
if (document.forms[i].name === theFormName) {
theForm = document.forms[i];
//continue; // Unnecessary though had originally thought of building more into this area.
}
}
n=theForm.elements.length;
for (i = 0; i < n; i += 1) {
switch (theForm.elements[i].type) {
case "select":
case "select-one":
theForm.elements[i].addEventListener("change", function () {
xhr.getPrice();
});
break;
case "textarea":
case "text":
theForm.elements[i].addEventListener("input", function () {
xhr.getPrice();
});
break;
case "checkbox":
case "radio":
theForm.elements[i].addEventListener("click", function () {
xhr.getPrice();
});
break;
case "number":
theForm.elements[i].addEventListener("change", function () {
xhr.getPrice();
});
theForm.elements[i].addEventListener("keyup", function () {
xhr.getPrice();
});
theForm.elements[i].addEventListener("input", function () {
xhr.getPrice();
});
break;
}
}
[B]xhr.[/B]createSB();
xhr.getPrice();
}

> 
> Uncaught TypeError: xhr.createSB is not a function
>     at init (matrox-g200-mms-p-1.html:1329)
That would be because the third to last line is different between the two sets of code. There are also significant differences in the remainder of the code.

This particular forum thread is not about how to properly install/update some other plugin (in this case dynamic price updater) and while the version installed to the purchased template is causing problems with this plugin it would with almost any other that happens to load before DPU.  Again, I encourage you to update Dynamic Price Updater in its entirety (not just to patch a line here or there) for several reasons such as previous versions (similar to what appears to be installed to that template) would not pass javascript page validation, do not take advantage of the ZC ajax process which in itself as I understand helps extend the users session time by recognizing that the user is taking action on the page, and also offers additional screen/content updating features that did not exist in previous versions.

I encourage that the issue be resolved; however, also suggest continuing to do that in a separate forum thread that is either directly applicable to [DPU](https://www.zen-cart.com/downloads.php?do=file&id=1301) or in a newly started thread within the ZC forum.  Ultimately, the custom theme developer should be approached to address these issues and that individual/organization should support resolving the problem that they have created.

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

4 Apr 2018, 1:12 PM
#122
dvtalk avatar

dvtalk

New Zenner

Join Date:
Mar 2018
Location:
USA
Posts:
30
Plugin Contributions:
0

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

I understand what you are saying. I misunderstood your first reply, I thought you were showing a fix. I checked DPU version and it's 3.0 which I understand is several versions behind. I will try to update the DPU to 3.2.0 first, and then try and go back to Image Swap fix. IUnfortunately the template maker is not cooperating so that avenue is not available to me.

Thanks again, will post with an update.

David

4 Apr 2018, 6:41 PM
#123
dvtalk avatar

dvtalk

New Zenner

Join Date:
Mar 2018
Location:
USA
Posts:
30
Plugin Contributions:
0

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

mc12345678:

Again, I encourage you to update Dynamic Price Updater in its entirety (not just to patch a line here or there) for several reasons such as previous versions (similar to what appears to be installed to that template) would not pass javascript page validation, do not take advantage of the ZC ajax process which in itself as I understand helps extend the users session time by recognizing that the user is taking action on the page, and also offers additional screen/content updating features that did not exist in previous versions.

Thanks for pointing me to the right direction. After updating the DPU, adding back the <div id="productMainImage"> to the tpl_modules_main_product_image.php that the theme authors have omitted, and installing the Attribute image plugin, it is finally working!

4 Apr 2018, 8:17 PM
#124
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]

dvtalk:

Thanks for pointing me to the right direction. After updating the DPU, adding back the <div id="productMainImage"> to the tpl_modules_main_product_image.php that the theme authors have omitted, and installing the Attribute image plugin, it is finally working!
Glad that worked out. Yeah, I had considered adding a field to the configuration to support use of an alternate id field, but had been working to make improvements in some relative steps.

If you have the "time" I would suggest comparing other template files for that template to see what, if anything else, is missing. Of course it will be affected by the associated css, so keep that in mind as you go along.

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

5 Apr 2018, 3:16 PM
#125
dvtalk avatar

dvtalk

New Zenner

Join Date:
Mar 2018
Location:
USA
Posts:
30
Plugin Contributions:
0

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

Here is what I had to do to successfully install this plugin with third party theme (claiming to be ZC 1.5.5.f compatible):

Copy/overwrite admin/includes/languages/english/options_name_manager.php
Copy/overwrite admin/options_name_manager.php
Copy/overwrite includes/modules/alto/attributes.php
Copy admin/includes/auto_loaders/config.attribute_image_swap.php
Copy includes/classes/observers/auto.attrib_image_swap.php
Copy includes/modules/pages/product_info/jscript_ais.php

Did not copy includes/modules/pages/product_info/on_load_ais.js - not sure what this does
5 Apr 2018, 3:21 PM
#126
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]

dvtalk:

Here is what I had to do to successfully install this plugin with third party theme (claiming to be ZC 1.5.5.f compatible):

Copy/overwrite admin/includes/languages/english/options_name_manager.php
Copy/overwrite admin/options_name_manager.php
Copy/overwrite includes/modules/alto/attributes.php
Copy admin/includes/auto_loaders/config.attribute_image_swap.php
Copy includes/classes/observers/auto.attrib_image_swap.php
Copy includes/modules/pages/product_info/jscript_ais.php

Did not copy includes/modules/pages/product_info/on_load_ais.js - not sure what this does
Without this (when the plugin is installed on its own), effectively by omitting that file when returning to the product from the shopping cart the image will not update to what was identified as the current selection until one of the options is changed.

It establishes an action to be performed when the page has been loaded (on_load event).

As to the other files, the changes made to support the plugin should be incorporated into the existing files rather than "blindly" overwriting/replacing the files. That is relatively true for all plugins.

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

5 Apr 2018, 5:01 PM
#127
dvtalk avatar

dvtalk

New Zenner

Join Date:
Mar 2018
Location:
USA
Posts:
30
Plugin Contributions:
0

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

mc12345678:

Without this (when the plugin is installed on its own), effectively by omitting that file when returning to the product from the shopping cart the image will not update to what was identified as the current selection until one of the options is changed.

It establishes an action to be performed when the page has been loaded (on_load event).

As to the other files, the changes made to support the plugin should be incorporated into the existing files rather than "blindly" overwriting/replacing the files. That is relatively true for all plugins.

I actually did that, but decided that overwriting was the best course of action (there were minimal to no changes in files overwritten).

As far as on_load_ais.js, even after copying this to the site, I am not getting the image updated when I click the product with attributes ion shopping cart. All attribuites get populated properly. I made sure that only the one that affects the image is set to Type: 8, and rest are set to 7 (also tried 0).

Not sure if this is relevant but I am getting these errors from Chrome dev console, when I load that product page with attributes string (without attributes, no errors).

TypeError: theForm.elements[i].onclick is not a function
at ais_init (index.php?main_page=product_info&products_id=341:4e7c3b0ed19dda8c9e17d0ed3c3a1a30:1683)
at onload (index.php?main_page=product_info&products_id=341:4e7c3b0ed19dda8c9e17d0ed3c3a1a30:111)

Can you please help me track this (hopefully), final problem down?

Thanks,

David

6 Apr 2018, 4:16 PM
#128
dvtalk avatar

dvtalk

New Zenner

Join Date:
Mar 2018
Location:
USA
Posts:
30
Plugin Contributions:
0

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

Did a lot of digging but still cannot figure out. It sems that > TypeError: theForm.elements[i].onclick is not a function is pointing to this section of the ais_init() function:

case "radio":
    if (document.getElementById(theForm.elements[i].id).checked) {
        theForm.elements[i].onclick();
    }
    break;

All attributes get populated properly, just not the image swap.

6 Apr 2018, 4:44 PM
#129
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]

dvtalk:

Did a lot of digging but still cannot figure out. It sems that is pointing to this section of the ais_init() function:

case "radio":
if (document.getElementById(theForm.elements[i].id).checked) {
theForm.elements[i].onclick();
}
break;

> All attributes get populated properly, just not the image swap.

Had looked into this issue/situation (not only yesterday but I seem to recall some time ago as well). So here's the thing(s).

AIS applies actions only to applicable attributes that are to cause an image swap, and this is done when generating the attribute list.  Therefore, it is possible that a product having attributes may not have an attribute image swap update request for all attributes.  I saw two central ways to address/prevent this as far as just this plugin is concerned, one is to move the application of the action to outside of the attribute generation and into more of the ajax arena which should then also make that initial call more adaptable to only try to update the element(s) that are a part of the image swap. The other is to apply some action of some type to all attributes, whether the action causes an update or not.

Considering that DPU is also installed, the second option is relatively present assuming that the load/execution sequence of the javascript can be "controlled" if by nothing than alphabetical sorting.  Might I suggest attempting to rename includes/modules/pages/product_info/on_load_ais.js to something like on_load_zais.js and seeing if that resolves the issue for now?

Another option which would involve minimal redevelopment would be to use try/catch style code in the ais_init function (prevents the need to identify/lookup the event(s) to see if they exist against the element.)

Ie. in includes/modules/pages/product_info/jscript_ais.php change:
        switch (theForm.elements[i].type) {
            case "select":
            case "select-one":
                theForm.elements[i].onchange();
                break;
            case "text":
                theForm.elements[i].onkeyup();
                break;
            case "checkbox":
            case "radio":
                if (document.getElementById(theForm.elements[i].id).checked) {
                  theForm.elements[i].onclick();
                }
                break;
            case "number":
                theForm.elements[i].onchange();
                theForm.elements[i].onkeyup();
                theForm.elements[i].oninput();
                break;
        }
to:
        switch (theForm.elements[i].type) {
            case "select":
            case "select-one":
                try {
                    theForm.elements[i].onchange();
                } catch(err) {
                     // Action not associated with element.
                }
                break;
            case "text":
                try {
                    theForm.elements[i].onkeyup();
                } catch(err) {
                    // Action not associated with element.
                }
                break;
            case "checkbox":
            case "radio":
                if (document.getElementById(theForm.elements[i].id).checked) {
                    try {
                      theForm.elements[i].onclick();
                    } catch(err) {
                        // Action not associated with element.
                    }
                }
                break;
            case "number":
                try {
                    theForm.elements[i].onchange();
                } catch(err) {
                    // Action not associated with element.
                }
                try {
                    theForm.elements[i].onkeyup();
                } catch(err) {
                    // Action not associated with element.
                }
                 try {
                    theForm.elements[i].oninput();
                } catch(err) {
                    // Action not associated with element.
                }
                break;
        }

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

6 Apr 2018, 4:52 PM
#130
dvtalk avatar

dvtalk

New Zenner

Join Date:
Mar 2018
Location:
USA
Posts:
30
Plugin Contributions:
0

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

#1 made no difference.

#2 try/catch blocks worked! - Thank you!

So, seems to be a conflict with DPU, or maybe the way my custom theme is handling it. Hope this can be fixed in the future versions.

Thanks again! Now can go back to rebuilding the rest of the modules.

David

6 Apr 2018, 5:18 PM
#131
dvtalk avatar

dvtalk

New Zenner

Join Date:
Mar 2018
Location:
USA
Posts:
30
Plugin Contributions:
0

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

Just a quick follow up, and this may be too much to ask, but what would it take to display the swapped image in the cart?

I think that would be a great addition to the script and will avoid potential confusion with the customer.

6 Apr 2018, 6:22 PM
#132
dvtalk avatar

dvtalk

New Zenner

Join Date:
Mar 2018
Location:
USA
Posts:
30
Plugin Contributions:
0

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

dvtalk:

Just a quick follow up, and this may be too much to ask, but what would it take to display the swapped image in the cart?

I think that would be a great addition to the script and will avoid potential confusion with the customer.

I actually already started working on it. Will share when I have something, and may be you can impllement it in the next version, if it's worthy of implementation. I am not the cleanest coder. :)

6 Apr 2018, 6:37 PM
#133
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]

dvtalk:

Just a quick follow up, and this may be too much to ask, but what would it take to display the swapped image in the cart?

I think that would be a great addition to the script and will avoid potential confusion with the customer.

dvtalk:

I actually already started working on it. Will share when I have something, and may be you can impllement it in the next version, if it's worthy of implementation. I am not the cleanest coder. :)

So, I have/had already incorporated something into Stock By Attributes that does that, guess could add to this plugin a way to incorporate the functionality if it didn't/doesn't already exist.

See the function that begins here: https://github.com/mc12345678/Stock_By_Attributes_Combined/blob/master/includes/classes/observers/class.products_with_attributes_stock.php#L936

With the "meat" between lines 1024 and 1071 (though need to get through a few if statements to activate that code portion)

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

7 Apr 2018, 5:59 AM
#134
dvtalk avatar

dvtalk

New Zenner

Join Date:
Mar 2018
Location:
USA
Posts:
30
Plugin Contributions:
0

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

Here is what I came up with that works for me, with my limited hobbyist coding level.

includes/functions/extra_functions/functions_ais_cart.php

<?php
/**
 * includes/functions/extra_functions/functions_ais_cart.php
 * ais 
 *
 * @author  DavidV
 * @license http://www.gnu.org/licenses/gpl.txt GNU General Public License V2.0
 * @version $Id: functions_ais_cart.php,v 1.0 Rev 1 2018-04-06 13:52:50
 * Last modified by DavidV 2018-04-06 13:52:50 
 */

/**
 * Displays attribute images in cart for Attribute Image Swap 6 (AIS)
 */
function ais_cart_img_data($id,$attr){
	global $db;
	$sql = "SELECT attributes_image,options_values_id
          from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib
          where    patrib.products_id=" . (int)$id . "
            and      patrib.options_id = popt.products_options_id
            and      popt.language_id = " . (int)$_SESSION['languages_id'] . "
            and (popt.products_options_images_style = 6 OR popt.products_options_images_style = 8)";
	$result = $db->Execute($sql);
	return $result;
}
function ais_cart_img($id,$attr,$img,$img_name) {
	$ais_support = defined('ATTRIBUTES_ENABLED_IMAGES') && ATTRIBUTES_ENABLED_IMAGES == 'true' && zen_has_product_attributes((int)$id);
	if ($ais_support) {
		$result = ais_cart_img_data($id,$attr);
		if ($result->RecordCount() > 0){
			$attr_cart = array();
			foreach ($attr as $attrval)
				array_push($attr_cart[$attrval['options_values_id']]);
			$attr_all = array();
			while (!$result->EOF) {
				$attr_all[$result->fields['options_values_id']] = $result->fields['attributes_image'];
				$result->MoveNext();
			}
			$img_attr = current(array_intersect_key($attr_all,$attr_cart));
			if($img_attr)
				return zen_image(DIR_WS_IMAGES.$img_attr,$img_name);
			else
				return $img;
		}
		else
			return $img;
	}
	else
		return $img;
}

LINE 67 tpl_shopping_cart_default.php

Replaced:

<?php echo $product['productsImage']; ?>

With:

<?php echo ais_cart_img($product['id'],$product['attributes'],$product['productsImage'],$product['productsName']); ?>

I am sure there is a more elegant way to do this but it serves the purpose for now.
Once again, thankls for all your help!

7 Apr 2018, 6:19 AM
#135
dvtalk avatar

dvtalk

New Zenner

Join Date:
Mar 2018
Location:
USA
Posts:
30
Plugin Contributions:
0

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

Slight change to functions_ais_cart.php
ais_cart_img_data only needs an $id argument.
Also further consolidated the code.

<?php
/**
 * includes/functions/extra_functions/functions_ais_cart.php
 * @author  DavidV (dvtalk)
 * @license http://www.gnu.org/licenses/gpl.txt GNU General Public License V2.0
 * @version $Id: functions_ais_cart.php,v 1.0.1 2018-04-07
 * Displays attribute images in cart for Attribute Image Swap 6 (AIS)
 */
function ais_cart_img_data($id){
	global $db;
	$sql = "SELECT attributes_image,options_values_id
          from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib
          where    patrib.products_id=" . (int)$id . "
            and      patrib.options_id = popt.products_options_id
            and      popt.language_id = " . (int)$_SESSION['languages_id'] . "
            and (popt.products_options_images_style = 6 OR popt.products_options_images_style = 8)";
	return $db->Execute($sql);
}
function ais_cart_img($id,$attr,$img,$img_name) {
	$img_attr = false;
	$ais_support = defined('ATTRIBUTES_ENABLED_IMAGES') && ATTRIBUTES_ENABLED_IMAGES == 'true' && zen_has_product_attributes((int)$id);
	if ($ais_support) {
		$result = ais_cart_img_data($id);
		if ($result->RecordCount() > 0){
			$attr_cart = array();
			foreach ($attr as $attrval)
				array_push($attr_cart[$attrval['options_values_id']]);
			$attr_all = array();
			while (!$result->EOF) {
				$attr_all[$result->fields['options_values_id']] = $result->fields['attributes_image'];
				$result->MoveNext();
			}
			$img_attr = current(array_intersect_key($attr_all,$attr_cart));
		}
	}
	if($img_attr)
		return zen_image(DIR_WS_IMAGES.$img_attr,$img_name);
	else
		return $img;
}
7 Apr 2018, 6:22 PM
#136
dvtalk avatar

dvtalk

New Zenner

Join Date:
Mar 2018
Location:
USA
Posts:
30
Plugin Contributions:
0

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

One more edit. array_push() was improperly used.

<?php
/**
 * includes/functions/extra_functions/functions_ais_cart.php
 * @author  DavidV (dvtalk)
 * @license http://www.gnu.org/licenses/gpl.txt GNU General Public License V2.0
 * @version $Id: functions_ais_cart.php,v 1.0.1 2018-04-07
 * Displays attribute images in cart for Attribute Image Swap 6 (AIS)
 */
function ais_cart_img_data($id){
	global $db;
	$sql = "SELECT attributes_image,options_values_id
          from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib
          where    patrib.products_id=" . (int)$id . "
            and      patrib.options_id = popt.products_options_id
            and      popt.language_id = " . (int)$_SESSION['languages_id'] . "
            and (popt.products_options_images_style = 6 OR popt.products_options_images_style = 8)";
	return $db->Execute($sql);
}
function ais_cart_img($id,$attr,$img,$img_name) {
	$img_attr = false;
	$ais_support = defined('ATTRIBUTES_ENABLED_IMAGES') && ATTRIBUTES_ENABLED_IMAGES == 'true' && zen_has_product_attributes((int)$id);
	if ($ais_support) {
		$result = ais_cart_img_data($id);
		if ($result->RecordCount() > 0){
			$attr_cart = array();
			foreach ($attr as $attrval)
				$attr_cart[$attrval['options_values_id']]=1;
			$attr_all = array();
			while (!$result->EOF) {
				$attr_all[$result->fields['options_values_id']] = $result->fields['attributes_image'];
				$result->MoveNext();
			}
			$img_attr = current(array_intersect_key($attr_all,$attr_cart));
		}
	}
	if($img_attr)
		return zen_image(DIR_WS_IMAGES.$img_attr,$img_name);
	else
		return $img;
}
9 Apr 2018, 6:20 PM
#137
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]

Used a different approach but have incorporated some similar operation into what is to be considered version 1.5.9 of this plugin (including other corrections/changes). This uses the notifier for the shopping_cart page (no template file editing) to replace the product image with the attribute image swapped image. Can see this arrangement at: https://github.com/mc12345678/Attribute_image_Swap/tree/v1.5.9

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

9 Apr 2018, 6:23 PM
#138
dvtalk avatar

dvtalk

New Zenner

Join Date:
Mar 2018
Location:
USA
Posts:
30
Plugin Contributions:
0

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

mc12345678:

Used a different approach but have incorporated some similar operation into what is to be considered version 1.5.9 of this plugin (including other corrections/changes). This uses the notifier for the shopping_cart page (no template file editing) to replace the product image with the attribute image swapped image. Can see this arrangement at: https://github.com/mc12345678/Attribute_image_Swap/tree/v1.5.9

This is great. While my approach serves the purpose for now, I will use updated version as soon as it is released. Thanks for considering, and support.

12 Apr 2018, 1:41 AM
#139
dvtalk avatar

dvtalk

New Zenner

Join Date:
Mar 2018
Location:
USA
Posts:
30
Plugin Contributions:
0

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

mc12345678:

Used a different approach but have incorporated some similar operation into what is to be considered version 1.5.9 of this plugin (including other corrections/changes). This uses the notifier for the shopping_cart page (no template file editing) to replace the product image with the attribute image swapped image. Can see this arrangement at: https://github.com/mc12345678/Attribute_image_Swap/tree/v1.5.9

Thank you for this. I went ahead and downloaded the 1.5.9 from Github. Everything seems to be working woderfully, but I wonder if you can help me figure this out:

I am using an image plugin that displays a product zoom and I am attempting to merge the attributes.php file.

Your code is inserting $params into the select field, outputting:

<div class="select-wrapper"><select name="id[35]" id="attrib-35" onchange="getattribimage('id[35]', 450, 0, this.value, 508);">

Their code is simply:

<div class="select-wrapper"><select name="id[35]" id="attrib-35">

If I add the $params to the select, it breaks their code. If I don't insert the $params, then the image swap doesn't work.

Can you please point me to the right direction on where to lok for the conflict?

Thanks,

David

12 Apr 2018, 2:23 AM
#140
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]

dvtalk:

Thank you for this. I went ahead and downloaded the 1.5.9 from Github. Everything seems to be working woderfully, but I wonder if you can help me figure this out:

I am using an image plugin that displays a product zoom and I am attempting to merge the attributes.php file.

Your code is inserting $params into the select field, outputting:

<div class="select-wrapper"><select name="id[35]" id="attrib-35" onchange="getattribimage('id[35]', 450, 0, this.value, 508);">

Their code is simply:

<div class="select-wrapper"><select name="id[35]" id="attrib-35">

If I add the $params to the select, it breaks their code. If I don't insert the $params, then the image swap doesn't work.

Can you please point me to the right direction on where to lok for the conflict?

Thanks,

David

"Their" method uses the standard attribute build which means that they also use javascript to initiate the action. How the javascript attaches and loads should help to resolve the issue. Would look to follow the javascript from page load to attribute change. (Most browsers support such action/operation.)

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