Open DamjanRI opened 4 years ago
@DamjanRI Is the path for autoload.php correct? I think it should be something like PHPShopify/vendor/autoload.php
(if PHPShopify is the folder where composer.json is present).
I have composer.json in PHPShopify folder and autoload in PHPShopify/vendor folder but still its not recognized! In main php file I have require_once('PHPShopify/vendor/autoload.php'), is this ok, is namespace or use required? object is created like this $config = array( 'ShopUrl' => $shop . ".myshopify.com", 'ApiKey' => $api_key, 'Password' => $shared_secret, );
$shopify = new ShopifySDK($config);
and it crashes on object creation $shopify = new ShopifySDK($config);
Where is your main file located? Is it inside "PHPShopify" folder?
No I have app folder where main.php is located then PHPShopify folder inside it like library
App\main.php App\PHPShopify \composer.json App\PHPShopify \vendor\autoload.php App\PHPShopify \vendor\phpclassic\php-shopify\ App\PHPShopify \vendor\phpclassic\php-shopify\lib*
require_once('PHPShopify/vendor/autoload.php');
$config = array(
'ShopUrl' => $shop . ".myshopify.com",
'ApiKey' => $api_key,
'Password' => $shared_secret,
);
$shopify = new PHPShopify\ShopifySDK($config);
I have install php-shopify with composer but it seems that autoload.php does not load files properly?
require_once('PHPShopify/autoload.php'); $config = array( 'ShopUrl' => $shop . ".myshopify.com", 'ApiKey' => $api_key, 'Password' => $shared_secret, );
$shopify = new ShopifySDK($config);