Page 6 of 7 FirstFirst ... 4567 LastLast
Results 51 to 60 of 62
  1. #51
    Join Date
    Apr 2008
    Posts
    283
    Plugin Contributions
    0

    Default Re: Dynamic DropDown with Image

    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

  2. #52
    Join Date
    Apr 2008
    Posts
    283
    Plugin Contributions
    0

    Default Re: Dynamic DropDown with Image

    OK I believe I have found the problem but don't know how to fix it...the code is


    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 }?>
    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?

  3. #53
    Join Date
    Apr 2008
    Posts
    283
    Plugin Contributions
    0

    Default Re: Dynamic DropDown with Image

    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.

  4. #54
    Join Date
    Sep 2008
    Location
    Sweden
    Posts
    94
    Plugin Contributions
    4

    Default Re: Dynamic DropDown with Image

    [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.
    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>
    I like to have my dropdown like this but where to put this code?

  5. #55
    Join Date
    Aug 2008
    Location
    Cleveland
    Posts
    78
    Plugin Contributions
    0

    Default Re: Dynamic DropDown with Image

    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

  6. #56
    Join Date
    Aug 2008
    Location
    Cleveland
    Posts
    78
    Plugin Contributions
    0

    Default Re: Dynamic DropDown with Image

    Quote Originally Posted by shwag View Post
    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

  7. #57
    Join Date
    Aug 2008
    Posts
    30
    Plugin Contributions
    0

    Default Re: Dynamic DropDown with Image

    Two fixes...the code that goes into jscript_showimage.js should be as follows:
    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;
      
    }
    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.

  8. #58
    Join Date
    Feb 2007
    Posts
    210
    Plugin Contributions
    0

    Default Re: Dynamic DropDown with Image

    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.

  9. #59
    Join Date
    Jul 2008
    Location
    london
    Posts
    169
    Plugin Contributions
    0

    Default Re: Dynamic DropDown with Image

    WONDERFUL!!
    I think i will give it a go.

    Many thanks

  10. #60
    Join Date
    Feb 2007
    Posts
    210
    Plugin Contributions
    0

    Default Re: Dynamic DropDown with Image

    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!

 

 
Page 6 of 7 FirstFirst ... 4567 LastLast

Similar Threads

  1. v151 Dynamic Dropdown on Home Page (not stock by attributes).
    By Axeman in forum All Other Contributions/Addons
    Replies: 7
    Last Post: 29 May 2015, 05:37 PM
  2. v151 Dynamic Dropdown Menus on Product Page
    By evildave in forum All Other Contributions/Addons
    Replies: 2
    Last Post: 22 Oct 2013, 05:08 PM
  3. Problem with dynamic dropdown
    By genyux in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 10 Jun 2010, 12:33 PM
  4. Dynamic Dropdown Issues
    By valfodr in forum All Other Contributions/Addons
    Replies: 3
    Last Post: 28 Mar 2009, 04:47 AM
  5. Dynamic Dropdown Categories - Is it possible?
    By AATECH in forum General Questions
    Replies: 4
    Last Post: 21 Jul 2008, 08:10 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg