Infralution Support Forum Index Infralution Support
Support groups for Infralution products
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CustomGenerator and Sale->Select Key

 
Post new topic   Reply to topic    Infralution Support Forum Index -> Licensing Support
View previous topic :: View next topic  
Author Message
DaveB



Joined: 08 Feb 2011
Posts: 15

PostPosted: Tue Feb 08, 2011 5:34 pm    Post subject: CustomGenerator and Sale->Select Key Reply with quote

I have a simple CustomGenerator that looks at Customer and Sale and ensures sale price is in the correct range. It also formats the ProductInfo based on sale date and evaluation true/false.

My problem is this: when keys are assigned to a distributor, CustomGenerator is called with Customer and Sale null, which seems right. However, when the sale is made, and I click 'Select...' in the 'Edit/Add Sale' dialog, I need CustomGenerator to be called again so I can check price and format ProductInfo.

Anyone else have this issue with keys assigned to a distributor?
_________________
Dave
Back to top
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Tue Feb 08, 2011 11:14 pm    Post subject: Reply with quote

The Custom Generator is only called when license keys are generated. If you pre-generate license keys then it will be called when you create the license keys for the distributor - not later when you assign the keys to a sale. If you need to have the Custom Generator passed the sale/customer information then you should enable the "Generate Keys at Point of Sale" option for the Product (on the "Key Generation" tab). Then instead of using the "Select" button in the Sale dialog to select existing license keys use the "Generate" button. Your custom generator will then be passed the Customer and Sale.
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
DaveB



Joined: 08 Feb 2011
Posts: 15

PostPosted: Tue Feb 08, 2011 11:38 pm    Post subject: Reply with quote

I do have "Generate Keys at Point of Sale" checked, and it does work if I always use 'Generate' in the Sale dialog.

However, I would like to take advantage of the License Tracker feature which allows me to issue keys to distributors in advance, recording the sales at the time they occur.

Since the CustomGenerator parameters are Customer and Sale, it makes sense that it would be called when the sale is made. Otherwise, those parameters are null and the CustomGenerator can serve no real purpose.
_________________
Dave
Back to top
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Wed Feb 09, 2011 5:50 am    Post subject: Reply with quote

The point of a Custom Generator is to enable you to generate keys with custom product info (which can potentially depend on the Customer and Sale data). If the license key has alread been generated and issued previously then there is no point calling a Custom Generator because you can't change the product info that is in the already generated key.

I suspect you might be trying to use the Custom Generator for something it is not designed for.
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
DaveB



Joined: 08 Feb 2011
Posts: 15

PostPosted: Wed Feb 09, 2011 4:33 pm    Post subject: Reply with quote

Ah, yes you're right - I forgot that ProductInfo is not changeable after the key is issued.
_________________
Dave
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Infralution Support Forum Index -> Licensing Support All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group