<< Home

NPD Btn Not Working in Community Builder Profile

Use this forum for issues related to TriniTronic's Nice PayPal Downloads Extension.

Moderator: jamesSBT

NPD Btn Not Working in Community Builder Profile

Postby ggr » Fri Mar 02, 2012 4:06 pm

I produce audio production downloads for yearly subscribers and pay-as-you-go clients. The yearly subscribers don't require a PayPal payment, the pay-as-you-go customers do! I have set up NPD so that I can distribute the YEARLY SUBSCRIBER files using a zero price and all downloads via NPD work nicely :) However, I'm having a problem configuring NPD to work with CB when paying thru paypal.

Here's how I have it set up:
I have created a CB Content Module to display a Community Builder text-area field called "cb_downloads", via "loadposition" in a "Download" article. This article is accessible only when logged in to their profile.
The cb_downloads text-area field is where I load the NPD buttons for each clients individual files. When they login and click the "Download" link on the menu, they are taken to the "Download" article that, in turn, displays only the NPD buttons that I inserted into the "cb_downloads" field via the CB Content Module.

As I mentioned, this works great when setting the price to zero for the NPD file... The page loads their individual download buttons and all works as it should.

My issues is when I set a price for the pay-as-you-go clients. I click the "buy now" button and am taken to PayPal where I make my payment and am redirected via NPD URL to the "Return Message", but the NPD button in the "cb_downloads" field never gets cleared... It stays in the "buy now" state. The Transaction Log shows that the payment has cleared but not the NPD Button that it was paid from.

Ultimately, what I would like to have happen is for NPD to redirect DIRECTLY back to the Download article with the button state changed to "download". But I'd settle for redirecting back to the NPD's "Return Message" where I can link to the "Downloads" page and get a CLEARED "DOWNLOAD" button. I would greatly appreciate any information as to where I'm going wrong.

Thank you!
ggr
Lithos
Lithos
 
Posts: 2
Joined: Fri Mar 02, 2012 3:03 pm

Re: NPD Btn Not Working in Community Builder Profile

Postby Michael » Fri Mar 02, 2012 5:22 pm

Hi,

I wouldn't say that you're going wrong. It is just that the Nice PayPal Downloads extension wasn't designed to facilitate one off purchased on a per user basis. Take for example, my website. You came to my website and made a purchase from a NPD button in an article. You were sent to PayPal and completed your transaction. Later, you received an email with a link to the NPD download page. After your purchase, I don't want the NPD purchase button to disappear, because then the next person to visit my site would not be able to buy my file.

So, the extension was never designed to disappear the purchase button after someone buys the file. What you need to do is customize the NPD button plugin to check the DB before creating its button. It would check the user's Joomla user ID against the NPD transaction history to see if they made a purchase or not. If they hadn't made a purchase, then button would be spawned, otherwise it would not.

Now the extension allows for anonymous purchases, meaning that the user does not need to be logged in to buy a file. So, you would also need to modify the purchase button and the db a bit. First, you need to add the user's id number to the paypal button. You would use custom input variable to pass the id to paypal. PayPal would then pass the id number back to the extension with purchase info. You then need to add a bit of code to the IPN script to capture the custom var info. Last but not least, you need to add a custom or uid column to the extension's transaction db table.

That said, I think that this solution would completely work.

~ Best regards
Contributed by Michael Babcock
User avatar
Michael
Cosmos
Cosmos
 
Posts: 2473
Joined: Thu Aug 14, 2008 12:30 am

Re: NPD Btn Not Working in Community Builder Profile

Postby ggr » Fri Mar 02, 2012 8:49 pm

Thank you for the info Michael. I think this is a bit beyond my capabilities. I will pass the info along to my programer and see if he can get it to work for me.

Best Regards
ggr
Lithos
Lithos
 
Posts: 2
Joined: Fri Mar 02, 2012 3:03 pm

Re: NPD Btn Not Working in Community Builder Profile

Postby Michael » Mon Mar 05, 2012 12:57 pm

Anytime!
Contributed by Michael Babcock
User avatar
Michael
Cosmos
Cosmos
 
Posts: 2473
Joined: Thu Aug 14, 2008 12:30 am


Return to Joomla: Nice PayPal Downloads

Who is online

Users browsing this forum: No registered users and 0 guests