April 6, 2020
#16 Products Multi Filters | Max and Min Price | Ajax Price Range | E-Commerce website with Laravel

#16 Products Multi Filters | Max and Min Price | Ajax Price Range | E-Commerce website with Laravel


okay friends in this video you will see we
have set category price range and click on find you will see crimes in product
but here is bug if someone don’t click on price range click on find then we
have a error let me show you console reload select any category don’t select
any price click on find you have a error because in controller I have set price
equal to not empty that is wrong because price are ready so for that we have to
setup a query according to our array just connect oldest thing okay just mend all first of all let me
show you but I want to say we have to say count request price you know if
someone click on category don’t click here you will see zeros okay we are
getting again first you have to commend this also don’t select any license just
you if I select any price Jimmy see this hair is one that’s we have to figure out
so I will say price counter and here you can use this if right not equal to zero then we can use this
type of because without this we getting error
okay let me comment this again all of this okay
after this else if get ID not equal to zero that means we have a cap is
selected that correct category drop down list select my user please get ID and vice count also it complete zero then we
will take equal both are selected and rest else we will take nothing else
selector and here you can see nice it’s selected save it read out your page nothing is like selecting your category
cat is selected and select price Prices like that if I select the words we need
to set both category not then we will say we load again select fruit select
Friday’s prices selector actually there should we both hands and price count reload only fries left
private sector that’s fine soups left cat is like that okay when yes should we
both are selected and that means we have to put this all this all up here you can
do it no problem else but do not assess ok DeLoach nothing is like root right
strains okay fourth unselected now unselect for your price scattered slept
on unselect here get select only price okay everything is good now now here you
have both selector then you can do it this type of openness and page there
just remove this and will comment this you can copy this queries when both are
selected okay where is both our selector here is your both elected that’s it now
time to only get finally selected where is category selected that’s fine when
price this only selector – is price only selected that’s it
oh you can put here also save it okay now time to when nothing is selected so
you can say this one s but yeah you can say nothing else rector’s you say h1 just copy this and change the message
according to your vet we don’t hate this okay knob for deck explain the message
please select at least one folder save it we need to display our kata just copy
this and paste here that’s fine now we have everything set put to reload
hopefully we will get a desirable result respect and Ament
3 not select category fine okay we have response message inspector
okay I think I’ll move line number one retain that means I have
removed some I am eeriest – okay save it the load click on
please select at least one filter okay undefined data that is because we are
getting that type of okay we will figure out this network three dot slight fruit
rice rings and nothing in this by change unselect price is fruit now you can see
to Mary table without price here is variable let me check with price same
result we have okay if I select wrong combination no product or is it a now
select sweet okay no price range in this okay here is 100 to 300
here is our sweets now unselect to your price find we are getting all of data route select any continuation no product
range in 500 to 1000 unselect price range and you are getting all of fruit
now filter it target to 200 then select 1 to 30 okay that’s fine
this is reality okay guys I think that’s it for now see
in the next video thank you

5 thoughts on “#16 Products Multi Filters | Max and Min Price | Ajax Price Range | E-Commerce website with Laravel

  1. why I use "$priceCount =count( $request->price);"
    it shows an error "count(): Parameter must be an array or an object that implements Countable".

  2. Just realized that we are fetching the results by cat_id and when you click on "add to cart" it's also fetching cat_id only therefore we can not add to cart the items we want. How we can solve this issue ? Thanks.

  3. hello, sir thank you so much for your time and the wonderful job you are doing keep it up bless up. but sir i have some issue I am using laravel 5.7 and php 7.2.4 but in the product controller when i add
    ✅$priceCount = count($request->price); i have some error in the frontend like this…..❌.count(): Parameter must be an array or an object that implements Countable. so please i need your help if you could please tell me what is the error all about is my laravel version or my php version. and how to solve them thank you so much.

Leave a Reply

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