PageSourceSearch

https://www.phytoadvance.com/wp-content/themes/alchemLifeUp/assets/js/script-tmp.js?ver=1791585590

js phytoadvance.com collected 2026-10-09 22:40:53 UTC 2,294 bytes, 59 lines download raw bytes

1
2// Increase and Decrease Only
3
4function increase_only() {
5    var quantity = document.querySelector('#input-quantity').innerHTML;
6    var newQuantity = parseInt(quantity)+1;
7    var actual_quantity = newQuantity > 9 ? newQuantity: newQuantity;
8
9    document.querySelector('#input-quantity').innerHTML = actual_quantity;
10}
11
12function decrease_only(){
13    var quantity = document.querySelector('#input-quantity').innerHTML;
14        if((quantity) > 1){
15            var newQuantity = parseInt(quantity)-1;
16            var actual_quantity = newQuantity > 9 ? newQuantity: newQuantity;
17            document.querySelector('#input-quantity').innerHTML = actual_quantity;
18        }
19    
20}
21
22// Add to cart product change
23
24
25function increase_quantity() {
26    var inputquantity = document.querySelector('#input-quantity').innerHTML;
27    var price = document.querySelector('#total-cost').innerHTML.includes('₹')
28                ?document.querySelector('#total-cost').innerHTML.split(" ")[1]
29                :document.querySelector('#total-cost').innerHTML;
30    var single_product = price/inputquantity;
31    var newQuantity = parseInt(inputquantity)+1;
32    var quantity = newQuantity > 9 ? newQuantity: newQuantity;
33    var newprice = single_product*newQuantity;
34    document.querySelector('#total-cost').innerHTML = newprice.toFixed(2);
35    document.querySelector('#input-quantity').innerHTML = quantity;
36}
37
38function reduce_quantity() {
39    var inputquantity = document.querySelector('#input-quantity').innerHTML;
40    var price = document.querySelector('#total-cost').innerHTML.includes('₹')
41                ?document.querySelector('#total-cost').innerHTML.split(" ")[1]
42                :document.querySelector('#total-cost').innerHTML;
43    var single_product = price/inputquantity;
44    if((inputquantity)> 1) 
45        {
46            var newQuantity = parseInt(inputquantity)-1;
47            var quantity = newQuantity > 9 ? newQuantity: newQuantity;
48            var newprice = single_product*newQuantity;
49            document.querySelector('#total-cost').innerHTML = newprice.toFixed(2);
50            document.querySelector('#input-quantity').innerHTML = quantity;
51        }
52 }
53
54
55// remove product from cart
56
57$('#remove-product').on( 'click' , function(){
58    $('.cart-product').addClass('d-lg-none');
59});

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.