Do you like AbanteCart? Please rate AbanteCart or share your experience with other eCommerce entrepreneurs. Go to Softaculous rating page to add your rating or write a review

Adding activation key to use my extension?

Started by nerdinho, May 20, 2016, 04:45:53 PM

Previous topic - Next topic

nerdinho

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??

abolabo

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

nerdinho

Hello abolabo!

you would have a link reference?

abolabo

example for UI  part:   line 37 https://github.com/abantecart/abantecart-src/blob/master/public_html/extensions/default_twilio/config.xml#L37
<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

Forum Rules Code of conduct
AbanteCart.com 2010 -