Custom Serial Provider

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
JohnK
Ensign (ENS)
Ensign (ENS)
Posts: 8
Joined: Wed Aug 25, 2010 12:34 pm

Custom Serial Provider

Post by JohnK » Tue Aug 31, 2010 5:31 pm

I have read through this thread viewtopic.php?f=42&t=7630 but the solution they went with really doesn't work for me. They ended up sending emails to their licensing server in order to generate the correct license.

We need to create a system where users can buy subscription licenses to software. We also need custom fields on the form for duration of the subscription and some other things. I need to get this data from the form into my implementation of the SerialProviderBase. My problem is that in my implementation, I cannot access any information about the order. I need to get access to this information so that I can generate the correct license. Also, is there a way to get custom information from the aspx configuration file to the SerialProviderBase? If possible, I would like to use the configuration to set some custom properties on the DigitalGood to be used with the license generation.

Thanks,
John

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: Custom Serial Provider

Post by mazhar » Tue Aug 31, 2010 10:31 pm

You can try to create a product template with custom fields of type customer. Then apply your product template on your desired products. This will let the customer enter values on product details page. Finally you can access these custom values by reading them from order item.

JohnK
Ensign (ENS)
Ensign (ENS)
Posts: 8
Joined: Wed Aug 25, 2010 12:34 pm

Re: Custom Serial Provider

Post by JohnK » Wed Sep 01, 2010 10:06 am

Thanks a lot.

So I would access the order item from my implemented SerialKeyProviderClass using DigitalGood_.OrderItemDigitalGoods[x].OrderItem? If so, in the case where a user buys more than one license I will need to figure out a way to know which OrderItemDigitalGoods I have already created license keys for.

John

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: Custom Serial Provider

Post by mazhar » Wed Sep 01, 2010 11:11 pm

You need to access this information from OrderItemDigitalGood objects like

Code: Select all

OrderItemInputCollection inputs = oidg.OrderItem.Inputs;
        foreach (OrderItemInput input in inputs)
        {
            if (!input.IsMerchantField)
            { 
                //PROCESS CURRENT INPUT FIELD HERE
            }
        }

Post Reply