Skip to content

Commit 6fa8d1c

Browse files
SugarCRM Marketplace rebranding (#4)
1 parent 0339372 commit 6fa8d1c

18 files changed

+226
-196
lines changed

README.md

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,33 @@
1-
# outfitters-licensing-example
2-
SugarOutfitter's Sample License Addon code
1+
# Marketplace Licensing Example
2+
3+
This repository provides a sample SugarCRM add-on that demonstrates how to implement license validation by integrating with the [SugarCRM Marketplace API](https://marketplace.sugarcrm.com/selling/license). It includes a PHP library that leverages Sugar's [`ExternalResourceClient`](https://sugarclub.sugarcrm.com/dev-club/b/dev-blog/posts/introducing-externalresourceclient-your-friendly-http-client) for making HTTP requests.
4+
5+
## Features
6+
7+
- Sample implementation of license validation logic
8+
- Integration with the SugarCRM Marketplace API
9+
- Usage of `ExternalResourceClient` for simplified HTTP communication
10+
11+
## Requirements
12+
13+
- Sugar 13.0 or higher
14+
- PHP 7.4 or higher
15+
- Access to the SugarCRM Marketplace
16+
17+
## Getting Started
18+
19+
1. Clone this repository into your SugarCRM instance's custom module directory.
20+
2. Follow the provided code to integrate license validation in your own add-ons.
21+
3. Update the API credentials and endpoint URLs as required.
22+
23+
## Documentation
24+
25+
For more information on selling add-ons and using licensing in the SugarCRM Marketplace, refer to the [Marketplace Licensing Guide](https://marketplace.sugarcrm.com/selling/license).
26+
27+
## Contributing
28+
29+
Contributions and improvements are welcome. Please submit a pull request or open an issue for feedback or suggestions.
30+
31+
## License
32+
33+
This project is provided as a sample and is not intended for production use without proper testing and validation.
Lines changed: 50 additions & 50 deletions
Large diffs are not rendered by default.

license/license/config.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
<?php
22

3-
$outfitters_config = array(
3+
$marketplace_config = array(
44
'name' => 'SampleLicenseAddon', //The matches the id value in your manifest file. This allow the library to lookup addon version from upgrade_history, so you can see what version of addon your customers are using
5-
'shortname' => 'samplelicenseaddon', //The short name of the Add-on. e.g. For the url https://marketplace.sugarcrm.com/addons/sugaroutfitters the shortname would be sugaroutfitters
6-
'public_key' => '', //The public key associated with the group
5+
'shortname' => 'samplelicenseaddon', //The short name of the Add-on. e.g. For the url https://marketplace.sugarcrm.com/addons/sugarmarketplace the shortname would be sugarmarketplace
6+
'public_key' => '331508e5cdffc82904af8a7af6618ec2', //The public key associated with the group
77
'api_url' => 'https://marketplace.sugarcrm.com/api/v1',
8-
'validate_users' => false,
9-
'manage_licensed_users' => false, //Enable the user management tool to determine which users will be licensed to use the add-on. validate_users must be set to true if this is enabled. If the add-on must be licensed for all users then set this to false.
8+
'validate_users' => true,
9+
'manage_licensed_users' => true, //Enable the user management tool to determine which users will be licensed to use the add-on. validate_users must be set to true if this is enabled. If the add-on must be licensed for all users then set this to false.
1010
'validation_frequency' => 'weekly', //default: weekly options: hourly, daily, weekly
1111
'continue_url' => '', //[optional] Will show a button after license validation that will redirect to this page. Could be used to redirect to a configuration page such as index.php?module=MyCustomModule&action=config
1212
);
@@ -19,5 +19,5 @@
1919

2020
// global $sugar_version;
2121
// if(preg_match( "/^6.*/", $sugar_version) ) {
22-
// $outfitters_config['continue_url'] = 'index.php?module=SugarChimp&action=setup';
22+
// $marketplace_config['continue_url'] = 'index.php?module=SugarChimp&action=setup';
2323
// }

license/license/language/de_de.lang.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
$license_strings = array (
55
'LBL_STEPS_TO_LOCATE_KEY_TITLE' => 'Zum Suchen Sie Ihr Schl�ssel',
6-
'LBL_STEPS_TO_LOCATE_KEY' => '1. Melden Sie sich bei <a href="https://marketplace.sugarcrm.com" target="_blank">SugarOutfitters</a><br/>2. gehen Sie zu Account->Purchases</br>3. Suchen Sie den Schl�ssel f�r den Kauf dieses Add-on<br/>4. F�gen Sie in das Feld Lizenzschl�ssel unter<br/>5. Klicken Sie auf "Validate"',
6+
'LBL_STEPS_TO_LOCATE_KEY' => '1. Melden Sie sich bei <a href="https://marketplace.sugarcrm.com" target="_blank">SugarCRM Marketplace</a><br/>2. gehen Sie zu Account->Purchases</br>3. Suchen Sie den Schl�ssel f�r den Kauf dieses Add-on<br/>4. F�gen Sie in das Feld Lizenzschl�ssel unter<br/>5. Klicken Sie auf "Validate"',
77
'LBL_LICENSE_KEY' => 'Lizenzschl�ssel',
88
'LBL_CURRENT_USERS' => 'Aktuelle Benutzeranzahl',
99
'LBL_LICENSED_USERS' => 'Lizenzierte Benutzer Anzahl',

license/license/language/en_us.lang.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
$license_strings = array (
55
'LBL_STEPS_TO_LOCATE_KEY_TITLE' => 'To Locate Your Key',
6-
'LBL_STEPS_TO_LOCATE_KEY' => '1. Login to <a href="https://marketplace.sugarcrm.com" target="_blank">SugarOutfitters</a><br/>2. Go to Account->Purchases</br>3. Locate the key for the purchase of this add-on<br/>4. Paste into the License Key box below<br/>5. Hit "Validate"',
6+
'LBL_STEPS_TO_LOCATE_KEY' => '1. Login to <a href="https://marketplace.sugarcrm.com" target="_blank">SugarCRM Marketplace</a><br/>2. Go to Account->Purchases</br>3. Locate the key for the purchase of this add-on<br/>4. Paste into the License Key box below<br/>5. Hit "Validate"',
77
'LBL_LICENSE_KEY' => 'License Key',
88
'LBL_CURRENT_USERS' => 'Current User Count',
99
'LBL_LICENSED_USERS' => 'Licensed User Count',
@@ -14,7 +14,7 @@
1414
'LBL_AVAILABLE_USERS' => 'Available Licenses',
1515
'LBL_HOW_MANY_USERS' => 'Additional Licenses Needed',
1616
'LBL_ADD_USERS_BUTTON_LABEL' => 'Add More Users Now',
17-
'LBL_HOWTO_REDUCE_LICENSE' => 'Need to decrease your total licenses? Simply log into SugarOutfitters and change the number of users for this add-on under your Purchases.',
17+
'LBL_HOWTO_REDUCE_LICENSE' => 'Need to decrease your total licenses? Simply log into SugarCRM Marketplace and change the number of users for this add-on under your Purchases.',
1818
'LBL_VALIDATION_REQUIRED' => 'The above License Key validation is required before making changes to your licensed users',
1919
'LBL_MANAGE_USERS_TITLE' => 'Manage Users',
2020
'LBL_ERROR_TOO_MANY_USERS' => 'Please add more additional licenses above and try again.',

license/license/language/es_es.lang.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
$license_strings = array (
55
'LBL_STEPS_TO_LOCATE_KEY_TITLE' => 'Para localizar la clave',
6-
'LBL_STEPS_TO_LOCATE_KEY' => '1. Ingresa para <a href="https://marketplace.sugarcrm.com" target="_blank">SugarOutfitters</a><br/>2. Ir a Account->Purchases</br>3. Busque la clave para la compra de este complemento<br/>4. Pegar en el cuadro Clave de licencia por debajo de<br/>5. Hacer clic en "Validate"',
6+
'LBL_STEPS_TO_LOCATE_KEY' => '1. Ingresa para <a href="https://marketplace.sugarcrm.com" target="_blank">SugarCRM Marketplace</a><br/>2. Ir a Account->Purchases</br>3. Busque la clave para la compra de este complemento<br/>4. Pegar en el cuadro Clave de licencia por debajo de<br/>5. Hacer clic en "Validate"',
77
'LBL_LICENSE_KEY' => 'clave de licencia',
88
'LBL_CURRENT_USERS' => 'Conde Usuario actual',
99
'LBL_LICENSED_USERS' => 'N�mero de usuarios con licencia',

license/license/language/fr_fr.lang.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
$license_strings = array (
55
'LBL_STEPS_TO_LOCATE_KEY_TITLE' => 'Pour retrouver la cl�',
6-
'LBL_STEPS_TO_LOCATE_KEY' => '1. Connectez-vous � <a href="https://marketplace.sugarcrm.com" target="_blank">SugarOutfitters</a><br/>2. Allez � Account->Purchases</br>3. Recherchez la cl� pour l\'achat de cet add-on<br/>4. Coller dans la bo�te de cl� de licence ci-dessous<br/>5. Cliquez sur "Validate"',
6+
'LBL_STEPS_TO_LOCATE_KEY' => '1. Connectez-vous � <a href="https://marketplace.sugarcrm.com" target="_blank">SugarCRM Marketplace</a><br/>2. Allez � Account->Purchases</br>3. Recherchez la cl� pour l\'achat de cet add-on<br/>4. Coller dans la bo�te de cl� de licence ci-dessous<br/>5. Cliquez sur "Validate"',
77
'LBL_LICENSE_KEY' => 'Cl� de licence',
88
'LBL_CURRENT_USERS' => 'Nombre actuel de l\'utilisateur',
99
'LBL_LICENSED_USERS' => 'Licence Nombre d\'utilisateurs',

license/license/language/hu_hu.lang.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
$license_strings = array (
55
'LBL_STEPS_TO_LOCATE_KEY_TITLE' => 'Keresse meg a kulcs',
6-
'LBL_STEPS_TO_LOCATE_KEY' => '1. Bel�p�s <a href="https://marketplace.sugarcrm.com" target="_blank">SugarOutfitters</a><br/>2. Menj a Account->Purchases</br>3. Keresse meg a gombot a beszerz�se a kieg�sz�to<br/>4. Illessze be a enged�ly kulcs al�bbi mezobe<br/>5. Kattints "Validate"',
6+
'LBL_STEPS_TO_LOCATE_KEY' => '1. Bel�p�s <a href="https://marketplace.sugarcrm.com" target="_blank">SugarCRM Marketplace</a><br/>2. Menj a Account->Purchases</br>3. Keresse meg a gombot a beszerz�se a kieg�sz�to<br/>4. Illessze be a enged�ly kulcs al�bbi mezobe<br/>5. Kattints "Validate"',
77
'LBL_LICENSE_KEY' => 'enged�ly kulcs',
88
'LBL_CURRENT_USERS' => 'Aktu�lis felhaszn�l� Count',
99
'LBL_LICENSED_USERS' => 'Licenccel rendelkezo felhaszn�l� Count',

license/license/language/it_it.lang.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
$license_strings = array (
55
'LBL_STEPS_TO_LOCATE_KEY_TITLE' => 'Per individuare la chiave',
6-
'LBL_STEPS_TO_LOCATE_KEY' => '1. Accedi per <a href="https://marketplace.sugarcrm.com" target="_blank">SugarOutfitters</a><br/>2. Vai a Account->Purchases</br>3. Individuare la chiave per l\'acquisto di questo add-on<br/>4. Incollare nella casella Chiave di Licenza di seguito<br/>5. Fare clic su "Validate"',
6+
'LBL_STEPS_TO_LOCATE_KEY' => '1. Accedi per <a href="https://marketplace.sugarcrm.com" target="_blank">SugarCRM Marketplace</a><br/>2. Vai a Account->Purchases</br>3. Individuare la chiave per l\'acquisto di questo add-on<br/>4. Incollare nella casella Chiave di Licenza di seguito<br/>5. Fare clic su "Validate"',
77
'LBL_LICENSE_KEY' => 'Chiave di Licenza',
88
'LBL_CURRENT_USERS' => 'Conte utente corrente',
99
'LBL_LICENSED_USERS' => 'Numero di utenti con licenza',

license/license/language/nl_nl.lang.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
$license_strings = array (
55
'LBL_STEPS_TO_LOCATE_KEY_TITLE' => 'Om Uw sleutel Locate',
6-
'LBL_STEPS_TO_LOCATE_KEY' => '1. Log in om <a href="https://marketplace.sugarcrm.com" target="_blank">SugarOutfitters</a><br/>2. Gaan naar Account->Purchases</br>3. Zoek de sleutel voor de aankoop van deze add-on<br/>4. Plakken in de Licentiecode vak hieronder<br/>5. Klik op "Validate"',
6+
'LBL_STEPS_TO_LOCATE_KEY' => '1. Log in om <a href="https://marketplace.sugarcrm.com" target="_blank">SugarCRM Marketplace</a><br/>2. Gaan naar Account->Purchases</br>3. Zoek de sleutel voor de aankoop van deze add-on<br/>4. Plakken in de Licentiecode vak hieronder<br/>5. Klik op "Validate"',
77
'LBL_LICENSE_KEY' => 'Licentiecode',
88
'LBL_CURRENT_USERS' => 'Huidige gebruiker Graaf',
99
'LBL_LICENSED_USERS' => 'Licensed Gebruikersaantal',

0 commit comments

Comments
 (0)