• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

How to add vip to znote store

Dakotah

New Member
Joined
Feb 4, 2018
Messages
14
Reaction score
0
You can buy premium days in the znote shop but is it possible to put vip days in the znote shop? Im not sure how I would go about doing this. Using .4
 
Solution
Reposting PM as it might help others out.
Znote AAC: Adding VIP Time in shop as a custom shop type.

Added shop type 10 for VIP time in config.php, here I add 3 days:
PHP:
11 => array(
    'type' => 10,
    'itemid' => 12466, // Item to display on page
    'count' => 3, // Days of VIP account
    'description' => "VIP membership",
    'points' => 30,
),
Type 10 can then be linked to a purchase to add custom logic/code for that type.

Then in shop.php:
I add the logic, what happens when you purchase type 10: (adds 3 days[configured in config.php] of vip to database in the buyers account)
PHP:
} else if ($buy['type'] == 10) { // Add VIP time
    $data = mysql_select_single("SELECT `vip_time` FROM `accounts` WHERE...
Reposting PM as it might help others out.
Znote AAC: Adding VIP Time in shop as a custom shop type.

Added shop type 10 for VIP time in config.php, here I add 3 days:
PHP:
11 => array(
    'type' => 10,
    'itemid' => 12466, // Item to display on page
    'count' => 3, // Days of VIP account
    'description' => "VIP membership",
    'points' => 30,
),
Type 10 can then be linked to a purchase to add custom logic/code for that type.

Then in shop.php:
I add the logic, what happens when you purchase type 10: (adds 3 days[configured in config.php] of vip to database in the buyers account)
PHP:
} else if ($buy['type'] == 10) { // Add VIP time
    $data = mysql_select_single("SELECT `vip_time` FROM `accounts` WHERE `id`='{$cid}' LIMIT 1;");
    $tmp = ((int)$data['vip_time'] > time()) ? (int)$data['vip_time'] : time();
    $tmp += 3600 * 24 * (int)$buy['count'];
    mysql_update("UPDATE `accounts` SET `vip_time`='{$tmp}' WHERE `id`='{$cid}' LIMIT 1;");
    echo '<font color="green" size="4">You now have '.$buy['count'].' additional days of VIP membership.</font>';

And I added the VIP time to be displayed in the same category / table as premium time in the shop list.
PHP:
case 10: // Type 10 = VIP time, lets add it to category_premium
    $category_premium[$key] = $offer;
break;
 
Solution
Back
Top