Thank you for this module...it has been a life saver for my current project.

I am trying to figure out how to use this module with views. I'd like to be able to use panels and views to control how users see their node balance, but have been unable to figure out if this is possible, and if so, what fields or relationships I need to add in order to be able to do so.

Essentially, I'd like to be able to create a simple block that shows the user their balance for each content type for which they've purchased nodes.

Any assistance is greatly appreciated!!

Comments

maurizio.ganovelli’s picture

Assigned: Unassigned » maurizio.ganovelli

Hi vjorden,
pay per node creates a block (see your block configuration page and search for "Pay per node balance" block) that shows the current logged user's balance.
It's simple but maybe useful for your purposes .. let me know!

vjorden’s picture

I didn't realize there was a block! I'll have to play around with the css to get it to look the way I want, but it might just work.

I'll let you know! Thanks!

vjorden’s picture

So, I have another question...

Is there a way to insert a link to purchase more nodes, or display the node balance as zero, in the block instead of the "you are not allowed to create content" that now appears when a user's balance is zero.

Also, I've noticed that when a user's balance is 0 I get this error message:

Notice: Undefined variable: rows in paypernode_block_view() (line 488 of /home/content/06/9200306/html/sites/all/modules/paypernode/paypernode.module).

Thanks for the help! :D

maurizio.ganovelli’s picture

A quick workaround is to use http://drupal.org/project/stringoverrides and change 'You are not allowed to create content.' message.
For the php notice it's necessary to declare $rows variable after the line 479 of paypernode.module adding
$rows = array();
after the curly bracket.
I'll commit this change one as soon as possible.

vjorden’s picture

Great! Thanks!

maurizio.ganovelli’s picture

Status: Active » Needs review
maurizio.ganovelli’s picture

Status: Needs review » Fixed

#4 fixed on last dev release (2.x).

maurizio.ganovelli’s picture

Version: 7.x-1.0 » 7.x-2.x-dev

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.