How to assign URL passed parameter to liquid variables?

Zahoor_Zarri
Visitor
3 0 0

Hi, I have a page which shows 3 dropdown where user can select values for width, aspect ratio and diameter. These 3 values are actually products Mete fields. These selected correctly and passed to the URL, I can assed them on next page that is collection named "all" page using JavaScript code. But I want to assign these values to liquid variables. here are details:
1. Function that redirect to collection named as "all" with correct parameters is:
Screenshot_74.png

 

2. URL (suppose I select 100,200 and 300 respectively)
https://aqs-testing.myshopify.com/collections/all?width=100&aspect_ratio=200&diameter=300

(Password: admin)

3. Code to display passed values on collection page using JavaScript
Screenshot_75.png

 Here values are displayed correctly.
Screenshot_76.png

 

When I assign using following method, values are assigned and printed but not those which are passed from parameter, it prints those values which were passed  at first time.Screenshot_77.png

Zarri
Replies 0 (0)