Articles on: Building Calculators

Adding Custom Javascript

The feature allows you to improve your store with different JavaScript tools. It simplifies the use of JavaScript components and sets you free from tiresome code editing.
​_When it comes to improving your Shopify product page, this tool simplifies adding features. Online visitor tracking, alerts, and prompt messages, calendars, interaction sound for your content, maps, and many more helpful tools. The app makes it super easy for any developer to add any custom JavaScrip, and create and test your own._

How to access this configuration block?

Go to your Shopify store admin panel
Click on Apps from the left navigation and then select "Custom Price Calculator"
Once the app loads, select "Calculators" then scroll down and click Custom JavaScript



Figure: Scripting section in the Custom price calculator app

Code samples:

​_You can use the following snippet for your use cases:_

Add a custom javascript that executes on every page load on the products where the calculator is added

$(document).ready(function() { //Write javascript code here that will run on page load });

Add a custom javascript that executes on when the value is changed for the selector on the products where the calculator is added


$('.selector-class').change(function() { //Write javascript code here that will run change of the specified selector });




Updated on: 02/05/2025

Was this article helpful?

Share your feedback

Cancel

Thank you!