Online Restaurant Website Part 38 Payment Method
Hi, Dear's here we learn how to implement "Pizza Restaurant Drink" Website in Visual Studio using C# ASP.NET MVC. Ilyasoft software company provide full project step by step training on our YouTube Channel ilyasoft software company so now subscribe, share and like for more project base tutorials
In this video we are going to implement Shopping Cart Payment tab for more details click here: watch vedio
First we are going to open project , then go to order controller:
Open ViewCart action view and create payment tab inside tab section. code below
> Add in ViewCart View:
// tab header code
<li class="nav-item"><a class="nav-link" href="#tab-payment" data-toggle="tab"><span>3</span>payment method</a></li>
// payment method tab detail code
<div class="tab-pane col-md-12 col-12" id="tab-payment">
<div class="form-horizontal">
<fieldset>
<div class="form-group ">
<ul class="list-inline text-center link">
<li class="list-inline-item">
<a href="#"><img src="~/Content/Template/assets/images/shop/visacard.png" alt="visa" title="visa" class="img-fluid"></a>
</li>
<li class="list-inline-item">
<a href="#"><img src="~/Content/Template/assets/images/shop/master.png" alt="master" title="master" class="img-fluid"></a>
</li>
<li class="list-inline-item">
<a href="#"><img src="~/Content/Template/assets/images/shop/discovers.png" alt="discover" title="discover" class="img-fluid"></a>
</li>
<li class="list-inline-item">
<a href="#"><img src="~/Content/Template/assets/images/shop/pay.png" alt="paypal" title="paypal" class="img-fluid"></a>
</li>
</ul>
</div>
<div class="form-group row">
<div class="col-sm-12">
<input class="form-control" id="input-card" placeholder="Card Holder Name" value="" name="holder" type="text">
</div>
</div>
<div class="form-group row">
<div class="col-sm-12">
<input class="form-control" id="input-expiry" placeholder="Card Number" value="" name="card" type="text">
</div>
</div>
<div class="form-group row">
<label>Expiry Date</label>
<div class="col-sm-4">
<input class="form-control" placeholder="Month" value="" name="month" type="text">
</div>
<div class="col-sm-4">
<input class="form-control" placeholder="Year" value="" name="Year" type="text">
</div>
<div class="col-sm-4">
<input class="form-control" id="input-cvv" placeholder="cvv" value="" name="cvv" type="text">
</div>
</div>
<div class="form-group row">
<div class="col-sm-12">
<hr class="bg-dark" />
</div>
<div class="col-sm-12">
<label>
@Html.CheckBoxFor(x => x.CashOnDelivery) Cash on Delivery (COD)
</label>
</div>
<div class="col-sm-12">
<hr class="bg-dark" />
</div>
</div>
<div class="form-group row">
<div class="col-md-12 col-12 text-center">
<div class="buttons">
<a href="#tab-cart" data-toggle="tab" class="btn btn-theme btn-md btn-wide">Shopping Cart</a>
<button type="submit" class="btn btn-theme btn-md btn-wide">Place Order</button>
</div>
</div>
</div>
</fieldset>
</div>
</div>
Next go to module folder and open ShoppingCartMV model and add CashOnDelivery field.
this field is actually use for when customer order payment on order deliverey then customer use check CashOnDelivery check box.
> ShoppingCartMV Model :
public bool CashOnDelivery { get; set; } = true;
> Run Application,
Comments
Post a Comment