Skip to content

Commit

Permalink
Merge pull request #58 from SandeshGC/price-formatting
Browse files Browse the repository at this point in the history
Changed Price formatting
  • Loading branch information
Ankit-11525 committed Oct 4, 2022
2 parents 710bb65 + c0a362b commit 165c5a0
Show file tree
Hide file tree
Showing 7 changed files with 68 additions and 108 deletions.
29 changes: 7 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,28 +152,21 @@ git push -u origin <your_branch_name>
<sub><b>Rohit Tewari</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/SandeshGC">
<img src="https://avatars.githubusercontent.com/u/59115123?v=4" width="100;" alt="SandeshGC"/>
<br />
<sub><b>Sandesh GC</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/nishtha53">
<img src="https://avatars.githubusercontent.com/u/68805896?v=4" width="100;" alt="nishtha53"/>
<br />
<sub><b>Nishtha53</b></sub>
</a>
</td></tr>
<tr>
</td>
<td align="center">
<a href="https://github.com/minhaj-313">
<img src="https://avatars.githubusercontent.com/u/107562768?v=4" width="100;" alt="minhaj-313"/>
<br />
<sub><b>Shaikh Minhaj</b></sub>
</a>
</td>
</td></tr>
<tr>
<td align="center">
<a href="https://github.com/Mohasin-Haque">
<img src="https://avatars.githubusercontent.com/u/72180173?v=4" width="100;" alt="Mohasin-Haque"/>
Expand All @@ -189,17 +182,10 @@ git push -u origin <your_branch_name>
</a>
</td>
<td align="center">
<a href="https://github.com/Praphulla-Mishra">
<img src="https://avatars.githubusercontent.com/u/79088582?v=4" width="100;" alt="Praphulla-Mishra"/>
<br />
<sub><b>Praphulla Mishra</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/SM8UTI">
<img src="https://avatars.githubusercontent.com/u/56423859?v=4" width="100;" alt="SM8UTI"/>
<a href="https://github.com/SandeshGC">
<img src="https://avatars.githubusercontent.com/u/59115123?v=4" width="100;" alt="SandeshGC"/>
<br />
<sub><b>Smruti Ranjan Nayak</b></sub>
<sub><b>Sandesh GC</b></sub>
</a>
</td>
<td align="center">
Expand All @@ -208,8 +194,7 @@ git push -u origin <your_branch_name>
<br />
<sub><b>Sumit Kumar</b></sub>
</a>
</td></tr>
<tr>
</td>
<td align="center">
<a href="https://github.com/aaheli8">
<img src="https://avatars.githubusercontent.com/u/66815283?v=4" width="100;" alt="aaheli8"/>
Expand Down
4 changes: 2 additions & 2 deletions account.html
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
<input type="text" placeholder="Username">
<input type="password" placeholder="Password">
<button type="submit" class="btn">Login</button>
<a href="">Forgot Password</a>
<a href="">Forgot Password ?</a>
</form>
<form id="RegForm">
<input type="text" placeholder="Username">
Expand Down Expand Up @@ -112,7 +112,7 @@ <h3>Follow Us</h3>
</div>
<hr>
<p class="copyright">Copyright &copy
<script type="text/javascript"> document.write(new Date().getFullYear());</script>-RedStore
<script type="text/javascript"> document.write(new Date().getFullYear());</script> - RedStore
</p>
</div>
</div>
Expand Down
32 changes: 16 additions & 16 deletions allproducts.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,13 @@

<div class="small-container">
<div class="row row-2" data-aos="fade-up">
<h2>All Products</h2>
<h2>Our Products</h2>
<select>
<option>Default Shorting</option>
<option>Default Sorting</option>
<option>Sort By Price</option>
<option>Sort By Popularity</option>
<option>Sort By Rating</option>
<option>Sort By Sale</option>
<option>Sort By Sales</option>
</select>

</div>
Expand All @@ -73,7 +73,7 @@ <h4>Red Printed T-Shirt</h4>
<i class="fa fa-star"></i>
<i class="fa fa-star-o"></i>
</div>
<p> 50 Rs.</p>
<p>Rs. 450</p>
</div>
<div class="col-4" data-aos="fade-up">
<img src="images/product-2.jpg">
Expand All @@ -86,7 +86,7 @@ <h4>HRX- Shoes</h4>
<i class="fa fa-star-o"></i>
<i class="fa fa-star-o"></i>
</div>
<p> 600 Rs.</p>
<p>Rs. 600</p>
</div>
<div class="col-4" data-aos="fade-up">
<img src="images/product-3.jpg">
Expand All @@ -99,7 +99,7 @@ <h4>Grry Jogger</h4>
<i class="fa fa-star"></i>
<i class="fa fa-star-half-o"></i>
</div>
<p> 950 Rs.</p>
<p>Rs. 950</p>
</div>
<div class="col-4" data-aos="fade-up">
<img src="images/product-4.jpg">
Expand All @@ -112,7 +112,7 @@ <h4>Navy Blue Puma Tshirt</h4>
<i class="fa fa-star-half-o"></i>
<i class="fa fa-star-o"></i>
</div>
<p> 250 Rs.</p>
<p>Rs. 250</p>
</div>
</div>
<div class="row">
Expand All @@ -127,7 +127,7 @@ <h4>Jogging Shoes</h4>
<i class="fa fa-star"></i>
<i class="fa fa-star-o"></i>
</div>
<p> 750 Rs.</p>
<p>Rs. 750</p>
</div>
<div class="col-4" data-aos="fade-up">
<img src="images/product-6.jpg">
Expand All @@ -140,7 +140,7 @@ <h4>Puma tshirt</h4>
<i class="fa fa-star-o"></i>
<i class="fa fa-star-o"></i>
</div>
<p> 450 Rs.</p>
<p>Rs. 450</p>
</div>
<div class="col-4" data-aos="fade-up">
<img src="images/product-7.jpg">
Expand All @@ -153,7 +153,7 @@ <h4>Exclusive socks</h4>
<i class="fa fa-star"></i>
<i class="fa fa-star-half-o"></i>
</div>
<p> 50 Rs.</p>
<p>Rs. 50</p>
</div>
<div class="col-4" data-aos="fade-up">
<img src="images/product-8.jpg">
Expand All @@ -166,7 +166,7 @@ <h4>Wrist Watch</h4>
<i class="fa fa-star-half-o"></i>
<i class="fa fa-star-o"></i>
</div>
<p> 650 Rs.</p>
<p>Rs. 650</p>
</div>
</div>
<div class="row">
Expand All @@ -181,7 +181,7 @@ <h4>Wrist Watch</h4>
<i class="fa fa-star"></i>
<i class="fa fa-star-o"></i>
</div>
<p> 450 Rs.</p>
<p>Rs. 450</p>
</div>
<div class="col-4" data-aos="fade-up">
<img src="images/product-10.jpg">
Expand All @@ -194,7 +194,7 @@ <h4>Black Ranger shoes</h4>
<i class="fa fa-star-o"></i>
<i class="fa fa-star-o"></i>
</div>
<p> 850 Rs.</p>
<p>Rs. 850</p>
</div>
<div class="col-4" data-aos="fade-up">
<img src="images/product-11.jpg">
Expand All @@ -207,7 +207,7 @@ <h4>New style shoes</h4>
<i class="fa fa-star"></i>
<i class="fa fa-star-half-o"></i>
</div>
<p> 450 Rs.</p>
<p>Rs. 450</p>
</div>
<div class="col-4" data-aos="fade-up">
<img src="images/product-12.jpg">
Expand All @@ -220,7 +220,7 @@ <h4>Black jogger Puma</h4>
<i class="fa fa-star-half-o"></i>
<i class="fa fa-star-o"></i>
</div>
<p> 550 Rs.</p>
<p>Rs. 550</p>
</div>
</div>
<div class="page-btn">
Expand Down Expand Up @@ -271,7 +271,7 @@ <h3>Follow Us</h3>
</div>
<hr>
<p class="copyright">Copyright &copy
<script type="text/javascript"> document.write(new Date().getFullYear());</script>-RedStore
<script type="text/javascript"> document.write(new Date().getFullYear());</script> - RedStore
</p>
</div>
</div>
Expand Down
10 changes: 5 additions & 5 deletions cart.html
Original file line number Diff line number Diff line change
Expand Up @@ -216,23 +216,23 @@ <h3>Follow Us</h3>

// Insert a cell at the end of the row
let newCell = newRow.insertCell();
newCell.innerHTML = `<div class='cartinfo' data-aos='fade-up'><img src='${item.img}' /><div><p>${item.productName}</p><small>Price: ${item.productPrice} Rs.</small><br /><span class="remove-btn" id="remove-${id}" onclick="removeItem()">Remove</span></div></div>`;
newCell.innerHTML = `<div class='cartinfo' data-aos='fade-up'><img src='${item.img}' /><div><p>${item.productName}</p><small>Price: Rs. ${item.productPrice}</small><br /><span class="remove-btn" id="remove-${id}" onclick="removeItem()">Remove</span></div></div>`;

newCell = newRow.insertCell();
newCell.innerHTML += `<input type='number' value='${item.productQuantity}' data-aos="fade-up" onchange="updateQty(this)" id="updateQty-${id}" min="1"/>`;

newCell = newRow.insertCell();
newCell.innerHTML += `<div data-aos="fade-up">${item.productPrice * item.productQuantity} Rs.</div>`;
newCell.innerHTML += `<div data-aos="fade-up">Rs. ${item.productPrice * item.productQuantity}</div>`;
subTotal += item.productPrice * item.productQuantity;
});

document.getElementById(
"subtotal-section"
).innerHTML = `<table><tr><td>Subtotal</td><td>${subTotal} Rs.</td></tr><tr><td>GST</td><td>${Number(
).innerHTML = `<table><tr><td>Subtotal</td><td>Rs. ${subTotal}</td></tr><tr><td>GST</td><td>Rs. ${Number(
(subTotal / 7.78).toFixed(2)
)} Rs.</td></tr><tr><td>Total</td><td>${Number(
)}</td></tr><tr><td>Total</td><td>Rs. ${Number(
(subTotal + subTotal / 7.78).toFixed(2)
)} Rs.</td></tr></table>`;
)}</td></tr></table>`;
}
renderItemsAndCosts(); //rendering the cart items and the costs initially
// to remove the row of item
Expand Down
32 changes: 16 additions & 16 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@
<li><a href="">About</a></li>
<li><a href="contact.html">Contact</a></li>
<li><a href="account.html">Account</a></li>
<a href="cart.html" class="cart-hover">
<img src="images/cart.png" width="30px" height="30px">
</a>
</ul>
</nav>
<a href="cart.html" class="cart-hover">
<img src="images/cart.png" width="30px" height="30px">
</a>

<img src="images/menu.png" class="menu-icon" onclick="menutoggle()">

Expand Down Expand Up @@ -102,7 +102,7 @@ <h4>Red Printed T-Shirt</h4>
<i class="fa fa-star"></i>
<i class="fa fa-star-o"></i>
</div>
<p> 500 Rs.</p>
<p>Rs. 500</p>
</div>
</div>
<div class="col-4" data-aos="fade-up">
Expand All @@ -117,7 +117,7 @@ <h4>HRX- Shoes</h4>
<i class="fa fa-star-o"></i>
<i class="fa fa-star-o"></i>
</div>
<p> 600 Rs.</p>
<p>Rs. 600</p>
</div>
</div>
<div class="col-4" data-aos="fade-up">
Expand All @@ -132,7 +132,7 @@ <h4>Grey Jogger</h4>
<i class="fa fa-star"></i>
<i class="fa fa-star-half-o"></i>
</div>
<p> 950 Rs.</p>
<p>Rs. 950</p>
</div>
</div>
<div class="col-4" data-aos="fade-up">
Expand All @@ -147,7 +147,7 @@ <h4>Navy Blue Puma Tshirt</h4>
<i class="fa fa-star-half-o"></i>
<i class="fa fa-star-o"></i>
</div>
<p> 250 Rs.</p>
<p>Rs. 250</p>
</div>
</div>
</div>
Expand All @@ -167,7 +167,7 @@ <h4>Jogging Shoes</h4>
<i class="fa fa-star"></i>
<i class="fa fa-star-o"></i>
</div>
<p> 750 Rs.</p>
<p>Rs. 750</p>
</div>
</div>
<div class="col-4" data-aos="fade-up">
Expand All @@ -182,7 +182,7 @@ <h4>Puma tshirt</h4>
<i class="fa fa-star-o"></i>
<i class="fa fa-star-o"></i>
</div>
<p> 450 Rs.</p>
<p>Rs. 450</p>
</div>
</div>
<div class="col-4" data-aos="fade-up">
Expand All @@ -197,7 +197,7 @@ <h4>Exclusive socks</h4>
<i class="fa fa-star"></i>
<i class="fa fa-star-half-o"></i>
</div>
<p> 50 Rs.</p>
<p>Rs. 50</p>
</div>
</div>
<div class="col-4" data-aos="fade-up">
Expand All @@ -212,7 +212,7 @@ <h4>Wrist Watch</h4>
<i class="fa fa-star-half-o"></i>
<i class="fa fa-star-o"></i>
</div>
<p> 650 Rs.</p>
<p>Rs. 650</p>
</div>
</div>
</div>
Expand All @@ -229,7 +229,7 @@ <h4>Wrist Watch</h4>
<i class="fa fa-star"></i>
<i class="fa fa-star-o"></i>
</div>
<p> 450 Rs.</p>
<p>Rs. 450</p>
</div>
</div>
<div class="col-4" data-aos="fade-up">
Expand All @@ -244,7 +244,7 @@ <h4>Black Ranger shoes</h4>
<i class="fa fa-star-o"></i>
<i class="fa fa-star-o"></i>
</div>
<p> 850 Rs.</p>
<p>Rs. 850</p>
</div>
</div>
<div class="col-4" data-aos="fade-up">
Expand All @@ -259,7 +259,7 @@ <h4>New style shoes</h4>
<i class="fa fa-star"></i>
<i class="fa fa-star-half-o"></i>
</div>
<p> 450 Rs.</p>
<p>Rs. 450</p>
</div>
</div>
<div class="col-4" data-aos="fade-up">
Expand All @@ -274,7 +274,7 @@ <h4>Black jogger Puma</h4>
<i class="fa fa-star-half-o"></i>
<i class="fa fa-star-o"></i>
</div>
<p> 550 Rs.</p>
<p>Rs. 550</p>
</div>
</div>
</div>
Expand Down Expand Up @@ -441,4 +441,4 @@ <h3>Follow Us</h3>
</script>
</body>

</html>
</html>

0 comments on commit 165c5a0

Please sign in to comment.