Version 5.0 – 1 June, 2021==txs to @Jeny
- Adding new admins
- Admin role permission setting
- Multi instructor in single course
- Coupon code
- Course compare feature
- Application performance improvement
- Organised Admin navigation menu
- Organised applications assets
- Documentation updated
Which Addon is causing an issue?Addon install purchase code error //version 5.0
Which addon is causing an issue?Addon install purchase code error //version 5.0
For Baypass Purchased Code Addon version 5, you must uncomment or deletedWhich addon is causing an issue?
I try install theme + addon = > It's okey but admin cpanel not show addon or themeFor Baypass Purchased Code Addon version 5, you must uncomment or deleted
Application > Models > Addon_model
start line 14
/* if ($param1 == 'install'){
if($_SERVER['SERVER_NAME'] == 'localhost' || $_SERVER['SERVER_NAME'] == '127.0.0.1'){
//Local server
$purchase_code = null;
}else{
$purchase_code = $this->input->post('purchase_code');
// $addon_exits = $this->get_addon_by_purchase_code($purchase_code);
// if($addon_exits->num_rows() > 0){
// $this->session->set_flashdata('error_message', get_phrase('you_have_already_used_this_purchase_code'));
// redirect(site_url('admin/addon'), 'refresh');
// }
$status_response = $this->crud_model->curl_request($purchase_code);
if(!$status_response){
$this->session->set_flashdata('error_message', get_phrase('purchase_code_is_wrong').'. '.get_phrase('please_enter_your_valid_purchase_code'));
redirect(site_url('admin/addon'), 'refresh');
}
}
}*/
end line 34
Success to install addon
For Baypass Purchased Code!!!!!I try install theme + addon = > It's okey but admin cpanel not show addon or theme
function curl_request($code = '')
{
$product_code = $code;
$personal_token = "FkA9UyDiQT0YiKwYLK3ghyFNRVV9SeUn";
$url = "https://api.envato.com/v3/market/author/sale?code=" . $product_code;
$curl = curl_init($url);
//setting the header for the rest of the api
$bearer = 'bearer ' . $personal_token;
$header = array();
$header[] = 'Content-length: 0';
$header[] = 'Content-type: application/json; charset=utf-8';
$header[] = 'Authorization: ' . $bearer;
$verify_url = 'https://api.envato.com/v1/market/private/user/verify-purchase:' . $product_code . '.json';
$ch_verify = curl_init($verify_url . '?code=' . $product_code);
curl_setopt($ch_verify, CURLOPT_HTTPHEADER, $header);
curl_setopt($ch_verify, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch_verify, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch_verify, CURLOPT_CONNECTTIMEOUT, 5);
curl_setopt($ch_verify, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.13) Gecko/20080311 Firefox/2.0.0.13');
$cinit_verify_data = curl_exec($ch_verify);
curl_close($ch_verify);
$response = json_decode($cinit_verify_data, true);
if (count($response['verify-purchase']) > 0) {
return true;
} else {
return false;
}
}
function curl_request($code = '')
{
return !empty($code) ? true : false;
}
$zipped_file_name = $_FILES['addon_zip']['name'];
if(isset($_FILES['addon_zip'])){
$zipped_file_name = $_FILES['addon_zip']['name'];
}
Tranks xDFor Baypass Purchased Code Install version 5, you must add one line of code
between lines 49 and 50
Application >Controller > Install.php
49 ---> $validation_response = $this->crud_model->curl_request($purchase_code);
50 ---> if ($validation_response == true) {
add
49 ---> $validation_response = $this->crud_model->curl_request($purchase_code);
50 ---> $validation_response = true; /* Add This Line */
51 ---> if ($validation_response == true) {
Good Lucky
I do not understand, enter this file, and delete line 14 to 34 and then I can install the addon? Sorry I'm new at this, I'm trying here, or give error 500 or nothing happens and does not install or pop up something saying that the buying code is wrongFor Baypass Purchased Code Addon version 5, you must uncomment or deleted
Application > Models > Addon_model
start line 14
/* if ($param1 == 'install'){
if($_SERVER['SERVER_NAME'] == 'localhost' || $_SERVER['SERVER_NAME'] == '127.0.0.1'){
//Local server
$purchase_code = null;
}else{
$purchase_code = $this->input->post('purchase_code');
// $addon_exits = $this->get_addon_by_purchase_code($purchase_code);
// if($addon_exits->num_rows() > 0){
// $this->session->set_flashdata('error_message', get_phrase('you_have_already_used_this_purchase_code'));
// redirect(site_url('admin/addon'), 'refresh');
// }
$status_response = $this->crud_model->curl_request($purchase_code);
if(!$status_response){
$this->session->set_flashdata('error_message', get_phrase('purchase_code_is_wrong').'. '.get_phrase('please_enter_your_valid_purchase_code'));
redirect(site_url('admin/addon'), 'refresh');
}
}
}
end line 34
Success to install addon