Hello, friend will come back, you know, previous video, we successfully removed our item from the
car, right?
So no one to do untoward for quantity options into this quantity area.
If you want to increase or decrease your quantity, you can decrease it.
And also, if you want to increase its quantity, then you can increase it.
So how can do that work?
In this video, I will show you that things with a live example.
So for doing this, first of all, we have to do we have to create two of these function.
One will be far increase, one that will be our bequeaths.
Right.
So go to our view.
That means in our app order into the airport or into the view area.
So here also we have to do have to define that as a logging.
So after this, I want to create another function.
So just name it as a locking ticket.
And here after this, I define that our function name as the increased card.
OK, just name it to the increase card and also will be increased with already request.
And also they have the product.
Right.
That means this idea will be needed for the reasons here.
I have defined another idea as a picture that is the primary key.
And after that we have to do we have to do the same things.
We have to get our items.
I just name it as an item and then our gate object get object after that means if you get this object,
will we get it?
And then it will be displayed that for the formula for and then I define our product that is from our
product model, we have to get it and then our ID.
I just simply define as it will be as it already existed.
Right.
So this will be just like the same concept.
Right.
So here we have already defined that part so that for the remote products also here we have to do we
have to increase this, our specific product for the regions here I load our model.
That means our product model.
And after that, we have to do we have to get our all the our object, all the data.
So I take one of the variable as in order.
OK, order curie's.
So I just simplified the curious and then our order and from the the order we have to define our objects
and the objects I want to do and filter it.
So to simply define the filter and filter will be our user or user will be our existing user.
So should we check it.
That is registered user and also we have to do we have to check our order.
That means our order is false or not.
That mhere I have defined as the ordered order and order will be as a false.
OK, so here I define as a false friend.
I think you already know about that concept.
That means with this we actually define our all the pending all the orders.
That means if we go to our order in the order you can see that our pending order, that means there
is totally uncompleted.
Right.
So when it will be completed that between our this product will be completely sold out, then it should
be make as a true.
That means.
All right.
So right now I just make our faults, all the data.
And then also we have to define the condition if this order is already exist.
So I just simply if this our order, that means our all the pending orders when it should be allowed
to exist.
OK, so you exist exist.
So here that if these as they exist, then we have to do we have to get this our order object.
Right.
So if you want to get it.
So I want to convert it with the order and then our D existing order, this existing order object and
define with the zero.
So I just simply get it on here.
That was Ojito position, right.
So all that our pending order, I get it in particular that area.
So now we have to do also we have to define our card.
Right.
So that is our card product will be needed.
So right now, I also want to get our all that card object.
So if you want to do that work after this.
After this, I just simply defined as if if our order and then the same concept as the order items,
order items, order items.
And then I want to define the filter.
So with this filter, it shall be check.
Our item is that's appropriate, semiretirement or not.
So that means our items will be the same item will be as item.
That means it shall be check out this order.
That means this order item.
And here this item, actually the Sami does not.
OK, so here it shall be.
First of all, check it with this item is equal to item.
And also here after that we have to define that exist.
So when this order will be same and Hwange to be as exist, then I want to do and to get our card.
I just take as an order item.
And here I define our card, our card class from the card.
Plus I have to define that objects and then our filter.
So I have to filter it.
And here we have to define the same concept.
It will be matching the item.
OK.
It should be matched with the item will be.
Well, two item, so here I just simply different item will be item, our user will be our requested
user user and also other than the our part just right there, the parties will be as a false.
So I just simply defined as a false and after that I already get our all that our order object to with
this.
So here I just simply pass it.
OK.
So now we have to do we have to define our object, this quantity.
So here at the front of the EHV, our order item, that means this order item.
OK, if this order item here is defined as our quantity when our freedoms are Phelim, I have defined
that is our quantity.
So here they just simply define our quantity field.
OK, what else should be quantity will be as a Katahdin equal.
So I just get an equal one.
So when it should be an identical one, then it will be updated, that quantity.
So I just simplified the order underscore item, this order item, quantity field.
So this order item, quantity field will be updated as a plus one.
OK.
That means a plus equal and then one, that means one quantity will be updated and it be one quantity
are better than I would done to save this or that item data.
So that is an order underscore item order item that time to save it.
To simply save after the save and also defines on the message.
So this message is I define the taggle as a infotech, so infotech, so into the info area here.
That will be the request.
And also here, if you want to display your message with the specific our D item name in this product
name, we can also defining it.
So if you to defining it, then you have to define as F and the F area here you have to declare your
item name.
So I define our item into the item that is our name.
Right.
So if you go to our model so you can see the regular card, that is our card item.
So you do the card like I want to define with our products into the product area.
So the product area, the result will name as a name right now and we do and actually access it as an
item name and then it shall be displayed as item name.
That means our product name and then quantity.
OK, quantity has been updated.
So this step up, one of the messages will be displayed and after that I want to return it.
So just simply refunders return redirect done the direct to our it will be returned redirect to our.
Maybe I just defined the card please.
OK.
So for the card I have already defined that our link that is in our app underscore order into the app
order and pass it to the card.
That means the card like a friend and else else.
What exactly we do.
Ls say just simply friends.
Ls it should we show the same message so that this type of one of the messages to the display.
So here at the front of the message in request our item name and we decide team name is shall be displayed
as a is not not in your card.
So this tape of one of the messages that we display and after that it will be redacted, attached to
our that means tweeners will be as empty, then it should be left to our home page, OK?
So I just simply defend our home.
That means you our app underscores Undiscussable into the app shop.
Our home state is simply defined as a home, OK, and else.
So Ale's else will be filled another message.
So to simplify the messages and they find the Tagore's the info with this request, I want to pass some
of the text as a you OK, you don't, I don't have you don't have an active order that this type of
of the message should be displayed and also should be displayed in our home.
So just somebody defense redirect, redirect to our form that means or absorb into the apps of the home,
which should be to specific this home base.
Perfect.
So that's all for our increase.
And also we have to do we have to create another one for the decrease.
OK, so better after this.
After this.
I wanted to create another function on Allsorts will be as a logging we could say just simply defend
the locking ticket and concept will be just like that.
Same here I define as a decrease OK, decrease car.
So this type of one of the functional to create also shall be request.
And here also you have to posit that our primary key and then here we have to do we have to define our
item just like that same concept here.
It will be as a gate object that means gas object or import zero four.
And with this here, we have to access our product model.
So our product model and also here should be matched with our product ID, with our tickets to tidy
that result.
OK, and then our I take one of the variable as the order and the same name as it is, OK, and here
we have to do we have to define our order model and from the order model objects will be needed and
then out the filter and the filter it and then our when our user will be user and user will be already
created user.
So I just simplified the requested user.
And then also here we have to define our order.
Right.
That is same as ordered or that will be a default.
So I just simply defined as false.
And then also here we have to define that with the condition our f our order underscore these queries
when it shall be as they exist.
So they told us just like the same concept, OK, that to will be as it existed then we have to do we
have to check it.
That means first of all, here we have to get all that or order data to the object area.
So I just simply different order and our order, all that queries, all the query time to take the things
with our zero objects.
We are just simply defining it.
And after that, I define that our F condition if our order and then our order item.
OK, all order items, that means the same things.
OK, there is on our order item that I want to learn to filter it Santa filter and the filter with our
item will be the same as item.
Right.
And then also here we have to define that as they existed or not.
So just simply the fact they exist.
So they exist.
Right.
And then we have to do we have to get our all that our card object data that here we have to defining
it.
So I just have the order underscore item, because if that's actually the same concept, actually,
what exactly would need on here?
So now we have to only updated our this condition.
OK, so that's all we have to do rather than everything will be there just like the same.
That just simply defines the order item and the order item area.
I define as a cart our with our cart model, the objects and then the filter and then filter with the
item.
Item will be as item and also user.
User will be our requested user requested user.
Right.
And also the purchase because the card if we check is actually patches and the patches, it should be
as a false site, as simply defined as a false.
And also here I want to pass out this object that is our other object data.
So I just simply pass it on here, OK?
And then we have to apply that condition in our quantity fields.
So just simply depends.
If our order underscore item with this order item, there is a quantity field, OK, that is a quantity
field.
When it will be there than one one, it will be as a greater than one, then it will be as old.
This order underscore item disorder I tell my own to do and to minus eight.
So that means with our order item well defined, that quantity or quantity will be minus so minus equal
to one.
So that is actually the condition we have to apply.
And after that the same, we have to define our said that our order item if I just simply say it, OK,
and after that one or two we say, I want to show some of the message.
So we might suggest I refer to the info tag.
I need the infotech area.
That will be the request.
And with the if that is the product name, I want the visible.
So if individual that product name would still be as the item and the desired amount says that name.
And then you should be sure as a quantity.
Sorry.
So quantity has been has been updated.
So this type of one of the message will be visible and then it should be also redone.
Sorry, we've done, we've done redirect so return redirect to our car base.
So here I also want to pass it in our app order into the app order that your card.
Right.
So I want to pass it on here and else.
So I not I'm not explaining it because of all that is actually the same concept.
Right.
So now here before we did that work, before we save it and now we are only updated about this quantitative
portion.
So that is a clear the I have just updated and ale's here.
I want to do when it shall be as a minus.
That percentage will be as a zero.
So here I want to do when it should be as a zero, then I want to remove this product from our discard
area.
OK, so here when it will be as a zero, that means it doesn't mean anything.
So it'll be a zero automatically.
Our D product I want to remove from what card.
OK, so for the reasons here I want to do into the LCD so it'll will be a minus.
Denisova as a showing, as a quantity has been updated and owners will be as a zero.
That means the ils into the if I another condition into the else area.
I want to do with this order and our order item.
OK, so with these other items I want to do one to remove it.
So I just simply remove so the remove and here also we remove our this order that means this order item.
So I just simply remove this, OK, and then I want to do unto to delete this hour this order item.
So I just simply want the order item.
So this order item will be deflected.
So I just simply leave another function and then all sorts of issues on the messages as a warning.
I just name it as a warning tag and then the request.
And here also if you want to show that product name, then you can defining it with the item and then
the name.
That means the item name.
And after that I define the item has been removed from your card.
So this type of of the message, it shall be displayed and after that it should be addicted to our copy.
OK, that means better.
What needs to be reduced, that this one should be elected in a terrible decade to over this same guard
base here to be addicted to our base, so I just simply give him the return and then redirect and redirect
in our app that see in our app and restore order into the app order is to be addicted to our card base.
So just simply defined as a card based government and then another they I want to define so that it
will be another Ailes and Ailes is, to be sure, some of the other message.
So I definitive the messages and then in full and then the request.
So I somebody find that request and then I want to do other displays on the messages that you don't
have an active order of active order.
So this step of one of the messages to display and then it should be the to our home base.
So I just have the return.
Sorry, return and then redirect and then it should be elected to our home.
That is in our app shop into the app shop.
It should be elected to our home base.
OK, government.
So that's all you have to do here.
I have updated our dysfunction, so that is our lucky good function.
So that is our decree's one and that is our Ingres one.
Right.
So now we have to we have to actually call it, we have to call it in our discard base area.
So better able to do and do continue this process.
And your next video will apply this link.
And we have to also create around the world for this one.
And then we have to add that you are in particular that button area so we can do that work.
You know, next video, I will show you that things with a live example.
So thanks for watching and I'll see you in the next video.