Shopify Augmented Reality Open The AR Camera Mode Using QR Code

Intro

I’m looking to achieve opening the AR camera mode (on mobile) by scanning a QR code from the desktop website. QR codes require a URL which is where I’m struggling. There is no URL/href present in Shopify’s generated model-viewer elements.

Question

  1. Does anyone know if we can open this AR camera mode using a URL? I can see the ‘View in your space’ (on mobile) is a button and does not continue a href as such, and therefore must be a javascript-based trigger/function to open the AR camera mode.

  2. A long-winded solution I have thought of is on the desktop to have the QR image link to the webpage with a URL parameter. Then use JS to check if we are on mobile and if the URL contains the parameter we want, then trigger the button click to the original ‘View in your space’ AR button provided by the model-viewer. This will open it.

As a side note

I have noticed problems with the AR camera mode not opening for mobile browsers like chrome and brave.

Any help is much appreciated.

Thanks in advance!

Leave a Comment