data structures - site link search box shopify
I want to include an input box on site A; after I type in the query and press Enter, open a new tab to display the search results of B. It would be as if I had typed the search query into B directly.
Set up a form to handle the search. Make it's action parameter the address of site B's search handler. Give it a target attribute of _blank
<form action="https://storeB.myshopify.com/search" method="GET" target="_blank"> <input name="q" type="text"> <input type="submit" value="Submit"> </form>
These are the basics. You can match the look of your current site by adapting the code from your theme. The code to look at may be in your theme's folders under templates/search.liquid.
Didn't find the answer?
Our community is visited by hundreds of Shopify development professionals every day. Ask your question and get a quick answer for free.
Find the answer in similar questions on our website.
Write quick answer
Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.