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

MySQL Adding Offer to Shop [Gesior ACC]

Red

Cyntara.org
Staff member
Global Moderator
Premium User
Joined
Aug 9, 2008
Messages
4,455
Solutions
2
Reaction score
921
Location
United States
This is a noob (my first) tutorial explaining how to add a shop offer to your Gesior ACC database. Most experienced players already know this, but this is how you add offer types to your shop, to trade for points. That is ALL this tutorial explains, please find another that answers how to set up shopsystem.php ect. This is ONLY for the phpmyadmin part for adding new shop offers!!!

Start by entering your database:
http://localhost/phpmyadmin

If you have z_shop_offer in your database, use the SQL button, paste this information, and then click "Go". (You will want to continue this until all of your items are made, Making sure that the `id` is ONE higher every time you submit it! Afterward, you should see a new table.

Code:
INSERT INTO `z_shop_offer` (`id`, `points`, `itemid1`, `count1`, `itemid2`, `count2`, `offer_type`, `offer_description`, `offer_name`) VALUES
(1, 5, 2517, 1, 0, 0, 'item', 'Buy a shield of honour!', 'Shield of Honour');

`id` = Unique ID of the item. These go up in intervals of 1, each item has to be different. (ex. 1, 2, 3, 4, 5)
`points` = How many points it will cost
`itemid1` = The ID of the item
`count1` = How many of the item (ID above) do you wish to receive
`itemid2` = Set to 0, you wont use this unless you are selling backpacks of items
`count2` = Same as above
`offer_type` = The type of offer you're giving away. This one is obviously, one item, so keep it as `item`.
`offer_description` = The description on the website. What you want to advertise about the item.
`offer_name` = Name of the item on the website

Edit the tables as needed, and it should appear in your shop, as seen below:


(obviously that was made for my server specifically) :blink:

All I ask is that if I helped you, you let me know by repping. I won't beg, ONLY if you think I deserve it ;)

Red
 
Cool, finally someone did this :D

Not that I need to know, but for the noobs that's asking 24/7, I'll just link them this ^^

Thanks !
/Limannen
 
Code:
`id` = Unique ID of the item. These go up in intervals of 1, each item has to be different. (ex. 1, 2, 3, 4, 5)

This row using 'auto incrament' & 'unique' attributes so left empty and script will give id automaticaly. :)
 
Code:
`id` = Unique ID of the item. These go up in intervals of 1, each item has to be different. (ex. 1, 2, 3, 4, 5)

This row using 'auto incrament' & 'unique' attributes so left empty and script will give id automaticaly. :)

Great tip! Something I didn't know! :thumbup:

Red
 
its a great tip indeed.
Btw.
@red
Your funny even when your Red is Blue you sign yourself with Red xD

(i know its donator) :p

Haha, I know. If only we could request colors :blink:
 
how can you manually add z_shop_offer? for somereason i dont have it ive had it b4 but now i dont something went wrong?
 
BUMP..

What about the image of the item? this "tutorial" isnt complete..

And.. is there another type of offers?
I mean.. offer_type..
 
Last edited:
For the image of the item, just follow the guidelines in the image folder in htdocs!

If you do not have z_shop_offer then you must reinstall gesiors! =)
 
Adding z_shop_offer to Database

Code:
CREATE TABLE IF NOT EXISTS `z_shop_offer` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `points` int(11) NOT NULL DEFAULT '0',
  `itemid1` int(11) NOT NULL DEFAULT '0',
  `count1` int(11) NOT NULL DEFAULT '0',
  `itemid2` int(11) NOT NULL DEFAULT '0',
  `count2` int(11) NOT NULL DEFAULT '0',
  `offer_type` varchar(255) DEFAULT NULL,
  `offer_description` text NOT NULL,
  `offer_name` varchar(255) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=47 ;

Should work.
Key word: Should.
 
Picture - Image with offer ID in directory /var/www/item_images/.
Containers - item2 is container ID and offer_type is container, i guess.
 
Back
Top