Page 8 of 16 FirstFirst ... 678910 ... LastLast
Results 71 to 80 of 159
  1. #71
    Join Date
    Feb 2010
    Posts
    74
    Plugin Contributions
    0

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

    Quote Originally Posted by mc12345678 View Post
    Sorry, there was a typo in the original query (@products_options_type_id should have been @products_options_types_id) :

    Code:
    SELECT @products_options_types_id := pot.products_options_types_id+1
                FROM `products_options_types` pot    
                order by pot.products_options_types_id desc limit 1;
    
    INSERT INTO `products_options_types` (products_options_types_id, products_options_types_name) VALUES (@products_options_types_id, 'Link');
    
    INSERT INTO `configuration` (configuration_title, configuration_key, configuration_value,
            configuration_description, configuration_group_id, sort_order, date_added, use_function, set_function) VALUES ('Link product option type', 'PRODUCTS_OPTIONS_TYPE_LINK', @products_options_types_id, 'Numeric value of the link product option type', 6, 0, now(), NULL, NULL);
    I don't know why an error occurred with the removal as I just ran it (twice) to see if I would get an error...
    THAT WORKED!....so does it work with drop-down boxes?

  2. #72
    Join Date
    Feb 2010
    Posts
    74
    Plugin Contributions
    0

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

    I'm lost now....it doesn't work at all...
    http://leoandmo.com/index.php?main_p...products_id=81

  3. #73
    Join Date
    Jul 2012
    Posts
    16,741
    Plugin Contributions
    17

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

    Quote Originally Posted by lrfowler24 View Post
    THAT WORKED!....so does it work with drop-down boxes?
    Wish I could answer this. I just happened to take a look at the thread because it had popped up in my recent messages a few times and I was curious about the plugin. Seeing related posts and the query with which you were having difficulty I realized what the likely problem was and so tried to provide a solution to that. Beyond that I am not familiar with the operation nor what is necessary for it to "work". I did see a few other "issues" with the provided attribute.php file which should be placed in one's override folder rather (includes/modules/YOUR_TEMPLATE) instead of in the "core" path as provided. Further with the way ZC 1.5.5 has modified the attributes.php file, there is an improved way to implement what this does that doesn't/shouldn't require modifying the in-store version of that file.
    Quote Originally Posted by lrfowler24 View Post
    I'm lost now....it doesn't work at all...
    http://leoandmo.com/index.php?main_p...products_id=81
    Again, at the moment unsure what is needed to make it work, perhaps someone familiar with the plugin will chime in. Suggestion would be to look back at the recent posts on issues identified and also providing more information about your setup (ie. ZC version).
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  4. #74
    Join Date
    Jul 2012
    Posts
    16,741
    Plugin Contributions
    17

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

    Quote Originally Posted by lrfowler24 View Post
    I'm lost now....it doesn't work at all...
    http://leoandmo.com/index.php?main_p...products_id=81
    Because this plugin likely uses javascript (or equivalent) to swap the images, I ran that page through an html validator (https://validator.w3.org/check?uri=h...nline&group=0) and had 47 errors. I don't know if that is a factor in the lack of operation, but certainly want your pages to validate to ensure javascript operations and for your pages to be looked upon favorably.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  5. #75
    Join Date
    Jul 2012
    Posts
    16,741
    Plugin Contributions
    17

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

    I've gotten this to work as well as updated it to use ajax.php instead of the provided additional root file. Also, have moved the attributes.php related code primarily out of attributes file and into an observer file. Just thought about something more that I could do to further remove the code out a little. Having looked through the remainder of this thread am considering what would be necessary to incorporate changes made by other plugins like colorbox. Oh, and two other things incorporated as discussed in here is the switch back to the default image in absence of an attribute defined image and bypassing the "bigger_image" load if such an image is not present in the system as well as other ZC standardization such as using DIR_WS_IMAGES for the images directory, moving the jscript_main code into its own file, and properly sequencing the javascript to provide appropriate javascript "validation".

    I've attempted to contact the most recent author/updater and haven't heard anything yet, but as soon as I complete the remaining items I want to address, I will post the changes made to support updating this plugin.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  6. #76
    Join Date
    Jul 2012
    Posts
    16,741
    Plugin Contributions
    17

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

    Quote Originally Posted by mc12345678 View Post
    I've gotten this to work as well as updated it to use ajax.php instead of the provided additional root file. Also, have moved the attributes.php related code primarily out of attributes file and into an observer file. Just thought about something more that I could do to further remove the code out a little. Having looked through the remainder of this thread am considering what would be necessary to incorporate changes made by other plugins like colorbox. Oh, and two other things incorporated as discussed in here is the switch back to the default image in absence of an attribute defined image and bypassing the "bigger_image" load if such an image is not present in the system as well as other ZC standardization such as using DIR_WS_IMAGES for the images directory, moving the jscript_main code into its own file, and properly sequencing the javascript to provide appropriate javascript "validation".

    I've attempted to contact the most recent author/updater and haven't heard anything yet, but as soon as I complete the remaining items I want to address, I will post the changes made to support updating this plugin.
    Just uploaded version 1.5.6 of this plugin.

    Writeup was:
    - Modified approach to display the swapped attribute image to use ZC's ajax method instead of an additional file from this plugin.- Updated the install SQL to account for other products_options_types having been added.
    - Used POST related transfer of data rather than the URL to improve on security.
    - Added that if an attribute selected does not have an image associated with it that the default/main product's image would be displayed.
    - Added javascript to load the attribute image if the product information page is displayed with the attribute(s) already selected.
    - Incorporated the module main_product_image.php code to support Image Handler operation on the attribute file.
    - Moved added attributes related code into an observer file with minor modifications made to the provided attributes.php file associated with ZC 1.5.5's version of the file. Additional effort would be needed to completely remove all modifications and instead use more of a javascript insertion/modification.
    - Modified/expanded the readme instructions.
    - Added a SQL query to be run if determined necessary because of not updating to ZC 1.5.5 and missing database records.
    - Modified code to use ZC standard defined variables/constants rather than hard-coded (i.e. DIR_WS_IMAGES instead of 'images/')
    - Made use of an image such as bigger_picture.jpg optional where the standard 'larger image' (TEXT_CLICK_TO_ENLARGE) text will be shown if the file does not exist.
    - Resequenced the javascript so that expected variables/data would be in scope, minimizing the processing needed to display/correct the javascript code.
    - Reduced the amount of code that needed to be merged versus added by pulling the javascript code added by this module out of jscript_main.php and putting it into its own jscript_ file.
    - Moved an extra function demonstrated to be called only by this plugin into the observer class, although the code that calls the zen_link function doesn't provide all of the data necessary to use the function to its maximum extent. The code remains intact, but does not appear to provide the intended operation/capability.
    - As compared to the previous version, the additional attribute images will be displayed if the attribute image style is selected to be 6, but will be removed if set as 7. In both conditions 6 and 7, the attribute image will be swapped with the main product image upon selection.
    It should be available from the location identified in post 1 of this thread which is here when it has been reviewed and approved by one of the ZC volunteers. (ie. please be patient while the code undergoes the necessary review cycle prior to being made available here.)
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  7. #77
    Join Date
    May 2005
    Location
    England
    Posts
    626
    Plugin Contributions
    0

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

    Hello there,
    Thanks for all your efforts in updating this module. I am not currently using attribute images, but I just had a query as to whether using this module, if it would cause the slight slowdown in zencart that is talked about in the optimisation page for zencart? Currently I have the option set to false in the config, as recommended. But it would be interesting to know if this module ignores that.

    Regards,
    James

  8. #78
    Join Date
    Jul 2012
    Posts
    16,741
    Plugin Contributions
    17

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

    Quote Originally Posted by HeathenMagic View Post
    Hello there,
    Thanks for all your efforts in updating this module. I am not currently using attribute images, but I just had a query as to whether using this module, if it would cause the slight slowdown in zencart that is talked about in the optimisation page for zencart? Currently I have the option set to false in the config, as recommended. But it would be interesting to know if this module ignores that.

    Regards,
    James
    Could you please elaborate on the above? Which article, which setting?

    From observation I did see the possibility of change response time possibly being slow, but it didn't prevent me as a user from moving on to the next action, whether it was to change attribute selections again or to carry on with add-to-cart. The delay was completely dependent on the data transfer/response speed. I could for example use one device and have lightening response, and another slow as molasses, but the slow device was slow in everything not just image swap.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  9. #79
    Join Date
    May 2005
    Location
    England
    Posts
    626
    Plugin Contributions
    0

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

    https://www.zen-cart.com/content.php...eed-up-my-site
    . In Admin->Configuration->Attribute Settings, there are a few switches which, if turned off, will reduce the number of queries used to calculate and display product information:
    - Enable Downloads -- If you're not doing downloads on your site, turn this off.
    - Enable Price Factor -- If you're not using price-by-attributes support, turn this off to stop those calculations and the related queries
    - Enable Qty Price Discount -- If you're not doing quantity discounts, turn this off
    - Enable Attribute Images -- If you're not adding images to your attributes, turn this off
    I understand it won't be possible to make it have no impact when attribute images are being used.

    Regards,
    James

  10. #80
    Join Date
    Jul 2012
    Posts
    16,741
    Plugin Contributions
    17

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

    Quote Originally Posted by HeathenMagic View Post
    https://www.zen-cart.com/content.php...eed-up-my-site

    I understand it won't be possible to make it have no impact when attribute images are being used.

    Regards,
    James
    If the image setting for the option name isn't 6 or 7, then no swap will occur nor be attempted and the javascript will load waiting to be activated, but not do anything and therefore there would be no slowdown related to the attributes image specifically, just the additional javascript associated with possibly loading.

    It does not currently respect those settings though, ie. if the attribute image style is set to 6 or 7, it will still "inquire" about the presence of attribute image information and if found associated with the product/attribute combination will move forward with the next action (which would be to pull the same image as already on screen and try to update it to be the same as it was for each selected attribute that doesn't have an alternate image selected...)

    Can look to see what efficiencies can be obtained by inspecting that setting. Seems that basically everything "front facing" would be disabled/bypassed as none of the javascript would apply and therefore not need to be pushed to the browser at least that which is pertinent to the plugin. (There's a few JS functions present that are not called by this plugin, but they seem to be one of those, hey someone added it, used it, and expects it... things but it doesn't do anything for this software.)

    So effectively it seems that the slowdown would all be in querying the database and returning the base image on every selection if it is even possible for the attribute's image setting to be identified as 6 or 7. Though I guess more could be done with the javascript to identify the last image loaded and if different than the current/new image then to pass the information rather than to pass it on every attribute selection change. (ie. A little further JS refinement possible.)
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

 

 
Page 8 of 16 FirstFirst ... 678910 ... 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