support

Author Topic: Adding activation key to use my extension?  (Read 5721 times)

Offline nerdinho

  • Newbie
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Adding activation key to use my extension?
« on: May 20, 2016, 04:45:53 PM »
Hello guys!

I am creating a language paid extension, and i want add a function to only activate the extension after entering an activation key.

how can I implement that function, with the field to enter the key??

Offline abolabo

  • core-developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 2064
  • Karma: +326/-13
  • web for all, all for web!
    • View Profile
    • AbanteCart
Re: Adding activation key to use my extension?
« Reply #1 on: May 20, 2016, 05:08:56 PM »
mmm.... i think you should to use hidden field in settings of your extension with empty default value.
plus you need your own response controller on admin side that will process changing your hidden config field.

You can use your own small tpl of this functionality (please look into  config.xml of pp_express)
Inside your small tpl you can call your response controller and save activation key into config (settings table)
“No one is useless in this world who lightens the burdens of another.”
― Charles Dickens

Offline nerdinho

  • Newbie
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Re: Adding activation key to use my extension?
« Reply #2 on: May 20, 2016, 05:20:15 PM »
Hello abolabo!

you would have a link reference?

Offline abolabo

  • core-developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 2064
  • Karma: +326/-13
  • web for all, all for web!
    • View Profile
    • AbanteCart
Re: Adding activation key to use my extension?
« Reply #3 on: May 20, 2016, 06:00:43 PM »
example for UI  part:   line 37 https://github.com/abantecart/abantecart-src/blob/master/public_html/extensions/default_twilio/config.xml#L37
Code: [Select]
<item id="default_twilio_test_connection">
<type>html_template</type>
<template>responses/extension/default_twilio_test.tpl</template>
<default_value></default_value>
</item>

Then inside tpl you do ajax call to your response controller and save key
“No one is useless in this world who lightens the burdens of another.”
― Charles Dickens

 

Powered by SMFPacks Social Login Mod