Would it be possible to make the whole incomplete transactions section optional? I think it will only make things too complicated for my users. Don't see why people cant just pay each other, rather than a person paying another and thend the other having to accept the payment. Would rather it work more like internet banking or paypal.

Also does the length of the transaction description have to be so long compulsorily? Something like 'gardening' should be enough..

And could the rating system be optional as well? Our group has decided that we don't want to have a rating system.

Another feature which would be great, but not that important would be to have an increased limit after a user has reached a certain turnover. eg. if you set the limits to 100 and -100, and then a user manages to turnover 500 units, then they are obviously a good user of the system, passing through 0 several times, and it would be nice to be able to i ncrease their limits to 500 and -500.

This is a fantastic module. Am definitely going to use it. I was planning on hacking away at all the bits I didn't like, but thought I should post and discuss these options. I'm pretty good with php but have not ever written a drupal module or worked with them much, so am not sure bout all the hooks and so on. ie. not sure what a clean job it will be if I go in and cut things out and try to make it all work. Am happy to do this though, and then perhaps work with you to make my changes usable for others..

cheers,
Rachel

Comments

matslats’s picture

Status: Active » Closed (works as designed)

Hi Rachel,
I'm glad you like the module, it's been a major project of mine since before I got into Drupal but nobody's actually using it yet. I'm very keen for your participation because I believe that complementary currencies are about to become a much more viable alternative.

I'm happy to say that most of your requests above are already accounted for. If you don't like incomplete transactions (there is a need for arbitration sometimes), then disable invoice and pay, using permissions. Just as you have probably already disabled 'take'.

The rating system is optional, just remove the values from admin/settings/marketplace/ratings, if I recall correctly. Let me know if it works!

The per-user transaction limit is a good idea, but not a priority. Currently the limits are per-currency, and currently there's only the default currency. The per-user limit might conflict with the per-currency limit, especially as you'd then have to have a limit for every currency for every user, and maybe an option in the currency design as to which limits apply, or both, and if both, the greatest value, the least value, or the sum of values? So you see, the range of options this opens up means it's probably simpler to work around it. Nonetheless, I'll bear it in mind when I code for multiple currencies.

fudge714’s picture

Completely agree with you about complementary currencies, have been wanting to start one for a while. Have just recently sent letters out in my neighbourhood asking everyone if they would be interested in sharing the resources we have. So far, I've had 22 responses out of 200 letters and it keeps on growing. I'm setting up a website at thesharehood.org, which will hopefully be extensible later on so that other small local groups can use the same site. But yeah, your module is perfect for what I want, I've been working making drupal sites for a few years now, and noticed when this came on..

Anyway, I've been editing the module for the past few hours, to make it work for our site..

I tried disabling everything except give, but this doesnt work all that well..

Firstly, even if only one option is available, it still shows a select box, so I've added an if statement to pre_transaction_form() in .module

if (count(_available_transaction_types()) > 1) {
  $form['transaction_type']=array(
    '#type' => 'select',
    '#title' => t('Transaction type'),
    '#required' => TRUE, 
    '#default_value' => TRANSACTION_TYPE_INVOICE,
    '#weight'=> -5,
    '#options'=> $allowed_transactions
  );  
  } else {
	$form['transaction_type']=array(
    '#type' => 'hidden',
	'#value' => $allowed_transactions[0]
	);
  }

and this in edit_transaction_form() in .inc

  if (count(_available_transaction_types()) > 1) {
  $form['transaction_type']=array(
    '#type'=>'select',
    '#title'=>t('Transaction type'),
    '#required' => TRUE, 
    '#default_value' => 1,
    '#weight'=> -5,
    '#options'=> _available_transaction_types(),
  );
  } else {
  $t_types = _available_transaction_types();
  foreach ($t_types as $key=>$value) {
	$t_type = $key;
  }
  $form['transaction_type']=array(
    '#type'=>'hidden',
	'#value'=>$key
  );
  }

There's also the ' Is this transaction completed?' question which I'd rather not have there.. I've gotten rid of it on some forms, but not all strangely, with

function _available_incomplete_transactions() {
	$allowed_transactions = _available_transaction_types();
	if ($allowed_transactions[TRANSACTION_TYPE_INVOICE]) return false;
	if ($allowed_transactions[TRANSACTION_TYPE_PAY]) return false;
	return TRUE;
}

and this IF in transactions_form_alter()

if (_available_incomplete_transactions() == true) {
		  //move the node status checkbox out of the options group and call it 'completed'
	      $form['status']= $form['options']['status'];
	      $form['status']['#title']='Is this transaction completed?';
	      $form['status']['#weight']= 4;
	      unset($form['options']['status']);
	  }
      unset ($form['buttons']['preview']);

and this in theme_balances()

 if (_available_incomplete_transactions() == TRUE) {
	$html .= "\n<tr><td>".t('Pending Balance').'</td><td>'. theme('money', $turnover, $currency) . '</td></tr>';
  }

because even when there are only the permissions for give, the whole system is still really designed around there being incomplete transactions I think..

I haven't gotten all the way through the files yet, may be other things too I think.

And you're right, the grading system goes away if you delete the qualities. excellent. I just came up with an elaborate unnecessary way of choosing the grading system or not the grading system, but never mind...

And fair enough about the per-user transaction limit, I can see that it would be a hassle and something probably for much later..

With the description length, I changed the IF in transactions_validate() to

  if (strlen($node->title) < 3) {