Skip to content

Commit

Permalink
adds checkout link
Browse files Browse the repository at this point in the history
  • Loading branch information
sphawes committed Jul 30, 2023
1 parent 3983b64 commit b7449b3
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 15 deletions.
20 changes: 10 additions & 10 deletions dist/assets/index-e217de74.js → dist/assets/index-1bc1b9b7.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions dist/assets/index-3ef4cc58.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion dist/assets/index-7f1cab6c.css

This file was deleted.

4 changes: 2 additions & 2 deletions dist/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
<link rel="mask-icon" href="safari-pinned-tab.svg" color="#5bbad5">
<meta name="msapplication-TileColor" content="#da532c">
<meta name="theme-color" content="#ffffff">
<script type="module" crossorigin src="./assets/index-e217de74.js"></script>
<link rel="stylesheet" href="./assets/index-7f1cab6c.css">
<script type="module" crossorigin src="./assets/index-1bc1b9b7.js"></script>
<link rel="stylesheet" href="./assets/index-3ef4cc58.css">
</head>
<body>
<div id="output"></div>
Expand Down
12 changes: 10 additions & 2 deletions math.js
Original file line number Diff line number Diff line change
Expand Up @@ -370,13 +370,21 @@ window.calculate = function () {
if (isNaN(occurrences['2'])) occurrences['2'] = 0;
if (isNaN(occurrences['3'])) occurrences['3'] = 0;

var lumenID = "40225822965947";
var feeder8mmID = "44544437256379";
var checkout = "https://index-machines.myshopify.com/cart/";
checkout = checkout + lumenID + ":1,";
checkout = checkout + feeder8mmID + ":" + Math.ceil(occurrences['0'] / 5);

var order = document.getElementById("order");
order.innerHTML="<h3>Result</h3><p><a href='https://opulo.io/products/lumenpnp'>LumenPnP</a>: 1</p><p><a href='https://opulo.io/products/8mm-feeder'>8mm 5packs</a>: "
+ Math.ceil(occurrences['0'] / 5) + "</p><p>12mm 5packs: "
+ Math.ceil(occurrences['1'] / 5) + "</p><p>16mm 5packs: "
+ Math.ceil(occurrences['2'] / 5) + "</p><p>24mm 5packs: "
+ Math.ceil(occurrences['3'] / 5) + "</p>";

+ Math.ceil(occurrences['3'] / 5) + "</p><br>"
+ "<a href='" + checkout + "'><button>Add to Cart</button></a>"
;

}

}
1 change: 1 addition & 0 deletions style.css
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ button {
border-radius:10px;
background-color: #DAA520;
margin: auto;
font-weight: bold;
}

button:hover {
Expand Down

0 comments on commit b7449b3

Please sign in to comment.