Page 10 of 17 FirstFirst ... 89101112 ... LastLast
Results 91 to 100 of 161
  1. #91
    Join Date
    Jul 2012
    Posts
    16,799
    Plugin Contributions
    17

    Default Re: Attribute image replaces main product image on selecting attribute

    Quote Originally Posted by Nick1973 View Post
    Unless you want to have a go at installing it yourself? I'm happy to give you FTP access etc through a PM. I may have installed it incorrectly for all I know.
    Same "timing" issue applies, but let me know as much detail as can about path or land me as close to the "root" of the store/catalog as possible. :)
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  2. #92
    Join Date
    Sep 2008
    Location
    Cleethorpes
    Posts
    1,228
    Plugin Contributions
    6

    Default Re: Attribute image replaces main product image on selecting attribute

    Quote Originally Posted by mc12345678 View Post
    Same "timing" issue applies, but let me know as much detail as can about path or land me as close to the "root" of the store/catalog as possible. :)
    Shall I PM you then?
    Nick Smith - Venture Design and Print
    https://venturedesignandprint.co.uk

  3. #93
    Join Date
    Sep 2008
    Location
    Cleethorpes
    Posts
    1,228
    Plugin Contributions
    6

    Default Re: Attribute image replaces main product image on selecting attribute

    Quote Originally Posted by Nick1973 View Post
    Shall I PM you then?
    It's ok I have it working, I will PM you the URL for you to see it as it contains my server IP.

    However will try to remember to put a link here when it goes live.
    Nick Smith - Venture Design and Print
    https://venturedesignandprint.co.uk

  4. #94
    Join Date
    Jul 2012
    Posts
    16,799
    Plugin Contributions
    17

    Default Re: Attribute image replaces main product image on selecting attribute

    Quote Originally Posted by Nick1973 View Post
    It's ok I have it working, I will PM you the URL for you to see it as it contains my server IP.

    However will try to remember to put a link here when it goes live.
    Could you elaborate for the other readers about either the issue or what had to be done to "make it work"?

    The answer to the other previous question would have been yes. :) But would still be glad to take a look.

    On my sample site, I also have the same "issue" that with dropdowns, the possible attribute image(s) remain below the select (dropdown) option. There are ways to make that either more of a feature or to at least have it removed automatically if so desired.

    In includes/classes/observers/auto.attrib_image_swap.php if you find this section:

    Code:
        //  NOTIFY_ATTRIBUTES_MODULE_OPTION_BUILT
        function updateNotifyAttributesModuleOptionBuilt(&$callingClass, $notifier, $products_options_names_fields, &$options_name, &$options_menu, &$options_comment, &$options_comment_position, &$options_html_id, &$options_attributes_image)
        {
            global $products_options;
            
            if ($products_options->RecordCount() == 1 && $products_options_names_fields['products_options_type'] == PRODUCTS_OPTIONS_TYPE_LINK) {
                array_pop($options_name);
                array_pop($options_menu);
                array_pop($options_comment);
                array_pop($options_comment_position);
                array_pop($options_html_id);
                //array_pop($options_attributes_image);  // This may need to be commented out because the $options_attributes_image variable is not addressed in the below called function and if it should remain associated with this attribute assignment as part of displaying the information.  
                // With testing, (grid product having a single option value for each of a single option name, one single option value and one multiple option values and in conjunction with another non-grid attribute that displayed a picture.) it didn't seem to matter one way or the other.  
                //   Flow pushes the attribute image to the $options_attributes_image array before coming to this notifier and does so for all attribute types.  
                //   That said, it would seem that if the single option value option type were called upon and that images are in other ways addressed by the below code, then this array item should be popped off the set as well.
                // This could maybe be commented out for 2 reasons: 1) images are not addressed in the below called function, and 2) if they need to be cleared they  will below.
                
                $this->updateNotifyAttributesModuleDefaultSwitch($callingClass, $notifier, $products_options_names_fields, $options_name, $options_menu, $options_comment, $options_comment_position, $options_html_id);
            }
            if ($products_options_names_fields['products_options_type'] == PRODUCTS_OPTIONS_TYPE_SELECT) {
                array_pop($options_attributes_image);  // This may need to be commented out because the $options_attributes_image variable is not addressed in the below called function and if it should remain associated with this attribute assignment as part of displaying the information.  
                // With testing, (grid product having a single option value for each of a single option name, one single option value and one multiple option values and in conjunction with another non-grid attribute that displayed a picture.) it didn't seem to matter one way or the other.  
                //   Flow pushes the attribute image to the $options_attributes_image array before coming to this notifier and does so for all attribute types.  
                //   That said, it would seem that if the single option value option type were called upon and that images are in other ways addressed by the below code, then this array item should be popped off the set as well.
                // This could maybe be commented out for 2 reasons: 1) images are not addressed in the below called function, and 2) if they need to be cleared they  will below.
            }
    
        }
    Adding the code in blue above will remove the options_attributes_image "row" from all select lists... Ideally there might be a "switch" added to the configuration window (or another option name selection) that would make that possible or I guess the code could be modified to treat option 7 as allowing image swap in all cases, but not to show the attribute image adjacent to the attribute which would require a little bit of a rewrite to the code besides just modifying the above. (Basically I think it would be to remove all existing cases of '7' from within the observer and in the above check to see if 7 is set and if so, then remove the attribute image from the above selections such that each attribute would know what image to present, but only an image swap would occur..) Maybe that was the original point of those settings... It certainly wasn't clear (to me) before and didn't seem to work in a way that made sense.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  5. #95
    Join Date
    Sep 2008
    Location
    Cleethorpes
    Posts
    1,228
    Plugin Contributions
    6

    red flag Re: Attribute image replaces main product image on selecting attribute

    Quote Originally Posted by mc12345678 View Post
    Could you elaborate for the other readers about either the issue or what had to be done to "make it work"?

    The answer to the other previous question would have been yes. :) But would still be glad to take a look.

    On my sample site, I also have the same "issue" that with dropdowns, the possible attribute image(s) remain below the select (dropdown) option. There are ways to make that either more of a feature or to at least have it removed automatically if so desired.

    In includes/classes/observers/auto.attrib_image_swap.php if you find this section:

    Code:
        //  NOTIFY_ATTRIBUTES_MODULE_OPTION_BUILT
        function updateNotifyAttributesModuleOptionBuilt(&$callingClass, $notifier, $products_options_names_fields, &$options_name, &$options_menu, &$options_comment, &$options_comment_position, &$options_html_id, &$options_attributes_image)
        {
            global $products_options;
            
            if ($products_options->RecordCount() == 1 && $products_options_names_fields['products_options_type'] == PRODUCTS_OPTIONS_TYPE_LINK) {
                array_pop($options_name);
                array_pop($options_menu);
                array_pop($options_comment);
                array_pop($options_comment_position);
                array_pop($options_html_id);
                //array_pop($options_attributes_image);  // This may need to be commented out because the $options_attributes_image variable is not addressed in the below called function and if it should remain associated with this attribute assignment as part of displaying the information.  
                // With testing, (grid product having a single option value for each of a single option name, one single option value and one multiple option values and in conjunction with another non-grid attribute that displayed a picture.) it didn't seem to matter one way or the other.  
                //   Flow pushes the attribute image to the $options_attributes_image array before coming to this notifier and does so for all attribute types.  
                //   That said, it would seem that if the single option value option type were called upon and that images are in other ways addressed by the below code, then this array item should be popped off the set as well.
                // This could maybe be commented out for 2 reasons: 1) images are not addressed in the below called function, and 2) if they need to be cleared they  will below.
                
                $this->updateNotifyAttributesModuleDefaultSwitch($callingClass, $notifier, $products_options_names_fields, $options_name, $options_menu, $options_comment, $options_comment_position, $options_html_id);
            }
            if ($products_options_names_fields['products_options_type'] == PRODUCTS_OPTIONS_TYPE_SELECT) {
                array_pop($options_attributes_image);  // This may need to be commented out because the $options_attributes_image variable is not addressed in the below called function and if it should remain associated with this attribute assignment as part of displaying the information.  
                // With testing, (grid product having a single option value for each of a single option name, one single option value and one multiple option values and in conjunction with another non-grid attribute that displayed a picture.) it didn't seem to matter one way or the other.  
                //   Flow pushes the attribute image to the $options_attributes_image array before coming to this notifier and does so for all attribute types.  
                //   That said, it would seem that if the single option value option type were called upon and that images are in other ways addressed by the below code, then this array item should be popped off the set as well.
                // This could maybe be commented out for 2 reasons: 1) images are not addressed in the below called function, and 2) if they need to be cleared they  will below.
            }
    
        }
    Adding the code in blue above will remove the options_attributes_image "row" from all select lists... Ideally there might be a "switch" added to the configuration window (or another option name selection) that would make that possible or I guess the code could be modified to treat option 7 as allowing image swap in all cases, but not to show the attribute image adjacent to the attribute which would require a little bit of a rewrite to the code besides just modifying the above. (Basically I think it would be to remove all existing cases of '7' from within the observer and in the above check to see if 7 is set and if so, then remove the attribute image from the above selections such that each attribute would know what image to present, but only an image swap would occur..) Maybe that was the original point of those settings... It certainly wasn't clear (to me) before and didn't seem to work in a way that made sense.
    In all honesty I had just installed it incorrectly. I uploaded the files in the instructions but couldn't see any change admin side, however I missed the bit that says 'Attribute Style for Radio Buttons/Checkbox: set a value of 6' - this is in 'Catalog > Option Name Manager'

    Click image for larger version. 

Name:	Screen Shot 2017-06-08 at 13.14.30.jpg 
Views:	29 
Size:	18.8 KB 
ID:	17085

    Find the Option Name you want to Edit, then Click 'Edit'


    You will then arrive at this screen:

    Click image for larger version. 

Name:	Screen Shot 2017-06-08 at 13.11.57.jpg 
Views:	25 
Size:	22.6 KB 
ID:	17086

    From here select: 6= Attribute Image Replaces Main Product Image


    I have this working now and for anybody thats interested, if you don't want an attributes image to show next to your Attributes Select Menu, just add the code as described by mc12345678 thats highlighted in blue on the previous post.

    I also went a step further, I did not want the 'Larger Image' link so I went and edited zcAttrib_prod_info.php

    If you also want to do the same, look in the above file by doing a 'find' or 'search' in the above file for:

    $image_return = '<a href="javascriptopupWindow(\'' . zen_href_link(FILENAME_POPUP_IMAGE_ADDITIONAL, 'products_image_large_additional=' . $products_image_large) . '\')">' . $image . '<br /><span class="imgLink">' . $larger_text . '</span></a>';

    and change to:

    $image_return = '' . $image . '';
    } else { // mc12345678 Used to assign an indicate to return to the original image.
    $image_return = "";

    this will stop the image from linking to a larger image.
    Nick Smith - Venture Design and Print
    https://venturedesignandprint.co.uk

  6. #96
    Join Date
    Aug 2005
    Location
    Trujillo Alto, Puerto Rico
    Posts
    1,547
    Plugin Contributions
    9

    Default Re: Attribute image replaces main product image on selecting attribute

    Is this module supposed to show the popup image when clicked? For me it's showing "no image".
    IDEAS Girl
    IDEAS Creative Group
    = Your image... our business!

  7. #97
    Join Date
    Jul 2012
    Posts
    16,799
    Plugin Contributions
    17

    Default Re: Attribute image replaces main product image on selecting attribute

    Quote Originally Posted by ideasgirl View Post
    Is this module supposed to show the popup image when clicked? For me it's showing "no image".
    The file: includes/classes/ajax/zcAttrib_prod_info.php

    attempts to load the template override version of the module file typically named: main_product_image.php (referenced by the constant FILENAME_MAIN_PRODUCT_IMAGE) and also provides a link for the file that is referenced/identified by the $products_image_large name. It was verified to work with even Image Handler 4. Now the latest version (under review) also supports the latest version of the ZC plugin called Zen color box and will offer the ability to see the swapped image as a popup as intended via color box.

    Plugins that modify associated files may provide different results. Following the guidance of the posting tips when further attempting to address the discrepancy will help to narrow down the source of the issue.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  8. #98
    Join Date
    Aug 2005
    Location
    Trujillo Alto, Puerto Rico
    Posts
    1,547
    Plugin Contributions
    9

    Default Re: Attribute image replaces main product image on selecting attribute

    Yes, but never worked. I gave up.
    IDEAS Girl
    IDEAS Creative Group
    = Your image... our business!

  9. #99
    Join Date
    Jul 2012
    Posts
    16,799
    Plugin Contributions
    17

    Default Re: Attribute image replaces main product image on selecting attribute

    Quote Originally Posted by ideasgirl View Post
    Yes, but never worked. I gave up.
    Too bad... Haven't been able to get to a computer to possibly review the site, I remember looking at a page from my mobile, but can't remember what link I followed to get there. Also, without knowing anything about the setup, it is not possible to even suggest what may be going on or wrong. So, if there is/was a desire to make it work or identify why it wasn't working in the particular setup, but it worked in a vanilla install of ZC 1.5.5e, then more effort is needed.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  10. #100
    Join Date
    Aug 2005
    Location
    Trujillo Alto, Puerto Rico
    Posts
    1,547
    Plugin Contributions
    9

    Default Re: Attribute image replaces main product image on selecting attribute

    Yes, don't worry. I was looking for an alternative to my "attributes image popup" since it stopped showing the thumbnails. But I updated the script and now I have it back (which I prefer because the images for attributes will display where they belong).

    I really don't know why it didn't work because I don't think there's anything else that could be affecting it.

    Keep up the good work!
    IDEAS Girl
    IDEAS Creative Group
    = Your image... our business!

 

 
Page 10 of 17 FirstFirst ... 89101112 ... LastLast

Similar Threads

  1. Attribute image replaces main image but only pop up larger image
    By welchyboy in forum Setting Up Categories, Products, Attributes
    Replies: 15
    Last Post: 26 Nov 2010, 11:56 PM
  2. Replies: 0
    Last Post: 7 Oct 2009, 07:11 PM
  3. Replies: 0
    Last Post: 16 Jul 2009, 06:07 AM
  4. Replies: 1
    Last Post: 5 Oct 2008, 11:45 PM
  5. Attribute image replaces main product image on selecting attribute
    By pegog in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 19 Jun 2008, 07:29 AM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR