Regarding this previously referenced code... I'd like to make a suggestion...
Originally Posted by
karinvd
I had a problem with combination of zen-colorbox2 and SBA. When i used an attribute with a drop down menu, the image did not load. On line 42 of includes\functions\extra_functions\products_with_attributes.php i found the next code which showed on a product page when i used a drop down menu, if i used a check box or a radio button it did not show and zen-colorbox2 worked fine. So i comment this line out.
Wil i get problems with?
Code:
$field = '<script src="'.DIR_WS_TEMPLATES . $template_dir . '/jscript/jquery-1.10.2.min.js"></script>
<script type="text/javascript">
$(function(){
$("#attrib-'.$tmp_attribID.'").on("click", function(){
$("#SBA_ProductImage").attr("src", $(this).find(":selected").attr("data-src"));
});
});
</script>';
In the Zen Colorbox code, we will be doing the following in the next release:
Code:
<?php
//Load jQuery ONLY if jQuery has not been loaded. This is to support versions of Zen Cart prior to v1.5.4 because jQuery was not part of core code
//Also want to prevent jQuery from loading again if bundled with a plugin or template package
?>
<script type="text/javascript">
if (typeof jQuery == 'undefined') {
document.write('script type="text/javascript" src="//code.jquery.com/jquery-1.11.1.min.js"><\/script>');
}
</script>
May I suggest that SBA do something similar if it ABSOLUTELY has to make a jQuery call within it's code...
Bookmarks