AbanteCart Community

eCommerce construction => Installation and Configuration => Topic started by: nerdinho on May 20, 2016, 04:45:53 PM

Title: Adding activation key to use my extension?
Post by: nerdinho 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??
Title: Re: Adding activation key to use my extension?
Post by: abolabo 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)
Title: Re: Adding activation key to use my extension?
Post by: nerdinho on May 20, 2016, 05:20:15 PM
Hello abolabo!

you would have a link reference?
Title: Re: Adding activation key to use my extension?
Post by: abolabo 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