venom2506 Posted December 10, 2013 Share Posted December 10, 2013 (edited) Hello, I'm in need of some help again. I am now required to have the name of the color attributes show under their boxes (like, under a box with the color yellow, it shows the name I've chosen in the back office, the same that already appears in the tooltip). Could someone give me pointers as for how to do that? I already have an inkling of where it should go, in product.tpl, in there: <li><a id="color_{$id_attribute|intval}" class="color_pick" style="background: {$color.value};" onclick="updateColorSelect({$id_attribute|intval});$('#wrapResetImages').show('slow');" title="{$color.name}">{if file_exists($col_img_dir|cat:$id_attribute|cat:'.jpg')}<img src="{$img_col_dir}{$id_attribute}.jpg" alt="{$color.name}" width="20" height="20" />{/if}</a></li> and I should use "$color.name" as the variable to display said name, but the syntax kinds of elude me, so any help would be welcome. Thank you very much. Edited December 16, 2013 by venom2506 (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted December 10, 2013 Share Posted December 10, 2013 try to use {$color.name} use it before </li> code 1 Link to comment Share on other sites More sharing options...
venom2506 Posted December 10, 2013 Author Share Posted December 10, 2013 Just that? Anyway I tried it, it does not seem to work. I also tried with an echo, but to no avail. Link to comment Share on other sites More sharing options...
vekia Posted December 10, 2013 Share Posted December 10, 2013 after modifications in tpl files please recompile theme Link to comment Share on other sites More sharing options...
venom2506 Posted December 10, 2013 Author Share Posted December 10, 2013 It's already set, as I keep editing tpl files, so that can't be it. I even tried emptying the cache, no good. Link to comment Share on other sites More sharing options...
vekia Posted December 10, 2013 Share Posted December 10, 2013 your website is online? can you share url if so? Link to comment Share on other sites More sharing options...
venom2506 Posted December 11, 2013 Author Share Posted December 11, 2013 Unfortunately not, I'm working for a company, and they haven't provided a means or the authorisation to put it online yet. I could provide the tpl, but I doubt that would be enough? Link to comment Share on other sites More sharing options...
vekia Posted December 11, 2013 Share Posted December 11, 2013 take a look: i used just: {$colors.$id_attribute.name} variable 1 Link to comment Share on other sites More sharing options...
venom2506 Posted December 11, 2013 Author Share Posted December 11, 2013 (edited) Mmh, my job's firewall blocking the picture. I'll check it at home tonight, thank you. For the time being, unfortunately, this didn't work either. Should it go in a php tag or something? Well, I tried in a php tag and it didn't work, so my question is kindda pointless :/ Well I attached my tpl file, it's been modified a bit, if you have the time to check it, maybe there's something in there that prevents the change. product.txt Edited December 11, 2013 by venom2506 (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted December 11, 2013 Share Posted December 11, 2013 what ps version you use exactly? i will test it on the same version. Link to comment Share on other sites More sharing options...
venom2506 Posted December 11, 2013 Author Share Posted December 11, 2013 Thank you very much; I'm using PS 1.5.6.0. Link to comment Share on other sites More sharing options...
venom2506 Posted December 16, 2013 Author Share Posted December 16, 2013 (edited) Hello, I wondered if you had had time to check this? Edited December 16, 2013 by venom2506 (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted December 16, 2013 Share Posted December 16, 2013 i used variable that i suggested to use file with modification: http://pastebin.com/qZH1Chut 2 Link to comment Share on other sites More sharing options...
venom2506 Posted December 16, 2013 Author Share Posted December 16, 2013 It works fine with your version. I honestly don't know what I did wrong, it looks the same as what I tried. Ah well, thanks a lot anyway, it really was driving me mad. Link to comment Share on other sites More sharing options...
Alberto Fernández Posted April 14, 2014 Share Posted April 14, 2014 Would be great if color name only appears for the color selected by the user, I think that kind of behaviour improves aesthetics and usability. ¿Don't you? Link to comment Share on other sites More sharing options...
aliaspt Posted October 23, 2014 Share Posted October 23, 2014 (edited) Anybody knows how to make it display the color name next to "Color" when you click on the square? I agree with the comment above that it would make more sense to display the color name only when it's picked. Plus it would look better than the mod above. This is an important feature considering that there are so many dark shades (black, dark brown, dark gray, etc) that you won't be able to see the difference if the monitor settings are low. --- PS 1.6.0.9 Edited October 23, 2014 by aliaspt (see edit history) Link to comment Share on other sites More sharing options...
Mortenboo Posted December 23, 2015 Share Posted December 23, 2015 Anybody knows how to make it display the color name next to "Color" when you click on the square? I agree with the comment above that it would make more sense to display the color name only when it's picked. Plus it would look better than the mod above. This is an important feature considering that there are so many dark shades (black, dark brown, dark gray, etc) that you won't be able to see the difference if the monitor settings are low. --- PS 1.6.0.9 Hey Aliaspt, Can you please explain to me how? I'm not finding it so easy. Merry Christmas // Morten Link to comment Share on other sites More sharing options...
dany2234 Posted January 5, 2016 Share Posted January 5, 2016 Hi, Did you find a solution to display color name only for selected colors ? As you said, normal behavior should be > Color: Black when black square selected ...and so on... Thank you, 1 Link to comment Share on other sites More sharing options...
Gubik Posted March 10, 2016 Share Posted March 10, 2016 Hi have you solved it? if yes please tell me how i want to do same Anybody knows how to make it display the color name next to "Color" when you click on the square? I agree with the comment above that it would make more sense to display the color name only when it's picked. Plus it would look better than the mod above. This is an important feature considering that there are so many dark shades (black, dark brown, dark gray, etc) that you won't be able to see the difference if the monitor settings are low. --- PS 1.6.0.9 Link to comment Share on other sites More sharing options...
Alberto Fernández Posted March 10, 2016 Share Posted March 10, 2016 Hi have you solved it? if yes please tell me how i want to do same Try this hack, works very well: https://www.prestashop.com/forums/topic/394851-display-only-color-name-selected/ 1 Link to comment Share on other sites More sharing options...
Gubik Posted March 10, 2016 Share Posted March 10, 2016 Great, thank you www.polepto.com it works, easy !! Try this hack, works very well: https://www.prestashop.com/forums/topic/394851-display-only-color-name-selected/ 1 Link to comment Share on other sites More sharing options...
erdem19 Posted April 26, 2016 Share Posted April 26, 2016 hello, any help on 1.6.1.5? thanks for advance. Link to comment Share on other sites More sharing options...
mrjan Posted May 6, 2016 Share Posted May 6, 2016 i used variable that i suggested to use file with modification: http://pastebin.com/qZH1Chut Hello Vekia, what variable should I use, when I need to put there Reference number of product please? Link to comment Share on other sites More sharing options...
harvesterr Posted October 3, 2016 Share Posted October 3, 2016 hi is it possible to help me to this problem too?? i have 1.6.1.7 and i use the warehouse theme and i cannot show the title of the combination with any of the solutions here! please some help??? thnx! kostaso 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