Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1
    Join Date
    May 2009
    Posts
    66
    Plugin Contributions
    0

    Default Is this available for 1.57D - Attribute image replaces main product image on sel?

    When will/is this available for zen-cart 1.57D?

    Attribute image replaces main product image on sel
    https://www.zen-cart.com/downloads.php?do=file&id=699

  2. #2
    Join Date
    Jul 2012
    Posts
    16,710
    Plugin Contributions
    17

    Default Re: Is this available for 1.57D - Attribute image replaces main product image on sel?

    Quote Originally Posted by printchic View Post
    When will/is this available for zen-cart 1.57D?

    Attribute image replaces main product image on sel
    https://www.zen-cart.com/downloads.php?do=file&id=699
    What has your testing on a development site indicated is it was a problem with it running against 1.5.7d?
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  3. #3
    Join Date
    May 2009
    Posts
    66
    Plugin Contributions
    0

    Default Re: Is this available for 1.57D - Attribute image replaces main product image on sel?

    Quote Originally Posted by mc12345678 View Post
    What has your testing on a development site indicated is it was a problem with it running against 1.5.7d?

    There is no version 1.57 according to the plugin's description says it is for;

    Zen Cart® Versions v1.5.3, v1.5.4, v1.5.5, v1.5.6
    Original Author vishalmelmatti
    Last Updated by mc12345678 - 16 Jun 2019
    So that is why I was asking if a version for 1.57d or basically a 1.57 version is/would be available. Sorry if I was confusing.

  4. #4
    Join Date
    May 2009
    Posts
    66
    Plugin Contributions
    0

    Default Re: Is this available for 1.57D - Attribute image replaces main product image on sel?

    Quote Originally Posted by mc12345678 View Post
    What has your testing on a development site indicated is it was a problem with it running against 1.5.7d?
    Ok just got around to trying to install the 1.56 version of the image attribute swap on select plugin since there isn't a 1.57 version. I am testing on a clean install with the test products only in the database.

    - Yes I searched docs
    - Yes I searched the forum for the answers before asking the initial question:

    TESTING ENVIRONMENT:
    Zen: 1.57D
    Database client version: libmysql - mysqlnd 7.4.30
    PHP extension: mysqli
    PHP version: 7.4.30
    Server: Localhost via UNIX socket
    Server type: MariaDB
    Server version: 10.2.44-MariaDB - MariaDB Server

    OTHER PLUGINS ADDED:

    -BACKUP MYSQL Plugin
    -MONTHLY SALE AND TAX 2.04 PLUGIN
    -DBIO 1.67 MANAGER PLUGIN
    -SALES REPORT 3.51A

    DEBUG LOGS: none created

    STORE URL: https://www.westickerthang.com/ourst...index&cPath=65

    ATTEMPTED INSTALLATION OF 1.56's VERSION BECAUSE 1.57 DOESN'T EXIST RESULTS:

    1.) I uploaded all the files to the proper folders (except For upgrades to v1.5.6 of this plugin, the following file(s) should be removed from the server:
    attrib_prod_info.php
    includes/functions/extra_functions/vishal_functions.php (per the installation instructions for anything 1.56 or higher don't need them)

    2.) I didn't upload the ajax.php file from the 1_main_file area of the plugin (dated 6/16/2019) because when I compared it against the same file in the 1.57D version of the store (dated 2/28/2022) using beyond compare software there was no difference.

    3.) I noticed 1 file was a core file in the plugin. admin/option.name.manager.php. That file changed drastically so I don't know if I missed something but I did a search for the name of the person that did the coding for the attribute swap in the old 1.56 version of store and only saw 1 section which I added to my fresh copy of option.name.manager.php. This is the code below;

    Code:
    ['id' => '6', 'text' => TEXT_OPTION_ATTRIBUTE_IMAGES_STYLE_6], /* mc12345678 Attribute Image Swap Start 1 of 1 */
    ['id' => '7', 'text' => TEXT_OPTION_ATTRIBUTE_IMAGES_STYLE_7],
    ['id' => '8', 'text' => TEXT_OPTION_ATTRIBUTE_IMAGES_STYLE_8] /* mc12345678 Attribute Image Swap End 1 of 1 */

    2.) I ran the sql_run.txt and got the following feedback (I did it in phpadmin) as last time I tried it inside the sql patch the store went blank and I couldn't see any error message and I wasn't able to fix issue).
    Click image for larger version. 

Name:	dbasae_error_attribute_.jpg 
Views:	46 
Size:	42.7 KB 
ID:	20103

    3.) I added 1 of my products so I could test things. I used the color attribute (that was already an option in the test store) and attached a photo to each color I used (silver was standard, blue, orange, brown, etc. were alternatives).

    4.) I went to the option manager screen and set the code to 6 and eventually 8 and left the option type as radio.
    5.) Went to my live test store and click on each radio box. The screen did flicker as if it was making a change but the main product image didn't change. Nor did the photo I select in the radio box appear in the cart (only the main photo did).
    6.) I tried installing the missing.dropdown.sql.txt code and was told a couple fields at the end of the code were duplicates but the code near the top did install. (unfortunately I forgot to capture the screen). I then went back to the store and set the option type to dropdown box. Nothing seemed to happen when I select different colors (the screen didn't flicker) as if trying to swap an image. I tried changing option manager in admin to 6 and then 8 but nothing happened (no indication that anything was switching). I also tried changing the type to radio box again. The switching attempt didn't happen but no images change/switched. Tried both option 6, and 8.

    FINAL TAKE (My testing on 1.57d indicates the following):

    - The run.sql.txt file didn't install cleanly it gave some warning message (I attached a copy of the screen earlier)
    - The missing.sql.txt file didn't install cleanly (it stated some files were duplicates sorry didn't get a screen shot)
    - /admin/option.manager.php had too many changes for me to determine if I needed to add anything other than the coding I mentioned above.
    - It appears (in front end of the test store) using a radio box option type does attempt to swap the image based on color selected (as the screen does flicker) as if a switching is attempting to happen but it doesn't change the images. Using dropdown option doesn't indicate anything is happening.

  5. #5
    Join Date
    May 2009
    Posts
    66
    Plugin Contributions
    0

    Default Re: Is this available for 1.57D - Attribute image replaces main product image on sel?

    Re: Is this available for 1.57D - Attribute image replaces main product image on sel?

    Quote Originally Posted by mc12345678 View Post
    What has your testing on a development site indicated is it was a problem with it running against 1.5.7d?
    Quote Originally Posted by mc12345678 View Post
    What has your testing on a development site indicated is it was a problem with it running against 1.5.7d?
    Ok just got around to trying to install the 1.56 version of the image attribute swap on select plugin since there isn't a 1.57 version. I am testing on a clean install with the test products only in the database.

    - Yes I searched docs
    - Yes I searched the forum for the answers before asking the initial question:

    TESTING ENVIRONMENT:
    Zen: 1.57D
    Database client version: libmysql - mysqlnd 7.4.30
    PHP extension: mysqli
    PHP version: 7.4.30
    Server: Localhost via UNIX socket
    Server type: MariaDB
    Server version: 10.2.44-MariaDB - MariaDB Server

    OTHER PLUGINS ADDED:

    -BACKUP MYSQL Plugin
    -MONTHLY SALE AND TAX 2.04 PLUGIN
    -DBIO 1.67 MANAGER PLUGIN
    -SALES REPORT 3.51A

    DEBUG LOGS: none created

    STORE URL: https://www.westickerthang.com/ourst...index&cPath=65

    1.) I uploaded all the files to the proper folders (except For upgrades to v1.5.6 of this plugin, the following file(s) should be removed from the server:
    attrib_prod_info.php
    includes/functions/extra_functions/vishal_functions.php (per the installation instructions for anything 1.56 or higher don't need them)

    2.) I didn't upload the ajax.php file from the 1_main_file area of the plugin (dated 6/16/2019) because when I compared it against the same file in the 1.57D version of the store (dated 2/28/2022) using beyond compare software there was no difference.

    3.) I noticed 1 file was a core file in the plugin. admin/option.name.manager.php. That file changed drastically so I don't know if I missed something but I did a search for the name of the person that did the coding for the attribute swap in the old 1.56 version of store and only saw 1 section which I added to my fresh copy of option.name.manager.php. This is the code below;

    Code:
    ['id' => '6', 'text' => TEXT_OPTION_ATTRIBUTE_IMAGES_STYLE_6], /* mc12345678 Attribute Image Swap Start 1 of 1 */
    ['id' => '7', 'text' => TEXT_OPTION_ATTRIBUTE_IMAGES_STYLE_7],
    ['id' => '8', 'text' => TEXT_OPTION_ATTRIBUTE_IMAGES_STYLE_8] /* mc12345678 Attribute Image Swap End 1 of 1 */

    2.) I ran the sql_run.txt and got the following feedback (I did it in phpadmin) as last time I tried it inside the sql patch the store went blank and I couldn't see any error message and I wasn't able to fix issue).
    Click image for larger version. 

Name:	dbasae_error_attribute_.jpg 
Views:	46 
Size:	42.7 KB 
ID:	20103

    3.) I added 1 of my products so I could test things. I used the color attribute (that was already an option in the test store) and attached a photo to each color I used (silver was standard, blue, orange, brown, etc. were alternatives).

    4.) I went to the option manager screen and set the code to 6 and eventually 8 and left the option type as radio.
    5.) Went to my live test store and click on each radio box. The screen did flicker as if it was making a change but the main product image didn't change. Nor did the photo I select in the radio box appear in the cart (only the main photo did).
    6.) I tried installing the missing.dropdown.sql.txt code and was told a couple fields at the end of the code were duplicates but the code near the top did install. (unfortunately I forgot to capture the screen). I then went back to the store and set the option type to dropdown box. Nothing seemed to happen when I select different colors (the screen didn't flicker) as if trying to swap an image. I tried changing option manager in admin to 6 and then 8 but nothing happened (no indication that anything was switching). I also tried changing the type to radio box again. The switching attempt didn't happen but no images change/switched. Tried both option 6, and 8.

    FINAL TAKE (My testing on 1.57d indicates the following):

    - The run.sql.txt file didn't install cleanly it gave some warning message (I attached a copy of the screen earlier)
    - The missing.sql.txt file didn't install cleanly (it stated some files were duplicates sorry didn't get a screen shot)
    - /admin/option.manager.php had too many changes for me to determine if I needed to add anything other than the coding I mentioned above.
    - It appears (in front end of the test store) using a radio box option type does attempt to swap the image based on color selected (as the screen does flicker) as if a switching is attempting to happen but it doesn't change the images. Using dropdown option doesn't indicate anything is happening.

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

    Default Re: Is this available for 1.57D - Attribute image replaces main product image on sel?

    In parallel with this I've looked at the same and have prepared a possible revision. I've only tested option 6. I've seen in Github that another individual had reworked some of the Ajax processing though I hadn't worked through all of their changes because in a lot of places they changed spacing from four spaces to two spaces which throws off a straight visual review.

    I agree that the software needs some massaging for zc1.5.7, one of the key issues being to support the zc1.5.7 includes/modules/attributes.php file straight out of the box and without override. This is done through a minor change in the observer class.

    I expect to have these changes ready for review on github shortly and will post back the path to use to get to those updated files.

    Thank you for reporting that there are issues with the sql code. Would be great to know more of what those issues were, though no idea how much effort that may entail.

    As to possible store breakage when running database modifications, that's a reason to have a development site and also to make backups before doing something that affects the database. A quick restore on the database and back to what it was...
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  7. #7
    Join Date
    May 2009
    Posts
    66
    Plugin Contributions
    0

    Default Re: Is this available for 1.57D - Attribute image replaces main product image on sel?

    Quote Originally Posted by mc12345678 View Post
    In parallel with this I've looked at the same and have prepared a possible revision. I've only tested option 6. I've seen in Github that another individual had reworked some of the Ajax processing though I hadn't worked through all of their changes because in a lot of places they changed spacing from four spaces to two spaces which throws off a straight visual review.

    I agree that the software needs some massaging for zc1.5.7, one of the key issues being to support the zc1.5.7 includes/modules/attributes.php file straight out of the box and without override. This is done through a minor change in the observer class.

    I expect to have these changes ready for review on github shortly and will post back the path to use to get to those updated files.

    Thank you for reporting that there are issues with the sql code. Would be great to know more of what those issues were, though no idea how much effort that may entail.

    As to possible store breakage when running database modifications, that's a reason to have a development site and also to make backups before doing something that affects the database. A quick restore on the database and back to what it was...

    Yes I should have done that. I did create a test one after that episode so I am working from the test version of my store. Below is the results of the sql_run.txt and sql_run_dropdowns_txt files. Hope they help.
    Click image for larger version. 

Name:	dbasae_error_attribute_show_dbase_message_all.jpg 
Views:	59 
Size:	43.1 KB 
ID:	20105

    If you can't see it then this link is to a copy of it:
    http://www.westickerthang.com/dbasae...essage_all.png
    Last edited by printchic; 8 Sep 2022 at 04:25 AM.

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

    Default Re: Is this available for 1.57D - Attribute image replaces main product image on sel?

    Quote Originally Posted by printchic View Post
    Yes I should have done that. I did create a test one after that episode so I am working from the test version of my store. Below is the results of the sql_run.txt and sql_run_dropdowns_txt files. Hope they help.
    Click image for larger version. 

Name:	dbasae_error_attribute_show_dbase_message_all.jpg 
Views:	59 
Size:	43.1 KB 
ID:	20105

    If you can't see it then this link is to a copy of it:
    http://www.westickerthang.com/dbasae...essage_all.png
    Glad you saw that the uploaded images of previous posts were for some reason not accessible. I had tried to access them, but the forum didn't seem to want to cooperate.

    Looking at the results of the queries, I see the following: as expected for the first query group, the additional option to provide a 'link' was successfully added. The second query group is only needed really in earlier zc versions as the upgrade script and other developments have pretty much prevented the unlikely deletion of those three option name types. But, what the reporting indicates is that in the first line, no update was needed for those records. Then each of the following insert lines fail because the associated option name type already exists.

    See several years ago there were plugins that caused the deletion of those three option name types unexpectedly. The result often was that existing settings prevented the display of option values in dropdown style or any of the other styles.

    And really the first sql code isn't required for simply dealing images. It's "functionality" had remained so that those that have found a way to use it could continue use. Not executing that set of queries will not prevent swap operation.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

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

    Default Re: Is this available for 1.57D - Attribute image replaces main product image on sel?

    Quote Originally Posted by printchic View Post
    Yes I should have done that. I did create a test one after that episode so I am working from the test version of my store. Below is the results of the sql_run.txt and sql_run_dropdowns_txt files. Hope they help.
    Click image for larger version. 

Name:	dbasae_error_attribute_show_dbase_message_all.jpg 
Views:	59 
Size:	43.1 KB 
ID:	20105

    If you can't see it then this link is to a copy of it:
    http://www.westickerthang.com/dbasae...essage_all.png
    May I suggest trying to use the files from the following github branch that have been updated for Zen Cart 1.5.7:
    mc12345678/Attribute_image_Swap at 1_5_11 (github.com)

    This reflects the files that I intend to upload to the plugins for the above discussed module.

    There still are no real sql queries required to be run to support the image swap feature.
    The only file that requires modification at this time is the admin/options_name_manager.php file to add the three additional selection options for swapping images. All other operation is basically provided through an observer.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  10. #10
    Join Date
    May 2009
    Posts
    66
    Plugin Contributions
    0

    Default Re: Is this available for 1.57D - Attribute image replaces main product image on sel?

    Quote Originally Posted by mc12345678 View Post
    May I suggest trying to use the files from the following github branch that have been updated for Zen Cart 1.5.7:
    mc12345678/Attribute_image_Swap at 1_5_11 (github.com)

    This reflects the files that I intend to upload to the plugins for the above discussed module.

    There still are no real sql queries required to be run to support the image swap feature.
    The only file that requires modification at this time is the admin/options_name_manager.php file to add the three additional selection options for swapping images. All other operation is basically provided through an observer.
    I restored my dbase to before I installed the sql.txt files since they were not needed for my store. I then uploaded all the plugin files. The plugin works now.

    Thank you so much for taking time to update this great plugin to work with 1.57 stores.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Attribute image replaces main product image on select [Support Thread]
    By exoticcorpse in forum All Other Contributions/Addons
    Replies: 158
    Last Post: 24 Aug 2020, 05:07 PM
  2. 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
  3. Replies: 0
    Last Post: 7 Oct 2009, 07:11 PM
  4. Replies: 0
    Last Post: 16 Jul 2009, 06:07 AM
  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