Open senakokozpazar opened 2 months ago
While fetching products you can specify product list by using query parameters:
[x] category: you can limit products by sending category
category
[x] if client select a category it should navigate to shop/:gender/:categoryName/:categoryId sample: shop/kadin/tisort/2
shop/:gender/:categoryName/:categoryId
shop/kadin/tisort/2
[x] on shop page it should get categoryId from URL parameters
categoryId
[x] on categoryId state change it should create a get request to products?category=2
products?category=2
[x] sort: products can be sorted by the select component on shop page
sort
[x] select component should list values of "price:asc", "price:desc" , "rating:asc", "rating:desc"
"price:asc", "price:desc" , "rating:asc", "rating:desc"
[x] if client select a sort option and click filter the value should be hold on the sort state
[x] on sort state change it should create a get request to products?sort=price:desc
products?sort=price:desc
[x] filter: on Shop page products can be filtered by an Input beside sort select component
filter
[x] if client text in filter input it should be hold in the filter state
[x] on filter state change it should create a get request to products?filter={CLIENT_INPUT}
products?filter={CLIENT_INPUT}
REMARKABLE POINTS!
[x] If one of the parameters category, filter, sort is changed, a new GET request should be sent and products on the page should be reloaded!
category, filter, sort
GET
[x] If one of the parameters category, filter, sort is changed, other parameters should be kept!
Sample Case:
first on category selected it should create a GET request to products?category=2
Then filter text entered as "siyah" it should create a GET request to products?category=2&filter=siyah
products?category=2&filter=siyah
and then sort is selected as "price:desc" it should create a GET request to products?category=2&filter=siyah&sort=price:desc
products?category=2&filter=siyah&sort=price:desc
While fetching products you can specify product list by using query parameters:
[x]
category
: you can limit products by sending category[x] if client select a category it should navigate to
shop/:gender/:categoryName/:categoryId
sample:shop/kadin/tisort/2
[x] on shop page it should get
categoryId
from URL parameters[x] on
categoryId
state change it should create a get request toproducts?category=2
[x]
sort
: products can be sorted by the select component on shop page[x] select component should list values of
"price:asc", "price:desc" , "rating:asc", "rating:desc"
[x] if client select a sort option and click filter the value should be hold on the
sort
state[x] on
sort
state change it should create a get request toproducts?sort=price:desc
[x]
filter
: on Shop page products can be filtered by an Input beside sort select component[x] if client text in filter input it should be hold in the
filter
state[x] on
filter
state change it should create a get request toproducts?filter={CLIENT_INPUT}
REMARKABLE POINTS!
[x] If one of the parameters
category, filter, sort
is changed, a newGET
request should be sent and products on the page should be reloaded![x] If one of the parameters
category, filter, sort
is changed, other parameters should be kept!Sample Case:
first on category selected it should create a
GET
request toproducts?category=2
Then filter text entered as "siyah" it should create a
GET
request toproducts?category=2&filter=siyah
and then sort is selected as "price:desc" it should create a
GET
request toproducts?category=2&filter=siyah&sort=price:desc