Facebook  Twitter 

SMFHacks.com

+-

SMFHacks.com

+- User Information

Welcome, Guest.
Please login or register.
 
 
 
Forgot your password?

+- Forum Stats

Members
Total Members: 4257
Latest: Alex998.
New This Month: 1
New This Week: 0
New Today: 0
Stats
Total Posts: 43295
Total Topics: 7523
Most Online Today: 212
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 0
Guests: 204
Total: 204

Author Topic: Feedback only after winning auction or buying something  (Read 22278 times)

0 Members and 1 Guest are viewing this topic.

Offline vkot

  • Full Member
  • ***
  • Posts: 136
    • View Profile
Re: Feedback only after winning auction or buying something
« Reply #15 on: June 09, 2010, 04:14:05 am »
Any news about my previous message? Or should I make a hack myself?

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16452
    • View Profile
Re: Feedback only after winning auction or buying something
« Reply #16 on: June 09, 2010, 08:50:30 am »
I believe I have it added to the latest SMF Trader System found on the mod site on SMF.
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline vkot

  • Full Member
  • ***
  • Posts: 136
    • View Profile
Re: Feedback only after winning auction or buying something
« Reply #17 on: September 14, 2010, 05:08:27 am »
I installed SMF Trader 1.5 on my test forum, and it seems that the checks for the winning auctions are working OK. Nice ;)

This problem still exists:
Also, the PM that is sent to the other member, saying that someone left a rating, does not have a correct link to the profile, it only says: http://xxxx.xxx/index.php?action=profile

And two new small requests:
-  On the classified page there should also be displayed the number of transactions the member has made along with a link to the page with the ratings that the member has, like it is on the member's profile page.
- On the member's profile page, the ratings should not be shown for all members because there are members that they never buy/sell anything (in forums that are not only for classifieds). The ratings should be displayed only when the member has at least one rating, otherwise it has no meaning. You could make this an option.
« Last Edit: September 14, 2010, 05:28:43 am by vkot »

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16452
    • View Profile
Re: Feedback only after winning auction or buying something
« Reply #18 on: September 14, 2010, 12:31:06 pm »
Quote
Also, the PM that is sent to the other member, saying that someone left a rating, does not have a correct link to the profile, it only says: http://xxxx.xxx/index.php?action=profile
I think the idea behind that was for the user to check their profile next for the feedback
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline vkot

  • Full Member
  • ***
  • Posts: 136
    • View Profile
Re: Feedback only after winning auction or buying something
« Reply #19 on: September 15, 2010, 01:06:45 am »
ah! I got confused, because the previous line says "Comment made by: .........", so I was expecting that the following link should be of that member. Well, maybe it should be like this, and on the next line it could say "Visit your profile to see your ratings: {link}" or even better: "See the ratings and comments here: {link http://xxx.xx/index.php?action=trader&id=xxxx}"

What about the 2 new requests?

Offline vkot

  • Full Member
  • ***
  • Posts: 136
    • View Profile
Re: Feedback only after winning auction or buying something
« Reply #20 on: September 23, 2010, 04:22:29 am »
Now, that the classified has to be completed so that a user can write feedback, there is a problem with the classifieds that:
1) have zero price (for example ads by teachers that give private lessons, or users that are searching band members)
2) have multiple items for sale (ok, I can ask everyone to put a different ad for each item, but what if someone has 10 of the same item?)

In the first case, the classified can never be "completed", while the second the first buyer that makes an offer (and the seller accepts it) will "complete" the classified.

Anyway, I would prefer if you looked into my 2 requests of September 14 first... which are things that I could do myself, but I think that they should be part of one of the next SMF Trader updates.

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16452
    • View Profile
Re: Feedback only after winning auction or buying something
« Reply #21 on: September 23, 2010, 04:12:06 pm »
For the fist two requests on trader system.

1. The number of transactions is that the total completed listings/auctions?  I can add that above the rating information of the member.

2. I can maybe add an option for that my concern would be that people would not use the ratings as much if they can't find it.



For two new requests
1. You want a buy it now option even if it is free?

2. Well that sounds more like a store than a listing system. Since there is a qty how would the qty be tracked? Each time someone buys just remove one from the qty? But what if they don't pay etc
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline vkot

  • Full Member
  • ***
  • Posts: 136
    • View Profile
Re: Feedback only after winning auction or buying something
« Reply #22 on: September 26, 2010, 01:35:22 am »
1. The number of transactions is that the total completed listings/auctions?  I can add that above the rating information of the member.

Yes, the same way that it appears on the member's profile page.

2. I can maybe add an option for that my concern would be that people would not use the ratings as much if they can't find it.

Well, if someone has no transactions, you could just display a something like: "This member has no transactions yet" (now that I think of it, you should check if the member has transactions, not ratings)

1. You want a buy it now option even if it is free?

2. Well that sounds more like a store than a listing system. Since there is a qty how would the qty be tracked? Each time someone buys just remove one from the qty? But what if they don't pay etc

1. Well, not really, because "buy it now" will complete the transaction. On the other hand, having the listing open indefinetly receiving "buy it now" clicks is not a good idea (for example, someone could make multiple accounts just to click and rate).
2. You are right, it is like a store. I think it's very rare for a simple member to have many of the same kind and to want to sell them individually.
So, forget these 2 for now, they are not so important.

Offline vkot

  • Full Member
  • ***
  • Posts: 136
    • View Profile
Re: Feedback only after winning auction or buying something
« Reply #23 on: October 12, 2010, 12:39:44 pm »
- On the member's profile page, the ratings should not be shown for all members because there are members that they never buy/sell anything (in forums that are not only for classifieds). The ratings should be displayed only when the member has at least one rating, otherwise it has no meaning. You could make this an option.

OK, I did this in Profile.template.php just by adding
Code: [Select]
if ($tradecount>0)   //vkot - hide when no ratingsbefore
Code: [Select]
echo '


<dt class="clear">' . $txt['smftrader_title'] . '</dt>
<dt>' . $txt['smftrader_profile'] . '</dt><dd>(<a href="' . $scripturl .  '?action=trader&id=' . $context['member']['id'] . '">' . ($modSettings['trader_use_pos_neg'] ? ($tradecount > 0 ? '+' . $tradecount : $tradecount)  : $tradecount) . '</a>)</dd>
<dt>' . $txt['smftrader_positivefeedbackpercent']  . '</dt><dd>' , $context['tradecount_nonetural'] != 0 ? round(($context['pcount'] / $context['tradecount_nonetural']) * 100, 2) : 0 , '%</dd>
<dt>' . $txt['smftrader_positivefeedback'] . '</dt><dd>' . $context['pcount'] . '&nbsp;<img src="' .  $modSettings['smileys_url'] . '/default/smiley.gif" alt="positive" /></dd>
<dt>' . $txt['smftrader_neutralfeedback']  . '</dt><dd>' .  $context['neturalcount'] . '&nbsp;<img src="' . $modSettings['smileys_url'] . '/default/undecided.gif" alt="neutral" /></dd>
<dt>' . $txt['smftrader_negativefeedback']  . '</dt><dd>' .  $context['ncount'] . '&nbsp;<img src="' .  $modSettings['smileys_url'] . '/default/angry.gif" alt="negative" /></dd>
<dt>' . $txt['smftrader_totalfeedback']  . '</dt><dd>' .  ($context['pcount'] - $context['ncount']) . '</dd>
<dt class="clear"><a href="' . $scripturl .  '?action=trader&sa=submit&id=' . $context['member']['id'] . '">' . $txt['smftrader_submitfeedback'] . $context['member']['name'] . '</a></dt>
';

Offline vkot

  • Full Member
  • ***
  • Posts: 136
    • View Profile
Re: Feedback only after winning auction or buying something
« Reply #24 on: October 12, 2010, 02:47:11 pm »
Well... the "Feedback only after winning auction or buying something" check needs these small improvements:

- The check should take place when a user clicks the link "Submit Feedback", before entering the post rating form, and not after he has completed the form and clicked on the form's submit button. Or even better: The link "Submit Feedback" should not appear at all if there hasn't been a transaction between the users.

- The "Topic URL:" field in the post rating form is not needed anymore

Offline vkot

  • Full Member
  • ***
  • Posts: 136
    • View Profile
Re: Feedback only after winning auction or buying something
« Reply #25 on: October 25, 2010, 01:59:58 pm »
- The check should take place when a user clicks the link "Submit Feedback", before entering the post rating form, and not after he has completed the form and clicked on the form's submit button. Or even better: The link "Submit Feedback" should not appear at all if there hasn't been a transaction between the users.

OK, I made a quick hack for this. Maybe I shouldn't put the code in the template file, but at least it works...

In Trader2.template.php change:
Code: [Select]
<td class="windowbg">
<form action="' . $scripturl . '?action=trader;sa=submit2" method="post">
to:
Code: [Select]
<td class="windowbg">';
//vkot - Check for existing listing before showing the submit feedback form
if (count($context['class_listings_trader']) == 0) { echo $txt['smftrader_err_classifieds_listing'].'</td></tr></table>'; return; }
else echo '
<form action="' . $scripturl . '?action=trader;sa=submit2" method="post">

- The "Topic URL:" field in the post rating form is not needed anymore

Just delete from Trader2.template.php the following:
Code: [Select]
<tr>
<td width="25%">' . $txt['smftrader_topicurl'] . '</td>
<td align="left"><input type="text" name="topicurl"  size="75" /></td>
</tr>

Offline peterae

  • Member
  • *
  • Posts: 7
    • View Profile
Re: Feedback only after winning auction or buying something
« Reply #26 on: January 28, 2011, 10:46:17 am »
vkot
Thankyou for your mods above, they have been very helpful.

Now i would like to stop 'Submit feedback for xxxxxxx' from  comming up in the profile instead of clicking it and then getting a page saying

'You must select a Classifieds listing that you have bid on or created to leave feedback for this user.'

So in profile i have this code

   <tr><td colspan="2"><br /><a href="' . $scripturl .  '?action=trader&sa=submit&id=' . $context['member']['id'] . '">' . $txt['smftrader_submitfeedback'] . $context['member']['name'] . '</a></td>

so i need to make traders variables available so i can insert this check in profile
count($context['class_listings_trader']) == 0

so this way leave feedback does not show in profile unless it's needed.

So what i am saying is how do i allow Profile.template see the variable 'class_listings_trader' so i can do the test.





Offline peterae

  • Member
  • *
  • Posts: 7
    • View Profile
Re: Feedback only after winning auction or buying something
« Reply #27 on: January 30, 2011, 07:44:48 am »
Ok I have the feedback link only showing when it should now.

If you go into profile, trader overview and on the listing, it does not show if you are looking at your own, and only shows if there are 1 or more items to leave feedback for.

I did this by making a new function, which is basically a copy of the submit function in the classified.template, instead of showing error's i got it to return false for any errors or the number of items to leave feedback for, i dropped this function into profile,trader.template and classifeds.template and called the function and tested the reply, if all went well then the submit feedback link was allowed to show.

function Flag_Feedback($ID)

{

   global $context, $txt, $db_prefix, $ID_MEMBER;



   is_not_guest();



   // Check if they are allowed to submit feedback

   isAllowedTo('smftrader_feedback');





   $context['sub_template']  = 'submit';



   @$memid = $ID;



   if (empty($memid))

      return false;



   $request = db_query("

   SELECT

      realName FROM {$db_prefix}members

   WHERE ID_MEMBER = $memid LIMIT 1", __FILE__, __LINE__);

   $row = mysql_fetch_assoc($request);



   $mcount = db_affected_rows();



   if ($mcount != 1)

      return false;



   if ($ID_MEMBER == $memid)

      return false;

      

   $context['traderid'] = $memid;

   $context['tradername'] = $row['realName'];





   $context['page_title'] = $txt['smftrader_submittitle'] . ' - ' . $row['realName'];

      

   if (IsClassifiedsInstalled() == true)

   {

      

      // Gets any listed that is completed with bids

      // WHERE the LIST OWNER = CURRENT VIEWER AND BIDDER = PROFILEID

      $context['class_listings_trader'] = array();

      

      $request = db_query("

      SELECT

         l.title, l.ID_LISTING, m.realName, m.ID_MEMBER

      FROM ({$db_prefix}class_listing as l, {$db_prefix}class_bids  as b)

         LEFT JOIN {$db_prefix}members as m ON (m.ID_MEMBER = b.ID_MEMBER)

      WHERE b.ID_LISTING = l.ID_LISTING AND b.bid_accepted = 1 AND l.listingstatus = 2 AND l.ID_MEMBER = $ID_MEMBER AND b.ID_MEMBER = $memid ", __FILE__, __LINE__);

      while ($row = mysql_fetch_assoc($request))

      {

         $context['class_listings_trader'][] = $row;

      }

      mysql_free_result($request);

      

      // Gets any listed that is completed with bids

      // WHERE the LIST OWNER =  PROFILEID  AND BIDDER = CURRENT VIEWER

      $request = db_query("

      SELECT

         l.title, l.ID_LISTING, m.realName, m.ID_MEMBER

      FROM ({$db_prefix}class_listing as l, {$db_prefix}class_bids  as b)

         LEFT JOIN {$db_prefix}members as m ON (m.ID_MEMBER = l.ID_MEMBER)

      WHERE b.ID_LISTING = l.ID_LISTING AND b.bid_accepted = 1 AND l.listingstatus = 2 AND l.ID_MEMBER =  $memid AND b.ID_MEMBER = $ID_MEMBER ", __FILE__, __LINE__);

      while ($row = mysql_fetch_assoc($request))

      {

         $context['class_listings_trader'][] = $row;

      }

      mysql_free_result($request);

   return (count($context['class_listings_trader']));

   }
}


and the test in profile was

   if ((Flag_Feedback($context['member']['id']) != false) && (Flag_Feedback($context['member']['id']) != 0))


and the test in trader.template and classified.template was

if ((Flag_Feedback($context['traderid']) != false) && (Flag_Feedback($context['traderid']) != 0))



I am no programmer so i am not sure how secure this is and there maybe an easier way to do it, but it works for me so far.
« Last Edit: January 30, 2011, 08:58:16 am by peterae »

 

Related Topics

  Subject / Started by Replies Last post
1 Replies
4887 Views
Last post January 22, 2009, 07:36:23 pm
by SMFHacks
0 Replies
3495 Views
Last post July 05, 2010, 03:25:24 pm
by mightybeg
8 Replies
7961 Views
Last post August 20, 2010, 11:36:56 am
by Nigerdream
2 Replies
4089 Views
Last post May 06, 2011, 06:23:17 am
by sirkiu
2 Replies
6014 Views
Last post August 25, 2011, 10:49:00 pm
by bundabgergrum

+- Recent Topics

Please Help! by SMFHacks
April 17, 2024, 08:04:55 am

Rate own images by fvlog19
April 11, 2024, 10:56:53 am

Tidy Child Boards on 2.1.4 by SMFHacks
April 04, 2024, 03:54:12 pm

Problems SMF 2.0.19 > 2.1.4 SMF Gallery Pro - Recents Images to overall header by Michel68
March 30, 2024, 12:41:08 pm

Can't DROP 'id_member'; check that column/key exists Datei: by SMFHacks
March 30, 2024, 11:58:20 am

No thumbnails on new uploads by Tonyvic
March 29, 2024, 06:26:18 am

Display the Contact Page for guests by SMFHacks
March 27, 2024, 10:55:43 am

is it possible to add support for odysee.com by fvlog19
March 21, 2024, 08:47:51 am

Request for admin notification by davejo
March 10, 2024, 01:31:59 am

I need help with torrent upload by Ineedsmfhelp
March 09, 2024, 10:01:13 pm

Powered by EzPortal