Custom serial key provider - what fields are available?
Custom serial key provider - what fields are available?
Hello,
I have just upgraded to 7.0 Final.
I have a custom serial key provider for my digital goods. When my user purchases quantity 3 of a digital good, I would like to provide a single serial number for that item. In version 7.0 Final my serial key provider is called 3 times and 3 serials are generated, very different from RC2. In my opinion, a custom serial key provider should only be called a single time per product ordered, regardless of the quantity.
Since the AC7 source is not available, one workaround is to compare the OrderItemID and give back the same serial number from my serial key generator. Unfortunately, the only data I can find being sent to the custom serial key provider is the DigitalGoodID and the UserName. Is there a way to get the OrderItemID to be sent?
I would really appreciate some help on finding a solution.
thanks!
I have just upgraded to 7.0 Final.
I have a custom serial key provider for my digital goods. When my user purchases quantity 3 of a digital good, I would like to provide a single serial number for that item. In version 7.0 Final my serial key provider is called 3 times and 3 serials are generated, very different from RC2. In my opinion, a custom serial key provider should only be called a single time per product ordered, regardless of the quantity.
Since the AC7 source is not available, one workaround is to compare the OrderItemID and give back the same serial number from my serial key generator. Unfortunately, the only data I can find being sent to the custom serial key provider is the DigitalGoodID and the UserName. Is there a way to get the OrderItemID to be sent?
I would really appreciate some help on finding a solution.
thanks!
Re: Custom serial key provider - what fields are available?
Hello,
I just looked into this in more detail. I realize that its pretty difficult to retrieve the orderid/orderitemid inside the AcquireSerialKey method in a provider implementation. May be the OrderItemDigitalGood object for which this method gets invoked should have been passed as parameter. I have entered this as a bug in our bug tracking system and we are getting this discussed.
I just looked into this in more detail. I realize that its pretty difficult to retrieve the orderid/orderitemid inside the AcquireSerialKey method in a provider implementation. May be the OrderItemDigitalGood object for which this method gets invoked should have been passed as parameter. I have entered this as a bug in our bug tracking system and we are getting this discussed.
Re: Custom serial key provider - what fields are available?
Is this available as a patch now? We really need to convert to AC7 Final.
thank you for your help.
thank you for your help.
Re: Custom serial key provider - what fields are available?
What you're describing is quite different from most software serialization models. You're pretty much serializing only the customer purchase and not the products themselved. The usual intent of a "serial number" is to individualize the item purchased for identification and security purposes.DS1 wrote:In version 7.0 Final my serial key provider is called 3 times and 3 serials are generated, very different from RC2. In my opinion, a custom serial key provider should only be called a single time per product ordered, regardless of the quantity.
The serial key hook should have the option for both. But then you open the door to other variations:
1. One call per order
2. One call per customer
3. One call per line item
4. One call per unique SKU ignores quantity (your situation)
5. One call per unique SKU per quantity (how final works)
Joe Payne
AbleCommerce Custom Programming and Modules http://www.AbleMods.com/
AbleCommerce Hosting http://www.AbleModsHosting.com/
Precise Fishing and Hunting Time Tables http://www.Solunar.com
AbleCommerce Custom Programming and Modules http://www.AbleMods.com/
AbleCommerce Hosting http://www.AbleModsHosting.com/
Precise Fishing and Hunting Time Tables http://www.Solunar.com
Re: Custom serial key provider - what fields are available?
Thanks Joe you summed it up beautifully.
Of-course we will not change the way it is working currently.
The only enhancement we are currently discussing is possibility of allowing the custom implementations to retrieve the order item Id for which the calls are being made.
Of-course we will not change the way it is working currently.
The only enhancement we are currently discussing is possibility of allowing the custom implementations to retrieve the order item Id for which the calls are being made.
Re: Custom serial key provider - what fields are available?
That is fine with me. When can we have a patch?
Re: Custom serial key provider - what fields are available?
Can I please get an update?
-
- Ensign (ENS)
- Posts: 19
- Joined: Wed Nov 19, 2008 6:24 am
Re: Custom serial key provider - what fields are available?
Quick question
We have a custom provider which issues serial keys for software licensed on a per seat basis. So on a single line item if I purchased a quantity of 4 for Product A, I get a 4 seat license. So I would send the product Id , quantity, etc and be returned a 4 seat serial number.
After reading the bug discussion http://bugs.ablecommerce.com/show_bug.cgi?id=7047, it seems Sohaib's comment regarding overriding the AcquireSerialKey and using the oidg.OrderItemId to issue the same serial number for all 4 will take care of part of my issue. However is there a way to obtain the quantity for the oidg.OrderItemId without directly querying the db against that ID? Such as oidg.OrderItemId.Quantity
Thanks
Andrew.
We have a custom provider which issues serial keys for software licensed on a per seat basis. So on a single line item if I purchased a quantity of 4 for Product A, I get a 4 seat license. So I would send the product Id , quantity, etc and be returned a 4 seat serial number.
After reading the bug discussion http://bugs.ablecommerce.com/show_bug.cgi?id=7047, it seems Sohaib's comment regarding overriding the AcquireSerialKey and using the oidg.OrderItemId to issue the same serial number for all 4 will take care of part of my issue. However is there a way to obtain the quantity for the oidg.OrderItemId without directly querying the db against that ID? Such as oidg.OrderItemId.Quantity
Thanks
Andrew.
Re: Custom serial key provider - what fields are available?
Try this
Code: Select all
oidg.OrderItem.Quantity
-
- Ensign (ENS)
- Posts: 19
- Joined: Wed Nov 19, 2008 6:24 am
Re: Custom serial key provider - what fields are available?
Thanks mazhar.
Two more questions.
1. On the Digital Good email notification. I have it set to send the serial number upon fulfillment, however it sends an email for each quantity on the line item. How can I configure it to send just one email for an individual line item? Example: If I purchased 4 seats of a product on 1 line item, I am issued 1 fulfillment email.
2. Can I include the download link in the email instead of having them log into their account to get it?
Thanks,
Andrew
Two more questions.
1. On the Digital Good email notification. I have it set to send the serial number upon fulfillment, however it sends an email for each quantity on the line item. How can I configure it to send just one email for an individual line item? Example: If I purchased 4 seats of a product on 1 line item, I am issued 1 fulfillment email.
2. Can I include the download link in the email instead of having them log into their account to get it?
Thanks,
Andrew
Re: Custom serial key provider - what fields are available?
Please read following thread where some NVelocity script is used to generate thumbnail link. You have do something similar with digital good in corresponding Email template.
viewtopic.php?f=44&t=7553
-
- Ensign (ENS)
- Posts: 19
- Joined: Wed Nov 19, 2008 6:24 am
Re: Custom serial key provider - what fields are available?
Instead of using the default Key fulfillment email. I am trying to add the serial key to the order confimation email however I cant seem to access the key using the same code from the License key is fulfilled template.
Using $orderItemDigitalGood.SerialKeyData from within the loop for the products in the the Non-Shipping Items table just displays "$orderItemDigitalGood.SerialKeyData"
I am thinking orderItemDigitalGood is available directly in the fulfillment template and not in the Customer Order Notification template.
Can I access the orderItemDigitalGood values such as DigitalGood.Name and SerialKeyData?
Using $orderItemDigitalGood.SerialKeyData from within the loop for the products in the the Non-Shipping Items table just displays "$orderItemDigitalGood.SerialKeyData"
I am thinking orderItemDigitalGood is available directly in the fulfillment template and not in the Customer Order Notification template.
Can I access the orderItemDigitalGood values such as DigitalGood.Name and SerialKeyData?
Re: Custom serial key provider - what fields are available?
Yes you are right some data is available only in that context. For example $orderItemDigitalGood data variable is avilable in fulfillment template. Any how here is a workaround to access orderItemDigitalGood through current order item object. I am not sure that its populated correctly when order confirmation is triggered by you can give it a try.num5labonte wrote:Instead of using the default Key fulfillment email. I am trying to add the serial key to the order confimation email however I cant seem to access the key using the same code from the License key is fulfilled template.
Using $orderItemDigitalGood.SerialKeyData from within the loop for the products in the the Non-Shipping Items table just displays "$orderItemDigitalGood.SerialKeyData"
I am thinking orderItemDigitalGood is available directly in the fulfillment template and not in the Customer Order Notification template.
Can I access the orderItemDigitalGood values such as DigitalGood.Name and SerialKeyData?
You need to put this NVelocity code some where in Email template where a valid order item object is available. For example locate following code in order confirmation template
Code: Select all
#foreach($orderItem in $order.Items.FilterByShipmentAndSort($shipment.OrderShipmentId))
#beforeall
Code: Select all
#foreach($orderItem in $order.Items.FilterByShipmentAndSort($shipment.OrderShipmentId))
#beforeall
<tr>
<td colspan="4">
#if($orderItem.DigitalGoods.Count > 0)
#set($orderItemDigitalGood=$orderItem.DigitalGoods.get_Item(0))
<b> Now $orderItemDigitalGood is avilable here you can use it</b>
$orderItemDigitalGood.SerialKeyData
#end
</td>
</tr>
-
- Ensign (ENS)
- Posts: 19
- Joined: Wed Nov 19, 2008 6:24 am
Re: Custom serial key provider - what fields are available?
Thanks Mazhar,
Tested and working.
Andrew
Tested and working.
Andrew
-
- Ensign (ENS)
- Posts: 19
- Joined: Wed Nov 19, 2008 6:24 am
Re: Custom serial key provider - what fields are available?
I have an issue thats come up with the custom provider. If a user already has an account then when I pass oidg.OrderItem.Order.User.Email and oidg.OrderItem.Order.UserId it works as expected. However if this is their first time in the system the UserID is actually the ID of the annonoymous account and the email is blank.
So I am wondering, Is the SerialKey provider kicking off before the user account is created or am I grabbing the wrong fields?
So I am wondering, Is the SerialKey provider kicking off before the user account is created or am I grabbing the wrong fields?
-
- Ensign (ENS)
- Posts: 19
- Joined: Wed Nov 19, 2008 6:24 am
Re: Custom serial key provider - what fields are available?
Since there was no response to my question, let me see if I can clarify the issue.
When the customer checks out, the custom serial key provider passes the oidg.OrderItem.Order.User.Email & oidg.OrderItem.Order.UserId along with the product information to the license server. If the customer already has an account in the system it works as expected. If the customer is a new user who has not yet set up an account, then the anonymous userid and no email address is pased to the license server. Looking at the data it seems that the AquireSerialKey is kicking off before the user account is being created when the customer checks out.
So my question is, Am I passing the wrong items to the license server? oidg.OrderItem.Order.User.Email & oidg.OrderItem.Order.UserId
Or is there a way to change the current process to create the users account at checkout before the AquireSerialKey method executes?
Thanks,
Andrew
When the customer checks out, the custom serial key provider passes the oidg.OrderItem.Order.User.Email & oidg.OrderItem.Order.UserId along with the product information to the license server. If the customer already has an account in the system it works as expected. If the customer is a new user who has not yet set up an account, then the anonymous userid and no email address is pased to the license server. Looking at the data it seems that the AquireSerialKey is kicking off before the user account is being created when the customer checks out.
So my question is, Am I passing the wrong items to the license server? oidg.OrderItem.Order.User.Email & oidg.OrderItem.Order.UserId
Or is there a way to change the current process to create the users account at checkout before the AquireSerialKey method executes?
Thanks,
Andrew
Re: Custom serial key provider - what fields are available?
Well when an anonymous user registers then information from anonymous user is migrated to the new one. So I am not sure but this might be the case that you sent the user id of anonymous user and then after checkout it migrated to new user so old user id is no more valid. The process of registering a user is in CheckedOut method of OnePageCheckout page. Its called automatically after completing checkout. So can put you licensing code some where beneath it so that you always get a registered user for licensing.
-
- Ensign (ENS)
- Posts: 19
- Joined: Wed Nov 19, 2008 6:24 am
Re: Custom serial key provider - what fields are available?
Yes. That is exactly what is happening. However I am using a custom registered provider, so the licensing is handled at whatever stage the digital good provider kicks off.
At check out for a digital good: The digital good serial key provider contacts the external server, passing the client Id and prouct information, and then returns a serial key back to AbleCommerce. You are correct after the digital good provider executes, then the anonymous account is migrated into a new account. However at this point there is now a disconnect on the licensing sytem because the user id associated with the serial key is no longer the correct userid in Able.
Was hoping there was a way to grab the migrated account info or at least the correct email address. Since the user has to put their email address into the checkout page can I grab that value? Instead of passing oidg.OrderItem.Order.User.Email can I access the information inputted in the email textbox? Then I can run an update between the two systems to grab the correct userID after the account is migrated.
Thanks
Andrew
At check out for a digital good: The digital good serial key provider contacts the external server, passing the client Id and prouct information, and then returns a serial key back to AbleCommerce. You are correct after the digital good provider executes, then the anonymous account is migrated into a new account. However at this point there is now a disconnect on the licensing sytem because the user id associated with the serial key is no longer the correct userid in Able.
Was hoping there was a way to grab the migrated account info or at least the correct email address. Since the user has to put their email address into the checkout page can I grab that value? Instead of passing oidg.OrderItem.Order.User.Email can I access the information inputted in the email textbox? Then I can run an update between the two systems to grab the correct userID after the account is migrated.
Thanks
Andrew
Re: Custom serial key provider - what fields are available?
Try using NewUserName.Text to get the user Email on final screen of checkout where it asks about password.
-
- Ensign (ENS)
- Posts: 19
- Joined: Wed Nov 19, 2008 6:24 am
Re: Custom serial key provider - what fields are available?
NewUserName.Text wouldn't be exposed to the extended SerialKey provider though would it as oidg.OrderItem.Order.User.Email is?
Is there anyway to change when the SerialKey provider executes at checkout so that it happens after the user account is merged? Just doesn't seem right for that to execute first.
Is there anyway to change when the SerialKey provider executes at checkout so that it happens after the user account is merged? Just doesn't seem right for that to execute first.