Mengatasi Warning: You do not have permission to access the API! OpenCart

Cara mengatasi error Warning: You do not have permission to access the API! OpenCart saat membuat order history karena memakai DNS Cloudflare.

1. Buka file index.php pada direktori utama OpenCart terinstall

2. Tambahkan baris kode berikut setelah baris define('VERSION', 'x.x.x.x');

if ($_SERVER["HTTP_CF_CONNECTING_IP"]) 
{
 $_SERVER["REMOTE_ADDR"] = $_SERVER["HTTP_CF_CONNECTING_IP"];
}

Selesai, semoga bermanfaat.

Sumber:

user qasim: https://stackoverflow.com/questions/36623971/api-issue-when-editing-order-in-opencart-admin

Add a comment