• 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!

[Znote AAC] Shop Category

zibos

New Member
Joined
Jan 1, 2014
Messages
19
Reaction score
0
Hope this is right forum for it :) (Sorry for my english)

I was looking for simple solution in Otland but could not find any. So I did it in my way :p hope you like it.

I'll show you step by step. Demo available on my website which you can se live (You need to register) or see pictures at the bottom

Demo: Gashaonline.com


I will have onley 2 category in this tutorial. You repeating for the third and fourth and so on just like this.


The first step: In config file find this:

// If useDB is false, this array list will be used for shop offers.
$config['shop_offers'] = array(
// offer 1
1 => array(
'type' => 1, // 1 = item id offers, 2 = premium days [itemid ignored], 3 = sex change[itemid & count ignored], 4+ = custom.
'itemid' => 2160, // item to get in-game
'count' => 5, //if type is 2, this represents premium days
'describtion' => "Crystal coin.", // Describtion shown on website
'points' => 100, // How many points this offer costs
),



Change shop_offers in this line $config['shop_offers'] = array( to the category you want to.

For exempel:

// If useDB is false, this array list will be used for shop offers.
$config['shop_knight'] = array(
// offer 1
1 => array(
'type' => 1, // 1 = item id offers, 2 = premium days [itemid ignored], 3 = sex change[itemid & count ignored], 4+ = custom.
'itemid' => 2160, // item to get in-game
'count' => 5, //if type is 2, this represents premium days
'describtion' => "Crystal coin.", // Describtion shown on website
'points' => 100, // How many points this offer costs
),
2 => array(
'type' => 1, // 1 = item id offers, 2 = premium days [itemid ignored], 3 = sex change[itemid & count ignored], 4+ = custom.
'itemid' => 2160, // item to get in-game
'count' => 5, //if type is 2, this represents premium days
'describtion' => "Crystal coin.", // Describtion shown on website
'points' => 100, // How many points this offer costs
),


);


// If useDB is false, this array list will be used for shop offers.

$config['shop_paladin'] = array(
// offer 1
1 => array(
'type' => 1, // 1 = item id offers, 2 = premium days [itemid ignored], 3 = sex change[itemid & count ignored], 4+ = custom.
'itemid' => 2160, // item to get in-game
'count' => 5, //if type is 2, this represents premium days
'describtion' => "Crystal coin.", // Describtion shown on website
'points' => 100, // How many points this offer costs
),
);



Now we have made both for knight and paladin. time to next step.... Dont forget to close after every array with );

(You can have as meny as you want in config)



Second step: Add new shop.php file

  1. Now you have to crate 2 new shop files and name it what ever you want, mine will be knight.php & paladin.php
  2. Copy all code from the orginal shop.php file and paste in the knight.php and paladin.php
You have to make a small change in the new shop files:

Finde
$shop_list = $config['shop_offers']; and replace shop_offers to the array that we made in config. Mine was shop_knight so it will $shop_list = $config['shop_knight'] and the paladin will be $shop_list = $config['shop_Paladin'].






L
ets make the tab now. I found one on internet and I will share it here you can just add your own code.

I made new file in overall file and name it ass menu. And html code that I use:



<ul id="tabmenu">
<li>
<a href="knight.php">Knight</a> ///
Dont forget to link to the file that we made
</li>
<li>
<a href="paladin.php">Paladin</a>
/// Dont forget to link to the file that we made
</li>
</li>
</ul>



And this menu file you gona use it in every ctaegory/shop.php you make and you gona use a line of code to include this over the shop table


After this line in your new shop.php file

?><td>You have <?php echo $user_znote_data['points']; ?> points. (<a href="buypoints.php">Buy points</a>).</td><?php
}
?>


Add this

<?php
include 'layout/overall/menu.php';
?>



Photos





And download the css file and put the code inside your css file and the js file to your js file.

Download Css and JS fle





Done :)






 

Attachments

Last edited:
i didnt get any of this....can someone make this look more professional so i can actually understand it....?
 
Just was i was looking for! i'm working on a compilated of Every item selleable at 10.76, check at tibia.servers-absolute.com/shop.php, after i add this function i will release it as an addon! thanks for the work! ;D
 
Back
Top