URL Parameters in LIQUID?

Highlighted
Shopify Partner
59 0 6

Ok so I have read a few threads, this one for example ( https://ecommerce.shopify.com/c/shopify-discussion/t/pass-variables-to-liquid-template-via-url-32784 ) which say it is not possible to capture a URL param using LIQUID.  However that thread is 4 years old... 

I am creating a custom SEARCH for a client which will utilize custom metafields to display products. I would like to perform this by passing a parameter to page. like ?param=keyword 

Any help?

3 Likes
Shopify Partner
59 0 6

One thing I forgot to add. I can obviously get the URL Parameter using JavaScript, but that does nothing for me. I need to be able to use the information on SERVER-SIDE (i.e. LIQUID). Help please :-)

0 Likes
Shopify Partner
59 0 6

Any Ideas? Totally stumped on this one...

0 Likes
Shopify Staff
Shopify Staff
5704 0 284

You can't pass a parameter and read it in the Liquid, no. You cannot read the URL in Liquid.

Caroline from http://11heavens.com ∴ mllegeorgesand AT gmail DOT com
0 Likes
Shopify Staff
Shopify Staff
5704 0 284

You could build an app using Application Proxies: http://docs.shopify.com/api/tutorials/application-proxies

Caroline from http://11heavens.com ∴ mllegeorgesand AT gmail DOT com
0 Likes
Shopify Partner
59 0 6

Caroline,

Well that is definitely bad news. I am aware of Application Proxies, I have create a few apps actually. However I do not see how an Application proxy would help me here.

I am attempting to allow end-users (store customers) the option to search for products based on a set of customized criteria. 

 

Thanks though. I will try to come up with a solution.

0 Likes
Shopify Staff
Shopify Staff
5704 0 284

Hi Charles,

I have added your email address to this feature request — Expose current URL in Liquid, so you will receive an email when this feature is implemented, automatically.

Caroline from http://11heavens.com ∴ mllegeorgesand AT gmail DOT com
2 Likes
Shopify Partner
59 0 6

Caroline,

Perfect. Thanks a ton...  Kind of curious how this post is related to what I am trying to accomplish https://ecommerce.shopify.com/c/ecommerce-design/t/new-querystring-app-in-beta-59193 ;

Thanks again for your insight.

0 Likes
Shopify Staff
Shopify Staff
5704 0 284

You're welcome, Charles!

Kind of curious how this post is related to what I am trying to accomplish

With a Proxy App: http://api.shopify.com/app_proxy.html you can pass parameters to a URL that is using the same domain as the store front, then render content based on that. You would take care of producing search results based on passed parameters. 

Can you explain more what you are trying to do? 

Caroline from http://11heavens.com ∴ mllegeorgesand AT gmail DOT com
0 Likes
Shopify Partner
5 0 0

hi 

is there any luck for this issue ?? help i have same issue 

 

0 Likes