April 5, 2020
#24 Install Shopping Cart Package | E-Commerce Website in Laravel 5.5 and Ajax

#24 Install Shopping Cart Package | E-Commerce Website in Laravel 5.5 and Ajax


okay in this video we will cover cart functionality with Laravel we can use any library for shopping cart but I
recommend you use this library is very very good I using this from last year
for this let me install this with composer go to tzer’s CMD or terminal
and run this grant it will install everything and it’s working very fine
with but in any version laravel five point five five point four five and
three I don’t know five hunt – okay afternoon stalling we have to add this
lines our contributor F dot d s okay in the last four provide providers we will
put here we have second alliance you will put simply the last here and is
used as you can see is simple size with parameters and price quantity and your
product name has your product code anything you can use like this I will
show you and demo let me see is completed okay is running right now for
that we need car controller also okay now let him complete it
we will create here cut controller mmm after this because we need it
PHP RP son make controller at unto Allah okay
controller crater successfully let me try this as a demo purpose just close
this open your route add a new route as get test ok yes here you will put
function simply and inside this route you just add this ok and if you want to
see this output you will make a new route with name of anything I will put
it cut and function will output your card content so card content will return
as a array here it’s got content okay that’s nice go to website here here you
will put only test it will be blank because we are nothing to show here just
add it cut and you can see what we had add here if you can see quantity 1 if I
add same product to time it will quantity simply plus let me show you
test again and here is cut quantity to it one more thing I want to show route
at Hotel total your car product we need this parameter when we start our
programming about so here is rock hotel I simply put here
total and here is 24 now you can see our car nine nine ninety and text added to
time because we have a to country now if you want to seek subtotal you will make
here subtotal let me show you route at subtotal function here it gets returned
your cart subtotal this will be tau X be Lord okay we have a error here okay
semicolon Lord here is 19.9 eight because you have
a two products in cut try with 9.99 that’s it that we will add our cut now
let me copy this close this browser open again put here cut will be drilled okay
but when session will close your card will be empty so let me check this one wait a minute okay recording is working
I want to show you destroy a message to remove that okay here is it will be put
ID some ID okay we will get that ids okay
is content for content let me show you some remove yet remove and here your
function yeah now let me reload and add here we move
up does not contain this ID because is custom IDs you have to get ID from your
actual card okay so do not worry you don’t need this type of function here
just remove it go to actual coding products here we have it here anchor tag
if I click here it will go to next page and update our value in cart okay so for
that go to your resources view crunch your products okay here you have a
anchor tag yes I think this one here you will put here URL and part add let me
check info tag is okay yes it’s working here you will put I be also bitch ID I
be coming from your loop here e I do reload
if I see your URL is card / add and 5 so this type of
route you need here you can make anywhere here I will create cut so route
get up first of all we will define card controller cut controller index okay you
need go to your card controller and here is create a index function of click
function index and simply return your card content the pulses index I’m sure
that’s why we need this if I click on card simply it will return ok here is
you need to use that library actually you can see let me try if card its mark okay it’s working here is your card
contact okay up to this you will create here probably function free function add
item and it contains some IP of product and return just ID that’s it in your web
don’t PHP here you will put new route for add item but your URL will be slash
add and here ID okay simply cut controller your function f at
it that’s it now if I go to products and click on any button of God it will give
me Product ID now next thing we need information your information about
products so for that let me say it done product
information here you will put AB products and here just click on products
if you put here all function it will return all function ok but we need only
this ID so you will put here a fine and ID reload here is your ID now go to
again your products click on any randomly here is your new product we
need to add this product in our cart our cart is still dummy content we need
actual robots okay so this scenario we will cover in the next video for this
video that’s it if you have any reaction any issue please comment below if you
liked this video hit the like button thank you

6 thoughts on “#24 Install Shopping Cart Package | E-Commerce Website in Laravel 5.5 and Ajax

  1. Route::get('cart',function (){

    return Cart::content();

    });

    Call to undefined method DarryldecodeCartCart::content()

Leave a Reply

Your email address will not be published. Required fields are marked *