I created a product configurator for our company, which uses javascript to add, multiple etc prices in a form, depending on the amounts that are filled in. It is showcased at http://shop.cloud2.nl/configurator.
If you look at the Server Backup Lite/Basic tab, it works like a charm. But when you check the Server Backup Pro tab, if you fill in the amount under "Aantal", nothing happens. The price for one server is 0.00. However, when you add another item with "Server Toevoegen", the price is changed from 0.00 to whatever amount you filled in times the value of the field.
I managed to figure out it does not work with one row, seeing as the Server Backup Lite/Basic tab works fine. But for the life of me I can't seem to figure out how to solve it.
Does anyone have a solution to this? I have included the code in the .php, the css and js for the tabs come from tabber.js and example.css (See source code or attachments).
My apologies for the late reply, I was quite busy and totally forgot about this. @Slick812: You are definitely right about the large amount of Javscript. This is one of the major downsides of Magento, and I have been working on fixing this.
In the end there was as slight mistake in the code regarding variable/function naming which caused it to fail. Although it still needs some work, for now this issue is solved.
Although it does not solve the actual problem, it did give me some ideas as to how to clean up the code.
JavaScript
JavaScript is a dynamic, object-based language commonly used for client-side scripting in web browsers. Recently, server side JavaScript frameworks have also emerged. JavaScript runs on nearly every operating system and in almost every mainstream web browser.
calc totals refers to incorrect cart name cart_sbp should be cart_sbb