App reviews, troubleshooting, and recommendations
Dear Support,
I trust this message finds you well.
I have successfully developed a Shopify app using core PHP. However, I am encountering an issue while running the install.php file—I am unable to retrieve the Shopify shop name.
Here is the code snippet I am currently using:
<?php
$dotenv = parse_ini_file('.env');
$shop = $_GET['shop'];
$api_key = $dotenv['API_KEY'];
$scopes = "read_orders,write_products,read_themes,write_themes";
$redirect_uri = $dotenv['REDIRECT_URI'];
// Build install/approval URL to redirect to
$install_url = "https://" . $shop . ".myshopify.com/admin/oauth/authorize?client_id=" . $api_key . "&scope=" . $scopes . "&redirect_uri=" . urlencode($redirect_uri);
// Redirect
header("Location: " . $install_url);
die();
While manually adding the shop name statically functions as expected, I am seeking guidance on dynamically obtaining the shop name. Could you kindly advise me on the appropriate approach to achieve this?
Thank you for your assistance.
Discover how to increase customer engagement on your store with articles from Shopify A...
By Jacqui Apr 23, 2025Hey Community 👋 Did you know that March 15th is National Everything You Think Is W...
By JasonH Apr 1, 2025Discover how to increase the efficiency of commerce operations with Shopify Academy's l...
By Jacqui Mar 26, 2025