How to null Cs-cart Core your self

  • Note
    Starting May 2025, free add-ons will only be available to those who have purchased the Alexbranding add-on package, Or purchased more than 5 add-ons (+50$) from other developers, or uploaded at least 2 paid add-ons that are not published on the forum.

    You can Get Full access & download all Cs-cart addons & Themes With Premium Upgrades HERE
This steps for who want Unlocked CS-Cart them selfs

1 Go to : app\functions\fn.init.php

Find & Delete :


PHP:
Expand Collapse Copy
foreach ($core_hashes as $hash => $file) {

if ($hash != sha1_file($dir_root . strrev(str_rot13($file['file'])))) {
if (filemtime($dir_root . strrev(str_rot13($file['file']))) < TIME - SECONDS_IN_DAY * 2) { // 2-days cache
Tygh::$app['cache']->regenerate($hash, $file['file']);
}

fn_process_cache_notifications($file['notice']);

break;
}
}

2- Go to : app\Tygh\Helpdesk.php
Find:

PHP:
Expand Collapse Copy
if (empty($license_number)) {
$uc_settings = Settings::instance()->getValues('Upgrade_center');
$license_number = $uc_settings['license_number'];
}

$store_mode = fn_get_storage_data('store_mode');

if (empty($license_number) && !in_array($store_mode, ['trial', 'free'])) {
return 'LICENSE_IS_INVALID';
}

$store_ip = fn_get_ip();
$store_ip = $store_ip['host'];

$request = [
'license_number' => $license_number,
'ver' => PRODUCT_VERSION,
'product_status' => PRODUCT_STATUS,
'product_build' => strtoupper(PRODUCT_BUILD),
'edition' => isset($extra_fields['edition'])
? $extra_fields['edition']
: PRODUCT_EDITION,
'lang' => strtoupper(CART_LANGUAGE),
'store_uri' => fn_url('', 'C', 'http'),
'secure_store_uri' => fn_url('', 'C', 'https'),
'https_enabled' => (Registry::get('settings.Security.secure_storefront') === YesNo::YES || Registry::get('settings.Security.secure_admin') === YesNo::YES)
? 'Y'
: 'N',
'admin_uri' => str_replace(fn_get_index_script('A'), '', fn_url('', 'A', 'http')),
'store_ip' => $store_ip,
'store_mode' => strtoupper(isset($extra_fields['store_mode'])
? $extra_fields['store_mode']
: $store_mode
),
];

$request = array(
'Request@action=check_license@api=3' => array_merge($extra_fields, $request),
);

$request = '' . fn_array_to_xml($request);

Registry::set('log_cut', Registry::ifGet('config.demo_mode', false));

$data = Http::get(Registry::get('config.resources.updates_server') . '/index.php?dispatch=product_updates.check_available', array('request' => $request), array(
'timeout' => 10
));

if (empty($data)) {
$data = fn_get_contents(Registry::get('config.resources.updates_server') . '/index.php?dispatch=product_updates.check_available&request=' . urlencode($request));
}

$_SESSION['license_information'] = $data;

if (empty($license_number) && !fn_allowed_for('ULTIMATE:FREE')) {
return 'LICENSE_IS_INVALID';
}

return $data;

Replace With:
PHP:
Expand Collapse Copy
Registry::set('log_cut', false);
return 'ACTIVE';

Find:
PHP:
Expand Collapse Copy
$updates = $messages = $license = '';
$params = $restrictions = [];

if (!empty($data)) {
// Check if we can parse server response
if (strpos($data, ' $xml = simplexml_load_string($data);
$updates = (string) $xml->Updates;
$messages = $xml->Messages;
$license = (string) $xml->License;

if (isset($xml->TrialExpiryTime)) {
$params['trial_expiry_time'] = (int) $xml->TrialExpiryTime;
}

if (isset($xml->TrialLeftTime)) {
$params['trial_left_time'] = (int) $xml->TrialLeftTime;
}

if (isset($xml->AllowedNumberOfStores)) {
fn_set_storage_data('allowed_number_of_stores', (int) $xml->AllowedNumberOfStores);
} else {
fn_set_storage_data('allowed_number_of_stores', null);
}

if (isset($xml->Restrictions)) {
$json_restrictions = json_encode($xml->Restrictions);
$restrictions = json_decode($json_restrictions, true);

fn_set_storage_data('restrictions', serialize($restrictions));
} else {
fn_set_storage_data('restrictions', '');
}

if (isset($xml->LicenseKey)) {
Settings::instance()->updateValue('license_number', (string) $xml->LicenseKey, '', false, null, false);
}

if (isset($xml->FreeMode) && fn_allowed_for('ULTIMATE:FREE') && YesNo::isFalse(fn_get_storage_data('free_mode', false))) {
fn_set_storage_data('free_mode', YesNo::YES);
}

if (isset($xml->LatestAvailableVersion)) {
fn_set_storage_data('latest_available_version', (string) $xml->LatestAvailableVersion->Version);
fn_set_storage_data('latest_available_version_timestamp', (string) $xml->LatestAvailableVersion->Timestamp);
}
} else {
$license = $data;
}
}

if (!empty($auth)) {
if (Registry::get('settings.General.auto_check_updates') === YesNo::YES &&
fn_check_user_access($auth['user_id'], 'upgrade_store') &&
$updates == 'AVAILABLE'
) {
/** @var \Tygh\NotificationsCenter\NotificationsCenter $notifications_center */
$notifications_center = Tygh::$app['notifications_center'];
$notifications_center->add([
'user_id' => $auth['user_id'],
'title' => __('notification.upgrade_available.title'),
'message' => __('notification.upgrade_available.message', [
'[product]' => PRODUCT_NAME,
]),
'area' => 'A',
'section' => NotificationsCenter::SECTION_ADMINISTRATION,
'tag' => NotificationsCenter::TAG_UPDATE,
'action_url' => fn_url('upgrade_center.manage'),
'language_code' => Registry::get('settings.Appearance.backend_default_language'),
]);
}

if (!empty($data)) {
$_SESSION['last_status'] = $license;
}
}

$messages = self::processMessages($messages, $process_messages, $license);

return [$license, $updates, $messages, $params, $restrictions];

Replace With:
PHP:
Expand Collapse Copy
$_SESSION['last_status'] = 'ACTIVE';
return array('ACTIVE', 'NO UPDATES', '', []);

Find:
PHP:
Expand Collapse Copy
$request = array(
'Request@action=registerLicense@api=2' => array(
'product_type' => PRODUCT_EDITION,
'domain' => Registry::get('config.http_host'),
'first_name' => $license_data['first_name'],
'last_name' => $license_data['last_name'],
'email' => $license_data['email'],
),
);

$request = '' . fn_array_to_xml($request);

$data = Http::get(Registry::get('config.resources.updates_server') . '/index.php?dispatch=licenses_remote.add', array('request' => $request), array(
'timeout' => 10
));

if (empty($data)) {
$data = fn_get_contents(Registry::get('config.resources.updates_server') . '/index.php?dispatch=licenses_remote.create&request=' . urlencode($request));
}

$result = $messages = $license = '';

if (!empty($data)) {
// Check if we can parse server response
if (strpos($data, ' $xml = simplexml_load_string($data);
$result = (string) $xml->Result;
$messages = $xml->Messages;
$license = (array) $xml->License;
}
}

self::processMessages($messages, true, $license);

return array($result, $license, $messages);

Replace With:
PHP:
Expand Collapse Copy
return array('', 'ACTIVE', '');

Find :
PHP:
Expand Collapse Copy
$request = array(
'dispatch' => 'product_updates.check_storeimport_available',
'license_key' => $license_number,
'ver' => $version,
'edition' => $edition,
);

$data = Http::get(Registry::get('config.resources.updates_server'), $request, array(
'timeout' => 10
));

if (empty($data)) {
$data = fn_get_contents(Registry::get('config.resources.updates_server') . '/index.php?' . http_build_query($request));
}

$result = false;

if (!empty($data)) {
// Check if we can parse server response
if (strpos($data, ' $xml = simplexml_load_string($data);
$result = ((string) $xml == 'Y') ? true : false;
}
}

return $result;

Replace With:
PHP:
Expand Collapse Copy
return true;

Find:
PHP:
Expand Collapse Copy
$license_status = 'LICENSE_IS_INVALID';
$store_mode = '';
$messages = [];

if (fn_allowed_for('MULTIVENDOR')) {
$store_modes_list = ['', 'plus', 'ultimate', 'enterprise'];
} else {
$store_modes_list = ['free', '', 'ultimate', 'enterprise'];
}

foreach ($store_modes_list as $store_mode) {
$extra['store_mode'] = $store_mode;
$data = Helpdesk::getLicenseInformation($license_number, $extra);
list($license_status, , $messages, , $restrictions) = Helpdesk::parseLicenseInformation($data, $auth, false);
if ($license_status == 'ACTIVE') {
break;
}
}

return [$license_status, $messages, $store_mode, $restrictions];

Replace With:
PHP:
Expand Collapse Copy
$extra['store_mode'] = 'multivendor';
return [ 'ACTIVE', '', 'multivendor' ];

Find:

PHP:
Expand Collapse Copy
if ($storefronts_limit = fn_get_storage_data('allowed_number_of_stores')) {
/** @var \Tygh\Storefront\Repository $repository */
$repository = Tygh::$app['storefront.repository'];
$storefronts_count = $repository->getCount();

return $storefronts_count >= $storefronts_limit;
}
PHP:
Expand Collapse Copy
$uc_settings = Settings::instance()->getValues('Upgrade_center');
$license_number = $uc_settings['license_number'];

if ($license_number) {
$metrics = fn_get_schema('reporting', 'metrics');

foreach ($metrics as &$value) {
if (is_callable($value)) {
$value = call_user_func($value);
}
}
unset($value);

$logging = Http::$logging;
Http::$logging = false;

Http::post(
Registry::get('config.resources.updates_server') . '/index.php?dispatch=license_tracking.report',
array(
'metrics' => $metrics,
'license_number' => $license_number
),
array(
'timeout' => 10
)
);

Http::$logging = $logging;
}
PHP:
Expand Collapse Copy
if (!isset($request['token'])) {
return false;
}

$validation_params = array_merge([
'dispatch' => 'validators.validate_request',
'token' => $request['token'],
], $additional_validation_params);

$validator_url = Registry::get('config.resources.updates_server') . '/index.php';

$log_cut = Registry::ifGet('log_cut', false);

Registry::set('log_cut', true);
$validator_response = Http::get($validator_url, $validation_params);
Registry::set('log_cut', $log_cut);

$validator_response = strtolower(trim($validator_response));

return $validator_response === 'valid';

Replace With:
PHP:
Expand Collapse Copy
return 'valid';

Find & Delete:
PHP:
Expand Collapse Copy
/** @var \Tygh\SoftwareProductEnvironment $software */
$software = Tygh::$app['product.env'];

if ($format === 'json') {
$version = [
'product_name' => $software->getProductName(),
'version' => $software->getProductVersion(),
'product_status' => $software->getProductStatus(),
'product_build' => $software->getProductBuild(),
'store_mode' => $software->getStoreMode(),
];

if (YesNo::toBool($get_last_action)) {
$version['last_action'] = self::getLastAction();
}

$version_string = json_encode($version);
} else {
$version_string = $software->getProductName() . ' [B]' . $software->getProductVersion() . ' ';
if ($software->getProductStatus() !== '') {
$version_string .= ' (' . $software->getProductStatus() . ')';
}
if ($software->getProductBuild()) {
$version_string .= ' ' . $software->getProductBuild();
}
$version_string .= '[/B]';
}

if ($stop_execution) {
echo $version_string;
exit(0);
}

return $version_string;


3- Go to config.php
Find:

PHP:
Expand Collapse Copy
define('PRODUCT_STATUS', '');

Replace With:
PHP:
Expand Collapse Copy
define('PRODUCT_STATUS', 'ACTIVE');
 
  • Like
Reactions: cocolino
thanks to @cocolino for this updates


In app/Tygh/Helpdesk.php on

PHP:
Expand Collapse Copy
$license_status = 'LICENSE_IS_INVALID';
$store_mode = '';
$messages = [];

if (fn_allowed_for('MULTIVENDOR')) {
$store_modes_list = ['', 'plus', 'ultimate', 'enterprise'];
} else {
$store_modes_list = ['free', '', 'ultimate', 'enterprise'];
}

foreach ($store_modes_list as $store_mode) {
$extra['store_mode'] = $store_mode;
$data = Helpdesk::getLicenseInformation($license_number, $extra);
list($license_status, , $messages, , $restrictions) = Helpdesk::parseLicenseInformation($data, $auth, false);
if ($license_status == 'ACTIVE') {
break;
}
}

return [$license_status, $messages, $store_mode, $restrictions];

replace with according to how the store is intended to be used

PHP:
Expand Collapse Copy
$extra['store_mode'] = 'multivendor';
return [ 'ACTIVE', '', 'plus' ];

or

$extra['store_mode'] = 'multivendor';
return [ 'ACTIVE', '', 'ultimate' ]; 

or 

$extra['store_mode'] = 'multivendor';
return [ 'ACTIVE', '', 'enterprise' ];


and to exclude the fingerprint extracted by CS-Cart.com

in app/controllers/backend.index.php
on line 132 find

Find and Replace:
JavaScript:
Expand Collapse Copy
$stats = base64_decode('PGltZyBjbGFzcz0ib25lLXBpeGVsLWJhY2tncm91bmQiIHNyYz0iaHR0cHM6Ly93d3cuY3MtY2FydC5jb20vaW1hZ2VzL2JhY2tncm91bmQuZ2lmIiBoZWlnaHQ9IjEiIHdpZHRoPSIxIiBhbHQ9IiIgLz4=');

Because return this:
HTML:
Expand Collapse Copy
[IMG]https://www.cs-cart.com/images/background.gif[/IMG]

Replace with:
JavaScript:
Expand Collapse Copy
$stats = base64_decode('PGltZyBjbGFzcz0ib25lLXBpeGVsLWJhY2tncm91bmQiIHNyYz0iLi4vLi4vLi4vaW1hZ2VzL2JhY2tncm91bmQuZ2lmIiBoZWlnaHQ9IjEiIHdpZHRoPSIxIiBhbHQ9IiIgLz4=');

Because return this:
HTML:
Expand Collapse Copy
[IMG]https://socrahub.com/images/background.gif[/IMG]


in js/core/src/core/Tygh/core_methods.js
on line 1564 find

Find and Replace:
JavaScript:
Expand Collapse Copy
return $.rc64_helper("PGltZyBjbGFzcz0ib25lLXBpeGVsLWJhY2tncm91bmQiIHNyYz0iaHR0cHM6Ly93d3cuY3MtY2FydC5jb20vaW1hZ2VzL2JhY2tncm91bmQuZ2lmIiBoZWlnaHQ9IjEiIHdpZHRoPSIxIiBhbHQ9IiIgLz4=");

Because return this:
HTML:
Expand Collapse Copy
[IMG]https://www.cs-cart.com/images/background.gif[/IMG]

Replace with:
JavaScript:
Expand Collapse Copy
return $.rc64_helper("PGltZyBjbGFzcz0ib25lLXBpeGVsLWJhY2tncm91bmQiIHNyYz0iLi4vLi4vLi4vLi4vLi4vaW1hZ2VzL2JhY2tncm91bmQuZ2lmIiBoZWlnaHQ9IjEiIHdpZHRoPSIxIiBhbHQ9IiIgLz4=");

Because return this:
HTML:
Expand Collapse Copy
[IMG]https://socrahub.com/images/background.gif[/IMG]


in js/tygh/core.js

Find and Replace:
JavaScript:
Expand Collapse Copy
.rc64_helper("PGltZyBjbGFzcz0ib25lLXBpeGVsLWJhY2tncm91bmQiIHNyYz0iaHR0cHM6Ly93d3cuY3MtY2FydC5jb20vaW1hZ2VzL2JhY2tncm91bmQuZ2lmIiBoZWlnaHQ9IjEiIHdpZHRoPSIxIiBhbHQ9IiIgLz4=")

Because return this:
HTML:
Expand Collapse Copy
[IMG]https://www.cs-cart.com/images/background.gif[/IMG]

Replace with:
JavaScript:
Expand Collapse Copy
.rc64_helper("PGltZyBjbGFzcz0ib25lLXBpeGVsLWJhY2tncm91bmQiIHNyYz0iLi4vLi4vaW1hZ2VzL2JhY2tncm91bmQuZ2lmIiBoZWlnaHQ9IjEiIHdpZHRoPSIxIiBhbHQ9IiIgLz4=")

Because return this:
HTML:
Expand Collapse Copy
[IMG]https://socrahub.com/images/background.gif[/IMG]


place in images folder background.gif file


View attachment 11775