[ABD] UPS Easy Shop 0.7.0

Any abandoned MODs will be moved to this forum.

WARNING: MODs in this forum are not currently being supported or maintained by the original MOD author. Proceed at your own risk.
Forum rules
IMPORTANT: MOD Development Forum rules

WARNING: MODs in this forum are not currently being supported nor updated by the original MOD author. Proceed at your own risk.
Locked
User avatar
Jorup16
Registered User
Posts: 386
Joined: Sun Dec 14, 2008 5:13 am
Location: Zacapa, Guatemala
Name: Jorge
Contact:

Re: [Beta] UPS Easy Shop 0.6.0

Post by Jorup16 » Sun Mar 28, 2010 6:14 pm

Aitorcillo wrote:Thank you Femu, i have restored the code from 0.50... At the moment any problem and the items are permanent visible...
Kendy.9xvn wrote:Is there any option to create category for each kind of item?
That would be nice idea!! In next version try to add i think is very usefull items category ^^

Thanks

http://www.phpbb.com/community/viewtopi ... #p12030575

jonny5v
Registered User
Posts: 4
Joined: Tue Mar 30, 2010 3:57 am

Re: [Beta] UPS Easy Shop 0.6.0

Post by jonny5v » Tue Mar 30, 2010 4:01 am

I don't know if this is possible, but is there a way to display the amount of the item you are displaying on your shelf? Just wondering.

User avatar
keith10456
Registered User
Posts: 2315
Joined: Thu Feb 24, 2005 6:55 pm
Contact:

Re: [Beta] UPS Easy Shop 0.6.0

Post by keith10456 » Tue Mar 30, 2010 4:24 pm

jonny5v wrote:I don't know if this is possible, but is there a way to display the amount of the item you are displaying on your shelf? Just wondering.
Not sure of your question but:

A - The limit is set in the ACP... So the admin sets the total amount of items that can be displayed.

B - If you're asking if there's a way to make it so it says, "3 Items Displaying"... That is not currently a feature (I don't think it's needed either - just my opinion).

C - Are you asking is there a way to display the total amount of a particular item one posses while viewing their Shelf? That is not currently a feature. It will be interesting to see if it could be worked in.

jonny5v
Registered User
Posts: 4
Joined: Tue Mar 30, 2010 3:57 am

Re: [Beta] UPS Easy Shop 0.6.0

Post by jonny5v » Tue Mar 30, 2010 8:02 pm

keith10456 wrote:
jonny5v wrote:I don't know if this is possible, but is there a way to display the amount of the item you are displaying on your shelf? Just wondering.
Not sure of your question but:

A - The limit is set in the ACP... So the admin sets the total amount of items that can be displayed.

B - If you're asking if there's a way to make it so it says, "3 Items Displaying"... That is not currently a feature (I don't think it's needed either - just my opinion).

C - Are you asking is there a way to display the total amount of a particular item one posses while viewing their Shelf? That is not currently a feature. It will be interesting to see if it could be worked in.
You hit it on the head with choice C. When viewing the shelf, you see the total amount owned by the individual :D!

darklift
Registered User
Posts: 27
Joined: Fri Oct 30, 2009 10:47 am

Re: [Beta] UPS Easy Shop 0.6.0

Post by darklift » Wed Mar 31, 2010 6:54 am

Can you make the shop items clickable? What I need is a mod that displays cards and stuff, and when you click on teh card it shows an enlarged version as a pop up.

Also, I'd totally love to have the edits to display the no. of each items bought.

User avatar
Elarya
Registered User
Posts: 6
Joined: Sat Nov 08, 2008 7:22 pm

Re: [Beta] UPS Easy Shop 0.6.0

Post by Elarya » Mon Apr 05, 2010 6:26 pm

Hello Femu,

First, thank you for this mod!

Second, I was wondering if there is a way to set in the options that the admin receives a PM or a log of what is purchased?

I would like to have items in my shop other than a graphic, like, the ability to purchase a title on the board, etc.

Or, if there was some way to implement a log?

Is there currently a way for the admin to see what has been purchased and maybe I am missing it?

Thank you!

go99live
Registered User
Posts: 206
Joined: Mon May 01, 2006 7:18 pm
Contact:

Re: [Beta] UPS Easy Shop 0.6.0

Post by go99live » Mon Apr 05, 2010 7:04 pm

Code: Select all

Feature Request:

Once a item has been bought email admin/or specified email with the details of the purchase and user information.
Looks very useful :D

User avatar
keith10456
Registered User
Posts: 2315
Joined: Thu Feb 24, 2005 6:55 pm
Contact:

Re: [Beta] UPS Easy Shop 0.6.0

Post by keith10456 » Mon Apr 05, 2010 8:40 pm

Elarya wrote:... Second, I was wondering if there is a way to set in the options that the admin receives a PM or a log of what is purchased?
A log to see all of the purchased items in the ACP would definitely be useful.

User avatar
Wuerzi
Registered User
Posts: 60
Joined: Fri Aug 15, 2008 11:38 pm
Location: Germany/Würzburg
Contact:

Re: [Beta] UPS Easy Shop 0.6.0

Post by Wuerzi » Mon Apr 05, 2010 10:05 pm

You can add this in acp user log :?

Open includes/shop/functions_shop.php and search

Code: Select all

$db->sql_transaction('commit');
After add

Code: Select all

add_log('user', $user->data['user_id'], 'LOG_SHOP_BUY_ITEM', $this->data['name']);
And you must make a new lang string in language/en/info_acp_shop.php

Code: Select all

'LOG_SHOP_BUY_ITEM'					=> 'Buy Item %1$s',
I hope this works and is ok for you ;)

User avatar
Elarya
Registered User
Posts: 6
Joined: Sat Nov 08, 2008 7:22 pm

Re: [Beta] UPS Easy Shop 0.6.0

Post by Elarya » Mon Apr 05, 2010 11:39 pm

Thank you Wuerzi- I am working on this now! :) I do have a question (and sorry, I am still learning all of this). But, where you wrote:
And you must make a new lang string in language/en/info_acp_shop.php

Code: Select all

    'LOG_SHOP_BUY_ITEM'               => 'Buy Item %1$s',
I do not see a file in that path. Do I make a new file and save it as a php file adding that info? My forum is in my /forum directory. I went to /forum/language/en/ and do not see the info_acp_shop.php file. Am I in the wrong place?

femu
Registered User
Posts: 1070
Joined: Tue Sep 27, 2005 10:03 am

Re: [Beta] UPS Easy Shop 0.6.0

Post by femu » Tue Apr 06, 2010 6:19 am

Should be language/en/mods .... There you will find the file.
Regards, femu
_____________________________________________
[My development page] - [My normal homepage (German only)]

WascallyWabbit
Registered User
Posts: 170
Joined: Sun Mar 16, 2008 1:17 pm
Contact:

Re: [Beta] UPS Easy Shop 0.6.0

Post by WascallyWabbit » Tue Apr 06, 2010 6:55 am

I had a question similar to what the other person had asked about getting pms from the shop. I was wondering if there is a way to make it so that when an item sells out, an account is sent a pm so that more of that item can be added? Other than dealing with items running out though, everything else is perfect!! Great work on this as I was afraid that when the old shop that was being developed died that we would be stuck without one.......THANKS

User avatar
Elarya
Registered User
Posts: 6
Joined: Sat Nov 08, 2008 7:22 pm

Re: [Beta] UPS Easy Shop 0.6.0

Post by Elarya » Tue Apr 06, 2010 1:45 pm

Thank you Wuerzi & Femu! I edited those files, and I see when an item is purchased it is added to the user log.

Would be adding in a PM to me, the admin, as well as to the purchaser be difficult?

It is nice to have an ongoing log that can be referred back to. But for practicality, so that I can be alerted right away when an item is purchased, a private message would be wonderful to have.

Peter77sx
Registered User
Posts: 3257
Joined: Wed Nov 09, 2005 2:51 pm

Re: [Beta] UPS Easy Shop 0.6.0

Post by Peter77sx » Tue Apr 06, 2010 10:42 pm

Has anyone made an add-on for categories yet?

kidpro1412
Registered User
Posts: 4
Joined: Wed Apr 07, 2010 10:15 am

Re: [Beta] UPS Easy Shop 0.6.0

Post by kidpro1412 » Wed Apr 07, 2010 10:17 am

I use mod simple_points_system_0.5.1 currency combined with mod UPS_Easy_Shop_0.6.0
I have successfully installed 2 mods
Add product to work ok
But when the shop outside the forum its error
Fatal error: Call to undefined function number_format_points () in C: \ AppServ \ www \ forum \ shop.php on line 80
You can not help yourself
This file is shop.php

Code: Select all

<?php
/**
*
* @package - phpbb3 UPS Easy Shop
* @version $Id: shop.php 138 2010-02-22 10:39:40Z femu $
* @copyright (c) 2010 Wuerzi - http://spieleresidenz.de and femu - http://die-muellers.org
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/

/**
* @ignore
*/
define('IN_PHPBB', true);
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);
require($phpbb_root_path . 'includes/shop/functions_shop.' . $phpEx);

// Create shop object
$shop = new shop;

// Start session management
$user->session_begin();
$auth->acl($user->data);
$user->setup(array('mods/shop', 'mods/points'));

// Load shop template
$template->set_filenames(array(
	'body' => 'shop.html')
);

//Template variables for the navigation
$template->assign_block_vars('navlinks', array(
	'FORUM_NAME'	=> $user->lang['SHOP_FORUM_NAME'],
	'U_VIEW_FORUM'	=> append_sid("shop.$phpEx"),
));

$page_title = $user->lang['SHOP_FORUM_NAME'];

//Check if you are locked or not
if (!$auth->acl_get('u_shop_mod'))
{
    trigger_error('NOT_AUTHORISED');
}

// Disable shop, if the install file is still present in the root folder
if (file_exists($phpbb_root_path . 'install_shop.php'))
{
	// Adjust the message slightly according to the permissions
	if ( $auth->acl_gets('a_') )
	{
		$message = $user->lang['SHOP_REMOVE_INSTALL'];
	}
	else
	{
		$message = $shop_config['disbale_message'];
	}
	trigger_error($message);
}

// Shop Version
$version = $config['shop_mod_version'];

// Is Shop enable?
if (($items = $shop->get_item_list()) && $config['shop_enable'] && $shop->cash->money_on && $config['shop_mod_version'])
{
	$shop_open = true;
}
else
{
    meta_refresh(5, append_sid($phpbb_root_path . 'index.' . $phpEx));
	trigger_error($shop_config['disable_message']);
}

$template->assign_vars(array(
	'S_OPEN'		=> $shop_open,
	'S_STOCK'		=> true,
	'SHOP_VERS'		=> $version,
	'SHOP_YOU_HAVE'	=> sprintf($user->lang['SHOP_YOU_HAVE'], number_format_points($user->data['user_points']), $config['points_name']),
));

if ( request_var('mode', 'view') == 'buy' && $config['shop_enable'] )
{
	//first of all, we make sure the item exists
	$item_id = request_var('item', 0);

	if (!$item = $shop->get_item($item_id))
	{
		trigger_error('SHOP_ITEM_ID_NOT_FOUND');
	}

	if (confirm_box(true))
	{
        $item->buy();
	}
	else
	{
		$s_hidden_fields = build_hidden_fields(array(
			'submit'	=> true,
			)
		);

		$confirm_string = sprintf($user->lang['SHOP_ITEM_CONFIRM_BUY'], $item->data['name'], $shop->cash->format_cash_string($item->data['price']), $config['points_name']);
		confirm_box(false, $confirm_string, $s_hidden_fields);
		redirect(append_sid("{$phpbb_root_path}shop.$phpEx"));
	}
}

if ($shop_open)
{
	if (!$user->data['is_registered'])
	{
		$can_buy = false;
	}

	foreach ($items as $item)
	{
		$insuf_funds	= $item->data['price'] > $user->data['user_points'] ? true : false;

		$template->assign_block_vars('item_list', array(
			'NAME'			=> $item->data['name'],
			'DESCRIPTION'	=> $item->data['description'],
			'ICON'			=> $item->data['icon'],
			'ICON_WIDTH'	=> $item->data['icon_width'],
			'ICON_HEIGHT'	=> $item->data['icon_height'],
			'PRICE'			=> $shop->cash->format_cash_string($item->data['price']),
			'QUANTITY'		=> $item->data['quantity'],
			'INSUFFICENT'	=> sprintf($user->lang['SHOP_INSUFFICIENT_FUNDS'], $config['points_name']),
			'S_INSTANT'		=> $item->data['instant_use'],
			'S_INSUF_FUNDS'	=> $insuf_funds,
			'U_BUY'			=> append_sid("{$phpbb_root_path}shop.$phpEx", 'mode=buy&item=' . $item->data['item']),
		));

		// Pagination Items
		$start			= request_var('start', 0);
		$number			= $shop_config['items_per_page'];

		// Read out config data
		$sql = 'SELECT config_name, config_value
			FROM ' . SHOP_CONFIG_TABLE;
		$result = $db->sql_query($sql);

		while ($row = $db->sql_fetchrow($result))
		{
			$shop_config[$row['config_name']] = $row['config_value'];
		}
		$db->sql_freeresult($result);

		$sql = 'SELECT COUNT(item) AS total_items
			FROM ' . SHOP_ITEMS_TABLE . '
			WHERE item > 0 ';
		$result = $db->sql_query($sql);
		$row = $db->sql_fetchrow($result);
		$total_items = $row['total_items'];
		$db->sql_freeresult($result);

		$template->assign_vars(array(
			'PAGINATION' 	=> generate_pagination(append_sid("{$phpbb_root_path}shop.$phpEx"), $total_items, $number, $start, true),
			'PAGE_NUMBER'	=> on_page($total_items, $number, $start),
			'TOTAL_ITEMS'	=> sprintf($user->lang['SHOP_TOTAL_ITEMS'], $total_items),
		));
	}
}

page_header($page_title);

page_footer();

?>

Locked

Return to “[3.0.x] Abandoned MODs”