Re: Additional Product Images
Hello, I have an issue with my additional images not showing up. I've set the additional images to show through the admin and added the images accordingly but it may seem that the script isn't working properly. I've had to backup and reupload my shop a few times because of a few plugins that did not work well together, but after my last reupload the additional images stopped showing.
Does anyone have a clue what may be going on? Here's one of my products thats supposed to have two additional images right under the main image:
https://www.crowned.nolnir.com/index...products_id=19
I've checked for the script in the html_header.php, it's there. I've checked the "show additional images" under 'product types', it's set to show.
Re: Additional Product Images
Quote:
Originally Posted by
mito0930
Hello, I have an issue with my additional images not showing up. I've set the additional images to show through the admin and added the images accordingly but it may seem that the script isn't working properly. I've had to backup and reupload my shop a few times because of a few plugins that did not work well together, but after my last reupload the additional images stopped showing.
Does anyone have a clue what may be going on? Here's one of my products thats supposed to have two additional images right under the main image:
https://www.crowned.nolnir.com/index...products_id=19
I've checked for the script in the html_header.php, it's there. I've checked the "show additional images" under 'product types', it's set to show.
What html_header.php script is referenced above?
What mydebug log(s) have been generated in the logs folder?
I see that the additional images start and end tags are present in the html source code, but as indicated, no additional image(s).
Would suggest to review the installation to ensure that all of the files are properly placed and present.
What are the settings for this module in the admin? There is an option to disregard normal additional images or to disregard the images of this plugin as possibilities.
What type of additional image is expected at that product? One added by this plugin or images added through the normal Zen Cart process?
Re: Additional Product Images
Quote:
Originally Posted by
mc12345678
What html_header.php script is referenced above?
What mydebug log(s) have been generated in the logs folder?
I see that the additional images start and end tags are present in the html source code, but as indicated, no additional image(s).
Would suggest to review the installation to ensure that all of the files are properly placed and present.
What are the settings for this module in the admin? There is an option to disregard normal additional images or to disregard the images of this plugin as possibilities.
What type of additional image is expected at that product? One added by this plugin or images added through the normal Zen Cart process?
Thank you for your reply. I've reinstalled Zen Cart again just in case it wasn't any plugins I forgot to uninstall clashing, but the problem still persists even after following all instructions and reinstalling the plugin.
When I switch to show with the plugin to the original display style, all the product details and 'add to cart' box disappears, so I'm using the default ZC display option. I haven't added any additional images through FTP, just with the plugin.
Here's what the latest log has
--> PHP Warning: Use of undefined constant PRODUCTS_OPTIONS_TYPE_SELECT_SBA - assumed 'PRODUCTS_OPTIONS_TYPE_SELECT_SBA' (this will throw an Error in a future version of PHP) in
/includes/classes/observers/class.products_with_attributes_stock.php on line 280.
--> PHP Warning: Use of undefined constant STOCK_SHOW_ATTRIB_LEVEL_STOCK - assumed 'STOCK_SHOW_ATTRIB_LEVEL_STOCK' (this will throw an Error in a future version of PHP) in
/includes/classes/observers/class.products_with_attributes_stock.php on line 319.
--> PHP Warning: Use of undefined constant STOCK_SHOW_ATTRIB_LEVEL_STOCK - assumed 'STOCK_SHOW_ATTRIB_LEVEL_STOCK' (this will throw an Error in a future version of PHP) in
/includes/classes/observers/class.products_with_attributes_stock.php on line 328.
--> PHP Warning: Use of undefined constant PRODUCTS_OPTIONS_TYPE_SELECT_SBA - assumed 'PRODUCTS_OPTIONS_TYPE_SELECT_SBA' (this will throw an Error in a future version of PHP) in
/includes/classes/observers/class.products_with_attributes_stock.php on line 416.
--> PHP Warning: Use of undefined constant STOCK_SHOW_ORIGINAL_PRICE_STRUCK - assumed 'STOCK_SHOW_ORIGINAL_PRICE_STRUCK' (this will throw an Error in a future version of PHP) in
/includes/classes/observers/class.products_with_attributes_stock.php on line 430.
--> PHP Warning: Use of undefined constant PRODINFO_ATTRIBUTE_DYNAMIC_STATUS - assumed 'PRODINFO_ATTRIBUTE_DYNAMIC_STATUS' (this will throw an Error in a future version of PHP) in
/includes/classes/observers/class.products_with_attributes_stock.php on line 455.
--> PHP Warning: Use of undefined constant PRODINFO_ATTRIBUTE_DYNAMIC_STATUS - assumed 'PRODINFO_ATTRIBUTE_DYNAMIC_STATUS' (this will throw an Error in a future version of PHP) in
/includes/classes/observers/class.products_with_attributes_stock.php on line 455.
--> PHP Warning: Use of undefined constant PRODINFO_ATTRIBUTE_DYNAMIC_STATUS - assumed 'PRODINFO_ATTRIBUTE_DYNAMIC_STATUS' (this will throw an Error in a future version of PHP) in
/includes/classes/observers/class.products_with_attributes_stock.php on line 455.
--> PHP Warning: Use of undefined constant PRODUCTS_OPTIONS_TYPE_SELECT_SBA - assumed 'PRODUCTS_OPTIONS_TYPE_SELECT_SBA' (this will throw an Error in a future version of PHP) in
/includes/classes/observers/class.products_with_attributes_stock.php on line 280.
--> PHP Warning: Use of undefined constant STOCK_SHOW_ATTRIB_LEVEL_STOCK - assumed 'STOCK_SHOW_ATTRIB_LEVEL_STOCK' (this will throw an Error in a future version of PHP) in
/includes/classes/observers/class.products_with_attributes_stock.php on line 319.
--> PHP Warning: Use of undefined constant STOCK_SHOW_ATTRIB_LEVEL_STOCK - assumed 'STOCK_SHOW_ATTRIB_LEVEL_STOCK' (this will throw an Error in a future version of PHP) in
/includes/classes/observers/class.products_with_attributes_stock.php on line 328.
--> PHP Warning: Use of undefined constant PRODUCTS_OPTIONS_TYPE_SELECT_SBA - assumed 'PRODUCTS_OPTIONS_TYPE_SELECT_SBA' (this will throw an Error in a future version of PHP) in
/includes/classes/observers/class.products_with_attributes_stock.php on line 416.
--> PHP Warning: Use of undefined constant STOCK_SHOW_ORIGINAL_PRICE_STRUCK - assumed 'STOCK_SHOW_ORIGINAL_PRICE_STRUCK' (this will throw an Error in a future version of PHP) in
/includes/classes/observers/class.products_with_attributes_stock.php on line 430.
--> PHP Warning: Use of undefined constant PRODINFO_ATTRIBUTE_DYNAMIC_STATUS - assumed 'PRODINFO_ATTRIBUTE_DYNAMIC_STATUS' (this will throw an Error in a future version of PHP) in
/includes/classes/observers/class.products_with_attributes_stock.php on line 455.
--> PHP Warning: Use of undefined constant PRODINFO_ATTRIBUTE_DYNAMIC_STATUS - assumed 'PRODINFO_ATTRIBUTE_DYNAMIC_STATUS' (this will throw an Error in a future version of PHP) in
/includes/classes/observers/class.products_with_attributes_stock.php on line 455.
--> PHP Warning: Use of undefined constant PRODINFO_ATTRIBUTE_DYNAMIC_STATUS - assumed 'PRODINFO_ATTRIBUTE_DYNAMIC_STATUS' (this will throw an Error in a future version of PHP) in
/includes/classes/observers/class.products_with_attributes_stock.php on line 455.
Based on what the logs are telling me the Stock By Attributes plugin I added on is giving me errors. Is there a way to fix this or should I uninstall Additional Images and upload additional images through FTP?
Re: Additional Product Images
Forgot to put in the script code I mentioned that's in html_header.php
Code:
<script type="text/javascript">
$(document).ready(function() {
var origsrc = $("#productMainImage a img").attr("src");
$("#productAdditionalImages .additionalImages a img").hover(
function () {
$("#productMainImage a img").attr('src', this.src);
},
function () {
$("#productMainImage a img").attr('src', origsrc);
}
);
});
</script>
Re: Additional Product Images
Quote:
Originally Posted by
mito0930
Thank you for your reply. I've reinstalled Zen Cart again just in case it wasn't any plugins I forgot to uninstall clashing, but the problem still persists even after following all instructions and reinstalling the plugin.
When I switch to show with the plugin to the original display style, all the product details and 'add to cart' box disappears, so I'm using the default ZC display option. I haven't added any additional images through FTP, just with the plugin.
Here's what the latest log has
Code:
--> PHP Warning: Use of undefined constant PRODUCTS_OPTIONS_TYPE_SELECT_SBA - assumed 'PRODUCTS_OPTIONS_TYPE_SELECT_SBA' (this will throw an Error in a future version of PHP) in
/includes/classes/observers/class.products_with_attributes_stock.php on line 280.
--> PHP Warning: Use of undefined constant STOCK_SHOW_ATTRIB_LEVEL_STOCK - assumed 'STOCK_SHOW_ATTRIB_LEVEL_STOCK' (this will throw an Error in a future version of PHP) in
/includes/classes/observers/class.products_with_attributes_stock.php on line 319.
--> PHP Warning: Use of undefined constant STOCK_SHOW_ATTRIB_LEVEL_STOCK - assumed 'STOCK_SHOW_ATTRIB_LEVEL_STOCK' (this will throw an Error in a future version of PHP) in
/includes/classes/observers/class.products_with_attributes_stock.php on line 328.
--> PHP Warning: Use of undefined constant PRODUCTS_OPTIONS_TYPE_SELECT_SBA - assumed 'PRODUCTS_OPTIONS_TYPE_SELECT_SBA' (this will throw an Error in a future version of PHP) in
/includes/classes/observers/class.products_with_attributes_stock.php on line 416.
--> PHP Warning: Use of undefined constant STOCK_SHOW_ORIGINAL_PRICE_STRUCK - assumed 'STOCK_SHOW_ORIGINAL_PRICE_STRUCK' (this will throw an Error in a future version of PHP) in
/includes/classes/observers/class.products_with_attributes_stock.php on line 430.
--> PHP Warning: Use of undefined constant PRODINFO_ATTRIBUTE_DYNAMIC_STATUS - assumed 'PRODINFO_ATTRIBUTE_DYNAMIC_STATUS' (this will throw an Error in a future version of PHP) in
/includes/classes/observers/class.products_with_attributes_stock.php on line 455.
--> PHP Warning: Use of undefined constant PRODINFO_ATTRIBUTE_DYNAMIC_STATUS - assumed 'PRODINFO_ATTRIBUTE_DYNAMIC_STATUS' (this will throw an Error in a future version of PHP) in
/includes/classes/observers/class.products_with_attributes_stock.php on line 455.
--> PHP Warning: Use of undefined constant PRODINFO_ATTRIBUTE_DYNAMIC_STATUS - assumed 'PRODINFO_ATTRIBUTE_DYNAMIC_STATUS' (this will throw an Error in a future version of PHP) in
/includes/classes/observers/class.products_with_attributes_stock.php on line 455.
--> PHP Warning: Use of undefined constant PRODUCTS_OPTIONS_TYPE_SELECT_SBA - assumed 'PRODUCTS_OPTIONS_TYPE_SELECT_SBA' (this will throw an Error in a future version of PHP) in
/includes/classes/observers/class.products_with_attributes_stock.php on line 280.
--> PHP Warning: Use of undefined constant STOCK_SHOW_ATTRIB_LEVEL_STOCK - assumed 'STOCK_SHOW_ATTRIB_LEVEL_STOCK' (this will throw an Error in a future version of PHP) in
/includes/classes/observers/class.products_with_attributes_stock.php on line 319.
--> PHP Warning: Use of undefined constant STOCK_SHOW_ATTRIB_LEVEL_STOCK - assumed 'STOCK_SHOW_ATTRIB_LEVEL_STOCK' (this will throw an Error in a future version of PHP) in
/includes/classes/observers/class.products_with_attributes_stock.php on line 328.
--> PHP Warning: Use of undefined constant PRODUCTS_OPTIONS_TYPE_SELECT_SBA - assumed 'PRODUCTS_OPTIONS_TYPE_SELECT_SBA' (this will throw an Error in a future version of PHP) in
/includes/classes/observers/class.products_with_attributes_stock.php on line 416.
--> PHP Warning: Use of undefined constant STOCK_SHOW_ORIGINAL_PRICE_STRUCK - assumed 'STOCK_SHOW_ORIGINAL_PRICE_STRUCK' (this will throw an Error in a future version of PHP) in
/includes/classes/observers/class.products_with_attributes_stock.php on line 430.
--> PHP Warning: Use of undefined constant PRODINFO_ATTRIBUTE_DYNAMIC_STATUS - assumed 'PRODINFO_ATTRIBUTE_DYNAMIC_STATUS' (this will throw an Error in a future version of PHP) in
/includes/classes/observers/class.products_with_attributes_stock.php on line 455.
--> PHP Warning: Use of undefined constant PRODINFO_ATTRIBUTE_DYNAMIC_STATUS - assumed 'PRODINFO_ATTRIBUTE_DYNAMIC_STATUS' (this will throw an Error in a future version of PHP) in
/includes/classes/observers/class.products_with_attributes_stock.php on line 455.
--> PHP Warning: Use of undefined constant PRODINFO_ATTRIBUTE_DYNAMIC_STATUS - assumed 'PRODINFO_ATTRIBUTE_DYNAMIC_STATUS' (this will throw an Error in a future version of PHP) in
/includes/classes/observers/class.products_with_attributes_stock.php on line 455.
Based on what the logs are telling me the Stock By Attributes plugin I added on is giving me errors. Is there a way to fix this or should I uninstall Additional Images and upload additional images through FTP?
The above log info is a result of two things, one not running the install and two apparently that portion of code isn't written to be loaded to the server without executing the install. Either way that log is appears unrelated to the internal issue with additional images, though would suggest to complete the install of SBA and then test again.
Quote:
Originally Posted by
mito0930
Forgot to put in the script code I mentioned that's in html_header.php
Code:
<script type="text/javascript">
$(document).ready(function() {
var origsrc = $("#productMainImage a img").attr("src");
$("#productAdditionalImages .additionalImages a img").hover(
function () {
$("#productMainImage a img").attr('src', this.src);
},
function () {
$("#productMainImage a img").attr('src', origsrc);
}
);
});
</script>
Ahh, that script code. Well, that's not causing the absence of all code between the opening and closing comments of the additional images section.
So let's go back to the basics. What version of Zen Cart, what plugins are installed? It sounds like it was working before, but then something changed, what changed? How was it restored? If used a backup/restore utility, then likely files that had been added between the last backup and current restore were not removed, but files that had been modified or deleted were restored...
Re: Additional Product Images addon
Quote:
Originally Posted by
mc12345678
The above log info is a result of two things, one not running the install and two apparently that portion of code isn't written to be loaded to the server without executing the install. Either way that log is appears unrelated to the internal issue with additional images, though would suggest to complete the install of SBA and then test again.
Ahh, that script code. Well, that's not causing the absence of all code between the opening and closing comments of the additional images section.
So let's go back to the basics. What version of Zen Cart, what plugins are installed? It sounds like it was working before, but then something changed, what changed? How was it restored? If used a backup/restore utility, then likely files that had been added between the last backup and current restore were not removed, but files that had been modified or deleted were restored...
Alright, I went and fixed the first problem which was unrelated. I no longer have logs reporting that issue.
Now to tackle the issue. I'm using Zen Cart v 1.5.6c. The template I've made is based on template_default if that makes a difference.
I believe it changed after I added a plugin, but I'm unsure as to which one is causing the exact issue since I didn't realize it until I went to test the checkout.
It was restored after I completely reinstalled Zen Cart and installed it. It was the first plugin I installed.
Here's a list of plugins I'm currently using along with Additonal Images:
Stock By Attributes v1.5.6
Additional Images Hover v1.5
Column Layout Grid v2.3.1
Google reCaptcha v3.4
Re: Additional Product Images addon
Hello, after removing the files and running the uninstall.sql and reinstalling the plugin, the additional images started to show up. The other plugins still work alongside Additional Images but I believe a file may have gone missing while I was installing the plugins. Thank you for your time.
Re: Additional Product Images
Module isn't working in ZC 1.5.7
When clicking the 'Upload Images' button the additional_product_images page is reloaded, although the url does contain the expected data for the upload page.
Re: Additional Product Images
Quote:
Originally Posted by
strelitzia
Module isn't working in ZC 1.5.7
When clicking the 'Upload Images' button the additional_product_images page is reloaded, although the url does contain the expected data for the upload page.
Yeah, I've noticed that because of the report of this issue. I have also seen that the "problem" goes away if the form is changed from a 'get' type form to a 'post' type form. Going to try to follow through the post/get data to see what is happening and why it is not navigating to the alternate page (didn't even try to access the page). Otherwise, there are a few things that need to be addressed at least on the admin side to reduce the likelihood of mydebug logs for systems that use more recent versions of PHP and/or stricter controls...
Thanks for reporting this though.
Re: Additional Product Images
Quote:
Originally Posted by
mc12345678
Yeah, I've noticed that because of the report of this issue. I have also seen that the "problem" goes away if the form is changed from a 'get' type form to a 'post' type form. Going to try to follow through the post/get data to see what is happening and why it is not navigating to the alternate page (didn't even try to access the page). Otherwise, there are a few things that need to be addressed at least on the admin side to reduce the likelihood of mydebug logs for systems that use more recent versions of PHP and/or stricter controls...
Thanks for reporting this though.
Ughh... Sort of a messed up situation... In the admin, it appears that the expectation is that a 'get' style form is to feed back to the current page not to the "next" page... As such, in order to load a different page when using 'get' one has to modify the parameter `$_GET['cmd']` just before calling zen_draw_form... Even if the form is going to be going to the same location... I don't (yet) understand why this is so, but it certainly adds what I think is an unnecessary step in order to bypass that "issue"...
So, to at least get to the next "action" this is what I did that worked for a minimal modification:
On line 80 of admin\additional_product_images.php
Change:
Code:
<?php echo zen_draw_form('related_products', FILENAME_ADDITIONAL_IMAGES_UPLOAD, '', 'get');
to:
Code:
<?php echo zen_draw_form('related_products', $_GET['cmd'] = FILENAME_ADDITIONAL_IMAGES_UPLOAD, '', 'get');
This allowed moving forwards at least... I have a few other things that as I said I've addressed to offer some improvements in navigation and to reduce the occurrence of notices being logged.