You need to make a similar calculator http://www.gazetabaraholka.ru/reklamnyj_kalkulyator (click on the button to calculate the cost of advertising). The creator of the solution does not contact. I can not understand what is in the file calculator.php how the code looks like. I was looking for similar solutions purely on js, I did not find anything like that.

Js:

/modules/zakaz/js/calc.js

/ modules/zakaz/js/send_form.js

it is not clear how to associate the display of the php grid with js files, which is roughly located inside the file calculator.php (/ modules/zakaz/calculator.php)

help at least a piece of code)

  • 3
    no one will do the work for you, they help here when they run into a problem, and you tell us about files that we don’t see and eventually ask to write at least something for you - Jurij Jazdanov
  • What is there to look for? Calculation on pure js - there is a price per cm, there is a size in cm of each strip and the number of lanes and the number of publications is selected - just multiply everything. - Mihanik71
  • it is not clear how to make the area painted over on the picture page - shura-shkura
  • I did not find the answer here either. stackoverflow.com/questions/622413/… - shura-shkura
  • @ shura-shkura replied below - Mihanik71

1 answer 1

The calculation uses the formula:

Price per cm * module width * module height * number of publications - we get the final cost.

The visual display is done using a table - after changing the parameters, background-color is added for a certain number of rows and columns.