Click here to Skip to main content
15,916,951 members

Comments by Sudeshna2 (Top 5 by date)

Sudeshna2 18-Dec-19 8:15am View    
Yes. I had seen in network tab of the browser dev tools, js files shows pending. How to solve this?
Sudeshna2 18-Dec-19 5:48am View    
Error shown in Console:
Uncaught TypeError: $(...).myCart is not a function

It is connected to line:
$('.my-cart-btn').myCart({
Sudeshna2 12-Dec-19 5:57am View    
Will you give me proper code for local storage?
Sudeshna2 5-Dec-19 6:22am View    
I have got following code for local storage:




// Check browser support
if (typeof(Storage) !== "undefined") {
// Store
localStorage.setItem("lastname", "Smith");
// Retrieve
document.getElementById("result").innerHTML = localStorage.getItem("lastname");
} else {
document.getElementById("result").innerHTML = "Sorry, your browser does not support Web Storage...";
}


Does I have to store details of my all products like "lastname" and "smith" ? I have 10,000 products.

Like add new products string
$("#addNewProduct").click(function(event) {
var currentElementNo = $(".row").children().length + 1;
$(".row").append('product ' + currentElementNo + ' - $' + currentElementNo + 'Add to CartDetails')

Can I strore products dynamically in local storage and get in the Checkout Form Page?
Sudeshna2 12-Jun-19 9:47am View    
Thanks for your solution!
I have selected a template from the link you have given above.
From that I have a following difficulty:

I have onchange function to select price country wise.



Select Country
India
Outside India



function myFunction() {
var x = document.getElementById("mySelect").value;
document.getElementById("demo").innerHTML = x;
}


In the template to add price only numbers are accepted, but I have to give id value i.e. #demo to get amount country wise in add to cart button.

Code of 'add to cart' button:

Add to Cart

In the above code if I give a number after "price": it is excepted, but I have to give #demo

Pl. guide me how I make changes in the above code.