LCP Studio Posted December 10, 2011 Share Posted December 10, 2011 Hi everybody, I'll do my best to write a good english (I'm French), but I'm sorry if I write with some mistakes. I want to had a simple text (like "hello") just below the price of a product in my shop. I've check with my friend Google who told me to change the file "Product.tpl". I did, and, at line 301, I wrote: <p>Hello</p> . But nothing append. Of course, I "unchecked" the cache's box in the preferences. Could any of you help me ? Thanks in advance ! Julian Link to comment Share on other sites More sharing options...
Dave L Posted December 11, 2011 Share Posted December 11, 2011 For any changes to show following an edit to a .tpl file you will need to 'Force Compile'. Preferences>Performance set force compile to yes and then save. Change back to No again and save otherwise your site will run slowly. Link to comment Share on other sites More sharing options...
LCP Studio Posted December 12, 2011 Author Share Posted December 12, 2011 Hi, Sorry to answer so late, I didn't check for new post ! Thanks for your help, it's working.? Although, I still have a little problem with attributes on a product. Let me explain: I've got a product with differents choices (attributes) and I'd like to write some text under the price if one option is taken in a dropdownlist. Example (because I'm not sure that you can understand me right now ) I've got a Jeans to sell, and customers can choose between 3 sizes (S, M, L). I'd like, when the customers choose, let say, the size "M", that the line "M is the size" goes under the price ? I've tried a lot of things, and I'm not sure anymore if I have to change something in product.tpl or product.ps or both. A bit confused, and I hope you coule help me a bit on it Thanks anyway for your previous post ! Julian Link to comment Share on other sites More sharing options...
LCP Studio Posted December 12, 2011 Author Share Posted December 12, 2011 Sorry to insist! Any ideas ? Link to comment Share on other sites More sharing options...
CartExpert.net Posted December 13, 2011 Share Posted December 13, 2011 Hello! You can use Javascript and put an 'onchange' event listener on the select. Link to comment Share on other sites More sharing options...
LCP Studio Posted December 13, 2011 Author Share Posted December 13, 2011 Hello ! Thanks for your answer. I've been to there (on product.tpl): <select name="{$groupName}" id="group_{$id_attribute_group|intval}" onchange="javascript:findCombination();javascript:test();{if $colors|@count > 0}$('#wrapResetImages').show('slow');{/if};"> But I don't understand how to write something in Javascript and that it can "understand" where to put the text. In fact, I don't know how to tell him, in javascript: "Put the text I want here". For product.js, I'm here: Function test() { style.display = "" ; } I presume that javascript is working with id but I'm not sure how. Could you help me with this (I promise: I'm looking on Google too :-) ) Link to comment Share on other sites More sharing options...
LCP Studio Posted December 13, 2011 Author Share Posted December 13, 2011 Oops! I'm working on. I think I'm finding the solution so don't trouble yourself to help me. I'll tell you the next time I'm stuck ! Thanks anyway. Link to comment Share on other sites More sharing options...
LCP Studio Posted December 14, 2011 Author Share Posted December 14, 2011 Done ! I've just put this line in product.tpl: <div id="leprix" style="color: red; font-size: small;"></div> And those in product.ps: document.getElementById('leprix').innerHTML="Hello World!"; Quite easy finally! Thanks for you both who helped me ! Hum... How to mark 'SOLVED' this post ? Link to comment Share on other sites More sharing options...
CartExpert.net Posted December 14, 2011 Share Posted December 14, 2011 Hello! Happy we could help and you solved your problem! Edit your post with 'Full editor' and put '[sOLVED]' at the beginning of the title. 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