Currently working on creating a price configurator for a new lighting system within homes using Angular 7. Instead of using TypeScript and sass, I'm coding it in plain JavaScript.
Page 1: The user will choose between a new building or an existing one, along with options for Wi-Fi/wires [z1, z2...]
<label>New Building</label>
<input type="radio" value="z1">
The user then needs to specify the size of the building, which will add different controls on page number 3 [-o1, -o2...]
<select><option value="-o1">Small</option>...
Selection of what to build (lights, aircon, detectors, etc.), potentially adding more controls in step 4 [y8, y9...]
- Choose additional controls such as Android devices, TVs, keychains, movement detectors (can be multiple) [-5x2-24x2]
- Calculate the total price
I plan to store these values as strings in a variable and then use them to assign prices accordingly. For example, z1-o1-y8-i-5x2-24x2 translates to a new building, small size, lights, On/Off + timing controls, and specific controllers repeated twice each with their respective prices. It's quite complex, and I'm not sure if I'm on the right track. Any guidance on how to accomplish this would be greatly appreciated. Thank you.