Tips and Tricks HQ Support Portal › Forums › WP eStore Forum › eStore – Serial key displays incorrectly
- This topic has 1 reply, 2 voices, and was last updated 10 years, 2 months ago by wzp.
-
AuthorPosts
-
September 4, 2014 at 3:52 am #11416ReticentMember
I am trying to send a serial key to be used as an identifier with every product sold. However, when I use the {serial_key} tag, a couple of issues arise.
Firstly, the serial keys count backwards. I have allocated a range from 200000 to 200600, and the first purchase returned 200600, the second purchase returned 200599.
Secondly, the {serial_key} tag includes the name of the product. When I purchase multiple items, it will include the name of all items purchased, even when they have separate serial key lists. I have included a sample receipt.
WordPress version: 3.9.2
Email below:
====================================================================================
[Product 1] –
[Product 2] –
200600
Dear [Customer Name]
Thank you for your purchase!
[Product 1] x 1 – $0.01 (NZD)
[Product 2] x 1 – $0.01 (NZD)
Your Business Partner Number is
[Product 1] –
[Product 2] –
200600. If you would like to upgrade to a Level 3 agreement, please contact [Business Name], at [Business Email].
Thanks
===================================================================
“Business Partner Number” refers to the 6-digit code.
Email template below:
===================================================================
{serial_key}
Dear {first_name} {last_name}
Thank you for your purchase!
{product_details}
{product_specific_instructions}
Thanks
==========================================================
Product Details example:
==========================================================
Your Business Partner Number is {serial_key}. If you would like to upgrade to a Level 3 agreement, please contact [Business Name], at [Business Email].
==========================================================
September 4, 2014 at 4:54 am #65331wzpModeratorFirstly, the serial keys count backwards.
The serial numbers are stored as a coma delimited string in the database. It is programmatically safer to truncate the string, as numbers are issued, than to keep shifting it to the left.
The solution is to enter the serial numbers into the product details, in descending order.
Secondly, the {serial_key} tag includes the name of the product.
Please refer to this thread, for instructions on how to remove the product description text, from the tag. You want to follow the instructions for editing the eStore_serial_key_functions.php file only. When you get to “Step 3 of the editing instructions for this file,” just edit the code, so that only the serial number is returned. The other steps do not apply to you.
-
AuthorPosts
- You must be logged in to reply to this topic.