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: 17038
Posts: 18401
Latest User: bryanyb2

On configuring Mod for post-sale commission payments

 
Post new topic   Reply to topic    phpbb-auction.com Forum Index -> Support
View previous topic :: View next topic  
Author Message
guyb
Small-Cap Auctioneer
Small-Cap Auctioneer


Joined: 22 Oct 2008
Posts: 21

PostPosted: Sat Oct 25, 2008 9:59 am    Post subject: On configuring Mod for post-sale commission payments Reply with quote

This is a fantastic mod and my gratitude to FR and his team for developing it. I'm using this with a phpbb2 backend on a site which also uses mx-publisher with phpbb3 - and it all looks fine. I'm actually happy I'm using this mod with phpbb2 because more mods are available for it.

When this site was down last week I started posting my 'experiment' here, but now that this board is back up I'll write it here.

I'm posting the steps of an idea I'm trying to implement (with thanks to much thanks to Lumpy Burgertushie, Brf and poyntesm), but I do have a question or two at the end - I need a little help.


situation:
the business model I'm trying to use is that I would receive a commission only if an item sells (i.e. I get paid after someone has used the service).

The MOD isn't set up to guarantee that will work, so I have to hotwire it - and for this to work I need two things sorted out:
1. Payment: I would get paid by the buyer, I would ask seller to ship the merchandise, and then I would transfer his share of payment to him (i.e. an escrow style payment arrangement)
2. Security: I need to prevent buyer and seller from exchanging full contact details before close of sale, otherwise I could get cut out from receiving payment.

possible solutions: I'm posting my solutions / requests for help in separate postings below


Last edited by guyb on Sat Oct 25, 2008 10:37 am; edited 2 times in total
Back to top
View user's profile Send private message
guyb
Small-Cap Auctioneer
Small-Cap Auctioneer


Joined: 22 Oct 2008
Posts: 21

PostPosted: Sat Oct 25, 2008 10:06 am    Post subject: Reply with quote

Possible solution for "security":

to prevent buyers and sellers from seeing each others contact details, I had to add special conditions in certain files such that only ADMIN and MOD would be able to see email addresses, ICQ's, MSN messengers etc.

I wanted ideally a compound conditional statement so that more than 1 permission level could see these details.

The key issue here was that regardless of the permission nomenclature used by this mod (i.e. "AUCTIONEER"), only the usual phpbb2 names like ADMIN and MOD could be used.

The "If" command became:
Code:
if ( $userdata['user_level'] == ADMIN || $userdata['user_level'] == MOD )


And I used it like this (but for every mention of email, msn, www, etc.):

Code:
if ( $userdata['user_level'] == ADMIN || $userdata['user_level'] == MOD )
{
$email_uri = ( $board_config['board_email_form'] ) ? append_sid("profile.$phpEx?mode=email&" . POST_USERS_URL .'=' . $auction_offer_row['user_id']) : 'mailto:' . $sellerrow[0]['user_email'];

             $email_img = '<a href="' . $email_uri . '"><img src="' . $images['icon_email'] . '" alt="' . $lang['Send_email'] . '" title="' . $lang['Send_email'] . '" border="0"></a>';
             $email = '<a href="' . $email_uri . '">' . $lang['Send_email'] . '</a>';
      }
      else
      {
         $email_img = '&nbsp;';
         $email = '&nbsp;';
      }

* a more drastic fix is to just comment out whole fields of these kinds from the user profile page (templates/XXX/profile_add_body.tpl) - the data can't be entered, so it never gets displayed either, but see my comment below about using a user_level switch in template files - this is also a good and flexible solution.

As far as I've found, the phpbb2 files which need this censoring are:
memberlist.php
viewtopic.php
privmsg.php
profile.php
groupcp.php
includes/usercp_viewprofile.php

And from the auction mod:
auction_offer.php
auction_offer_view.php

That 2nd file also includes a text link to the seller's email ("email the seller"). That link could be disabled from its source file "languages/lang_en/lang_auction.php" but a much better solution is to use a user_level based "switch" to censor it from the templates/auction_view_offer_body.tpl file. To do that:

First, find this code in your "includes/page_header.php" file:

Code:

else
{
   $template->assign_block_vars('switch_user_logged_in', array());

then add this code just below it:
Code:

if ( $userdata['user_level'] == ADMIN )
   {
      $template->assign_block_vars('switch_user_admin',array() );
   }


then, in the "templates/auction_view_offer_body.tpl" file:

find:
Code:

<span class="name">&nbsp;&nbsp;&nbsp;<a href="{AUCTION_SEND_EMAIL}" class="genmed">{L_AUCTION_SEND_MAIL}</a></span><br>

(I'm unable to post the code below in any way so I'll describe the opening and closing arrow symbols below in words - don't include any commas or quotation marks)

and precede it with:
Code:

"SMALLER-THAN SYMBOL,DASH,DASH" BEGIN switch_user_admin "DASH,DASH,GREATER-THAN SYMBOL"


and end it with:
Code:

"SMALLER-THAN SYMBOL,DASH,DASH" END switch_user_admin "DASH,DASH,GREATER-THAN SYMBOL"


Only by adding the "template -> assign_block" command in the page_header.php file can you use the switch.



* I also installed the excellent Private Message Admin mod (to prevent exhange of contact details by PM; I mention that in the site's T&C's so users know PMs are monitored).

By the way there is nothing unique in that last step: eBay censors emails for exactly the same anti-collusion purpose.

edit: originally I'd written that it may be tempting to add a word censor mod in too but that the problem is that at some point the buyer and seller do have to exchange their details (i.e. after I receive the payment).

It then occurred to me that the auctioneer (us) may want to be the permanent go-between with the contact details for all sales: because if buyer and seller exchange details directly now, come the next auction they'll already know each others emails/websites/phone numbers and close the sale on their own. So, a censor mod may be a good addition to the arsenal - this one looks quite good. It checks private messages but it would need to be adapted into the auction mod's main pages too by us (aucton_offer.php, auction_offer_view.php, the relevant feedback page) - a bit of a headache...

caution: with all the mods available it's tempting to get carried away with 'over-security'. About the only fix I didn't mention above was signatures - for the auction mod these are useless as the mod doesn't display them, and they can only contain unecessary details. Instead of cracking teeth installing complex mods for this, just disable the option altogether in the forum control panel.


Last edited by guyb on Thu Oct 30, 2008 7:20 pm; edited 16 times in total
Back to top
View user's profile Send private message
guyb
Small-Cap Auctioneer
Small-Cap Auctioneer


Joined: 22 Oct 2008
Posts: 21

PostPosted: Sat Oct 25, 2008 10:18 am    Post subject: Reply with quote

Possible solution for "Payment":

to receive the payment, I want to make my moneybookers/paypal account a fixed "answer" in the field which asks auction users which payment method they accept when they register a new auction item for uploading (i.e. my email address would be hardcoded in there / no editing possible).

Ideally I would like a way of qualifying the hardcoding with a permission level as I did with the access to email address etc. above.

This was harder for me to accomplish, and this is what I did in the "auction_offer.php" file kind of randomly on line 340:

Code:

if ( ($userdata['user_level'] == ADMIN) OR ($userdata['user_level'] == MOD) )
{
$template->assign_var('AUCTION_OFFER_ACCEPTED_PAYMENTS' , '' );
}
else
{
$template->assign_var('AUCTION_OFFER_ACCEPTED_PAYMENTS' , 'Paypal only, pay to: me@myemail.com' );
}


I edited this post as the specific formulation of the "If" statement above works better than what I posted before: now the condition does work and the relevant user_levels see what they're supposed to.

BUT: the fixed answer appears in the field and is editable - it is not a 'fixed' text answer which appears in place of the field.

Question: Is there a way, on a user_level conditional basis, to make that prepared answer a fixed and unalterable line of text?


Last edited by guyb on Thu Oct 30, 2008 7:25 pm; edited 2 times in total
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    phpbb-auction.com Forum Index -> Support All times are GMT
Page 1 of 1

 
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