Tips and Tricks HQ Support Portal › Forums › WP PDF Stamper › PDF Stamper – Integration with variable values
- This topic has 6 replies, 3 voices, and was last updated 11 years, 9 months ago by admin.
-
AuthorPosts
-
January 29, 2013 at 1:56 pm #8449gugtavasMember
Hi!
I was able to implement the PDF Stamper integration and it works fine with manual stamping and manual input via the code itself.
However, when using your provided code for integration at http://www.tipsandtricks-hq.com/wp-pdf-stamper/third-3rd-party-integration-guide-10 , I cannot use WordPress own variables to stamp a file.
In other words, in the part of the code provided that goes like
//Customers Name
$customerName = “John Doe”;
//Customer Email address
$customerEmail = “john.doe@gmail.com”;
I would like to be able to have something like
//Customers Name
$customerName = $current_user->user_login;
//Customer Email address
$customerEmail = $current_user->user_email;
This, however, stamps the files with blank values (“Licence to in . Email:”).
Also, when using
global $current_user;
get_currentuserinfo()
to collect these values the whole code implodes and the Stamper does not return any pdf url.
Can you help me? All I want is to use WordPress’ current user info as the values stamped in the files.
Thanks!
January 30, 2013 at 12:24 am #53432adminKeymasterThat means your custom code is incorrect. Those variables have no value in it which means it is not retrieving the name and email like you think it is doing. Check your code again and use “echo” statement before you call the stamper API to make sure you have the correct values in those variables.
January 30, 2013 at 2:19 am #53433gugtavasMemberThanks!
It was indeed incorrect.
Just in case anyone here needs it in the future, in order to use WordPress variables inside the API, first you need to call the wp-load.php file.
A method to do it is to place
$parse_uri = explode( ‘wp-content’, $_SERVER );
require_once( $parse_uri[0] . ‘wp-load.php’ );
on top of the API. Please note that wp-content is the default installation folder, and may not be the one in use.
February 5, 2013 at 8:16 pm #53434wcandidoMemberI’m having a similar issue but I’m using the Footer Text layout Settings:
Licensed to {customer_name}/{customer_phone} Email: {customer_email}
But I don’t understand what the log is telling me… those path do exist!!
[02/05/2013 8:06 PM] – Status : Unresolved DL file path = http://www.dCCCCCCCCe.com/wp-content/plugins/wp-pdf-stamper/stamped-files/Michelle-LeSueur-01-Shoulders-Biceps-Triceps_5111662d0936e_e.pdf
[02/05/2013 8:06 PM] – Warning : Invalid URL conversion target = /home3/davidki3/public_html/wp-content/plugins/wp-pdf-stamper/stamped-files/Michelle-LeSueur-01-Shoulders-Biceps-Triceps_5111662d0936e_e.pdf
[02/05/2013 8:06 PM] – Advisory : Forcing “Do Not Convert” option.
[02/05/2013 8:06 PM] – Status : Resolved DL file path = http://www.dCCCCCCCCe.com/wp-content/plugins/wp-pdf-stamper/stamped-files/Michelle-LeSueur-01-Shoulders-Biceps-Triceps_5111662d0936e_e.pdf
[02/05/2013 8:06 PM] – Advisory : No DL file path conversion performed on URL.
[02/05/2013 8:06 PM] – Status : Dispatching DL method = 1
February 6, 2013 at 3:18 am #53435adminKeymasterIf you copy and paste the URL into your browser’s address bar you will see that it is incorrect. It doesn’t resolve:
[http://www.dCCCCCCCCe.com/wp-content/plugins/wp-pdf-stamper/stamped-files/Michelle-LeSueur-01-Shoulders-Biceps-Triceps_5111662d0936e_e.pdf]
This topic/thread is about using PDF stamper API to stamp a PDF file. So I am guessing you wrote your own custom code to talk to the stamper API. When you are doing a custom integration, you are writing your own code so we have no way of knowing what mistakes there could be in your code. Please give more details of the context so we can give you pointers.
Where is the main issue? Is your custom script not stamping correctly? You can’t download the file after you stamp it?
Did you check this checklist?
February 6, 2013 at 1:15 pm #53436wcandidoMemberforgive me…. I didn’t put the actual site on an public forum with it’s path and everything!! Feel skeptical about it but I can PM if needed…
The path resolves and it’s a PDF stamping issue.
I have the same issue where the stamping occurs manually and looks correct. when it downloads a file instead of showing Licensed to {customer_name}/{customer_phone} Email: {customer_email} it only shows Licensed to / Email:
only registered users can download a file btw!!
No custom integration. all based on the emember + estore + pdf stamper combo!!
Yes, I went thru the entire checklist and nothing jumps out at me that’s incorrect
February 6, 2013 at 11:16 pm #53437adminKeymasterOkay I sent you an email. Please reply to it.
Update: Turned out you were using the wrong shortcode. You were using the following shortcode which is only for “Download Now” type buttons:
[wp_eStore_category_products_fancy id=2 style=2 order=1 type=4 show_price=0]
For download now with PDF Stamping, you need to use button type 5. Here is the correct shortcode:
[wp_eStore_category_products_fancy id=2 style=2 order=1 type=5 show_price=0]
-
AuthorPosts
- You must be logged in to reply to this topic.