JCart : Customer Registration

To facilitate new customer registration we will provide a new Registration form where customer provide his details and register with our system. Let us implement the back-end customer service operations. public interface CustomerRepository extends JpaRepository<Customer, Integer>{ Customer findByEmail(String email); } @Service @Transactional public class CustomerService { @Autowired CustomerRepository customerRepository; public Customer getCustomerByEmail(String email) { return […]

Read More

JCart : Customer Login

So far we have implemented the functionality where customers can browse the categories, add products to cart, view Cart and update/remove items. But to checkout the cart the customer should login into the system. So if the customer is not yet loggedin we should redirect customer to login page. If customer is already registered with […]

Read More

JCart : Iteration -6

In this Iteration-6 we will be implementing the Customer Login/Register and placing the orders. As per of this we will implement the following usecases: Customer Login Customer Registration Billing & Delivery Page Create Order Order Confirmation Page Send Order Confirmation Email

Read More

JCart : View Cart

In our earlier post we have implemented Add To Cart functionality. In this post we will implement showing the Cart Item details. In out mainLayout.html header we have ShoppingCart icon showing the cart item count as follows: <div class=”shopping-item”> <a href=”#” th:href=”@{/cart}”>Cart <i class=”fa fa-shopping-cart”></i> <span id=”cart-item-count” class=”product-count”>(0)</span></a> </div> When customer clicks on Cart icon […]

Read More

JCart : ShoppingCart Add Item To Cart

In our HomePage/CategoryPage/ProductPage we have a button Add To Cart as follows: <a class=”add_to_cart_button” data-quantity=”1″ data-product_sku=”” data-product_id=”70″ rel=”nofollow” href=”#” th:onclick=”‘javascript:addItemToCart(\” + ${product.sku} + ‘\’);'”>Add to cart</a> When customer clicks on Add To Cart button it will trigger addItemToCart(sku) JavaScript function passing the product SKU value. Now create jcart-site/src/main/resources/static/assets/js/app.js and implement addItemToCart(sku) function as follows: function addItemToCart(sku) […]

Read More