Topic: Creating a unique payment ID
Just to start: this is only experimental (with european date) ![]()
Some of you hacked JB and mostly have the spotlight function as a paid function. I was looking around how to give the user a unique payment ID which you can easily understand. I thought the best was to have the date together with the ID of the job. This way you can easily match the payment with the job.
I came up with the following:
Open _templates/publish-confirmation.tpl and add in all 3 loops ('$smarty.session.later_edit', '$first_time_post == 0' and 'else')
<p>Your payment id is: <strong>{php}print strftime('%d%m%y');{/php}{$CURRENT_ID}</strong></p>So when a person has posted a job on step 3 of the publication process you'll see the regular message ('Your job has been edited', 'Your post is under review' and 'Your job has been posted') and below that "Your payment id is: 080809156".
To explain it some more the code exists of the date, the month, the year and the id of the job. So looking back in your payment history you see 080809156 and know that the job was posted on the 8th (08xxxxxxx) of august (xx08xxxxx) in 2009 (xxxx09xxx) and it's the job with the id 156 (xxxxxx156).
So know you're wondering why I added the date to the string, because we could also do with the job ID. Well, if you have to keep records of the payments there mostly in a list with dates. So having the date in the payment ID makes it easier to match them together.
You don't want to use the European datestamp? Google for "php strftime" and change "%d%m%y" (day, month, year) with what you want. Please remenber you can't use date and minutes. There not added to the JB strings.
That's all folks (for today at least) ![]()