Jump to content

Licensing Addon smarty code


sgrayban

Recommended Posts

I'm getting the same thing on testing the addon and cannot figure this out.

 

The licenses are being issued/controlled as I would expect but when I "purchase" a license the License Key is being inserted into the "Domain" field for the addon.

 

At the moment I have configured a custom field called "License Key" and am cutting and pasting the key from the "Domain" field to make it look as you would expect.

 

Is there a setting where this is defined in the addon or admin?

Link to comment
Share on other sites

There must be a way to do it.

 

Matt did it here, if you go to your product page you will see your license and when you click on it it sends you to the "Product Details".

 

When my clients click on mine they get a domain url instead. Very strange as there is nothing in the docs about this.

Link to comment
Share on other sites

The license number is in the domain field as it makes it easier to setup rather than having to add a custom field to each licensed product.

In your product email you can use this

Your License Key for {$service_product_name} is {$service_domain}

Link to comment
Share on other sites

Hi Sparky, thanks for the info.

 

If anyone needs a quick start on the template change its in the clientareaproducts.tpl (and for me its on line 12)

 

Find:

 

{$service.group} - {$service.product}{if $service.domain}<br /><a href="http://{$service.domain}" target="_blank">{$service.domain}</a>{/if}

 

and replace with

 

{$service.group} - {$service.product}{if isset ($service.domain) && $service.module == 'licensing'}<br /><a href="{$smarty.server.PHP_SELF}?action=productdetails&id={$service.id}" target="_blank">{$service.domain}</a>{else}<br /><a href="http://{$service.domain}" target="_blank">{$service.domain}</a>{/if}

Link to comment
Share on other sites

P.S. To keep the template "clean" and cater for users that sell products and services other than those requiring domains the {else} should really be an {elseif $service.domain}

 

as follows:

 

{$service.group} - {$service.product}{if isset ($service.domain) && $service.module == 'licensing'}<br /><a href="{$smarty.server.PHP_SELF}?action=productdetails&id={$service.id}" target="_blank">{$service.domain}</a>{elseif $service.domain}<br /><a href="http://{$service.domain}" target="_blank">{$service.domain}</a>{/if}

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated