prcwest Posted July 17, 2016 Share Posted July 17, 2016 Hello Community I am very new to PrestaShop and thats my first post. I would need calculator on my website like on this page. https://www.puncturesafe.com/puncturesafe-technical.php Could i integrate something like this to a cms page and if yes how could i do this? please keep in mind i am not a programmer so please be patient with me. Any help would be appreciate Kind Regards Pascal Link to comment Share on other sites More sharing options...
shokinro Posted July 17, 2016 Share Posted July 17, 2016 I think it might be difficult to use a CMS page. since this will involve calculation by javascript on client browser. The best way might be to create a new custom page. But if you are not a programmer, you might need to find someone to help you, for sure it will involve some programming unless you can find a exiting commercial module. 1 Link to comment Share on other sites More sharing options...
Naldinho Posted July 19, 2016 Share Posted July 19, 2016 Yes but if your not a programmer then creating the calculator will be difficult as that would require javascript as shokinro pointed out.You can use javascript on a CMS page inside of an iframe. If you need instructions on how to do that I can write some out when I'm less tired but if you can't code the calculator then having instructions on how to put it on a CMS page are pretty useless so my suggestion is first figure out how to make the calculator using just standard HTML and javascript and once you have that getting it to work in a CMS page is easy. 1 Link to comment Share on other sites More sharing options...
prcwest Posted July 23, 2016 Author Share Posted July 23, 2016 Thanks for the reply. I created a page now(not cms) and i would like to place the calculator on this page i did contacted the owner of the page and he gave me the calculations because i want to sell his products. Now i just have to place them somehow in the created page he send me the scripts: <script type="text/javascript"> function calc_amt(){ form = document.amt_calc; a=eval(form.width.value); b=eval(form.ratio.value); c=eval(form.rim.value); a2=a/34; b2=((b/100)*a)/34; c2=c+b2+b2; d=Math.round(a2*c2*.11*25.4); e=Math.round(d*0.0338140227); form.ml_calc.value = isNaN(d) ? "" : d; form.oz_calc.value = isNaN(e) ? "" : e; } </script> <script type="text/javascript"> function calc_amt2(){ form = document.amt_calc2; a=eval(form.width2.value); b=eval(form.ratio2.value); c=eval(form.rim2.value); a2=a/29; b2=((b/100)*a)/29; c2=c+b2+b2; d=Math.round(a2*c2*.11*25.4); e=Math.round(d*0.0338140227); form.ml_calc2.value = isNaN(d) ? "" : d; form.oz_calc2.value = isNaN(e) ? "" : e; } </script> <script type="text/javascript"> function calc_amt4(){ form = document.amt_calc3; a=eval(form.width3.value); b=eval(form.ratio3.value); c=eval(form.rim3.value); a2=a/25; b2=((b/100)*a)/27; c2=c+b2+b2; d=Math.round(a2*c2*.11*25.4); e=Math.round(d*0.0338140227); form.ml_calc3.value = isNaN(d) ? "" : d; form.oz_calc3.value = isNaN(e) ? "" : e; } </script> Link to comment Share on other sites More sharing options...
shokinro Posted July 24, 2016 Share Posted July 24, 2016 Not sure how you created the page, if you know how to create the page, you should can just include include the script into your page and then can create the calculation by calling those those functions, but you will need to create calculator forms in order to use those functions. Again, if you are not programmer, it might be difficult to do that by yourself, you may ask the developer of the Calculator owner to help you, since you are going to sell his products. 1 Link to comment Share on other sites More sharing options...
prcwest Posted July 24, 2016 Author Share Posted July 24, 2016 Thank you very much for the reply. I solved the problem. I created a custom page and included the calculator its working now. thanks again Link to comment Share on other sites More sharing options...
shokinro Posted July 24, 2016 Share Posted July 24, 2016 I am glad you have figured out and resolved your problem. thanks for feedback. 1 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