Ray UK Posted December 18, 2023 Share Posted December 18, 2023 Hi, is it possible to have PS show a small thumbnail of the product variant instead of a showing texture or a predefined image in the attribute creation page. I m meaning like this... Thanks in advance Link to comment Share on other sites More sharing options...
Nickz Posted December 18, 2023 Share Posted December 18, 2023 (edited) In IT everything is possible, its comes down to the price you are will to pay. Have a look into modules, there might be something. If not ask in the job center. Edited December 19, 2023 by Nickz a comma missing which led to a misinterpretation. (see edit history) Link to comment Share on other sites More sharing options...
Aldeag Posted December 18, 2023 Share Posted December 18, 2023 Check if this two free modules from Sunnytoo meets your requirements. I use both and I´m happy Combination images as textures - Free https://www.sunnytoo.com/57773/show-combination-images-textures-free-prestashop-module Free color name module for PrestaShop 1.7 https://www.sunnytoo.com/51255/free-color-name-module-prestashop-1-7 1 Link to comment Share on other sites More sharing options...
Ray UK Posted December 18, 2023 Author Share Posted December 18, 2023 3 hours ago, Nickz said: In IT everything is possible, its comes down to the price you are will to pay. Have a look into modules there might be something. If not ask in the job center. Well arent you a bundle of joy. Take your negative comments and shove them where the sun dont shine. This is a forum and the majority of people on here like to help others, and learn from others. Im more than willing to learn and code it myself, but im not a Prestashop guru so thats why im asking for help. Ill check the FREE modules out that a helpful poster has suggested. Thanks for nothing ! Link to comment Share on other sites More sharing options...
Ray UK Posted December 18, 2023 Author Share Posted December 18, 2023 2 hours ago, Aldeag said: Check if this two free modules from Sunnytoo meets your requirements. I use both and I´m happy Combination images as textures - Free https://www.sunnytoo.com/57773/show-combination-images-textures-free-prestashop-module Free color name module for PrestaShop 1.7 https://www.sunnytoo.com/51255/free-color-name-module-prestashop-1-7 Thanks that looks like the perfect module. After installing though its throwing up errors. "Oops... looks like an unexpected error occurred. key_exists(): Argument #2 ($array) must be of type array, StProThumbGroupClass given [TypeError 0]" I guess its not updated for 8.1 yet as the code in the instructions is different from what is in the product-variants.tpl file. Glad there are people on here that are happy to try and help others :) Link to comment Share on other sites More sharing options...
Aldeag Posted December 18, 2023 Share Posted December 18, 2023 (edited) Well. I used it with Prestashop 1.6. When I updated to 1.7 the module didn´t work as it did till it was updated. Since they updated the module it works fine for me. Try to write them at their contact form. I like to help others as I got free help also here in the forum. Edited December 19, 2023 by Aldeag (see edit history) Link to comment Share on other sites More sharing options...
Aldeag Posted December 18, 2023 Share Posted December 18, 2023 (edited) Also I recommend this paid module. It shows attributes miniatures in product list https://www.idnovate.com/1448-add-to-cart-button-and-attributes-in-product-list.html Edited December 18, 2023 by Aldeag (see edit history) Link to comment Share on other sites More sharing options...
Ray UK Posted December 19, 2023 Author Share Posted December 19, 2023 (edited) Thanks Aldeag, Ive messgaged Sunnytoo to ask about modifications for 8.1. That module works perfectly on my 1.7 copy of the site Edited December 19, 2023 by MerseyRay (see edit history) 1 Link to comment Share on other sites More sharing options...
Ray UK Posted December 19, 2023 Author Share Posted December 19, 2023 After further investigations by me, I have discovered that the module work perfectly fine on PS8, but only if you stick to PHP7. Switching to PHP8 gives an error when adding a rule in the module config Link to comment Share on other sites More sharing options...
Daresh Posted December 19, 2023 Share Posted December 19, 2023 In order to make the code compatible with PHP 8, you should change StProThumbGroupClass.php to use property_exists instead of key_exists like this: before: if (key_exists($key, $this) && $key != 'id_'.$this->table && !isset($_FILES[$key])) after: if (property_exists($this, $key) && $key != 'id_' . $this->table && !isset($_FILES[$key])) Please note the reversed order of arguments. 2 Link to comment Share on other sites More sharing options...
Aldeag Posted December 19, 2023 Share Posted December 19, 2023 Great answer. MerseyRay will confirm Link to comment Share on other sites More sharing options...
Ray UK Posted December 19, 2023 Author Share Posted December 19, 2023 7 hours ago, Daresh said: In order to make the code compatible with PHP 8, you should change StProThumbGroupClass.php to use property_exists instead of key_exists like this: before: if (key_exists($key, $this) && $key != 'id_'.$this->table && !isset($_FILES[$key])) after: if (property_exists($this, $key) && $key != 'id_' . $this->table && !isset($_FILES[$key])) Please note the reversed order of arguments. Thanks Daresh, I’ll give this a try tomorrow and update here. Link to comment Share on other sites More sharing options...
Ray UK Posted December 20, 2023 Author Share Posted December 20, 2023 18 hours ago, Daresh said: In order to make the code compatible with PHP 8, you should change StProThumbGroupClass.php to use property_exists instead of key_exists like this: before: if (key_exists($key, $this) && $key != 'id_'.$this->table && !isset($_FILES[$key])) after: if (property_exists($this, $key) && $key != 'id_' . $this->table && !isset($_FILES[$key])) Please note the reversed order of arguments. Perfect. Changed that code and it now functions properly with PHP8 2 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now