phpbb-auction.com Forum Index phpbb-auction.com
Download, Support, Documentation
 
Donate to phpbb-auction.com to support the project


phpbb-Auction
  Home
   - News
   - Bug report/Patches
   - Future Features
  Demo
  Downloads
   - Version 1.3m  (Core /Lang /Mods)
   - Version 1.2m  (Core /Lang /Mods)
   - Version 1.0m  (Core /Lang /Mods)
   - All
  Services
  Documentation
   - Features
   - Documents
   - How-Tos
   - About
  Support
   - English
   - German
  Development
   - Changlog
   - Requests
   - Team
   - CVS
  Community
   - Website of the Month
   - Websites
   - Community Forum
   - Member

Navigation
FAQFAQ
SearchSearch
UsergroupsUsergroups
RegisterRegister
ProfileProfile
Log in to check your private messagesLog in to check your private messages
Log inLog in

Forum
Changing start time auctions
Sun Feb 07, 2010 4:33 am FR
Easy: what code to use to update sql table?
Fri Oct 16, 2009 8:39 am guyb
Unlimited products(downloads)
Wed Oct 14, 2009 7:09 pm hoimyr
Seller chooses currency
Sun Oct 11, 2009 8:00 pm hoimyr
Cant select end date without getting error
Sun Oct 11, 2009 6:43 pm hoimyr

About
Author: FR
Credits:
Brookfresh, Brad Lawryk, Crogon, DaMysterious, EklipzeDesigns, ML, musashi, phpBB Group, phpBB-Auction-Team, php-styles, sanman, Tel, Vampy, wGEric

Supported Sites





Statistics
User: 18058
Posts: 18401
Latest User: BardykGyday

[MOD released] Allow both "real money" & local
Goto page 1, 2  Next
 
Post new topic   Reply to topic    phpbb-auction.com Forum Index -> Feature Request
View previous topic :: View next topic  

Should this mod be made?
Yes
100%
 100%  [ 4 ]
No
0%
 0%  [ 0 ]
Total Votes : 4

Author Message
madmacsen
Small-Cap Auctioneer
Small-Cap Auctioneer


Joined: 06 Feb 2005
Posts: 27
Location: New England, USA

PostPosted: Tue Feb 08, 2005 2:38 am    Post subject: [MOD released] Allow both "real money" & local Reply with quote

[Originally proposed in http://www.phpbb-auction.com/sutra4813.html#4813 and prodded into a formal request by FR...]

Arrow Problem: phpbb-auction currently will not allow auction admins to select both "real money" options (i.e. Paypal or MoneyBooker) and user_points for auction listing payments at the same time.

Idea Request: allow admin to allow any/all forms of payment for real money auctions.

Question Why?: There are currently two basic approaches available for handling "real money" listing fees:
  • individual "real money" transaction using, for example, PayPal
    • Advantage: easy for auction users -- especially first time and impulse auction users
    • Disadvantage: relatively high transaction fees for auction admins -- especially for lower listing prices

  • points transaction where user_points first must be earned or purchased
    • Advantage: gives auction user option of alternative means to earn or purchase points; gives auction admin option to sell points in quantity and save on transaction fees; gives admin the option of selling points via cash, check, bartar, or other offline transactions
    • Disadvantage: adds steps to listing process; may discourage new and impulse auction users

Allowing auction fees to be paid by either "real money" (i.e. PayPal, MoneyBooker, etc.) OR user_points at the same time:
  • provides a means for new users and impulse users to easily list items with a minimum number of steps;
  • provides regular users a means to earn points or purchase them "offline"; and
  • provides admins a means to reduce transaction fees through bulk sale of points without losing out on impulse listings.

_________________
New "Medieval Mart" auction development site at http://www.medievalmart.com/


Last edited by madmacsen on Thu Feb 10, 2005 3:31 pm; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
treebeard
Large-Cap Auctioneer
Large-Cap Auctioneer


Joined: 14 Sep 2004
Posts: 140
Location: Central Command

PostPosted: Tue Feb 08, 2005 6:56 am    Post subject: Reply with quote

I think that this issue is being taken care of with FR's 'debit system'. I like the concept but don't see a need to have redundant systems in place.
________
juggalos


Last edited by treebeard on Fri Feb 04, 2011 6:58 am; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website
madmacsen
Small-Cap Auctioneer
Small-Cap Auctioneer


Joined: 06 Feb 2005
Posts: 27
Location: New England, USA

PostPosted: Tue Feb 08, 2005 3:36 pm    Post subject: Reply with quote

treebeard wrote:
I think that this issue is being taken care of with FR's 'debit system'. I like the concept but don't see a need to have redundant systems in place.


It's not quite the same...

I am already in the process of adding a 'debit system' using an existing point system mod. (With any luck, I should have it in place by the end of the day...)

Using a debit system to buy points only provides half of the equation as I outlined in the original request proposal: it allows users to buy points in quantity to use for listing items (or towards final value fees, etc.). What lacks is an easy means for new/impulse users to use "real money" services without the extra steps needed to purchase points in advance.

IMHO, there are real advantages to giving the users the option of either purchasing points in bulk in advance or making direct "real money" payments on a listing-by-listing basis.

(It's entirely possible that I can modify the existing code to allow both user_points and "real money" systems to work at once. Honestly, I haven't looked at the code enough to know for sure. I'm hoping FR can comment whether there's an intrinsic reason why both can't be active at once or if that's just the way he assumed everybody would want it to work. Cool )
_________________
New "Medieval Mart" auction development site at http://www.medievalmart.com/
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
treebeard
Large-Cap Auctioneer
Large-Cap Auctioneer


Joined: 14 Sep 2004
Posts: 140
Location: Central Command

PostPosted: Tue Feb 08, 2005 3:59 pm    Post subject: Reply with quote

Ok I see your point. I was thinking that FR's debit system would be in addition to the current payment system. Now if FR's system also allows for montly billing after the fact then it would be truly powerful. However, we will have to wait and see what it has to offer when he releases it.... soon I hope! Wink
________
marijuana trichomes


Last edited by treebeard on Fri Feb 04, 2011 6:58 am; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website
madmacsen
Small-Cap Auctioneer
Small-Cap Auctioneer


Joined: 06 Feb 2005
Posts: 27
Location: New England, USA

PostPosted: Tue Feb 08, 2005 7:42 pm    Post subject: Reply with quote

treebeard wrote:
Ok I see your point. I was thinking that FR's debit system would be in addition to the current payment system. Now if FR's system also allows for montly billing after the fact then it would be truly powerful. However, we will have to wait and see what it has to offer when he releases it.... soon I hope! Wink


Hear, hear! (Not that we would want to be "hasty", ho-haroom... Wink )

The one odd problem with using both user_points and "real money" I'm running into is the odd system where the auction charges bids to the bidder's points on the fly... I need a simple way to turn that off without disabling the point system altogether. (It's good that the system allows users to pay for items/offers with points, but what if the seller wants $$$? I'd rather that all be worked out after the auction between buyer and seller rather than automagically by the software.)

FWIW, I added a PayPal based donation system today that needs just a few cosmetic tweaks to become a 'debit system' for purchasing user_points and am shopping for a subscription system that can be modified for variable billing next... Cool
_________________
New "Medieval Mart" auction development site at http://www.medievalmart.com/
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
madmacsen
Small-Cap Auctioneer
Small-Cap Auctioneer


Joined: 06 Feb 2005
Posts: 27
Location: New England, USA

PostPosted: Wed Feb 09, 2005 3:38 pm    Post subject: Reply with quote

FWIW, I'm halfway through creating this mod already... It's looking easier than I expected. (Thank you FR for coding so neatly. Cool )

Expect a beta of this MOD by the end of the day.
_________________
New "Medieval Mart" auction development site at http://www.medievalmart.com/
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
madmacsen
Small-Cap Auctioneer
Small-Cap Auctioneer


Joined: 06 Feb 2005
Posts: 27
Location: New England, USA

PostPosted: Thu Feb 10, 2005 2:42 pm    Post subject: Reply with quote

Here it is... (Didn't finish yesterday as planned -- wife insisted on going out... S'okay. She's cute, I'll keep her. Wink )

Exclamation 2/13/05 This MOD has been editted to version 0.1a beta to add code accidentally omitted when the MOD script was created. The new code can be found at "Combined Payment Method MOD - late payment 2"

Exclamation 2/13/05 Incremental MOD with bug fixes added below. You must add o.1a beta MOD first!

Code:

#####################################################################################
##
## MOD Title:       COMBINED PAYMENT METHODS MOD FOR AUCTION MOD 1.2m
## MOD Author:       madmacsen <madmacsen@medievalmart.com> (Bob) http://www.medievalmart.com/
## MOD Description:    Admins can mix payment methods ex. user_points & PayPal
## MOD Version:    0.1a beta
##
## Installation Level:    (Easy)
## Installation Time:   10 min (should be compatible with Easy MOD)
##
## Requirements:   A running phpBB 2.0.x (lastest version recommend)
##         phpbb-Auction 1.2b MOD
##                      Vampy's patch for [B1.2m-2a] MUST be in place for this mod to work properly!
##         Any points system MOD utilizing user_points
##
## Tested with:      phpbb 2.0.11
##         w/ Cash MOD 2.2.1
##
## Files To Edit:    templates/subSilver/auction_admin_config_body.tpl
##         language/lang_english/lang_auction.php
##         auction_offer.php
##         auction/functions_blocks.php
##
## Included Files:    none
##
#####################################################################################
##
## Before Adding This MOD To Your Forum, You Should Back Up All Files
## Related To This MOD
##
#####################################################################################
##
## For Security Purposes, you should check www.phpbb-auction.com for news and patches
##
#####################################################################################
##
## Author Notes:
##
##   This MOD allows admins to mix different payment methods and allows the
##   auction users to select whichever payment methods suits them best.
##
##   Special Thanks to...
##   
##          FR for bringing us phpbb Auction (and for writing such clear code :)   
##          Vampy for the [B1.2m-2a] payment confirmation patch
##          Treebeard for commenting on my original mod proposal
##
#####################################################################################
##
##   This hack is released under the GPL License.
##   This hack can be freely used, but not distributed, without permission.
##   Intellectual Property is retained by the author listed above.
##
#####################################################################################
#
#-----[ OPEN ]-------------------------------------------------------
#
#Prevents the Auction Configuration Panel from prohibiting the Admin from
#selecting combined payment methods.  All the original code is left in place and
#the entire MOD can be effectively reversed by returning this single change to its
#original form.
#

templates/subSilver/auction_admin_config_body.tpl

#
#-----[ FIND ]------------------------------------------
#
         <td class="row2"><input type="radio" name="auction_paymentsystem_activate_user_points" value="1" {user_points_active.AUCTION_PAYMENTSYSTEM_ACTIVATE_USER_POINTS_YES} onclick="javascript:deactivate();"/> {L_YES}&nbsp;&nbsp;<input type="radio" name="auction_paymentsystem_activate_user_points" value="0" {user_points_active.AUCTION_PAYMENTSYSTEM_ACTIVATE_USER_POINTS_NO} /> {L_NO}</td>

#
#-----[ REPLACE ]------------------------------------------
#
         <td class="row2"><input type="radio" name="auction_paymentsystem_activate_user_points" value="1" {user_points_active.AUCTION_PAYMENTSYSTEM_ACTIVATE_USER_POINTS_YES} /><!--onclick="javascript:deactivate();"/>--Combined Payment Methods MOD--> {L_YES}&nbsp;&nbsp;<input type="radio" name="auction_paymentsystem_activate_user_points" value="0" {user_points_active.AUCTION_PAYMENTSYSTEM_ACTIVATE_USER_POINTS_NO} /> {L_NO}</td>

#
#-----[ OPEN ]-------------------------------------------------------
#

language/lang_english/lang_auction.php

#
#-----[ FIND ]------------------------------------------
#
$lang['auction_paymentsystem_user_points'] = 'Use user-point system. <b>You have to deactivate all other payment-systems</b>. Don\'t forget to change the currency to \'points\'.';

#
#-----[ REPLACE ]------------------------------------------
#
//Combined Payment Methods MOD
$lang['auction_paymentsystem_user_points'] = 'Use user-point system. <b>You have to deactivate all other payment-systems to enable automatic bid charges</b>. Don\'t forget to change the currency to \'points\'.';

#
#-----[ OPEN ]-------------------------------------------------------
#
#Remove the hard coding that prevents combined payment methods.  All original
#functionality is retained and the system will automatically charge all transactions
#to user_points if that is the only payment method allowed.
#

auction_offer.php

#
#-----[ FIND ]------------------------------------------
#
      if ( $coupon_valid_flag == 1 )
                                  {
                                       $auction_offer_price = doubleval($auction_offer_price*$coupon_amount);
                                  } // if

                if ( $auction_config_data['auction_paymentsystem_activate_user_points'] == 1 )


#
#-----[ REPLACE ]------------------------------------------
#
      if ( $coupon_valid_flag == 1 )
                                  {
                                       $auction_offer_price = doubleval($auction_offer_price*$coupon_amount);
                                  } // if

      //Combined Payment Methods MOD - coupon handling
                if ( $auction_config_data['auction_paymentsystem_activate_user_points'] == 1 AND $auction_config_data['auction_paymentsystem_activate_paypal'] == 0 AND $auction_config_data['auction_paymentsystem_activate_moneybooker'] == 0)

#
#-----[ FIND ]-------------------------------------------------------
#
                            if ( $auction_config_data['auction_paymentsystem_activate_paypal'] == 1 && $auction_config_data['auction_paymentsystem_activate_user_points'] == 0)
                                 {
                                      $template->assign_block_vars('paypal', array('PAYPAL_IMAGE' => PAYPAL_IMAGE ));
                                 } // if

                            // Accept moneybooker payments
                            if ( $auction_config_data['auction_paymentsystem_activate_moneybooker'] == 1 && $auction_config_data['auction_paymentsystem_activate_user_points'] == 0)
                               {
                                    $template->assign_block_vars('moneybooker', array('MONEYBOOKER_IMAGE' => MONEYBOOKER_IMAGE));
                            } // if

#
#-----[ REPLACE ]------------------------------------------
#
             //Combined Payment Methods MOD - payment methods allowed
                            if ( $auction_config_data['auction_paymentsystem_activate_paypal'] == 1 )
                                 {
                                      $template->assign_block_vars('paypal', array('PAYPAL_IMAGE' => PAYPAL_IMAGE ));
                                 } // if

                            // Accept moneybooker payments
                            if ( $auction_config_data['auction_paymentsystem_activate_moneybooker'] == 1 )
                               {
                                    $template->assign_block_vars('moneybooker', array('MONEYBOOKER_IMAGE' => MONEYBOOKER_IMAGE));
                               } // if

#
#-----[ FIND ]------------------------------------------
#
                   if ( $auction_config_data['auction_paymentsystem_activate_user_points'] == 1 )
                        {
                             // Charge offer

#
#-----[ REPLACE ]------------------------------------------
#
         //Combined Payment Methods MOD - late payment 1
                   if ( $auction_config_data['auction_paymentsystem_activate_user_points'] == 1 AND $auction_config_data['auction_paymentsystem_activate_paypal'] == 0 AND $auction_config_data['auction_paymentsystem_activate_moneybooker'] == 0)
                        {
                             // Charge offer

#
#-----[ FIND ]------------------------------------------
#
                   $template->set_filenames(array('body' => 'auction_add_offer_pay.tpl'));

                   if ( $auction_config_data['auction_paymentsystem_activate_paypal'] == 1 AND $auction_config_data['auction_paymentsystem_activate_user_points'] == 0 )
                        {
                             $template->assign_block_vars('paypal', array(
                               'PAYPAL_IMAGE' => PAYPAL_IMAGE ));
                        }
                   // Accept moneybooker payments - show image
                   if ( $auction_config_data['auction_paymentsystem_activate_moneybooker'] == 1 AND $auction_config_data['auction_paymentsystem_activate_user_points'] == 0 )
                      {
                           $template->assign_block_vars('moneybooker', array('MONEYBOOKER_IMAGE' => MONEYBOOKER_IMAGE));
                      }

#
#-----[ REPLACE ]------------------------------------------
#
                   $template->set_filenames(array('body' => 'auction_add_offer_pay.tpl'));

         //Combined Payment Methods MOD - late payment 2a
                   if ( $auction_config_data['auction_paymentsystem_activate_user_points'] == 1 )
                        {
                             $template->assign_block_vars('user_points', array(
                               'L_AUCTION_PAY_WITH_USER_POINTS' => sprintf($lang['auction_pay_with_user_points'], $board_config['points_name']),
                               'AUCTION_PAY_WITH_USER_POINTS_TOTAL_COST' => $cost_total,
                               'AUCTION_PAY_WITH_USER_POINTS_OFFER_ID' => $auction_offer['PK_auction_offer_id'],
                               'S_AUCTION_PAY_WITH_USER_POINTS' => append_sid("auction_offer.php?mode=user_points_pay") ));
                         }

                   if ( $auction_config_data['auction_paymentsystem_activate_paypal'] == 1 )
                        {
                             $template->assign_block_vars('paypal', array(
                               'PAYPAL_IMAGE' => PAYPAL_IMAGE ));
                        }
                   // Accept moneybooker payments - show image
                   if ( $auction_config_data['auction_paymentsystem_activate_moneybooker'] == 1 )
                      {
                           $template->assign_block_vars('moneybooker', array('MONEYBOOKER_IMAGE' => MONEYBOOKER_IMAGE));
                      }

#
#-----[ FIND ]------------------------------------------
#
                // if point-payment is activated e charge the points now
                if ( $auction_config_data['auction_paymentsystem_activate_user_points'] == 1 )

#
#-----[ REPLACE ]------------------------------------------
#
                // if point-payment is activated e charge the points now
      //Combined Payment Methods MOD - buy now
                if ( $auction_config_data['auction_paymentsystem_activate_user_points'] == 1 AND $auction_config_data['auction_paymentsystem_activate_paypal'] == 0 AND $auction_config_data['auction_paymentsystem_activate_moneybooker'] == 0)

#
#-----[ FIND ]------------------------------------------
#
                // if pay-with-userpoints is active charge points now
                if ( $auction_config_data['auction_paymentsystem_activate_user_points'] == 1 )

#
#-----[ REPLACE ]------------------------------------------
#
                // if pay-with-userpoints is active charge points now
      //Combined Payment Methods MOD - buy now confirm
                if ( $auction_config_data['auction_paymentsystem_activate_user_points'] == 1 AND $auction_config_data['auction_paymentsystem_activate_paypal'] == 0 AND $auction_config_data['auction_paymentsystem_activate_moneybooker'] == 0)

#
#-----[ FIND ]------------------------------------------
#
                if ( $auction_config_data['auction_paymentsystem_activate_user_points'] == 1 )
                     {
                          // Check on user-point-payment if user has enough points

#
#-----[ REPLACE ]------------------------------------------
#
      //Combined Payment Methods MOD - bid check
                if ( $auction_config_data['auction_paymentsystem_activate_user_points'] == 1 AND $auction_config_data['auction_paymentsystem_activate_paypal'] == 0 AND $auction_config_data['auction_paymentsystem_activate_moneybooker'] == 0)
                     {
                          // Check on user-point-payment if user has enough points

#
#-----[ FIND ]------------------------------------------
#
                 // Charge points if payment-system is activated
                 if ( $auction_config_data['auction_paymentsystem_activate_user_points'] == 1)

#
#-----[ REPLACE ]------------------------------------------
#
                 // Charge points if payment-system is activated
       //Combined Payment Method MOD - bid
                 if ( $auction_config_data['auction_paymentsystem_activate_user_points'] == 1 AND $auction_config_data['auction_paymentsystem_activate_paypal'] == 0 AND $auction_config_data['auction_paymentsystem_activate_moneybooker'] == 0)

#
#-----[ FIND ]------------------------------------------
#
                 if ( $auction_config_data['auction_paymentsystem_activate_user_points'] == 1 )
                      {
                           $bid_value = round(doubleval($HTTP_POST_VARS['auction_your_amount']),0);

#
#-----[ REPLACE ]------------------------------------------
#
       //Combined Payment Method MOD - rounding
                 if ( $auction_config_data['auction_paymentsystem_activate_user_points'] == 1 AND $auction_config_data['auction_paymentsystem_activate_paypal'] == 0 AND $auction_config_data['auction_paymentsystem_activate_moneybooker'] == 0)
                      {
                           $bid_value = round(doubleval($HTTP_POST_VARS['auction_your_amount']),0);

#
#-----[ OPEN ]-------------------------------------------------------
#
# Allow Function Block to display mixed payment methods
#

auction/functions_blocks.php

#
#-----[ FIND ]------------------------------------------
#
                     // Accept paypal payments
                     if ( $auction_config_data['auction_paymentsystem_activate_user_points'] == 1 )
                        {
                             $template->assign_block_vars('prices_block.user_points', array(
                                    'L_AUCTION_PAYMENTSYSTEM_USER_POINTS' => $lang['auction_paymentsystem_user_points_active'] ));
                        }
                     if ( $auction_config_data['auction_paymentsystem_activate_paypal'] == 1 AND $auction_config_data['auction_paymentsystem_activate_user_points'] == 0 )
                        {
                             $template->assign_block_vars('prices_block.paypal', array(
                                    'PAYPAL_IMAGE' => PAYPAL_IMAGE ));
                        }
                     // Accept moneybooker payments
                     if ( $auction_config_data['auction_paymentsystem_activate_moneybooker'] == 1 AND $auction_config_data['auction_paymentsystem_activate_user_points'] == 0)
                        {
                             $template->assign_block_vars('prices_block.moneybooker', array(
                                    'MONEYBOOKER_IMAGE' => MONEYBOOKER_IMAGE));
                        }

#
#-----[ REPLACE ]------------------------------------------
#
         //Combined Payment Methods MOD
                     // Accept paypal payments
                     if ( $auction_config_data['auction_paymentsystem_activate_user_points'] == 1 )
                        {
                             $template->assign_block_vars('prices_block.user_points', array(
                                    'L_AUCTION_PAYMENTSYSTEM_USER_POINTS' => $lang['auction_paymentsystem_user_points_active'] ));
                        }
                     if ( $auction_config_data['auction_paymentsystem_activate_paypal'] == 1)
                        {
                             $template->assign_block_vars('prices_block.paypal', array(
                                    'PAYPAL_IMAGE' => PAYPAL_IMAGE ));
                        }
                     // Accept moneybooker payments
                     if ( $auction_config_data['auction_paymentsystem_activate_moneybooker'] == 1)
                        {
                             $template->assign_block_vars('prices_block.moneybooker', array(
                                    'MONEYBOOKER_IMAGE' => MONEYBOOKER_IMAGE));
                        }

#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#


Comments/corrections welcome. Cool

Next project... Final Value Commission charging...
_________________
New "Medieval Mart" auction development site at http://www.medievalmart.com/


Last edited by madmacsen on Sun Feb 13, 2005 10:34 pm; edited 2 times in total
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
FR
Site Admin
Site Admin


Joined: 26 Jan 2004
Posts: 1764
Location: root directory

PostPosted: Thu Feb 10, 2005 3:53 pm    Post subject: Reply with quote

madmacsen wrote:
Here it is... (Didn't finish yesterday as planned -- wife insisted on going out... S'okay. She's cute, I'll keep her. Wink )


know that situation..

great contrib. hope some feedback will be posted.
_________________
Want to say thank you. Use my Amazon Wishlist
Meet the world on movie-on.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
madmacsen
Small-Cap Auctioneer
Small-Cap Auctioneer


Joined: 06 Feb 2005
Posts: 27
Location: New England, USA

PostPosted: Sun Feb 13, 2005 4:55 pm    Post subject: Reply with quote

Exclamation Fixed a typo in MOD script for version 0.1 beta. (some replacement code was omitted in the section headed "Combined Payment Method MOD -- late payment 2")

The MOD script above has been updated to reflect the correction.

There is a bug in late payment where users can pay with points even if their point balance is too low. I think I have the solution but I'm having a coding problem I'll ask about elsewhere (brain lock)...

FWIW, this is tied into the development of my Final Value Commission fee system which, at this point, will require Combined Payment Method MOD. Once this bug is dead, the FVC isn't far off. Cool
_________________
New "Medieval Mart" auction development site at http://www.medievalmart.com/
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
madmacsen
Small-Cap Auctioneer
Small-Cap Auctioneer


Joined: 06 Feb 2005
Posts: 27
Location: New England, USA

PostPosted: Sun Feb 13, 2005 10:32 pm    Post subject: Reply with quote

Here's the 0.2 beta incremental upgrade.

If fixes the issue where users are allowed to charge listings to points when they dont have any and get themselves into a negative balance.

1> It displays how many points they have on the payment page.
2> If they don't have enough, it doesn't display the user_points payment button at all. Instead, it displays a message that they don't have enough user_points.
3> This code will be required for my Final Value Commission MOD, next on the MOD list.

Code:
#
#Combined Payment Methods MOD version 0.2 beta
#
#This is an incremental update.  You MUST do the Combined Payment Method MOD 0.1a beta FIRST
#

#
#-----[ OPEN ]------------------------------------------
#

auction_offer.php

#
#-----[ FIND ]------------------------------------------
#
         //Combined Payment Methods MOD - late payment 2a
                   if ( $auction_config_data['auction_paymentsystem_activate_user_points'] == 1 )
                        {
                             $template->assign_block_vars('user_points', array(
                               'L_AUCTION_PAY_WITH_USER_POINTS' => sprintf($lang['auction_pay_with_user_points'], $board_config['points_name']),
                               'AUCTION_PAY_WITH_USER_POINTS_TOTAL_COST' => $cost_total,
                               'AUCTION_PAY_WITH_USER_POINTS_OFFER_ID' => $auction_offer['PK_auction_offer_id'],
                               'S_AUCTION_PAY_WITH_USER_POINTS' => append_sid("auction_offer.php?mode=user_points_pay") ));
                         }

#
#-----[ REPLACE ]------------------------------------------
#
         //Combined Payment Methods MOD - late payment 2.1
                   if ( $auction_config_data['auction_paymentsystem_activate_user_points'] == 1 )
                        {
                             // CHECK IF user has enough points
                             $sql = "SELECT user_points
                                     FROM " . USERS_TABLE . "
                                     WHERE user_id= " . $userdata['user_id'];
 
                             if( !($result = $db->sql_query($sql)) )
                                  {
                                        message_die(GENERAL_ERROR, 'Could not query user-points', '', __LINE__, __FILE__, $sql);
                                  }
                               
                             $row = $db->sql_fetchrow($result);

                             //show user points balance
                             $template->assign_vars(array(
                               'L_USER_POINTS_BALANCE' => $row['user_points'],
                               'L_POINTS_NAME' => $board_config['points_name'],
                               'L_NOT_ENOUGH_POINTS' => sprintf($lang['auction_not_enough_points'], $board_config['points_name']) ));
   
                             if ( $row['user_points'] >= $cost_total)

                             {
                                  //show pay with user points option only if user balance sufficient
                                  $template->assign_block_vars('user_points', array(
                                    'L_AUCTION_PAY_WITH_USER_POINTS' => sprintf($lang['auction_pay_with_user_points'], $board_config['points_name']),
                                    'AUCTION_PAY_WITH_USER_POINTS_TOTAL_COST' => $cost_total,
                                    'AUCTION_PAY_WITH_USER_POINTS_OFFER_ID' => $auction_offer['PK_auction_offer_id'],
                                    'S_AUCTION_PAY_WITH_USER_POINTS' => append_sid("auction_offer.php?mode=user_points_pay") ));
                              }

                         } //if user points active

#
#-----[ OPEN ]----------------------------------------------------------
#

/templates/subSilver/auction_add_offer_pay.tpl

#
#-----[ FIND ]----------------------------------------------------------
#
     <!-- BEGIN user_points -->

#
#-----[ REPLACE ]-------------------------------------------------------
#
     <!-- Combined Payment Method MOD - late payment 2.1 -->
     <tr align="center">
          <td class="row2" colspan="3">
          <span class="forumlink">You have {L_USER_POINTS_BALANCE}&nbsp;{L_POINTS_NAME}.<br>{L_NOT_ENOUGH_POINTS}</span>
          </td>
     </tr>
     <!-- BEGIN user_points -->

#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#


As always, comments and criticisms welcome. Cool
_________________
New "Medieval Mart" auction development site at http://www.medievalmart.com/
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Crogon
Moderator
Moderator


Joined: 17 May 2004
Posts: 574
Location: Anywhere I'm needed.. which is usually everywhere. ;)

PostPosted: Thu Feb 17, 2005 6:35 pm    Post subject: Reply with quote

So can anyone verify that this works? It belongs in development at this point, but if it works the way it's intended as is, I could move it straight to the mods section.
Back to top
View user's profile Send private message
madmacsen
Small-Cap Auctioneer
Small-Cap Auctioneer


Joined: 06 Feb 2005
Posts: 27
Location: New England, USA

PostPosted: Thu Feb 17, 2005 10:28 pm    Post subject: Reply with quote

Crogon wrote:
So can anyone verify that this works? It belongs in development at this point, but if it works the way it's intended as is, I could move it straight to the mods section.


FWIW, it's still looking like it works properly so far... I don't expect to do anymore development along this line except as it relates to the pending Final Value Commission MOD which, so far, requires this MOD.

Cool
_________________
New "Medieval Mart" auction development site at http://www.medievalmart.com/
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Crogon
Moderator
Moderator


Joined: 17 May 2004
Posts: 574
Location: Anywhere I'm needed.. which is usually everywhere. ;)

PostPosted: Thu Feb 17, 2005 11:19 pm    Post subject: Reply with quote

For some unknown reason, in the dev forum we like to get at least one person to verify that a script is working first. It somehow compensates for the lack of having a range of server installs to test all known variables on. Confused Surprised

Actually I think it's a lot like a security blanket and let's us say that someone tested it and it works, lol. Laughing
Back to top
View user's profile Send private message
burento
Mid-Cap Auctioneer
Mid-Cap Auctioneer


Joined: 20 Dec 2004
Posts: 72

PostPosted: Thu Feb 24, 2005 11:52 am    Post subject: Reply with quote

Will this mod allow two forms of mentary or just points and one monetary.

Can my users chose both Yen and Dollar with this MOD?
Back to top
View user's profile Send private message
madmacsen
Small-Cap Auctioneer
Small-Cap Auctioneer


Joined: 06 Feb 2005
Posts: 27
Location: New England, USA

PostPosted: Thu Feb 24, 2005 10:58 pm    Post subject: Reply with quote

burento wrote:
Will this mod allow two forms of mentary or just points and one monetary.

Can my users chose both Yen and Dollar with this MOD?


This mod allows mixed payment methods, i.e. points or Paypal (or MoneyBooker). It does not provide for multiple currencies. =(

Cool
_________________
New "Medieval Mart" auction development site at http://www.medievalmart.com/
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    phpbb-auction.com Forum Index -> Feature Request All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


phpbb-auction.com - Developed by www.digital-media-lab.com
Sponsored by: www.globibo.com - www.learn2go.de - www.talentone.org - www.language-school.in - www.ping-ke.cn