Quote:
[Introduction]
Here's another release from me, functions completely coded by me. Design ripped from the new eFlyff Premium Shop, with some modifications.
The shop is coded in PHP for Official File servers. [Version 1 & 2]: Yes, I know, it runs off MySQL, but that is for the item shop database. [Version 3]: Premium Shop now runs solely off SQL Server!
[Updates]
Version 2:
- Login page added.
- Updated configuration files.
- Added jQuery file.
Version 3:
- Removed MySQL feature. Runs solely off SQL Server.
- Removed ShopKey protection feature.
- Reversed source unwrap.
- Invalid Access errors now redirect to login page with a detailed error.
- Fixed a few grammar errors.
- Center aligned the shop when viewed in browser.
[Features]
- Category navigation
- Page navigation
- Item details
- Purchase item
- Purchase & send gift
- Automatically updating "Popular" item based off purchases.
[Setup]
Setup shouldn't be too hard. You only need to configure the following variables in the inc/config.php file:
To use this shop, you need the shop database and two custom SQL Server stored procedures, shopMessengerList and shopSendItem. All three can be created by executing "PREMIUM_SHOP_TBL.sql" in the root folder.
Once you have the shop set up in a directory in your web host and mssql functions are enabled, you need to hex edit your "Neuz.exe". Find "http://billing.gpotato.com/Charge/FlyffItemList.asp" and replace the full URL to the URL of your web shop (for the eFlyff client).
Open the Premium Shop inside of the client to see your lovely shop.
Alternatively, you can go to the "login.php" page and login to the shop from there.
[Modifying Shop Items]
The shop comes preset with all of the items inside the eFlyff Cash Shop with exception to the clothing sets, clothing pieces, and hair items as of the post date.
THE 'NAME' FIELD INSIDE THE DATABASE MUST MATCH THE ITEM NAME INSIDE THE PROPITEM.TXT.TXT OF THE SERVER FILES OR ELSE THE ITEM WILL NOT BE SENT!
Add New Items:
To add a new item, just insert a new row into the shop table.
Single item required fields: itemid, name, desc, itemcount, price, category, image.
Bundle item required fields: All single item fields, isbundle=1, item1_id, item1_name, item1_count through item4 (leave null for no item). The itemid, name, and itemcount fields will just be used for display for bundle items.
Modifying Items:
Obviously, you can just change the field value...
To remove an item from the shop temporarily, just set 'forsale' equal to 0.
To temporarily put an item on sale, add a price to 'price_sale'. Set it to null or to 0 to remove the sale.
[Live Demo]
A live demo using version 3 can now be found at !
All functions except for buying items are working for the live demo.
Account: test
Password: test
Character: Test
[Screenshots]
[Final Notes]
Activation:
The key is no longer available for versions 1 and 2.
Item images:
Displayed from images/items/<itemid><image> for all items, with an exception to bundled items, in which it is images/items/<itemid>_bundle<image>.
Website Integration:
If you wish to have a login script for this, you will have to create your own page. Variables are as follows:
images/fail.jpg:PHP Code:
//Direct form POST to the shop:
$_POST['user_id'] //Account
$_POST['m_idPlayer'] //Player ID
$_POST['serverindex'] //Player serverindex
$_POST['check'] //Account password (must be hashed)
//Preset sessions:
$_SESSION['ifs_account'] //Account
$_SESSION['ifs_player'] //Player ID
$_SESSION['ifs_sindex'] //Player serverindex
$_SESSION['ifs_passwd'] //Account password (must be hashed)
You will have to edit and modify this images yourself to change "gPoints" to your server's currency.
Hosting:
In my experience, I have come to find that WAMP Server 2.0c works the best with MsSQL connections and such, so a download of that has been linked.
Back-end:
Please note that there is currently no back-end panel to add/modify items or add shop cash to an account. You will have to do these manually.
JavaScript Not Working?
Look for this in index.php:
Replace it with:Code:<script src="/js/jquery-1.3.2.min.js" type="text/javascript"></script>
[Downloads]Code:<script src="js/jquery-1.3.2.min.js" type="text/javascript"></script>
WAMPServer2.0c:
Premium Shop Release files:
Version 1:
MegaUpload:
MediaFire:
Version 2:
MegaUpload:
Version 3:
MegaUpload:
Crediz gehen an Treachery von Rz