The settings below are related to the OpenCart App.
Installation #
- Go to the admin area of ParrotGPT, then go to Settings > Apps > OpenCart, and enter the License Key to install the app.
- Go to Settings > OpenCart and enter the OpenCart details. To get the Username and API key enter the admin area of OpenCart and go to System >Users > API. You’ll see a predefined user named Default. Edit it generate the API key, then set the Status to enable. Next, add your IP to list of permitted for API access.
- With a file manager or FTP, edit file catalog/controller/common/header.php in the OpenCart installation folder and add the following key-value in $data variable:$data[‘parrotgpt’] = $this->customer->getFirstName() ? ‘var SB_DEFAULT_USER = { first_name: “‘ . $this->customer->getFirstName() . ‘”, last_name: “‘ . $this->customer->getLastName() . ‘”, email: “‘ . $this->customer->getEmail() . ‘”, extra: { opencart_id: [“‘ . $this->customer->getId() . ‘|’ . (isset($_COOKIE[‘OCSESSID’]) ? $_COOKIE[‘OCSESSID’] : ”) . ‘”, “Open Cart ID”], phone: [“‘ . $this->customer->getTelephone() . ‘”, “Phone”], opencart_store: [“‘ . $this->config->get(‘config_name’) . ‘”, “OpenCart Store”], opencart_store_url: [“‘ . $_SERVER[‘HTTP_HOST’] . ‘”, “OpenCart Store URL”] } };’ : ”;
- Download the sb.php file and upload it into catalog/controller/api.
More information #
- This app supports OpenCart Multistore.
- On OpenCart update you have to apply code above again.
- Currently only Opencart 3 is supported.