cenourinha Posted December 22, 2009 Share Posted December 22, 2009 Hi there, i would like to do a slider like the one i found here: https://www.teamspeak.cc/whmcs/cart.php?a=add&pid=85 How can it be done? 0 Quote Link to comment Share on other sites More sharing options...
bear Posted December 22, 2009 Share Posted December 22, 2009 It's done with Javascript, looks like something he got through Yahoo. Check the source on the page, it has all you need to locate the scripts at Yahoo, or write your own. (don't take his). 0 Quote Link to comment Share on other sites More sharing options...
cenourinha Posted December 23, 2009 Author Share Posted December 23, 2009 Yeah, but i mean, can i use html inside product configurations? 0 Quote Link to comment Share on other sites More sharing options...
bear Posted December 23, 2009 Share Posted December 23, 2009 I'd imagine you can, but that would depend on your skill level with coding. I don't see a good reason why that can't be adapted. 0 Quote Link to comment Share on other sites More sharing options...
cenourinha Posted December 23, 2009 Author Share Posted December 23, 2009 For what i can understand they are using a Option Type: Quantity field in their system. They use this and they use the slider to adjust the "count" field but what i don't understand is how they automatically update the result: <div class="yui-skin-sam"> <div id="slider-bg" class="yui-h-slider" tabindex="-1" title="Slider"> <div id="slider-thumb" class="yui-slider-thumb"><img src="https://teamspeak.cc/images/thumb-fader.gif"></div> </div> <br/> <p><input autocomplete="off" id="configoption[11]" name="configoption[11]" type="text" value="5" size="4" maxlength="4" /> <span id="slider-value"></span> slots x $0.39 <b><span id="total-cost">Type # of slots and press Enter.</span></b></p> </div> 0 Quote Link to comment Share on other sites More sharing options...
D-Litz Posted December 23, 2009 Share Posted December 23, 2009 You can find all the information about this slider here http://developer.yahoo.com/yui/slider/ 0 Quote Link to comment Share on other sites More sharing options...
cenourinha Posted December 23, 2009 Author Share Posted December 23, 2009 Yes, i know how to use the YUI Library, but i can't understand how to insert the bold code in whmcs fields 0 Quote Link to comment Share on other sites More sharing options...
bear Posted December 23, 2009 Share Posted December 23, 2009 Yes, i know how to use the YUI Library, but i can't understand how to insert the bold code in whmcs fields This is what I was referring to when I stated it depended on your coding skill. If you knew how JS worked, as well as the YUI, you'd know it states what field to edit when updating based on the slider. IE: (function() { 10 var Event = YAHOO.util.Event, 11 Dom = YAHOO.util.Dom, 12 lang = YAHOO.lang, 13 slider, 14 bg="slider-bg", thumb="slider-thumb", totalarea="total-cost", valuearea="slider-value", textfield="configoption[11]" Then in the page: <p><input type="text" maxlength="4" size="4" value="5" name="configoption[11]" id="configoption[11]" autocomplete="off"/> <span id="slider-value">5</span> slots x $0.39 <b><span id="total-cost">= $1.95 USD</span></b></p> If after this it's still unclear, you should probably hire someone to assist. Hope that helps. 0 Quote Link to comment Share on other sites More sharing options...
cenourinha Posted December 23, 2009 Author Share Posted December 23, 2009 I know how js works... but this way i will need to edit the input field for "Quantity" in order to add the <span id="slider-value">5</span> and <span id="total-cost">= $1.95 USD</span>. How can i do this without making it general... i mean, with the possibility of creating another "Quantity" fields without this <span> tags. 0 Quote Link to comment Share on other sites More sharing options...
wirenine Posted March 18, 2010 Share Posted March 18, 2010 This would be a good addition to the configuration option addon. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.