Results 1 to 6 of 6
  1. #1
    Join Date
    Nov 2004
    Location
    Deal, Kent, UK
    Posts
    332
    Plugin Contributions
    0

    Default Attribute image popup

    I looked at this thread http://www.zen-cart.com/forum/showth...ttribute+popup which is exactly what I want to do.

    I've tried looking at the main_template_vars_images in modules/pages/product_info and tried to fathom the logic to insert it into the main_template_vars_attributes.php (I assume this is where it would go?) but it's beyond me!

    Can anyone help me out please? I'm using 1.2.6, radio buttons, case 3.

  2. #2
    Join Date
    Nov 2004
    Location
    Deal, Kent, UK
    Posts
    332
    Plugin Contributions
    0

    Default Re: Attribute image popup

    More information:

    This is the code that pulls in the attribute images in tpl_product_info_display.php

    PHP Code:
      <?php
    if ($options_attributes_image[$i] != '') {
    ?>
          <tr>
            <td colspan="2"><table class="products-attributes-images">
                <tr> <?php echo $options_attributes_image[$i]; ?> </tr>
            </table></td>
          </tr>
    And this is the code that pulls in the main image:

    PHP Code:
     if (zen_not_null($products_image)) {
        require(
    DIR_WS_MODULES 'pages/' $current_page_base '/main_template_vars_images.php');
      } else {
        echo 
    '&nbsp;';
      }
    ?> 
    So I initially tried copying the main_template_vars_image file and replacing all products_image with attributes_image to see what happened and then used a require statement in tpl_product_info_display to reference it. However I got an error unsurprisingly - ereg_replace(): REG_EMPTY

    So I am stuck.

    if this isn't the way to go then can I amend the main_template_vars_attributes script:

    PHP Code:
     case '3':
                      
    $tmp_attributes_image_row++;

    //                  if ($tmp_attributes_image_row > PRODUCTS_IMAGES_ATTRIBUTES_PER_ROW) {
                      
    if ($tmp_attributes_image_row $products_options_names->fields['products_options_images_per_row']) {
                        
    $tmp_attributes_image .= '</tr><tr>';
                        
    $tmp_attributes_image_row 1;
                      }

                    if (
    $products_options->fields['attributes_image'] != '') {
                      
    $tmp_attributes_image .= '<td class="smallText" align="center" valign="top">' zen_draw_radio_field('id[' $products_options_names->fields['products_options_id'] . ']',
                                  
    $products_options_value_id$selected_attribute) . zen_image(DIR_WS_IMAGES $products_options->fields['attributes_image']) . (PRODUCT_IMAGES_ATTRIBUTES_NAMES == '1' '<br />' $products_options->fields['products_options_values_name'] : '') . $products_options_details_noname '</td>';
                    } else {
                      
    $tmp_attributes_image .= '<td class="smallText" align="center" valign="top">' zen_draw_radio_field('id[' $products_options_names->fields['products_options_id'] . ']',
                                  
    $products_options_value_id$selected_attribute) . '<br />' $products_options->fields['products_options_values_name'] . $products_options_details_noname '</td>';
                    }
                  break; 
    without having a require statement to create a popup? Help would be very much appreciated.

  3. #3
    Join Date
    Nov 2004
    Location
    Deal, Kent, UK
    Posts
    332
    Plugin Contributions
    0

    Default Re: Attribute image popup

    Still struggling with this - can anyone help out please....

    Thanks

  4. #4
    Join Date
    May 2004
    Location
    Hong Kong
    Posts
    1,291
    Plugin Contributions
    1

    Default Re: Attribute image popup

    For your reference.

    Color attribute images zoom when mouse is placed over them
    Images Zoom On Mouseover (hover) - V2, Fullblown
    A New Starter again

  5. #5
    Join Date
    Nov 2004
    Location
    Deal, Kent, UK
    Posts
    332
    Plugin Contributions
    0

    Default Re: Attribute image popup

    Thanks. It's definitely an option but I would really like to solve the popup solution if possible.

    In the meantime I've deleted the attribute swatches and have created new additional images to include the attribute title - changing the option value to a dropdown instead of radio buttons. Reason I'd like the swatch popup is if the swatch images aren't easily identifiable when using additional images (for example fabric patterns or abstract designs) the attribute value title automatically shows.

  6. #6
    Join Date
    Feb 2004
    Location
    Michigan
    Posts
    720
    Plugin Contributions
    0

    Default Re: Attribute image popup

    Does this contribution work in 1.3.X and are there changes to the installation instructions?
    Connie Taylor

 

 

Similar Threads

  1. Attribute Image Popup Mods or Solutions
    By Nineve in forum All Other Contributions/Addons
    Replies: 3
    Last Post: 19 Aug 2011, 01:33 PM
  2. popup attribute - image not showing
    By RilKen27 in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 5 Nov 2009, 12:01 AM
  3. Replies: 1
    Last Post: 5 Oct 2008, 11:45 PM
  4. Attribute Popup image
    By johnvpr in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 16 Feb 2008, 06:04 PM
  5. Attribute Image Popup via CSS
    By webomat in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 6 Dec 2006, 11:27 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