Jamroom Logo Jamroom 5 Core
is now Open Source!
User Support Forum Archive (Read Only)
Jamroom Developers:
{$ITEM_NUMBER} output to 'Thank you' page
Michael
Jamroom Team


Joined: 22 Apr 2008
Posts: 3423
Location: Tokyo

Posted: 06/25/09 18:16 
any cleaver ideas as to how to get the {$ITEM_NUMBER} of the item just purchased out on the return 'Thank you' page after payment has been completed?

{$ITEM_NUMBER} is the product number associated with the buy now button.

situation:(theme sage)
the user clicks on the 'buy now' button and gets sent to paypal from the 'store.php' page
/Some_Punk_Band/store.php

at paypal they pay the money and are shown a 'Return to merchant' button. Clicking on it takes them back to
/Some_Punk_Band/thank.php

which displays "Thank you for your purchase" but in the {debug} output the {$ITEM_NUMBER} of the product just purchased is not present.

Any good ideas as to how to get it there?


_________________
Michael Ussher
Jamroom Network Team Member: http://www.jamroom.net
Priority Support: http://www.jamroom.net/Support_Center
Back to top
smith.kyle
CodeSmith


Joined: 27 Apr 2006
Posts: 22009
Location: Southern California

Posted: 06/25/09 19:10 
I'm actually not sure if PayPal even posts that number back to the Thank You page - I'm leaning towards that they don't, which would make it impossible to show, sorry!


_________________
kyle[at]jamroom.net

Yes...that's a soda machine...

I get bored when no one's posting...
Back to top
Michael
Jamroom Team


Joined: 22 Apr 2008
Posts: 3423
Location: Tokyo

Posted: 06/25/09 19:16 
Your right, paypal posts nothing back.

Im currently thinking along the lines of setting the $_SESSION variable in some way, then picking it back up again on the thank you.

haven't found a way to get it working though.


_________________
Michael Ussher
Jamroom Network Team Member: http://www.jamroom.net
Priority Support: http://www.jamroom.net/Support_Center
Back to top
smith.kyle
CodeSmith


Joined: 27 Apr 2006
Posts: 22009
Location: Southern California

Posted: 06/25/09 19:22 
Because of the way the Jamroom Theme generator works, it might not be possible. It's worth a try though - you can access session vars via smarty by:

{$smarty.session.var_name}


_________________
kyle[at]jamroom.net

Yes...that's a soda machine...

I get bored when no one's posting...
Back to top
Michael
Jamroom Team


Joined: 22 Apr 2008
Posts: 3423
Location: Tokyo

Posted: 06/25/09 19:38 
thanks Kyle,

I also had another idea of setting a cookie with javascript on the 'buy now' submit then picking it up on the 'Thank you' page.

Can modules hook into the javascript function that are included already (jamroom_javascript.inc.js) and define a function to be included in there?

im guessing no, but if anyone would know it would be you.


_________________
Michael Ussher
Jamroom Network Team Member: http://www.jamroom.net
Priority Support: http://www.jamroom.net/Support_Center
Back to top
smith.kyle
CodeSmith


Joined: 27 Apr 2006
Posts: 22009
Location: Southern California

Posted: 06/25/09 19:41 
Not that I know of - you'd need to implement your own javascript function, sorry!


_________________
kyle[at]jamroom.net

Yes...that's a soda machine...

I get bored when no one's posting...
Back to top
Michael
Jamroom Team


Joined: 22 Apr 2008
Posts: 3423
Location: Tokyo

Posted: 06/25/09 23:25 
Got it! Smile

inside the include/js/jamroom_javascript.inc.js that is already being included by default there is already a script that can be used to solve the problem.

jrSetCookie
jrReadCookie
jrEraseCookie

although i couldnt locate an instance inside jamroom where these functions are actually being used, they work perfect for this situation.

set all the wanted data on form submission, pick it up at the thankyou page and delete the cookie to stop dual processing.

Must be Bigguys forward thinking by putting the functions there, Super happy.

Thanks. Smile


_________________
Michael Ussher
Jamroom Network Team Member: http://www.jamroom.net
Priority Support: http://www.jamroom.net/Support_Center
Back to top
smith.kyle
CodeSmith


Joined: 27 Apr 2006
Posts: 22009
Location: Southern California

Posted: 06/26/09 15:26 
Awesome Wink


_________________
kyle[at]jamroom.net

Yes...that's a soda machine...

I get bored when no one's posting...
Back to top
Display posts from previous:   
User Support Forum Archive (Read Only)
Jamroom Developers

 
Solutions
• Social Media Platform
• Social Networking Software
• Musician Website Manager
• Community Builder
Products
• Jamroom Core
• Jamroom Addons
• Jamroom Modules
• Jamroom Marketplace
Support
• Support Forum
• Documentation
• Support Center
• Contact Support
Community
• Community Forum
• Member Sites
• Developers
Company
• About Us
• Contact Us
• Privacy Policy
©2003 - 2010 Talldude Networks, LLC.