Results 1 to 5 of 5
  1. #1
    Join Date
    Aug 2009
    Posts
    40
    Plugin Contributions
    0

    Default Software Products --> Product Activation

    OK so I need a table and two fields in the ZenCart database to store "product activations" and "max activations" for my software. So now I am in treacherous waters messing around in the database and hopefully don't blow up my whole store. Should I create my own table with the required fields or is their an existing table I could use or modify?

    I am poking around in the database and boy does it seem MASSIVE as far as tables and such....much more complex than what I was originally doing when developing my initial solution...I had a table of customer info, and then a table which stored:

    customer, software purchased, activations, max activations

    for EACH piece of software that compromised their order.

    So anyway, is there a place in the zencart database I should use for this type of function....so far I found the "orders" table but it does not record the name of the product, just a total....any ideas on the best way to do this with ZenCart?

    Thanks so much!

  2. #2
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Software Products --> Product Activation

    Quote Originally Posted by kmedia View Post
    OK so I need a table and two fields in the ZenCart database to store "product activations" and "max activations" for my software.
    From your post I get the sense that you're thinking you need to add those fields to an existing table. But I don't understand why you would need to do that.

    I think I'd need a lot more information about your intended purpose of those fields in order to suggest options.

    What are those fields used for?

    In what way do those fields relate to anything in Zen Cart?

    Is there anything the values in those fields need to be used for during normal operation of Zen Cart? ie: when do you need to retrieve their information?
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  3. #3
    Join Date
    Aug 2009
    Posts
    40
    Plugin Contributions
    0

    Default Re: Software Products --> Product Activation

    Hi Dr Byte,

    Thanks for addressing my question! OK, so I will be selling software products. Thanks to your help, I have ZenCart working to produce a product activation key upon successful purchase and send that to the user. The next step is that the user must actually activate the software using their key and here is how it would work:

    1.) User enters their e-mail and their software key.
    2.) If the key is valid, the software connects to my ZenCart database and looks in the appropriate table and needs to find: product ID, customer e-mail, activations field, max activations field
    3.) If found and the activations do not exceed the maximum allowable activations, the software is activated on that computer and activations is incremented by one.

    So it's not completely related to ZenCart except in the sense that all of the customer information and products purchased are probably already stored in the database (somewhere?) so if I could integrate this part it would all be nice and seamless! What do you think?

    Thanks!

  4. #4
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Software Products --> Product Activation

    Table "orders" contains an orders_id record.
    That orders_id record is a one-to-many relationship in the orders_products table, where you'll find the products_id for all the products purchased with the specified orders_id.

    I would suggest your lookup query be a SQL JOIN between any required tables, including your activations table, the orders_products table and the orders_table.
    And you might want to add the products_id field to your activations table to speed future lookups. Maybe the email address too. Then you could do 1 lookup to the activations table, and if found use that, otherwise lookup with the more complex join query (for new activations, etc) and update your activations table fields with the relevant data when activating the new one.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  5. #5
    Join Date
    Aug 2009
    Posts
    40
    Plugin Contributions
    0

    Default Re: Software Products --> Product Activation

    Man I would have never found that relationship in regards to the orders_products table, thanks. This sounds like an excellent plan, I'm on it!

 

 

Similar Threads

  1. v151 Adding in Product Activation Key
    By chuckles_net in forum General Questions
    Replies: 6
    Last Post: 6 Apr 2014, 06:02 PM
  2. Licence Key delivery for digital (software) products
    By outofbandii in forum Setting Up Categories, Products, Attributes
    Replies: 3
    Last Post: 26 Feb 2010, 08:16 PM
  3. How to import products from Exonet Accounting Software?
    By Heyzoos in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 20 Aug 2006, 07:54 AM
  4. Software Products With License Keys?
    By Rodzilla in forum General Questions
    Replies: 2
    Last Post: 30 Jan 2006, 02:37 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR