Jump to content

Recommended Posts

Ok, Hi everyone. I found this awesome and simplistic shopping cart on codepen.com BUT I do not know how to make it work .... :(TO begin with here is the link for it: http://codepen.io/bartveneman/details/KHxLGI am using Dreamweaver to make my website. So I copied it all, made sure that the links between my html, css and js are working fine and it still does not work.

My problem with it is as follows: I did a copy+paste on it cannot shows me the cart without any items. I do not know how to add items without ruining the JS which will calculate things like total price, subtotal, etc.

Things that I tried [ if you know exactly what I need to do don't bother reading what I tried, I am a beginner anyways :D]

  1. I tried replacing inside the HTML the places where it says things like "src="{{=img}}" I would replace it the source with an actual source path for an image which works but shows nothing at all.
  2. I tried then also here in the HTMl file to simply take the tag off. As you see the html is based on one top part which is a big tag then is has the footer. The items are inside the tag at the top, BUT the tag is enclosed within some script tag so I removed the script and it shows one item ok-ish. The problem with this is that it would function with the script. For example it shows the item now but I cant add it to cart anything.
  3. Lastly, I looked inside the JS file and I found the section with the app variable which seems to have the details for the items included in the example. I changed those but nothing shows...

So I tried some basic stuff. If anybody can help me with this by the end of the weekend it would be great !

Share this post


Link to post
Share on other sites

You'll need to figure out exactly why it's not working. Open your browser's developer tools and use those to help. The console will display any Javascript errors. The network tab should show any requests that end up in a 404 or otherwise can't be loaded, they will usually be listed in red. You won't be able to fix it if you don't know what the problem is.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...