I did a search through develeoper tool kit and result came up negative. Nothing was found.
For the drop down changing main picture i downloaded the mod through zen cart.
http://www.zen-cart.com/index.php?ma...roducts_id=994
I did a search through develeoper tool kit and result came up negative. Nothing was found.
For the drop down changing main picture i downloaded the mod through zen cart.
http://www.zen-cart.com/index.php?ma...roducts_id=994
OK I believe I have found the problem but don't know how to fix it...the code is
and it is the file called attrib_prod_info. I am pretty sure if i can get help changing the bigger_picture.jpg in this code and even putting in the proper code to have it access lightbox then that should work. I just don't have a clue how to do that. Any help anyone?Code:<?php echo '<a href="javascript:popupWindow(\'' . zen_href_link(FILENAME_POPUP_IMAGE_ADDITIONAL, 'products_image_large_additional=' . 'images/'.$attributes_image) . '\')">' . $image . '<br /><span class="imgLink">' . zen_image('images/bigger_picture.jpg', 'larger image', '140', '44') . '</span></a>'; ?> <?php }?>
This is on a side not but still need help on the big_picture.jpg problem really bad. But I was wondering is there a way to have the product price change with the image as well. I have it marked as price by attribute and the prices are shown in the drop down menu but it is still confusing to see another image with the same price.
[QUOTE=skustes;615500]
I then pulled a query from the database of the attributes with the 3 fields that I need to build my SELECT. I'm sticking both the numeric value that is used to set the Zen Cart attribute selection (the one we hide with that STYLE there at the top) and the image I want to call. They are separated with a hyphen so the Javascript can split them.
I like to have my dropdown like this but where to put this code?Code:<style type="text/css"> #attrib-1 {display: none;}; </style> <!-- this is the table that is used you may need to change size based on your needs --> <table border="0" cellspacing="0" cellpadding="0" width="234"> <tr> <td width="134"> <?php $colorsquery = mysql_query("SELECT options_values_id,attributes_image,products_options_values_name FROM ztest_products_options_values,ztest_products_attributes WHERE ztest_products_options_values.products_options_values_id = ztest_products_attributes.options_values_id AND options_id = 1 ORDER BY `products_options_values_sort_order`,`products_options_values_name`") or die(mysql_error()); ?> <!--this calls the picture change function--> <select name="colorselection" onChange="showimage()"> <?php while ($currentcolor = mysql_fetch_array($colorsquery)) { echo "<option value='$currentcolor[0]-$currentcolor[1]'>$currentcolor[2]</option>"; } ?> </select> </td> <td width="100" align="center"> <align="center"><img src="images/attributes/black.gif" name="colorimage" style="border-width:1px; border-color:#000000; border-style:solid;"> </td> </tr> </table>
CREEPUR have you ever thought of making a dymanic dropdown that is more like a validation set up.
like this:
Style of shirt---------->Color-------------------->Size
plain [new menu] color available[new menu]sizes available
good example http://javascriptkit.com/script/scri...plecombo.shtml
if your ever interested of tyrin this im willing to try and help.
shwag
try this link instead . http://javascriptkit.com/script/scri...plecombo.shtml![]()
Two fixes...the code that goes into jscript_showimage.js should be as follows:
Second, the second code block should go into the file that you are calling from tpl_modules_attributes.php. I named mine color_selection.php since it is for the Color attribute. See the code on the first page by CREEPUR to understand where and how to insert the code to call that file.Code:function showimage() { if (!document.images) return; // Pull the currently selected value from the visible dropdown and split it on hyphen var imagevalueunsplit = document.getElementById("colorselection").value; var imagevaluearray = imagevalueunsplit.split("-"); // Set the array values to variables. First array value is the identifying value for the dropdown, second is the image name var imagevalue = imagevaluearray[0]; var imagename = imagevaluearray[1]; // Set the Zen Cart box (the hidden one) to the proper value so that the attribute is passed to the Shopping Cart document.getElementById("attrib-1").value = imagevalue; // Set the display image to the proper file document.images.colorimage.src="images/" + imagename; }
Is anyone going to make this an addon module? I think it's great - but I don't have the stamina to work through 6 pages of messages and code edits!
thanks in advance.
WONDERFUL!!
I think i will give it a go.
Many thanks
Any luck with making this an addon mod?
I've been trying to follow this thread...
I'm completely lost - but I'd really like to use this feature.
Does anyone have the code complete and working on their site? and be willing to share the new/changed modules?
If so - please share.
Thanks in advance!