This forum is for module development and code related questions, not general module support. For general support, use the Post installation forum.

eCommerce + QuickBooks integration

My client is currently running QuickBooks Premier (purchased this year) on her PC to handle invoices and orders; she also uses QuickBooks Merchant Services for face-to-face purchases.

Is there a known way to allow Drupal to process credit cards in such a way that data can be imported into the QuickBooks software?

I do have the option of recommending a different credit card processing method if that is the only option... anything that will allow my client to continue using QuickBooks! This has been pretty much her only request.

Setting variables on user form..?

Hello :)

I'm playing with a bit of module code, which is hopefully going to do some clever things with user pictures. I've used the code at this article as a basis for it, but for the life of me, I can't see how to achieve what I want.

I have the user picture area on a separate form, achieved thus:

<?php

function resizer_user($op, &$edit, &$account, $category = NULL) {
if ($op == 'load') {
// this is where we override with our own stuff
// if we want to add multiple pictures, etc
// $account->picture = 'foobaz!';
}
if ($op == 'categories') {
$categories = array(array('name' => 'avatar', 'title' => t('Picture'), 'weight' => 10));
return $categories;
}
if ($op == 'form' && $category == 'avatar') {
//$form = array();
$form['avatar'] = array(
'#type' => 'fieldset',
);
$form['avatar']['preview'] = array(
'#type' => 'markup',
'#value' => theme('user_picture', $account),
'#prefix' => '

'.t('Your current picture').'

',
);
$form['avatar']['picture_upload'] = array(
'#type' => 'file',
'#title' => t('Upload a new picture'),
'#size' => 20,
);
$form['avatar']['resize'] = array(
'#type' => 'value',
'#value' => 0
);

how to form alter

I want to alter fivestar_form and add

case 'notitle':
$form['vote']['#description'] = theme('fivestar_summary', $current_avg->value, $current_count->value, $stars);
break;

in switch section.

my alter function is:

function my_form_alter ($form_id, &$form) {
	if ($form_id == 'fivestar_form'){		
		switch ($style) {			      
			    case 'notitle':      
			      $form['vote']['#description'] = theme('fivestar_summary', $current_avg->value, $current_count->value, $stars);
			      break;
  		}
  		return $form;
	}
}

but I can't see fivestar_summary', $current_avg->value

This is function I want to alter:
<?php
function fivestar_form($content_type, $content_id, $style = 'default') {
global $user;
$current_avg = votingapi_get_voting_result($content_type, $content_id, 'percent', 'vote', 'average');
$current_count = votingapi_get_voting_result($content_type, $content_id, 'percent', 'vote', 'count');
if ($user->uid) {
$current_vote = votingapi_get_vote($content_type, $content_id, 'percent', 'vote', $user->uid);
}
else {
// If the user is anonymous, we never both loading their existing votes.
// Not only would it be hit-or-miss, it would break page caching. Safer to always
// show the 'fresh' version to anon users.
$current_vote->value = 0;
}

if ($content_type == 'node') {

login help needed

i have a site in development and need help to pick up from where the original developer left off. i need to add a line of text on the registration page in login toboggan next to the "create new account" button and i have no idea how to do this being a relative novice myself. any help would be much appreciated.

Drupal_goto() not working after proxy registration

Hi

I feel there must be a simple way to do this but after eight hours of trying I'm wondering if anyone can help.

What I want to do:

After an administrator successfully creates a new user, redirect them to that user's memberprofile page.

What I've tried:

- I can get the form to redirect by setting $form['destination']['#value'] in mymodule_form_alter(). The problem with that is that it doesn't yet know the new uid (because form_alter is called before registration - I think).

- I can use drupal_set_message with the correct links - but this just looks messy because it's displayed as part of a list on the wrong page! Here's how I do it:


function mymodule_user($op, &$edit, &$account, $category = NULL) {
    if ($op == 'insert')
	{
        //They've set up a member
	$message = 'You have created <em>'.$edit[name].'</em> as a new member.';
        $message .= 'You can fill it in their member profile <a href="../../../user/'.$edit[uid].'/edit/memberprofile">here</a>';
        drupal_set_message($message);
  }
}

- But what I can't seem to do is this - which would seem to be the sensible way:


function mymodule_user($op, &$edit, &$account, $category = NULL) {
    if ($op == 'insert')
	{
          drupal_goto('somepage/'.$edit[uid]);
        }
}

og_is_group_type() in OG module!

Hi,

I am creating a new module where I have created a form like the OG/group form. For its submission I have used some OG module functions.
I have copied a function from OG module and paste in my new module. That is...

Pages

Subscribe with RSS Subscribe to RSS - Module development and code questions