I am not able to embed my Shopify App

Highlighted
Tourist
11 0 1

I have made a Shopify app, it is a sales channel... now I want to embed the app, but the app always shows in a new browser window.

 

This is what I have done: From Shopify Partners Account, I have gone to the App's Extension and made it embedded:

 

hoomanbahreini_0-1596437282059.png

 

Now when user installs the app, I redirect the users to the oAuth page... if user accepts the app is installed. 

 

Next time user logs in to the app, I return the following code (C#, ASP.NET MVC):

 

 

public ActionResult Handshake(string shop)
{
    return View("Test"); // test view
}

 

 

I have tried returning both of the following content in the Test view:

1. a complete HTML page:

 

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width" />
    <title>Test</title>
    <link rel="stylesheet" href="https://sdks.shopifycdn.com/polaris/3.21.1/polaris.min.css" />
</head>
<body>
    <div class="Polaris-Page">
        <div class="Polaris-Page__Header">
            <h1 class="Polaris-DisplayText Polaris-DisplayText--sizeLarge">Settings</h1>
        </div>
        <div class="Polaris-Page__Content">
            <p>Page Content</p>
        </div>
    </div>
</body>
</html>

 

2. Just a div which contains my app

 

    <div class="Polaris-Page">
        <div class="Polaris-Page__Header">
            <h1 class="Polaris-DisplayText Polaris-DisplayText--sizeLarge">Settings</h1>
        </div>
        <div class="Polaris-Page__Content">
            <p>Page Content</p>
        </div>
    </div>

 

 

But the HTML that I return never gets embedded in Shopify Admin page... It always appear in a new tab.

hoomanbahreini_0-1596439091956.png

How can I embed this app?

 

 

0 Likes