• 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 Acc 1.5] Shop item list + Categories + Style

kushovu

NXA
Joined
Jan 27, 2009
Messages
75
Reaction score
13
item_shop.jpg

After some days trying to make this work i found this post:
[Znote AAC] Shop Category

And there i got the necesary for start working on this Pack so lets start:

First you need to open your "config.php" file and find this:

Code:
    // 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
            'description' => "Crystal coin.", // Description shown on website
            'points' => 100, // How many points this offer costs
        ),

        // offer 2
        2 => array(
            'type' => 1,
            'itemid' => 2392,
            'count' => 1,
            'description' => "Fire sword.",
            'points' => 10,
        ),

        // offer 3
        3 => array(
            'type' => 2,
            'itemid' => 12466, // Item to display on page
            'count' => 7,
            'description' => "Premium membership.",
            'points' => 25,
        ),

        // offer 4
        4 => array(
            'type' => 3,
            'itemid' => 12666,
            'count' => 3,
            'description' => "Change character gender.",
            'points' => 10,
        ),
        5 => array(
            'type' => 3,
            'itemid' => 12666,
            'count' => 0,
            'description' => "Change character gender.",
            'points' => 20,
        ),
        5 => array(
            'type' => 4,
            'itemid' => 12666,
            'count' => 1,
            'description' => "Change character name.",
            'points' => 20,
        ),
    );
?>

And replace it with a simple include:

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

    include 'shopitems.php';
?>

Now we need to make some changes at "Shop.php" for making it the principal page for category selection

You should find this table:

Code:
<table>
    <tr class="yellow">
        <td>Description:</td>
        <?php if ($config['shop']['showImage']) { ?><td>Image:</td><?php } ?>
        <td>Count/duration:</td>
        <td>Points:</td>
        <td>Action:</td>
    </tr>
        <?php
        foreach ($shop_list as $key => $offers) {
        echo '<tr class="special">';
        echo '<td>'. $offers['description'] .'</td>';
        if ($config['shop']['showImage']) echo '<td><img src="http://'. $config['shop']['imageServer'] .'/'. $offers['itemid'] .'.'. $config['shop']['imageType'] .'" alt="img"></td>';
        if ($offers['type'] == 2) echo '<td>'. $offers['count'] .' Days</td>';
        else if ($offers['type'] == 3 && $offers['count'] == 0) echo '<td>Unlimited</td>';
        else echo '<td>'. $offers['count'] .'x</td>';
        echo '<td>'. $offers['points'] .'</td>';
        echo '<td>';
        ?>
        <form action="" method="POST">
            <input type="hidden" name="buy" value="<?php echo (int)$key; ?>">
            <input type="submit" value="  PURCHASE  "  class="needconfirmation" data-item-name="<?php echo $offers['description']; ?>" data-item-cost="<?php echo $offers['points']; ?>">
        </form>
        <?php
        echo '</td>';
        echo '</tr>';
        }
        ?>
</table>

And replace all with this include:

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

Now for the Style you should go to "/layout/overall/head.php"
and add this line after the Style.css line:

Code:
  <link rel="stylesheet" type="text/css" href="layout/css/menu.css" />

And finnally import this files:
WWW.rar


I want to specially thank to @Znote For all hard work and for this awsome Web Script!
Also thanks to @zibos because he do the basics for making categories
and last but not less important thanks to @Saldivar Because He helped me a lot with the research and the items id and description

Any suggestion are acepted! :D
Have a nice day!
 

Attachments

Last edited by a moderator:
Sorry i can't Edit but
Items taked from TFS 1.1 With ORTS Data Pack but should work on all 10.76
 
This might be a no0b question, but i wanted to create an own folder in my uniformserver to make it easyer to find the .php files for edit l8r on.
I'm running into trouble with the manu.php, when trying to change the herf links it wont load the page. What am i doing wrong? (A)

Code:
<li>
        <a href="layout/shop/services.php" style="float: left;"><?php echo '<img src="http://'. $config['shop']['imageServer'] .'/16101.gif" alt="img">'?><div>Account Services</div></a>
    </li>
 
I follow all steps to put the category system.. but I get some errors when enter in the site
Code:
Notice: Use of undefined constant Both - assumed 'Both' in C:\xampp\htdocs\shopitems.php on line 549

Notice: Use of undefined constant Both - assumed 'Both' in C:\xampp\htdocs\shopitems.php on line 557

Notice: Use of undefined constant Both - assumed 'Both' in C:\xampp\htdocs\shopitems.php on line 565

Notice: Use of undefined constant Both - assumed 'Both' in C:\xampp\htdocs\shopitems.php on line 573

Notice: Use of undefined constant Both - assumed 'Both' in C:\xampp\htdocs\shopitems.php on line 581

Notice: Use of undefined constant One - assumed 'One' in C:\xampp\htdocs\shopitems.php on line 589

Notice: Use of undefined constant One - assumed 'One' in C:\xampp\htdocs\shopitems.php on line 597

Notice: Use of undefined constant One - assumed 'One' in C:\xampp\htdocs\shopitems.php on line 605
 
is this post still available? Here are my errors:

33xiq8w.png
[/IMG]
33xiq8w.png


There's a lot of errors, if you can help me:)!
 
I did and I got it all well, good supply Kushovu, just a point and a question.
note: Both the function and one fails.
question: how to add new categories, they do, but the frame is too small and you get me out of it, so you'll understand me, as a large table so that it is all within me.

thanks and regards
 
is this post still available? Here are my errors:

33xiq8w.png
[/IMG]
33xiq8w.png


There's a lot of errors, if you can help me:)!
-----------------------------------------------------------------
my friend passed me the same, edit the file and remove shopitems.php the line that none one or both, because this command does not recognize zNote xDD, you tell me if I worked

Code:
      'type' => 1,
       'itemid' => 12649, // Item to display on page
       'count' => 1,
       'description' => "Blade of corruption (Atk:48, Def:29 +2). <br> One hands.<br> Requeried Level: 82",
       'points' => 45,
      'type=> One hand' o ' both'
 
I still get some errors.

Captura21.png

----------------------------------------------------------------------------------------
config.php looking at shop and see if it makes it in this that I put you

Code:
    // If useDB is set to true, player can shop in-game as well using Znote LUA shop system plugin.
    $config['shop'] = array(
        'enabled' => true,
        'enableShopConfirmation' => true, // Verify that user wants to buy with popup
        'useDB' => false, // Fetch offers from database, or the below config array
        'showImage' => true,
        'imageServer' => 'items.znote.eu',   <------- so you read, you changed this on your localhost?
        'imageType' => 'gif',
    );
 
Back
Top