Here's how to sell a product in less than 3 minutes:
1. Enter your PayPal email address in the PayPal email address field of the Payment modes module of the Options page of Commerce Manager.
2. Create a product through the Add Product page of Commerce Manager. Enter a name and a price for this product. If it's downloadable, select Yes to the Downloadable field, enter its download URL in the Download URL field and copy the text below in the Instructions to the customer field:
You can download [product name] by clicking the link below:
[product download-url]
When you have filled these fields, click on one of the Save buttons.
3. Insert this cotillion:
[purchase-form redirection=# id=1 product=1]
or:
[purchase-button id=1]
into your posts/pages/widgets to display a button allowing the visitors of your website to purchase this product.
That's all!
The first cotillion displays an Email address field followed by a purchase button. Indeed, the average order abandonment rate is estimated to be over 60 %. Commerce Manager allows you to recontact the customers who have not finalized their order, in order to significantly increase your sales. Click here to learn more about the unfinalized orders.
The Email address field is prefilled if Commerce Manager already knows it, and does not appear if the user is logged in as a client. You can customize this form through the Forms page of Commerce Manager. When the user is redirected to the website of the payment gateway, the Email address field of this website is prefilled with the one he just gave.
If you want to create a client area, you can create with a single click the pages of this client area through the Front Office page of Commerce Manager, and test these pages by creating your client account through the Add Client page of Commerce Manager, or through the registration page of your client area. You can also customize the menu displayed at the top of the pages of the client area through the Menu module of the Front Office page of Commerce Manager, and add some pages of the client area to the navigation menu of your website through the Menus page of the Appearance menu in WordPress.
Read this to see how to fill the content of the home page of the client area.
The Back Office page of Commerce Manager allows you to customize your interface. With this page, you will can display the items that are useful for you and remove the others. In short, you will get an interface that fits precisely to your needs. We advise you to quickly browse through the admin pages of Commerce Manager in order to have a global vision, and then take the time to properly configure your options.
If you have installed one or more cache plugins on your website, we recommend you to deactivate them for the pages of the client area. The principle of these plugins is to speed up your website by preventing it from working properly, more precisely by preventing the scripts of your website from generating pages on the fly and by using a cached version instead. Cache plugins are therefore likely to cause some problems.
Among the problems that can occur, the visitors of your website could access pages restricted to your members/clients/affiliates without logging in, and see the personal informations of another member/client/affiliate instead of their own. Your purchase buttons/links/forms may not work properly.
You can also deactivate all your cache plugins (after emptying their caches). And in your wp-config.php file, remove this line if it exists:
define('WP_CACHE', true);
You can install Commerce Manager through the Add Plugins page of the Plugins menu in WordPress (Plugins => Add New => Upload Plugin). Upload the plugin file without unzipping it. You can also install it like this:
Once you have installed Commerce Manager:
You must enter your activation key in the Activation key field of the Activation/Upgrade module in the Options page of Commerce Manager. This key is mandatory to avoid an automatic deactivation of Commerce Manager in a few hours. You can find it in the home page of your client area, and in the emails you received just after your order.
When you upgrade Commerce Manager, you don't lose any settings or any data.
You can upgrade Commerce Manager through the Plugins menu in WordPress, and through the WordPress Updates page of the Dashboard menu in WordPress (Dashboard => Updates), or through the Add Plugins page of the Plugins menu in WordPress (Plugins => Add New => Upload Plugin, upload the plugin file without unzipping it). You can also upgrade it like this:
You don't need to deactivate and reactivate the plugin.
You can choose to automatically install all the upgrades of Commerce Manager as soon as they become available, by checking the Automatically upgrade Commerce Manager box of the Activation/Upgrade module in the Options page of Commerce Manager. To make sure it works well, enter your FTP credentials in your wp-config.php file, like this:
define('FTP_HOST', 'your-ftp-host');
define('FTP_USER', 'your-ftp-username');
define('FTP_PASS', 'your-ftp-password');
If it still doesn't work, make sure the PECL Zip extension is enabled on the server that hosts your website.
To display a purchase button of a product, insert into your posts/pages/widgets a cotillion like this:
[purchase-button id=N]
by replacing N with the ID of the product.
Example:
[purchase-button id=2]
Result (with a little formatting):
Commerce Manager allows you to recontact the customers who have not finalized their order, in order to significantly increase your sales. Indeed, the average order abandonment rate is estimated to be over 60 %. Click here to see how to display an Email address field followed by a purchase button.
By default, the URL of the purchase button is the URL you specified in the edit page of the product or the Options page of Commerce Manager, but you can specify a different URL by using the src attribute:
[purchase-button src=URL id=N]
by replacing URL with the URL of the button that you want to use. Click here to download many buttons that you can use for free on your website.
By default, the text of the purchase button (text displayed instead of the purchase button when this one can't be displayed) is the text you specified in the edit page of the product or the Options page of Commerce Manager, but you can specify a different text by using the alt attribute:
[purchase-button alt="text" id=N]
Don't forget to include the quotes at the beginning and the end of the value of the alt attribute.
By default, the quantity is equal to 1, but you can specify a different quantity by using the quantity attribute:
[purchase-button quantity=quantity id=N]
By default, the payment mode is the one you specified in the edit page of the product or the Options page of Commerce Manager, but you can specify a different payment mode by using the mode attribute:
[purchase-button mode="Payment mode" id=N]
Replace Payment mode with:
By default, the order must be paid at once, but you can specify an option of payment by installments by using the option attribute:
[purchase-button option=K id=N]
You can configure the options of payment by installments through the Recurring payments module of the edit page of the product. You can configure up to 4 options.
Replace K with:
Don't forget to properly configure the Available payment options field in the edit page of the product so that the user can actually buy it by choosing the option that you specified. Click here to learn how to configure this field.
Due to limitations of PayPal, when you offer to the buyer a payment by installments:
The options page of Commerce Manager and the edit pages of a product or product category include a field called Available payment options. This field allows you to specify the payment options that the user can choose to buy your product, and thus it can avoid the purchase by choosing another option. Separate the options numbers with commas.
For example, if you want that the user can not buy your product by choosing an option of payment by installments, enter 0
as the value for the Available payment options field. With this value, he will be forced to buy your product at once (he will pay the price of the product).
At the opposite, if you want that the user can not buy your product at once, enter 1, 2, 3, 4
as the value for the Available payment options field. With this value, he will be forced to buy your product by choosing an option of payment by installments. He will not can buy your product at once.
If you don't use the options 2, 3 and 4 for your product, enter 0, 1
as the value.
If your payment gateway allows it, you can do a test without generating a real transaction, like this:
[purchase-button test=yes id=N]
You must also select Yes to the Allow testing without generating a real transaction field in the edit page of your product, and follow the instructions of your payment gateway to do your test.
A proper operation during a fictitious transaction does not guarantee that everything will work properly during a real transaction, so we advise you to make a real transaction (you can temporarily lower the price of your product) if you want to ensure everything works well.
All attributes (except action and id) of the <form>
HTML tag are also available for the [purchase-button]
cotillion, with an identical role.
To display a purchase link of a product, insert into your posts/pages/widgets a cotillion like this:
[purchase-link id=N]
by replacing N with the ID of the product.
Example:
[purchase-link id=2]
Result (with a little formatting):
Click here to purchase Commerce Manager
If you want to display the purchase URL of the product, use a cotillion like this:
[purchase-url id=N]
by replacing N with the ID of the product.
Commerce Manager allows you to recontact the customers who have not finalized their order, in order to significantly increase your sales. Indeed, the average order abandonment rate is estimated to be over 60 %. Click here to see how to display an Email address field followed by a purchase button.
By default, the text of the purchase link is the text you specified in the edit page of the product or the Options page of Commerce Manager, but you can specify a different text by using the text attribute:
[purchase-link text="text" id=N]
Don't forget to include the quotes at the beginning and the end of the value of the text attribute.
By default, the quantity is equal to 1, but you can specify a different quantity by using the quantity attribute:
[purchase-link quantity=quantity id=N]
By default, the payment mode is the one you specified in the edit page of the product or the Options page of Commerce Manager, but you can specify a different payment mode by using the mode attribute:
[purchase-link mode="Payment mode" id=N]
Replace Payment mode with:
By default, the order must be paid at once, but you can specify an option of payment by installments by using the option attribute:
[purchase-link option=K id=N]
You can configure the options of payment by installments through the Recurring payments module of the edit page of the product. You can configure up to 4 options.
Replace K with:
Don't forget to properly configure the Available payment options field in the edit page of the product so that the user can actually buy it by choosing the option that you specified. Click here to learn how to configure this field.
Due to limitations of PayPal, when you offer to the buyer a payment by installments:
The options page of Commerce Manager and the edit pages of a product or product category include a field called Available payment options. This field allows you to specify the payment options that the user can choose to buy your product, and thus it can avoid the purchase by choosing another option. Separate the options numbers with commas.
For example, if you want that the user can not buy your product by choosing an option of payment by installments, enter 0
as the value for the Available payment options field. With this value, he will be forced to buy your product at once (he will pay the price of the product).
At the opposite, if you want that the user can not buy your product at once, enter 1, 2, 3, 4
as the value for the Available payment options field. With this value, he will be forced to buy your product by choosing an option of payment by installments. He will not can buy your product at once.
If you don't use the options 2, 3 and 4 for your product, enter 0, 1
as the value.
If your payment gateway allows it, you can do a test without generating a real transaction, like this:
[purchase-link test=yes id=N]
You must also select Yes to the Allow testing without generating a real transaction field in the edit page of your product, and follow the instructions of your payment gateway to do your test.
A proper operation during a fictitious transaction does not guarantee that everything will work properly during a real transaction, so we advise you to make a real transaction (you can temporarily lower the price of your product) if you want to ensure everything works well.
All attributes (except href and id) of the <a>
HTML tag are also available for the [purchase-link]
cotillion, with an identical role.
To display a purchase form (you must have created one previously through the Add Form page of Commerce Manager), insert into your posts/pages/widgets a cotillion like this:
[purchase-form id=N]
by replacing N with the form ID.
Commerce Manager allows you to recontact the customers who have not finalized their order, in order to significantly increase your sales. Indeed, the average order abandonment rate is estimated to be over 60 %. Click here to see how to display an Email address field followed by a purchase button.
You can, through the edit page of the form or the Options page of Commerce Manager, specify the values (product, payment mode, payment option, quantity) that will be used when the corresponding field is missing from the form, or is not filled by the user. You can also specify them like this:
[purchase-form product=P mode="Payment mode" option=K quantity=quantity id=N]
Replace P with the ID of one of your products. The mode, option and quantity attributes work like the attributes of the same name for the [purchase-button] cotillion.
You can decide, for each of your forms, if the cursor is or not automatically positioned in the first field when the page loads. This allows you to significantly improve your conversion rate. Insert into your posts/pages/widgets a cotillion like this:
[purchase-form focus=yes id=N]
by replacing N with the form ID.
You can significantly improve your conversion rate by automatically completing form fields with informations from the user when the page loads. Commerce Manager allows you to do this when the page link has been sent through an autoresponder, by you or one of your affiliates.
To do this, simply add:
If your payment gateway allows it, you can do a test without generating a real transaction, like this:
[purchase-form test=yes id=N]
You must also select Yes to the Allow testing without generating a real transaction field in the edit page of your product, and follow the instructions of your payment gateway to do your test.
A proper operation during a fictitious transaction does not guarantee that everything will work properly during a real transaction, so we advise you to make a real transaction (you can temporarily lower the price of your product) if you want to ensure everything works well.
All attributes (except action, id and name) of the <form>
HTML tag are also available for the [purchase-form]
cotillion, with an identical role.
The edit pages of a form or form category include a field called Code. You must insert in this field a special cotillion. Refer to the Creation Of Forms section for more explanation.
You can display an Email address field followed by a purchase button, like this:
<p style="margin-bottom: 0; text-align: center;">
[commerce-content][input email-address type=hidden value="(client email-address)"]
[other]<label><strong>Your email address:</strong><br />
[input email-address size=40 required=yes style="text-align: center;"]<br />
[error email-address style="color: #c00000;"]</label>[/commerce-content]</p>
<div style="margin-top: 0; text-align: center;">[input submit type=image src="(product purchase-button-url)" alt="(product purchase-button-text)"]</div>
Result:
The Email address field is prefilled if Commerce Manager already knows it, and does not appear if the user is logged in as a client. When the user is redirected to the website of the payment gateway, the Email address field of this website is prefilled with the one he just gave.
The average order abandonment rate is estimated to be over 60 %. Commerce Manager allows you to recontact the customers who have not finalized their order, in order to significantly increase your sales. Click here to learn more about the unfinalized orders.
You can allow the user to choose the product price, like this:
[validation-content][other]<p class="error">[error unfilled-fields] [error too-low-price]</p>[/validation-content]
<table style="width: 100%;">
<tr><td><strong>Product</strong></td>
<td>[product name]</td></tr>
<tr><td><strong>[label price]Price[/label]</strong></td>
<td>[input price size=5] [commerce-manager currency-code]</td></tr>
</table>
<div style="text-align: center;">[input submit value="Purchase"]</div>
Result:
The price entered by the user must be greater than or equal to the price that you specified for the product.
Example 1:
[validation-content][other]<p class="error">[error unfilled-fields]</p>[/validation-content]
<table style="width: 100%;">
<tr><td><strong>Product</strong></td>
<td>[product name] ([product price] [commerce-manager currency-code])</td></tr>
<tr><td><strong>[label quantity]Quantity[/label]</strong></td>
<td>[input quantity size=3 value=1]</td></tr>
</table>
<div style="text-align: center;">[input submit value="Purchase"]</div>
Result:
Example 2:
[validation-content][other]<p class="error">[error unfilled-fields]</p>[/validation-content]
<table style="width: 100%;">
<tr><td><strong>Product</strong></td>
<td>[product name] ([product price] [commerce-manager currency-code])</td></tr>
<tr><td><strong>[label payment-option]Payment[/label]</strong></td>
<td>[select payment-option]
[option value=0]at once[/option]
[option value=1][product payments-number1] x [product payments-amount1] [commerce-manager currency-code][/option]
[/select]</td></tr>
</table>
<div style="text-align: center;">[input submit value="Purchase"]</div>
Result:
Example 3:
[validation-content][other]<p class="error">[error unfilled-fields]</p>[/validation-content]
<div style="text-align: center;">
<p><label><strong>Product:</strong> [product-selector]</label></p>
<p><label>[input terms-and-conditions type=checkbox required=yes value=yes]
I accept the <a href="[commerce-manager terms-and-conditions-url]">terms and conditions</a>.</label>
<br />[error terms-and-conditions]</p>
<div>[input submit value="Purchase"]</div>
</div>
Result:
To display an add to cart button of a product, insert into your posts/pages/widgets a cotillion like this:
[add-to-cart-button id=N]
by replacing N with the ID of the product.
Example:
[add-to-cart-button id=2]
Result (with a little formatting):
By default, the URL of the add to cart button is the URL you specified in the edit page of the product or the Options page of Commerce Manager, but you can specify a different URL by using the src attribute:
[add-to-cart-button src=URL id=N]
by replacing URL with the URL of the button that you want to use. Click here to download many buttons that you can use for free on your website.
By default, the text of the add to cart button (text displayed instead of the add to cart button when this one can't be displayed) is the text you specified in the edit page of the product or the Options page of Commerce Manager, but you can specify a different text by using the alt attribute:
[add-to-cart-button alt="text" id=N]
Don't forget to include the quotes at the beginning and the end of the value of the alt attribute.
By default, the quantity is equal to 1, but you can specify a different quantity by using the quantity attribute:
[add-to-cart-button quantity=quantity id=N]
All attributes (except action, id and name) of the <form>
HTML tag are also available for the [add-to-cart-button]
cotillion, with an identical role.
To display an add to cart link of a product, insert into your posts/pages/widgets a cotillion like this:
[add-to-cart-link id=N]
by replacing N with the ID of the product.
Example:
[add-to-cart-link id=2]
Result (with a little formatting):
If you want to display the add to cart URL of the product, use a cotillion like this:
[add-to-cart-url id=N]
by replacing N with the ID of the product.
By default, the text of the add to cart link is the text you specified in the edit page of the product or the Options page of Commerce Manager, but you can specify a different text by using the text attribute:
[add-to-cart-link text="text" id=N]
Don't forget to include the quotes at the beginning and the end of the value of the text attribute.
By default, the quantity is equal to 1, but you can specify a different quantity by using the quantity attribute:
[add-to-cart-link quantity=quantity id=N]
All attributes (except href and id) of the <a>
HTML tag are also available for the [add-to-cart-link]
cotillion, with an identical role.
To display a shopping cart, insert this cotillion into your posts/pages/widgets:
[shopping-cart]
or:
[compact-shopping-cart]
to display a more compact shopping cart.
The shopping cart is incompatible with payment by installments, the ability to apply the tax percentage/shipping cost of the merchant account that receives the payments and instant payment of commissions.
When the customer has paid, Commerce Manager automatically divides the order into several orders. If the customer ordered N products, Commerce Manager will record N orders so that each order is associated with only one product. The customer is redirected to the order confirmation URL of the Options page of Commerce Manager. For each product ordered, the customer receives an order confirmation email (if you have configured the product to send an order confirmation email).
Currently, the shopping cart is compatible only with PayPal.
If your payment gateway allows it, you can do a test without generating a real transaction, like this:
[shopping-cart test=yes]
You must also select Yes to the Allow testing without generating a real transaction field in the edit page of your product, and follow the instructions of your payment gateway to do your test.
A proper operation during a fictitious transaction does not guarantee that everything will work properly during a real transaction, so we advise you to make a real transaction (you can temporarily lower the price of your product) if you want to ensure everything works well.
You can, through the Options page of Commerce Manager, choose to save or not the shopping cart of the user into his client account (if he's logged in as a client). You can also choose the lifetime of the shopping cart.
If this lifetime is not unlimited, and if the user makes no changes to his shopping cart during a period equal to this lifetime, then the shopping cart will be removed from his client account.
To display a content restricted to clients (persons registered to your client area and visible in the Clients page of Commerce Manager), insert into your posts/pages/widgets a cotillion like this:
[commerce-content]Content displayed if you are logged in as a client[/commerce-content]
You can also define a content that will be displayed if the user is not logged in as a client, like this:
[commerce-content]
Content displayed if you are logged in as a client[other]
Content displayed if you are not logged in as a client
[/commerce-content]
Result (with a little formatting):
Content displayed if you are not logged in as a client
To display a content restricted to clients of a certain category, insert into your posts/pages/widgets a cotillion like this:
[commerce-content category=N]Content displayed if you belong to this client category[/commerce-content]
by replacing N with the ID of the category.
It is possible to specify several IDs for the category attribute, by separating the different IDs by /
, like this:
[commerce-content category=id1/id2/…/idN]Content displayed if you belong to one of these clients categories[/commerce-content]
You can create pages restricted to users logged in as clients (persons registered to your client area and visible in the Clients page of Commerce Manager), and redirect the users to another page if they're not logged in as clients. If you use Commerce Manager on a non-WordPress static website, follow these instructions.
Note: If you are logged in as an administrator or editor, you will not be redirected.
Create a new page in WordPress. In the edit page of this page, create the commerce custom field (if you don't see the module of custom fields, follow these instructions, or click on Screen Options at the top right of the page and check the Custom fields box in order to display it) and enter as the value a cotillion like this:
[commerce-redirection condition=condition url=URL]
by replacing URL with the URL to which you want to redirect the user and condition with:
For example, in the edit page of the page containing your login form, create the commerce custom field and enter as the value a cotillion like this:
[commerce-redirection condition=session url=URL]
When he's logged in as a client, the user will be immediately redirected to the URL.
To understand how to create your pages relating to client area, refer to this section.
The category attribute works like the attribute of the same name for the [commerce-content] cotillion.
To logout the client, he must click on a link that points to urlindex.php?action=logout, where url is the URL of the commerce-manager directory (in your plugins directory). The logged out client is redirected to your home page.
Your logout URL should look like this:
https://www.your-domain-name.com/wp-content/plugins/commerce-manager/index.php?action=logout
You can create a logout page with a custom redirection URL. Create a new page in WordPress. In the edit page of this page, create the commerce custom field and enter as the value a cotillion like this:
[commerce-redirection action=logout url=URL]
by replacing URL with the URL to which you want to redirect the user.
Access to this page will have the effect of logout the client and redirect him to the specified URL.
If you use Commerce Manager on a non-WordPress static website, you can't use custom fields. To replace them, you must insert these lines of cotillion into the PHP file of your webpage:
add_shortcode('commerce-redirection', create_function('$atts', 'include_once commerce_path("shortcodes.php"); return commerce_redirection($atts);'));
$commerce = '[your-cotillion]'; do_shortcode($commerce);
just after this line:
include_once $file;
by replacing [your-cotillion] with a cotillion allowing to redirect the user.
If your page contains a login form, you must also insert this line of cotillion:
<?php $redirection = do_shortcode($commerce); if ($redirection!= '') { echo '<script>window.location = \''.$redirection.'\';</script>'; } ?>
just after this line:
<?php wp_footer(); ?>
You can create posts/pages whose comments are restricted to users logged in as clients (persons registered to your client area and visible in the Clients page of Commerce Manager).
In the edit page of this post/page, create the commerce custom field (if you don't see the module of custom fields, follow these instructions, or click on Screen Options at the top right of the page and check the Custom fields box in order to display it) and enter as the value a cotillion like this:
[commerce-comments condition=condition]
by replacing condition with:
The category attribute works like the attribute of the same name for the [commerce-content] cotillion.
Your clients (persons registered to your client area and visible in the Clients page of Commerce Manager) can have 3 statuses: Active, Inactive and Deactivated. An active client can login to view his statistics. At the opposite, an inactive (or deactivated) client can't login.
You can choose the status assigned to your clients upon their registration. If they're inactive, you will must activate them manually, or send them an activation link.
You can also deactivate your clients at any time.
The activation confirmation/notification emails are sent only when the client status moves from Inactive to Active, and the deactivation notification email is sent only when the client has been deactivated.
If when they register, your clients are inactive, you can send them an activation link so they can activate their account. To send your clients an activation URL, use the following cotillion:
[commerce-activation-url]
In the Body field of your registration confirmation email, you can insert a cotillion like this:
Click on the link below to activate your client account:
[commerce-activation-url]
You can choose to automatically login your clients after their registration through the registration form of Commerce Manager. If your clients are active when they register, they will be logged in immediately. Otherwise, they will be logged in immediately after clicking on their activation link.
To send your clients a one-click login URL, use the following cotillion:
[commerce-login-url]
In the Body field of your registration confirmation email, you can insert a cotillion like this:
Click on the link below to login in one click:
[commerce-login-url]
Your orders can have 3 statuses: Processed, Unprocessed and Refunded. You can choose the status assigned to your orders upon their registration. If your products are digital, or more generally if the processing of your orders is automatic and immediate, choose Processed, otherwise choose Unprocessed.
The order processing's notification email is sent only when the order status moves from Unprocessed to Processed, and the order refund's notification email is sent only when the order has been refunded.
To display an information about a product, insert into your posts/pages/widgets a cotillion like this:
[product information id=N]
by replacing N with the ID of the product.
You can also insert this cotillion in your order confirmation/notification emails. Then you don't have to use the id attribute, like this:
[product information]
When you don't use the id attribute, it is automatically set to the ID of the product ordered.
Replace information with:
This list is not complete and has only the most relevant items. You can find all possible values of information in the tables.php file of Commerce Manager.
Example:
Price of [product name id=2]: [product price id=2] USD
Result:
Price of Commerce Manager: 95 USD
You can specify a text that will be displayed instead of the information when this one is empty, using the default attribute, like this:
[product information default="text" id=N]
Don't forget to include the quotes at the beginning and the end of the default value.
You can specify a PHP function that will be applied to the information before this one is displayed, using the filter attribute, like this:
[product information filter=function id=N]
Replace function by the name of the function you want to apply.
Sometimes, the information is an English word. You can translate it into the language of your website by entering i18n as the value for the filter attribute.
Example:
Tax included in the price: [product tax-included-in-price filter=i18n id=2]
Result:
Tax included in the price: yes
It is possible to specify several functions for the filter attribute, by separating the different functions by /
, like this:
[product information filter=function1/function2/…/functionN id=N]
The functions will be applied in the specified order.
When the information is a numeric data, you can choose the number of digits after the decimal point used to display it, using the decimals attribute, like this:
[product information decimals=value id=N]
Replace value with:
You can specify several URLs into the Download URL field of the edit pages of your products, by separating the different URLs with commas. If one of your products has several download URLs, you can display the n-th download URL by using the part attribute, like this:
[product download-url part=n id=N]
Example:
First download URL: [product download-url part=1 id=N]
Second download URL: [product download-url part=2 id=N]
Third download URL: [product download-url part=3 id=N]
…
You can display the sum of informations about several of your products, by specifying several IDs for the id attribute. Separate the different IDs by +
, like this:
[product information id=2+3]
Example:
You can get the <em>[product name id=2] + [product name id=3]</em> pack with only [product price id=4] dollars instead of [product price id=2+3] dollars.
Result:
You can get the Commerce Manager + Affiliation Manager pack with only 165 dollars instead of 190 dollars.
You can, for each of your pages, specify a default ID that will be applied when you don't specify any value for the id attribute of the [product]
cotillion.
Into the edit page of your page, create the product_id custom field (if you don't see the module of custom fields, follow these instructions, or click on Screen Options at the top right of the page and check the Custom fields box in order to display it) and enter the ID you want.
If you use Commerce Manager on a non-WordPress static website, you can't use custom fields. To replace them, you must insert this line of cotillion into the PHP file of your webpage:
$GLOBALS['product_id'] = N;
just after this line:
include_once $file;
by replacing N with the ID of the product.
To display an information about a product category, insert into your posts/pages/widgets a cotillion like this:
[product-category information id=N]
by replacing N with the ID of the product category and information with:
This list is not complete and has only the most relevant items. You can find all possible values of information in the tables.php file of Commerce Manager.
Example:
[product-category name id=3]
Result:
WordPress Plugins
You can specify a text that will be displayed instead of the information when this one is empty, using the default attribute, like this:
[product-category information default="text" id=N]
Don't forget to include the quotes at the beginning and the end of the default value.
You can specify a PHP function that will be applied to the information before this one is displayed, using the filter attribute, like this:
[product-category information filter=function id=N]
Replace function by the name of the function you want to apply.
Sometimes, the information is an English word. You can translate it into the language of your website by entering i18n as the value for the filter attribute.
Example:
Tax included in the price: [product-category tax-included-in-price filter=i18n id=3]
Result:
Tax included in the price: yes
It is possible to specify several functions for the filter attribute, by separating the different functions by /
, like this:
[product-category information filter=function1/function2/…/functionN id=N]
The functions will be applied in the specified order.
When the information is a numeric data, you can choose the number of digits after the decimal point used to display it, using the decimals attribute, like this:
[product-category information decimals=value id=N]
Replace value with:
You can specify several URLs into the Download URL field of the edit pages of your products categories, by separating the different URLs with commas. If one of your products categories has several download URLs, you can display the n-th download URL by using the part attribute, like this:
[product-category download-url part=n id=N]
Example:
First download URL: [product-category download-url part=1 id=N]
Second download URL: [product-category download-url part=2 id=N]
Third download URL: [product-category download-url part=3 id=N]
…
You can display the sum of informations about several of your products categories, by specifying several IDs for the id attribute. Separate the different IDs by +
, like this:
[product-category information id=2+3]
You can specify a cotillion for the id attribute, provided to replace [ by ( and ] by ). It allows you to display an information about the category of a product, like this:
[product-category information id="(your-cotillion)"]
Don't forget to include the quotes at the beginning and the end of the cotillion.
Example:
Category of [product name id=2]: [product-category name default="None" id="(product category-id id=2)"]
Result:
Category of Commerce Manager: WordPress Plugins
To display an information about a purchase form, insert into your posts/pages/widgets a cotillion like this:
[purchase-form information id=N]
by replacing N with the form ID and information with:
This list is not complete and has only the most relevant items. You can find all possible values of information in the tables.php file of Commerce Manager.
Example:
[purchase-form name id=1]
Result:
Form 1
You can specify a text that will be displayed instead of the information when this one is empty, using the default attribute, like this:
[purchase-form information default="text" id=N]
Don't forget to include the quotes at the beginning and the end of the default value.
You can specify a PHP function that will be applied to the information before this one is displayed, using the filter attribute, like this:
[purchase-form information filter=function id=N]
Replace function by the name of the function you want to apply.
Sometimes, the information is an English word. You can translate it into the language of your website by entering i18n as the value for the filter attribute.
It is possible to specify several functions for the filter attribute, by separating the different functions by /
, like this:
[purchase-form information filter=function1/function2/…/functionN id=N]
The functions will be applied in the specified order.
To display an information about a purchase form category, insert into your posts/pages/widgets a cotillion like this:
[purchase-form-category information id=N]
by replacing N with the ID of the purchase form category and information with:
This list is not complete and has only the most relevant items. You can find all possible values of information in the tables.php file of Commerce Manager.
Example:
[purchase-form-category name id=1]
Result:
Forms
You can specify a text that will be displayed instead of the information when this one is empty, using the default attribute, like this:
[purchase-form-category information default="text" id=N]
Don't forget to include the quotes at the beginning and the end of the default value.
You can specify a PHP function that will be applied to the information before this one is displayed, using the filter attribute, like this:
[purchase-form-category information filter=function id=N]
Replace function by the name of the function you want to apply.
It is possible to specify several functions for the filter attribute, by separating the different functions by /
, like this:
[purchase-form-category information filter=function1/function2/…/functionN id=N]
The functions will be applied in the specified order.
You can specify a cotillion for the id attribute, provided to replace [ by ( and ] by ). It allows you to display an information about the category of a purchase form, like this:
[purchase-form-category information id="(your-cotillion)"]
Don't forget to include the quotes at the beginning and the end of the cotillion.
Example:
Category of [purchase-form name id=1]: [purchase-form-category name default="None" id="(purchase-form category-id id=1)"]
Result:
Category of Form 1: Forms
To display an information about the client (person registered to your client area and visible in the Clients page of Commerce Manager), insert into your posts/pages/widgets a cotillion like this:
[client information]
by replacing information with:
Example:
Your login name: [client login]
Result:
Your login name:
You can specify a text that will be displayed instead of the information when this one is empty, using the default attribute, like this:
[client information default="text"]
Don't forget to include the quotes at the beginning and the end of the default value.
You can specify a PHP function that will be applied to the information before this one is displayed, using the filter attribute, like this:
[client information filter=function]
Replace function by the name of the function you want to apply.
Sometimes, the information is an English word. You can translate it into the language of your website by entering i18n as the value for the filter attribute.
Example:
Your status: [client status filter=i18n]
Result:
Your status:
It is possible to specify several functions for the filter attribute, by separating the different functions by /
, like this:
[client information filter=function1/function2/…/functionN]
The functions will be applied in the specified order.
To display an information about a client category, insert into your posts/pages/widgets a cotillion like this:
[client-category information id=N]
by replacing N with the ID of the client category and information with:
Example:
[client-category name id=1]
Result:
Privileged Clients
You can specify a text that will be displayed instead of the information when this one is empty, using the default attribute, like this:
[client-category information default="text" id=N]
Don't forget to include the quotes at the beginning and the end of the default value.
You can specify a PHP function that will be applied to the information before this one is displayed, using the filter attribute, like this:
[client-category information filter=function id=N]
Replace function by the name of the function you want to apply.
It is possible to specify several functions for the filter attribute, by separating the different functions by /
, like this:
[client-category information filter=function1/function2/…/functionN id=N]
The functions will be applied in the specified order.
You can specify a cotillion for the id attribute, provided to replace [ by ( and ] by ). It allows you to display an information about the category of the client, like this:
[client-category information id="(your-cotillion)"]
Don't forget to include the quotes at the beginning and the end of the cotillion.
Example:
Your category: [client-category name default="None" id="(client category-id)"]
Result:
Your category: None
To display an information about an order or a customer, insert into your posts/pages/widgets a cotillion like this:
[order information id=N]
or this one:
[customer information id=N]
by replacing N with the ID of the order.
You can also insert these cotillions in your order confirmation/notification emails. Then you don't have to use the id attribute, like this:
[order information]
or:
[customer information]
When you don't use the id attribute, it is automatically set to the ID of the order concerned by the confirmation/notification.
Replace information with:
Example:
Amount of the first order: [order amount id=1] USD
Result:
Amount of the first order: 17 USD
You can specify a text that will be displayed instead of the information when this one is empty, using the default attribute, like this:
[order information default="text" id=N]
Don't forget to include the quotes at the beginning and the end of the default value.
You can specify a PHP function that will be applied to the information before this one is displayed, using the filter attribute, like this:
[order information filter=function id=N]
Replace function by the name of the function you want to apply.
Sometimes, the information is an English word. You can translate it into the language of your website by entering i18n as the value for the filter attribute.
Example:
Status of the first order: [order status filter=i18n id=1]
Result:
Status of the first order: processed
It is possible to specify several functions for the filter attribute, by separating the different functions by /
, like this:
[order information filter=function1/function2/…/functionN id=N]
The functions will be applied in the specified order.
When the information is a numeric data, you can choose the number of digits after the decimal point used to display it, using the decimals attribute, like this:
[order information decimals=value id=N]
Replace value with:
To display an information about a recurring payment, insert into your posts/pages/widgets a cotillion like this:
[recurring-payment information id=N]
by replacing N with the ID of the recurring payment.
You can also insert this cotillion in your recurring payment refund's notification emails. Then you don't have to use the id attribute, like this:
[recurring-payment information]
When you don't use the id attribute, it is automatically set to the ID of the payment concerned by the notification.
Replace information with:
Example:
Amount of the first recurring payment: [recurring-payment amount id=1] USD
Result:
Amount of the first recurring payment: 29 USD
You can specify a text that will be displayed instead of the information when this one is empty, using the default attribute, like this:
[recurring-payment information default="text" id=N]
Don't forget to include the quotes at the beginning and the end of the default value.
You can specify a PHP function that will be applied to the information before this one is displayed, using the filter attribute, like this:
[recurring-payment information filter=function id=N]
Replace function by the name of the function you want to apply.
Sometimes, the information is an English word. You can translate it into the language of your website by entering i18n as the value for the filter attribute.
Example:
Status of the first recurring payment: [recurring-payment status filter=i18n id=1]
Result:
Status of the first recurring payment: received
It is possible to specify several functions for the filter attribute, by separating the different functions by /
, like this:
[recurring-payment information filter=function1/function2/…/functionN id=N]
The functions will be applied in the specified order.
When the information is a numeric data, you can choose the number of digits after the decimal point used to display it, using the decimals attribute, like this:
[recurring-payment information decimals=value id=N]
Replace value with:
To display a counter, insert into your posts/pages/widgets a cotillion like this:
[commerce-counter data=data limit=L]
Data: [number][/commerce-counter]
by replacing L with a positive number and data with:
When the limit is reached, the content between [commerce-counter data=data limit=L]
and [/commerce-counter]
disappears. You can format this content as any content of your website. The limit attribute is optional. If you don't use it, the content will not disappear:
[commerce-counter data=data]
Data: [number][/commerce-counter]
You can insert the [number]
cotillion as many times as you want between [commerce-counter data=data limit=L]
and [/commerce-counter]
. If you don't insert it, Commerce Manager allows you to schedule a content disappearance without displaying a counter:
[commerce-counter data=data limit=L]
When the data reaches [limit], this sentence will disappear!
[/commerce-counter]
You also can display a counter of the sum of several different data, with a cotillion like this:
[commerce-counter data=data1+data2 limit=L]
Data: [number][/commerce-counter]
You are not limited to the [number]
cotillion. You can use the following cotillions:
[limit]
to display the limit[number]
to display the data[remaining-number]
to display the difference between the limit and the dataThe filter attribute (defined here) and the decimals attribute (defined here) are also available for these cotillions.
If you want to schedule a content substitution, insert into your posts/pages/widgets a cotillion like this:
[commerce-counter data=data limit=L]
Data: [number][after]The limit is reached.[/commerce-counter]
by replacing L with a positive number.
Insert the content you want to substitute between [after]
and [/commerce-counter]
. When the limit is reached, the content between [commerce-counter data=data limit=L]
and [after]
disappears, and the content between [after]
and [/commerce-counter]
appears. The content between [after]
and [/commerce-counter]
is never sent to the browser until the limit is reached.
You can insert the [number]
cotillion as many times as you want between [commerce-counter data=data limit=L]
and [/commerce-counter]
. If you don't insert it, Commerce Manager allows you to schedule a content substitution without displaying a counter:
[commerce-counter data=data limit=L]
The limit will be reached soon.
[after]The limit is reached.[/commerce-counter]
It is possible to specify several limits for the limit attribute, by separating the different limits by /
, like this:
[commerce-counter data=data limit=50/100]
The first limit will be reached soon.
[after]The second limit will be reached soon.
[after]The second limit has been reached.[/commerce-counter]
You can use the following cotillions:
[limit]
to display the current limit[number]
to display the difference between the current data and the previous limit[remaining-number]
to display the difference between the current limit and the current data[total-limit]
to display the last limit of the limit attribute[total-number]
to display the current data[total-remaining-number]
to display the difference between the last limit of the limit attribute and the current dataThe filter attribute (defined here) and the decimals attribute (defined here) are also available for these cotillions.
You can count only data recorded during a specific time range by using the range attribute, like this:
[commerce-counter data=data range=range limit=L]
Data: [number][/commerce-counter]
Replace range with:
To display a counter of product's performance, insert into your posts/pages/widgets a cotillion like this:
[product-counter data=data limit=L id=N]
Performance: [number][/product-counter]
by replacing L with a positive number, N with the ID of the product and data with:
When the performance reaches the limit L, the content between [product-counter data=data limit=L id=N]
and [/product-counter]
disappears. You can format this content as any content of your website. The limit attribute is optional. If you don't use it, the content will not disappear:
[product-counter data=data id=N]
Performance: [number][/product-counter]
You can insert the [number]
cotillion as many times as you want between [product-counter data=data limit=L id=N]
and [/product-counter]
. If you don't insert it, Commerce Manager allows you to schedule a content disappearance without displaying a counter:
[product-counter data=data limit=L id=N]
When the performance will reach [limit], this sentence will disappear!
[/product-counter]
You also can display a counter of the sum of several different performances, with a cotillion like this:
[product-counter data=data1+data2 limit=L id=N]
Performance: [number][/product-counter]
You are not limited to the [number]
cotillion. You can use the following cotillions:
[limit]
to display the limit[number]
to display the performance[remaining-number]
to display the difference between the limit and the performanceThe filter attribute (defined here) and the decimals attribute (defined here) are also available for these cotillions.
If you want to schedule a content substitution, insert into your posts/pages/widgets a cotillion like this:
[product-counter data=data limit=L id=N]
Performance: [number][after]The limit is reached.[/product-counter]
by replacing L with a positive number and N with the ID of the product.
Insert the content you want to substitute between [after]
and [/product-counter]
. When the performance reaches the limit L, the content between [product-counter data=data limit=L id=N]
and [after]
disappears, and the content between [after]
and [/product-counter]
appears. The content between [after]
and [/product-counter]
is never sent to the browser until the limit is reached.
You can insert the [number]
cotillion as many times as you want between [product-counter data=data limit=L id=N]
and [/product-counter]
. If you don't insert it, Commerce Manager allows you to schedule a content substitution without displaying a counter:
[product-counter data=data limit=L id=N]
The limit will be reached soon.
[after]The limit is reached.[/product-counter]
It is possible to specify several limits for the limit attribute, by separating the different limits by /
, like this:
[product-counter data=data limit=50/100 id=N]
The first limit will be reached soon.
[after]The second limit will be reached soon.
[after]The second limit has been reached.[/product-counter]
You can use the following cotillions:
[limit]
to display the current limit[number]
to display the difference between the current performance and the previous limit[remaining-number]
to display the difference between the current limit and the current performance[total-limit]
to display the last limit of the limit attribute[total-number]
to display the current performance[total-remaining-number]
to display the difference between the last limit of the limit attribute and the current performanceThe filter attribute (defined here) and the decimals attribute (defined here) are also available for these cotillions.
You can count only performances recorded during a specific time range by using the attribut range, like this:
[product-counter data=data range=range limit=L id=N]
Performance: [number][/product-counter]
Replace range with:
To display a counter of purchase form's performance, insert into your posts/pages/widgets a cotillion like this:
[purchase-form-counter data=data limit=L id=N]
Performance: [number][/purchase-form-counter]
by replacing L with a positive number, N with the ID of the purchase form and data with:
When the performance reaches the limit L, the content between [purchase-form-counter data=data limit=L id=N]
and [/purchase-form-counter]
disappears. You can format this content as any content of your website. The limit attribute is optional. If you don't use it, the content will not disappear:
[purchase-form-counter data=data id=N]
Performance: [number][/purchase-form-counter]
You can insert the [number]
cotillion as many times as you want between [purchase-form-counter data=data limit=L id=N]
and [/purchase-form-counter]
. If you don't insert it, Commerce Manager allows you to schedule a content disappearance without displaying a counter:
[purchase-form-counter data=data limit=L id=N]
When the performance will reach [limit], this sentence will disappear!
[/purchase-form-counter]
You also can display a counter of the sum of several different performances, with a cotillion like this:
[purchase-form-counter data=data1+data2 limit=L id=N]
Performance: [number][/purchase-form-counter]
You are not limited to the [number]
cotillion. You can use the following cotillions:
[limit]
to display the limit[number]
to display the performance[remaining-number]
to display the difference between the limit and the performanceThe filter attribute (defined here) and the decimals attribute (defined here) are also available for these cotillions.
If you want to schedule a content substitution, insert into your posts/pages/widgets a cotillion like this:
[purchase-form-counter data=data limit=L id=N]
Performance: [number][after]The limit is reached.[/purchase-form-counter]
by replacing L with a positive number and N with the ID of the purchase form.
Insert the content you want to substitute between [after]
and [/purchase-form-counter]
. When the performance reaches the limit L, the content between [purchase-form-counter data=data limit=L id=N]
and [after]
disappears, and the content between [after]
and [/purchase-form-counter]
appears. The content between [after]
and [/purchase-form-counter]
is never sent to the browser until the limit is reached.
You can insert the [number]
cotillion as many times as you want between [purchase-form-counter data=data limit=L id=N]
and [/purchase-form-counter]
. If you don't insert it, Commerce Manager allows you to schedule a content substitution without displaying a counter:
[purchase-form-counter data=data limit=L id=N]
The limit will be reached soon.
[after]The limit is reached.[/purchase-form-counter]
It is possible to specify several limits for the limit attribute, by separating the different limits by /
, like this:
[purchase-form-counter data=data limit=50/100 id=N]
The first limit will be reached soon.
[after]The second limit will be reached soon.
[after]The second limit has been reached.[/purchase-form-counter]
You can use the following cotillions:
[limit]
to display the current limit[number]
to display the difference between the current performance and the previous limit[remaining-number]
to display the difference between the current limit and the current performance[total-limit]
to display the last limit of the limit attribute[total-number]
to display the current performance[total-remaining-number]
to display the difference between the last limit of the limit attribute and the current performanceThe filter attribute (defined here) and the decimals attribute (defined here) are also available for these cotillions.
You can count only performances recorded during a specific time range by using the attribut range, like this:
[purchase-form-counter data=data range=range limit=L id=N]
Performance: [number][/purchase-form-counter]
Replace range with:
To display a counter of client's performance, insert into your posts/pages/widgets a cotillion like this:
[client-counter data=data limit=L id=N]
Performance: [number][/client-counter]
by replacing L with a positive number, N with the ID of the client (person registered to your client area and visible in the Clients page of Commerce Manager) and data with:
If you don't use the id attribute, it will automatically set to the login name of the user if he's logged in as a client.
When the performance reaches the limit L, the content between [client-counter data=data limit=L id=N]
and [/client-counter]
disappears. You can format this content as any content of your website. The limit attribute is optional. If you don't use it, the content will not disappear:
[client-counter data=data id=N]
Performance: [number][/client-counter]
You can insert the [number]
cotillion as many times as you want between [client-counter data=data limit=L id=N]
and [/client-counter]
. If you don't insert it, Commerce Manager allows you to schedule a content disappearance without displaying a counter:
[client-counter data=data limit=L id=N]
When the performance will reach [limit], this sentence will disappear!
[/client-counter]
You also can display a counter of the sum of several different performances, with a cotillion like this:
[client-counter data=data1+data2 limit=L id=N]
Performance: [number][/client-counter]
You are not limited to the [number]
cotillion. You can use the following cotillions:
[limit]
to display the limit[number]
to display the performance[remaining-number]
to display the difference between the limit and the performanceThe filter attribute (defined here) and the decimals attribute (defined here) are also available for these cotillions.
If you want to schedule a content substitution, insert into your posts/pages/widgets a cotillion like this:
[client-counter data=data limit=L id=N]
Performance: [number][after]The limit is reached.[/client-counter]
by replacing L with a positive number and N with the ID of the client.
Insert the content you want to substitute between [after]
and [/client-counter]
. When the performance reaches the limit L, the content between [client-counter data=data limit=L id=N]
and [after]
disappears, and the content between [after]
and [/client-counter]
appears. The content between [after]
and [/client-counter]
is never sent to the browser until the limit is reached.
You can insert the [number]
cotillion as many times as you want between [client-counter data=data limit=L id=N]
and [/client-counter]
. If you don't insert it, Commerce Manager allows you to schedule a content substitution without displaying a counter:
[client-counter data=data limit=L id=N]
The limit will be reached soon.
[after]The limit is reached.[/client-counter]
It is possible to specify several limits for the limit attribute, by separating the different limits by /
, like this:
[client-counter data=data limit=50/100 id=N]
The first limit will be reached soon.
[after]The second limit will be reached soon.
[after]The second limit has been reached.[/client-counter]
You can use the following cotillions:
[limit]
to display the current limit[number]
to display the difference between the current performance and the previous limit[remaining-number]
to display the difference between the current limit and the current performance[total-limit]
to display the last limit of the limit attribute[total-number]
to display the current performance[total-remaining-number]
to display the difference between the last limit of the limit attribute and the current performanceThe filter attribute (defined here) and the decimals attribute (defined here) are also available for these cotillions.
You can count only performances recorded during a specific time range by using the attribut range, like this:
[client-counter data=data range=range limit=L id=N]
Performance: [number][/client-counter]
Replace range with:
You can specify no value for the id attribute. In this case, it is automatically set to the ID of the user's client account if he's logged in as a client.
To display a counter of sales, insert into your posts/pages/widgets a cotillion like this:
[sales-counter limit=L id=N]
Already [number] copies sold!
Only [remaining-number] available copies!
[/sales-counter]
by replacing L with a positive number and N with the ID of the product.
When the number of sold copies reaches the limit L, the content between [sales-counter limit=L id=N]
and [/sales-counter]
disappears. You can format this content as any content of your website. The limit attribute is optional. If you don't use it, the content will not disappear:
[sales-counter id=N]
Already [number] copies sold!
[/sales-counter]
You can insert the [number]
and [remaining-number]
cotillions as many times as you want between [sales-counter limit=L id=N]
and [/sales-counter]
. If you don't insert it, Commerce Manager allows you to schedule a content disappearance without displaying a counter:
[sales-counter limit=L id=N]
When [limit] copies will be sold, this sentence will disappear!
[/sales-counter]
You are not limited to the [number]
and [remaining-number]
cotillions. You can use the following cotillions:
[limit]
to display the limit[number]
to display the number of sold copies[remaining-number]
to display the number of remaining copies until the limit is reachedThe filter attribute (defined here) and the decimals attribute (defined here) are also available for these cotillions.
If you want to schedule a content substitution, insert into your posts/pages/widgets a cotillion like this:
[sales-counter limit=L id=N]
Only [remaining-number] available copies!
[after]This product is no longer available.[/sales-counter]
by replacing L with a positive number and N with the ID of the product.
Insert the content you want to substitute between [after]
and [/sales-counter]
. When the number of sold copies reaches the limit L, the content between [sales-counter limit=L id=N]
and [after]
disappears, and the content between [after]
and [/sales-counter]
appears. The content between [after]
and [/sales-counter]
is never sent to the browser until the limit is reached.
You can insert the [number]
and [remaining-number]
cotillions as many times as you want between [sales-counter limit=L id=N]
and [/sales-counter]
. If you don't insert it, Commerce Manager allows you to schedule a content substitution without displaying a counter:
[sales-counter limit=L id=N]
This product will soon be unavailable.
[after]This product is no longer available.[/sales-counter]
It is possible to specify several limits for the limit attribute, by separating the different limits by /
, like this:
[sales-counter limit=50/100 id=N]
Only [remaining-number] available copies until the price goes from 37 to 57 dollars!
[after]Only [remaining-number] available copies!
[after]This product is no longer available.[/sales-counter]
You can use the following cotillions:
[limit]
to display the current limit[number]
to display the number of sold copies since the previous limit was reached[remaining-number]
to display the number of remaining copies until the current limit is reached[total-limit]
to display the last limit of the limit attribute[total-number]
to display the total number of sold copies[total-remaining-number]
to display the number of remaining copies until the last limit of the limit attribute is reachedThe filter attribute (defined here) and the decimals attribute (defined here) are also available for these cotillions.
You can count the cumulative sales of many of your products, by specifying several IDs for the id attribute. Separate the different IDs by +
, like this:
[sales-counter limit=L id=3+5]
Already [number] copies sold!
Only [remaining-number] available copies!
[/sales-counter]
To display a counter of refunds, insert into your posts/pages/widgets a cotillion like this:
[refunds-counter limit=L id=N]
Already [number] copies refunded!
Only [remaining-number] remaining copies!
[/refunds-counter]
by replacing L with a positive number and N with the ID of the product.
When the number of refunded copies reaches the limit L, the content between [refunds-counter limit=L id=N]
and [/refunds-counter]
disappears. You can format this content as any content of your website. The limit attribute is optional. If you don't use it, the content will not disappear:
[refunds-counter id=N]
Already [number] copies refunded!
[/refunds-counter]
You can insert the [number]
and [remaining-number]
cotillions as many times as you want between [refunds-counter limit=L id=N]
and [/refunds-counter]
. If you don't insert it, Commerce Manager allows you to schedule a content disappearance without displaying a counter:
[refunds-counter limit=L id=N]
When [limit] copies will be refunded, this sentence will disappear!
[/refunds-counter]
You are not limited to the [number]
and [remaining-number]
cotillions. You can use the following cotillions:
[limit]
to display the limit[number]
to display the number of refunded copies[remaining-number]
to display the number of remaining refunds until the limit is reachedThe filter attribute (defined here) and the decimals attribute (defined here) are also available for these cotillions.
If you want to schedule a content substitution, insert into your posts/pages/widgets a cotillion like this:
[refunds-counter limit=L id=N]
Only [remaining-number] remaining refunds!
[after]This product has already been refunded at least [limit] times.[/refunds-counter]
by replacing L with a positive number and N with the ID of the product.
Insert the content you want to substitute between [after]
and [/refunds-counter]
. When the number of refunded copies reaches the limit L, the content between [refunds-counter limit=L id=N]
and [after]
disappears, and the content between [after]
and [/refunds-counter]
appears. The content between [after]
and [/refunds-counter]
is never sent to the browser until the limit is reached.
You can insert the [number]
and [remaining-number]
cotillions as many times as you want between [refunds-counter limit=L id=N]
and [/refunds-counter]
. If you don't insert it, Commerce Manager allows you to schedule a content substitution without displaying a counter:
[refunds-counter limit=L id=N]
This product has not yet been refunded [limit] times.
[after]This product has been refunded at least [limit] times.[/refunds-counter]
It is possible to specify several limits for the limit attribute, by separating the different limits by /
, like this:
[refunds-counter limit=5/10 id=N]
This product has not yet been refunded 5 times.
[after]This product has not yet been refunded 10 times.
[after]This product has been refunded at least 10 times.[/refunds-counter]
You can use the following cotillions:
[limit]
to display the current limit[number]
to display the number of refunded copies since the previous limit was reached[remaining-number]
to display the number of remaining refunds until the current limit is reached[total-limit]
to display the last limit of the limit attribute[total-number]
to display the total number of refunded copies[total-remaining-number]
to display the number of remaining refunds until the last limit of the limit attribute is reachedThe filter attribute (defined here) and the decimals attribute (defined here) are also available for these cotillions.
You can count the cumulative refunds of many of your products, by specifying several IDs for the id attribute. Separate the different IDs by +
, like this:
[refunds-counter limit=L id=3+5]
Already [number] copies refunded!
Only [remaining-number] remaining copies!
[/refunds-counter]
To display a counter of items/products in the shopping cart, insert into your posts/pages/widgets a cotillion like this:
[shopping-cart-counter data=data limit=L]
[number] items/products in your shopping cart[/shopping-cart-counter]
by replacing L with a positive number and data with:
When the limit is reached, the content between [shopping-cart-counter data=data limit=L]
and [/shopping-cart-counter]
disappears. You can format this content as any content of your website. The limit attribute is optional. If you don't use it, the content will not disappear:
[shopping-cart-counter data=data]
[number] items/products in your shopping cart[/shopping-cart-counter]
You can insert the [number]
cotillion as many times as you want between [shopping-cart-counter data=data limit=L]
and [/shopping-cart-counter]
. If you don't insert it, Commerce Manager allows you to schedule a content disappearance without displaying a counter:
[shopping-cart-counter data=data limit=L]
When the number of items/products reaches [limit], this sentence will disappear!
[/shopping-cart-counter]
You are not limited to the [number]
cotillion. You can use the following cotillions:
[limit]
to display the limit[number]
to display the number of items/products[remaining-number]
to display the difference between the limit and the number of items/productsThe filter attribute (defined here) is available for these cotillions.
If you want to schedule a content substitution, insert into your posts/pages/widgets a cotillion like this:
[shopping-cart-counter data=data limit=L]
[number] items/products in your shopping cart[after]The limit is reached.[/shopping-cart-counter]
by replacing L with a positive number.
Insert the content you want to substitute between [after]
and [/shopping-cart-counter]
. When the limit is reached, the content between [shopping-cart-counter data=data limit=L]
and [after]
disappears, and the content between [after]
and [/shopping-cart-counter]
appears. The content between [after]
and [/shopping-cart-counter]
is never sent to the browser until the limit is reached.
You can insert the [number]
cotillion as many times as you want between [shopping-cart-counter data=data limit=L]
and [/shopping-cart-counter]
. If you don't insert it, Commerce Manager allows you to schedule a content substitution without displaying a counter:
[shopping-cart-counter data=data limit=L]
The limit will be reached soon.
[after]The limit is reached.[/shopping-cart-counter]
It is possible to specify several limits for the limit attribute, by separating the different limits by /
, like this:
[shopping-cart-counter data=data limit=5/10]
The first limit will be reached soon.
[after]The second limit will be reached soon.
[after]The second limit has been reached.[/shopping-cart-counter]
You can use the following cotillions:
[limit]
to display the current limit[number]
to display the difference between the number of items/products and the previous limit[remaining-number]
to display the difference between the current limit and the number of items/products[total-limit]
to display the last limit of the limit attribute[total-number]
to display the number of items/products[total-remaining-number]
to display the difference between the last limit of the limit attribute and the number of items/productsThe filter attribute (defined here) is available for these cotillions.
To display a content restricted to users who ordered one of your products (useful to deliver your digital products on your order confirmation pages), insert into your posts/pages/widgets a cotillion like this:
[purchase-content]Content displayed if the user ordered one of your products[/purchase-content]
You can also define a content that will be displayed if the user did not order any of your products, like this:
[purchase-content]
Content displayed if the user ordered one of your products[other]
Content displayed if the user did not order any of your products
[/purchase-content]
Result (with a little formatting):
Content displayed if the user did not order any of your products
If he's not logged is as a client (person registered to your client area and visible in the Clients page of Commerce Manager), the user is recognized by his IP address.
To display a content restricted to users who ordered the product whose the ID is N, insert into your posts/pages/widgets a cotillion like this:
[purchase-content id=N]
Thank you for your purchase of [product name id=N]!
<a href="[product download-url id=N]">Click here to download it.</a>
[/purchase-content]
It is possible to specify several IDs for the id attribute, by separating the different IDs by /
, like this:
[purchase-content id=id1/id2/…/idN]Content displayed if you ordered at least one of these products[/purchase-content]
Example:
[purchase-content id=2/3/4]
Content displayed if you ordered at least one of these products[other]
Content displayed if you did not order any of these products
[/purchase-content]
Result (with a little formatting):
Content displayed if you did not order any of these products
The status attribute allows you to count only the orders corresponding to a certain status.
Example :
[purchase-content status=unrefunded]Content displayed if the user ordered one of your products, and if at least one of his orders is not refunded[/purchase-content]
The status attribute can take the following values:
To display an option of Commerce Manager, insert into your posts/pages/widgets a cotillion like this:
[commerce-manager option]
by replacing option with:
This list is not complete and has only the most relevant items. You can find all possible values of option in the initial-options.php file of Commerce Manager.
Example:
Currency: [commerce-manager currency-code]
Result:
Currency: USD
To display an option of Commerce Manager, insert into your posts/pages/widgets a cotillion like this:
[commerce-manager option]
by replacing option with:
This list is not complete and has only the most relevant items. You can find all possible values of option in the initial-options.php file of Commerce Manager.
Example:
Initial status of the clients: [commerce-manager clients-initial-status]
Result:
Initial status of the clients: active
You can specify a text that will be displayed instead of the option when this one is empty, using the default attribute, like this:
[commerce-manager option default="text"]
Don't forget to include the quotes at the beginning and the end of the default value.
You can specify a PHP function that will be applied to the option before this one is displayed, using the filter attribute, like this:
[commerce-manager option filter=function]
Replace function by the name of the function you want to apply.
Sometimes, the option is an English word. You can translate it into the language of your website by entering i18n as the value for the filter attribute.
Example:
Initial status of the orders: [commerce-manager orders-initial-status filter=i18n]
Result:
Initial status of the orders: processed
It is possible to specify several functions for the filter attribute, by separating the different functions by /
, like this:
[commerce-manager option filter=function1/function2/…/functionN]
The functions will be applied in the specified order.
When the option is a numeric data, you can choose the number of digits after the decimal point used to display it, using the decimals attribute, like this:
[commerce-manager option decimals=value]
Replace value with:
You can deliver your digital products using encrypted download URLs. The encryption key and the validity duration of encrypted URLs are configurable through the Options page of Commerce Manager. Enter a random string (difficult to guess) into the Encryption key field.
To deliver your digital products using encrypted download URLs, use the following cotillion:
[product download-url filter=encrypt-url]
instead of this one:
[product download-url]
If your digital product has several download URLs, use the following cotillion:
[product download-url part=1 filter=encrypt-url]
[product download-url part=2 filter=encrypt-url]
…
instead of this one:
[product download-url part=1]
[product download-url part=2]
…
In the Body field of your order confirmation email, you can insert a cotillion like this:
You can download [product name] by clicking the link below:
[product download-url filter=encrypt-url]
You have [commerce-manager encrypted-urls-validity-duration] hours to download it. Then this link will no longer be valid.
You can also insert the cotillion above into the Instructions to the customer field of the edit page of your product, and insert the following cotillion into the Body field of your order confirmation email:
[product instructions]
You can insert cotillions into Sender, Receiver, Subject and Body fields of emails to display informations about the customer, the product, the client, the order and the recurring payment. These cotillions are simply the same as those presented in Display Of Informations About A Product, Display Of Informations About The Client, Display Of Informations About An Order Or A Customer and Display Of Informations About A Recurring Payment sections.
When you don't use the id attribute, it is automatically set to the ID of the product (for the [product]
cotillion), and the ID of the order/recurring payment/client concerned by the confirmation/notification/redelivery (for the [order]
, [recurring-payment]
and [client]
cotillions).
You can also insert in these fields all cotillions available on your website.
If you register the customer as a client, you can insert cotillions into these fields in order to display informations (login name and password for example) about the client. These cotillions are presented in this section.
If you register the customer/client to your affiliate program, you can insert cotillions into these fields in order to display informations (login name and password for example) about the affiliate. These cotillions are presented in this section.
If you register the customer/client to one or more of your members areas, you can insert cotillions into these fields in order to display informations (login name and password for example) about the member. These cotillions are presented in this section.
If you register the customer/client as a WordPress user, you can insert cotillions into these fields in order to display informations (login name and password for example) about the user. These cotillions are presented in this section.
Name <email@address>, Reply-To: Reply To Name <reply-to-email@address>
You can also enter several email addresses separated with commas in the Receiver field of emails. And you can insert HTML code into the Body field of emails.
Commerce Manager allows you to subscribe your customers/clients to an autoresponder list. You must make the settings shown in this section so that it works.
For the following autoresponders, you must enter the ID of the list into the List field of the Autoresponders module:
For GetResponse, enter the TOKEN key of the list. For MailerLite, enter the ID of the group. You can get this information in this page by logging into your MailerLite account.
You can find the ID of a MailChimp list in the List name & defaults page.
You can allow the user to choose an autoresponder list by inserting a cotillion like this one into the Code field of your form:
<p><label><strong>List:</strong> [select autoresponder-list]
[option value=list1]List 1[/option]
[option value=list2]List 2[/option]
…
[option value=listN]List N[/option]
[/select]</label></p>
Replace list1, list2… listN with the IDs or names of the lists.
You can also allow him to subscribe or not to an autoresponder list, by inserting a cotillion like this one into the Code field of your form:
<p><label>[input subscribed-to-autoresponder value=yes] Subscribe to this list</label></p>
You must make some adjustments so that Commerce Manager works with AWeber. You have two methods. If the first doesn't work, try the second.
First method:
Go to this page to get your authorization cotillion and copy it to the API key field in the AWeber module of the Options page. Commerce Manager will automatically extract your API key from it when you click a button to update your options.
Second method:
Go to your AWeber account, place your pointer on List Options, click on Email Parsers in the dropdown list that appears and then click on add new at the bottom of the page.
Enter what you want into the Description field and insert this cotillion into the Trigger Rule field:
From:[^\n|.]+wordpress\@domain\.extension
by replacing domain with the domain name of your website (without the extension) and extension the extension of your domain name (without the dot).
If your domain name (with the extension) contains more than 35 characters, insert this cotillion into the Trigger Rule field instead of the previous cotillion:
From:[^\n|.]+w\@domain\.extension
Insert this cotillion into the Rule 1 field:
\n[>\s]*Email:\s+(.+?)\n
In the Store In field to the right of the Rule 1 field, select Email.
Insert this cotillion into the Rule 2 field:
\n[>\s]*Name:\s+(.+?)\n
In the Store In field to the right of the Rule 2 field, select Name.
Insert this cotillion into the Rule 3 field:
\n[>\s]*Referrer:\s+(.+?)\n
In the Store In field to the right of the Rule 3 field, select Ad Tracking.
Click on Save to record your parser. Then edit it, check the Enable parser for all lists in this account box and click on Save to enable your parser for all lists of your AWeber account.
You have no adjustment to make so that Commerce Manager works with CyberMailing, but do not enable the protection against bots.
You must enter the API key of your GetResponse account in the Autoresponders integration module of the Options page of Commerce Manager so that Commerce Manager works with GetResponse. You can get your API key by logging into your GetResponse account.
You must enter the API key of your MailChimp account in the Autoresponders integration module of the Options page of Commerce Manager so that Commerce Manager works with MailChimp. You can get your API key by logging into your MailChimp account.
You must enter the API key of your MailerLite account in the Autoresponders integration module of the Options page of Commerce Manager so that Commerce Manager works with MailerLite. You can get your API key in this page by logging into your MailerLite account.
You must enter the API key of your Sendinblue account in the Autoresponders integration module of the Options page of Commerce Manager so that Commerce Manager works with Sendinblue. You can get your API key by logging into your Sendinblue account.
You must enter the URL of your Sendy installation and your API key in the Autoresponders integration module of the Options page of Commerce Manager so that Commerce Manager works with Sendy. You can get your API key in the Settings page of Sendy.
You must enter the ID of your SG Autorépondeur account and your activation cotillion in the Autoresponders integration module of the Options page of Commerce Manager so that Commerce Manager works with SG Autorépondeur. You can get these informations by logging into your SG Autorépondeur account.
If it doesn't work, make sure the cURL extension is enabled on the server that hosts your website.
You can register your customers as clients. The Autoresponders, Registration to the affiliate program, Membership, WordPress and Custom instructions modules of the pages of Commerce Manager supersede the modules of the same name in the Client Area page.
If the user orders a product while logged in as a client, or by specifying an email address identical to that of an existing client, Commerce Manager will not create a new client account, but will update the category of the client, if you want to assign the customer/client to a client category.
Upon registration, if he has not provided a login name, the login name of the customer is his email address, if there is no client with the same login name. Otherwise, a number will be added to the end. If he has not provided a password, a random password is generated automatically.
You can give to the customer his login name and his password, by inserting a cotillion like this one in the Body field of your order confirmation email:
Your login name: [client login]
Your password: [client password default="the same as before"]
The customer can always change his login name and password through the profile form of Commerce Manager.
You can insert cotillions into the Sender, Receiver, Subject and Body fields of order confirmation/notification emails in order to display informations about the client. These cotillions are presented in this section.
You can register your customers/clients to your affiliate program, if you have installed and activated Affiliation Manager. The Autoresponders, Registration as a client, Membership, WordPress and Custom instructions modules of Commerce Manager supersede the modules of the same name in Affiliation Manager.
If the user orders a product/registers while logged in as an affiliate, or by specifying an email address identical to that of an existing affiliate, Commerce Manager will not create a new affiliate account, but will update the category of the affiliate, if you want to assign the customer/client to an affiliate category.
Upon registration, if he has not provided a login name, the login name of the customer is the part before the @ character of his email address, if there is no affiliate with the same login name. Otherwise, a number will be added to the end. If he has not provided a password, a random password is generated automatically.
The affiliate's login name of the client is his client's login name, if there is no affiliate with the same login name. Otherwise, a number will be added to the end.
You can give to the customer/client his login name and his password, by inserting a cotillion like this one in the Body field of your order/registration confirmation email:
Your login name: [affiliate login]
Your password: [affiliate password default="the same as before"]
The customer/client can always change his login name and password through the profile form of Affiliation Manager.
You can insert cotillions into the Sender, Receiver, Subject and Body fields of order/registration confirmation/notification emails in order to display informations about the affiliate. These cotillions are presented in this section.
The connection as a client automatically creates a connection as an affiliate if the client also has an affiliate account and if the email addresses of the two accounts are identical. And under the same conditions, the connection as an affiliate automatically creates a connection as a client.
You can register your customers/clients to one or more of your members areas, if you have installed and activated Membership Manager. The Autoresponders, Registration as a client, Registration to the affiliate program, WordPress and Custom instructions modules of Commerce Manager supersede the modules of the same name in Membership Manager.
If the user orders a product/registers while logged in as a member, or by specifying an email address identical to that of an existing member, Commerce Manager will not create a new member account, but will update the account of the member. It will also update the category of the member, if you want to assign the customer/client to a member category.
Upon registration, if he has not provided a login name, the login name of the customer is his email address, if there is no member with the same login name. Otherwise, a number will be added to the end. If he has not provided a password, a random password is generated automatically.
The member's login name of the client is his client's login name, if there is no member with the same login name. Otherwise, a number will be added to the end.
You can give to the customer/client his login name and his password, by inserting a cotillion like this one in the Body field of your order/registration confirmation email:
Your login name: [member login]
Your password: [member password default="the same as before"]
The customer/client can always change his login name and password through the profile form of Membership Manager.
You can insert cotillions into the Sender, Receiver, Subject and Body fields of order/registration confirmation/notification emails in order to display informations about the member. These cotillions are presented in this section.
The connection as a client automatically creates a connection as a member if the client also has a member account and if the email addresses of the two accounts are identical. And under the same conditions, the connection as a member automatically creates a connection as a client.
You can register your customers/clients as WordPress users. Upon registration, if he has not provided a login name, the login name of the customer is his email address, if there is no WordPress user with the same login name. Otherwise, a number will be added to the end. If he has not provided a password, a random password is generated automatically.
If the user orders a product/registers while logged in as a WordPress user, or by specifying an email address identical to that of an existing WordPress user, Commerce Manager will not create a new WordPress user account.
The user's login name of the client is his client's login name, if there is no WordPress user with the same login name. Otherwise, a number will be added to the end.
You can give to the customer/client his login name and his password, by inserting a cotillion like this one in the Body field of your order/registration confirmation email:
Your login name: [user login]
Your password: [user password]
You can insert cotillions into the Sender, Receiver, Subject and Body fields of order/registration confirmation/notification emails in order to display informations about the user. These cotillions are presented in the Display Of Informations About The User section.
The connection as a WordPress user automatically creates a connection as a client, if the user is not an administrator (or editor), also has a client account and if the email addresses of the two accounts are identical. And under the same conditions, the connection as a client automatically creates a connection as a WordPress user.
To display an information about a WordPress user, insert into your posts/pages/widgets a cotillion like this:
[user information]
by replacing information with:
Example:
Your login name: [user login]
You can specify a text that will be displayed instead of the information when this one is empty (this is generally the case when the user is not logged in as a WordPress user), using the default attribute, like this:
[user information default="text"]
Don't forget to include the quotes at the beginning and the end of the default value.
You can specify a PHP function that will be applied to the information before this one is displayed, using the filter attribute, like this:
[user information filter=function]
Replace function by the name of the function you want to apply.
It is possible to specify several functions for the filter attribute, by separating the different functions by /
, like this:
[user information filter=function1/function2/…/functionN]
The functions will be applied in the specified order.
You can add custom instructions that will be executed just after the registration of an order, or other events. This allows you, among other things, to subscribe the customer/client to a list of an autoresponder that is not yet supported by Commerce Manager.
Some PHP skills are required. In the PHP code field, you can enter a PHP code or the path (relative to the directory in which your wp-config.php file is located) of a PHP file on your website. In the latter case, it's the PHP code of this file that will be executed.
The custom instructions (for the registration of an order) are executed inside the includes/add-order.php file of Commerce Manager. You can find where the custom instructions of other events are executed by opening all files of Commerce Manager with a text editor like Notepad++ and searching for the string of characters eval( in these files.
The custom instructions of form submission are executed inside the includes/forms/processing.php file of Commerce Manager. You can execute different instructions depending on the form by doing a test on the $id variable set in the forms.php file of Commerce Manager.
Commerce Manager allows you to recontact the customers who have not finalized their order, in order to significantly increase your sales. Indeed, the average order abandonment rate is estimated to be over 60 %.
Each time a user clicks on one of your purchase buttons/links, or submits a purchase form, but has not finalized his order after a delay of 30 to 45 minutes, Commerce Manager can automatically send him an email, and even subscribe him to a list of your autoresponder, if you wish.
To do this, Commerce Manager must know the email address of the user. This is always the case if he's logged as a client, affiliate, member or WordPress user. And this is of course the case if he has submitted a purchase form that asked him his email address. Click here to see how to display an Email address field followed by a purchase button.
It can also be the case if the user has been sent to a page of your website through an autoresponder, by you or one of your affiliates. To do this, simply add:
Replace {first-name} and {email-address} by the dynamic tags provided by your autoresponder, and tell your affiliates to do the same.
In your email, tell the customer that he can pay by check or by bank transfer, and tell him exactly how to do this. Also tell him that he can pay in several installments (if this is the case).
You can, through the Options page of Commerce Manager, choose how long the data about an unfinalized order are saved, in order to ease your database.
If this lifetime is not unlimited, and if the customer does not finalize his order for a period equal to this lifetime, then the data about this order will be deleted.
Regardless of the lifetime you have chosen, the data for an unfinalized order will be deleted as soon as the customer finalizes an order on your website.
You can allow your customers to get an automatic redelivery of a digital product they ordered. Customize the sender, the receiver, the subject and the body of the redelivery email through the Options page of Commerce Manager or the edit page of the product.
For example, copy this cotillion into the Instructions to the customer field of the edit page of the product:
Cliquez on the link below to download [product name]:
[product download-url]
Don't forget to insert the following cotillion where you want in the body of your redelivery email:
[product instructions]
The redelivery email is sent only if the order is not refunded, and in case of payment by installments, if the recurring payments profile has not been deactivated before the scheduled end and if the buyer currently owes no payment.
To display the redelivery form, insert this cotillion into your posts/pages/widgets:
[commerce-redelivery-form]
You can redirect the user to a page of your choice at the end of the redelivery, by inserting the following cotillion:
[commerce-redelivery-form redirection=URL]
Replace URL with the URL to which you want to redirect the user.
You can also redirect the user to a specific part of the page where he submitted the form, like this:
[commerce-redelivery-form redirection=#your-anchor]
To redirect the user to the top of the form, simply enter # as the value for the redirection attribute:
[commerce-redelivery-form redirection=#]
You can automatically position the cursor in the first field of the form when the page loads. Insert this cotillion into your posts/pages/widgets:
[commerce-redelivery-form focus=yes]
Insert into your posts/pages/widgets the cotillion:
[commerce-login-form]
to display the login form[commerce-login-compact-form]
to display the compact login form[commerce-password-reset-form]
to display the password reset form[commerce-profile-form]
to display the profile form[commerce-redelivery-form]
to display the redelivery form[commerce-registration-form]
to display the registration form[commerce-registration-compact-form]
to display the compact registration form[commerce-statistics-form]
to display the statistics formThe login form, the password reset form and the registration form appear only if the user is not logged as a client. The profile form and the statistics form appear only if the user is logged as a client.
The client can also login by entering his email address instead of his login name, and reset his password by entering his login name instead of his email address.
If you use Commerce Manager on a non-WordPress static website, you must insert, between the <head>
and </head>
tags, this line of cotillion in the PHP file of the page that displays the statistics form:
<link rel="stylesheet" type="text/css" media="screen" href="<?php echo commerce_url('libraries/date-picker.css'); ?>" />
To understand how to create your pages relating to client area, refer to this section.
You can redirect the user to a page of your choice when he completed the form, by using the redirection attribute:
[commerce-login-form redirection=URL]
Replace URL with the URL to which you want to redirect the user.
The redirection attribute is available for all the forms cotillions.
You can also redirect the user to a specific part of the page where he submitted the form, like this:
[your-cotillion-of-form redirection=#your-anchor]
To redirect the user to the top of the form, simply enter # as the value for the redirection attribute:
[your-cotillion-of-form redirection=#]
You can also redirect the user to the page he saw just before the current page, if this page belongs to your website, by entering referring-url as the value for the redirection attribute:
[your-cotillion-of-form redirection=referring-url]
If the user just attempted to access a page restricted to clients but has been redirected to a login page because he was not logged in, you can redirect him to this private page when he's logged in, by entering private-page as the value for the redirection attribute:
[commerce-login-form redirection=private-page]
You can decide, for each of your forms, if the cursor is or not automatically positioned in the first field when the page loads. Insert into your posts/pages/widgets a cotillion like this:
[your-cotillion-of-form focus=yes]
You can significantly improve your conversion rate by automatically completing form fields with informations from the user when the page loads. Commerce Manager allows you to do this when the page link has been sent through an autoresponder, by you or one of your affiliates.
To do this, simply add:
Example 1 (automatic completion of the first name):
https://www.kleor.com/affiliation/registration/?first-name=John
Example 2 (automatic completion of the email address):
https://www.kleor.com/affiliation/registration/?email-address=johnsmith@kleor.com
Example 3 (automatic completion of the first name and the email address):
https://www.kleor.com/affiliation/registration/?first-name=John&email-address=johnsmith@kleor.com
Use the dynamic tags provided by your autoresponder to automatically complete the fields.
All attributes (except action, id and name) of the <form>
HTML tag are also available for the cotillions that display a form, with an identical role.
You can customize the forms through the Front Office page of Commerce Manager. To customize a form, you must insert into the Code field of this form a special cotillion.
This cotillion is very similar to a normal HTML code, with the exception of the following characteristics:
<form>
tag and the closing </form>
tag are absent.<input />
tag is replaced with the [input]
cotillion.Insert into the Code field a cotillion like this:
[input name]
by replacing name with:
Example:
<p><label><strong>Your first name:</strong> [input first-name]<br />[error first-name]</label></p>
<p><label><strong>Your email address:</strong> [input email-address]<br />[error email-address]</label></p>
<div>[input submit value="Submit"]</div>
The above cotillion displays a form containing a field allowing the user to enter his first name, a field allowing him to enter his email address, and a button allowing him to submit the form.
Outside the standard names listed above, you can also replace name with the name you want, provided it contains only lowercase letters, numbers and hyphens, like this:
[input your-name]
All attributes (except id and name) of the <input />
HTML tag are also available for the [input]
cotillion, with an identical role.
Example:
<p><label><strong>Your first name:</strong> [input first-name size=20]<br />[error first-name]</label></p>
<p><label><strong>Your email address:</strong> [input email-address size=30]<br />[error email-address]</label></p>
<div>[input submit value="Submit"]</div>
The above cotillion displays a form containing a field (width of 20 characters) allowing the user to enter his first name, a field (width of 30 characters) allowing him to enter his email address, and a button allowing him to submit the form.
You can use the pattern HTML5 attribute to specify a syntax that the field must respect. In your regular expression, replace the [ and ] characters with their corresponding HTML entities: [ and ].
Example:
<p><label><strong>Postcode:</strong>
[input postcode pattern="[0-9]{5,5}" size=20]<br />
[error postcode]</label></p>
<div>[input submit value="Submit"]</div>
Insert into the Code field a cotillion like this:
[textarea name]Content[/textarea]
by replacing Content with the content you want display in the text area before the user completes the form and name with:
Example:
<p><label><strong>Your first name:</strong> [textarea first-name][/textarea]<br />[error first-name]</label></p>
<p><label><strong>Your email address:</strong> [textarea email-address][/textarea]<br />[error email-address]</label></p>
<div>[input submit value="Submit"]</div>
The above cotillion displays a form containing a text area allowing the user to enter his first name, a text area allowing him to enter his email address, and a button allowing him to submit the form.
Outside the standard names listed above, you can also replace name with the name you want, provided it contains only lowercase letters, numbers and hyphens, like this:
[textarea your-name]Content[/textarea]
All attributes (except id and name) of the <textarea>
HTML tag are also available for the [textarea]
cotillion, with an identical role.
Example:
<p><label><strong>Your first name:</strong> [textarea first-name cols=20 rows=1][/textarea]<br />[error first-name]</label></p>
<p><label><strong>Your email address:</strong> [textarea email-address cols=30 rows=1][/textarea]<br />[error email-address]</label></p>
<div>[input submit value="Submit"]</div>
The above cotillion displays a form containing a text area (20 columns and 1 row) allowing the user to enter his first name, a text area (30 columns and 1 row) allowing him to enter his email address, and a button allowing him to submit the form.
The [select]
cotillion has the same role as the <select>
HTML tag. Insert into the Code field a cotillion like this:
[select name]Content[/select]
by replacing name with:
Example:
<p><label><strong>Your country:</strong> [select country]
[option]Canada[/option]
[option]France[/option]
[option]Ireland[/option]
[/select]</label></p>
<div>[input submit value="Submit"]</div>
The above cotillion displays a form containing a dropdown list allowing the user to select his country, and a button allowing him to submit the form.
Outside the standard names listed above, you can also replace name with the name you want, provided it contains only lowercase letters, numbers and hyphens, like this:
[select your-name]Content[/select]
To display easily a dropdown list allowing the user to select a country, insert into the Code field the cotillion below:
[country-selector]
And to display into the registration form a dropdown list allowing the user to choose his category, insert into the Code field the cotillion below:
[category-selector]
To display easily a dropdown list allowing the user to select a product, insert into the Code field the cotillion below:
[product-selector]
And to display a dropdown list allowing the user to select a payment mode, insert into the Code field the cotillion below:
[payment-mode-selector]
All attributes (except id and name) of the <select>
HTML tag are also available for the [select]
, [category-selector]
, [country-selector]
, [product-selector]
and [payment-mode-selector]
cotillions, with an identical role.
The [option]
cotillion has the same role as the <option>
HTML tag. Insert into the Code field a cotillion like this:
[option value="Value of the option"]Name of the option[/option]
If the name and the value of the option are identical, you can also insert into the Code field a cotillion like this:
[option]Name of the option[/option]
Example:
<p><label><strong>Your country:</strong> [select country]
[option]Canada[/option]
[option]France[/option]
[option]Ireland[/option]
[/select]</label></p>
<div>[input submit value="Submit"]</div>
The above cotillion displays a form containing a dropdown list allowing the user to select his country, and a button allowing him to submit the form.
All attributes of the <option>
HTML tag are also available for the [option]
cotillion, with an identical role.
By default, all form fields are optional. To insert a required field, use a cotillion like this:
[input name required=yes]
by replacing name with one element of this list.
The required attribute is also available for the [textarea]
, [select]
and [country-selector]
cotillions.
When the user does not complete one of the required fields of the form, or enters an invalid email address, error messages are displayed. You can customize these messages through the Options page of Commerce Manager or through the interface of Commerce Manager.
Insert into the Code field a cotillion like this:
[error name]
by replacing name with:
Example:
<p><label><strong>Your first name:</strong> [input first-name]<br />[error first-name]</label></p>
<p><label><strong>Your email address:</strong> [input email-address]<br />[error email-address]</label></p>
<div>[input submit value="Submit"]</div>
Outside the standard names listed above, you can also replace name with the name you want, provided it contains only lowercase letters, numbers and hyphens, like this:
[error your-name]
To display the error messages in red, add this cotillion to your CSS stylesheet:
.error { color: #c00000; }
All attributes (except id) of the <span>
HTML tag are also available for the [error]
cotillion, with an identical role.
You can set different error messages for each field of a form, like this:
[error field data-name-message="Your error message"]
by replacing name with:
Example:
<p><label><strong>Your first name:</strong> [input first-name required=yes]<br />[error first-name data-unfilled-field-message="The first name is required."]</label></p>
<p><label><strong>Your email address:</strong> [input email-address]<br />[error email-address data-invalid-email-address-message="The email address is invalid."]</label></p>
<div>[input submit value="Submit"]</div>
The [label]
cotillion has the same role as the <label>
cotillion. Insert into the Code field a cotillion like this:
[label name]Content[/label]
by replacing name with:
Example:
<p>[label first-name]<strong>Your first name:</strong>[/label] [input first-name]<br />[error first-name]</p>
<p>[label email-address]<strong>Your email address:</strong>[/label] [input email-address]<br />[error email-address]</p>
<div>[input submit value="Submit"]</div>
Outside the standard names listed above, you can also replace name with the name you want, provided it contains only lowercase letters, numbers and hyphens, like this:
[label your-name]Content[/label]
All attributes (except for) of the <label>
HTML tag are also available for the [label]
cotillion, with an identical role.
You can use CAPTCHAs in forms. Insert into the Code field a cotillion like this:
[captcha type=type]
by replacing type with:
To use a CAPTCHA of the reCAPTCHA type, you must get a site key and a secret key here and enter these keys in the CAPTCHA module of the Options page of Commerce Manager.
The CAPTCHA of the reCAPTCHA v3 type is invisible. For the CAPTCHA of the reCAPTCHA v2 type, you can choose the theme you want to use, like this:
[captcha type=recaptcha theme=theme]
by replacing theme with:
To use a CAPTCHA of the hCaptcha type, you must get a site key and a secret key here and enter these keys in the CAPTCHA module of the Options page of Commerce Manager.
You can choose the theme you want to use, like this:
[captcha type=hcaptcha theme=theme]
by replacing theme with:
Example 1 (CAPTCHA of the reCAPTCHA v2 type):
[captcha type=recaptcha theme=dark]
Example 2 (CAPTCHA of the reCAPTCHA v3 type, invisible):
[captcha type=recaptcha3]
Example 3 (CAPTCHA of the Arithmetic operation type):
<p>[captcha type=arithmetic] = [input captcha size=3] (enter your answer in digits)</p>
Example 4 (CAPTCHA of the Reversed string type):
<p>Type the following characters in reverse order:<br />
[captcha type=reversed-string] : [input captcha size=20]</p>
Example 5 (CAPTCHA of the Question type):
<p>[captcha type=question question="Question" answer="Correct answer"] [input captcha size=20]</p>
All attributes of the <span>
HTML tag are also available for the [captcha]
cotillion, with an identical role, only if you don't use a CAPTCHA of the reCAPTCHA type.
You can require the double entry of a form field (email address, password…), like this:
[input confirm-name]
by replacing name with the name of the field that the user must enter a second time.
Example:
<p><label><strong>Your email address:</strong>*<br />
[input email-address size=40 required=yes]<br />[error email-address]</label></p>
<p><label><strong>Confirm your email address:</strong><br />
[input confirm-email-address size=40]<br />[error confirm-email-address]</label></p>
You can require that the client enters his current password to change his profile or preferences, like this:
[input current-password]
Example:
<p><label><strong>Your current password:</strong>*<br />
[input current-password size=30 required=yes]<br />
[error current-password data-invalid-field-message="The password you entered is incorrect."]</label></p>
To display a button allowing the user to submit the form, insert into the Code field a cotillion like this:
[input submit value="Text of the button"]
by replacing Text of the button with the text of your button.
If you want to use an image, insert a cotillion like this:
[input submit type=image src="URL of the image" alt="Alternative text"]
by replacing URL of the image with the image URL of your button and Alternative text with the text displayed when the image can not be displayed.
You can also use the <button>
HTML tag, like this:
<button type="submit">Text of the button</button>
To display a content restricted to users who have submitted the form without any error, insert into the Code field a cotillion like this:
[validation-content]Content displayed if the user has submitted the form without any error[/validation-content]
You can also define a content that will be displayed if the user has submitted the form and at least one error was generated, like this:
[validation-content]
Content displayed if the user has submitted the form without any error[other]
Content displayed if the user has submitted the form and at least one error was generated
[/validation-content]
Example:
[validation-content]
<p style="color: green;">Your profile has been changed successfully.</p>
[other]<p style="color: red;">[error unavailable-login] [error numeric-login] [error too-short-login] [error too-long-login] [error too-short-password] [error too-long-password] [error unavailable-email-address] [error unfilled-fields] [error invalid-captcha]</p>
[/validation-content]
You can also define a content that will be displayed if the user has not submitted the form, like this:
[validation-content]
Content displayed if the user has submitted the form without any error[other]
Content displayed if the user has submitted the form and at least one error was generated[other]
Content displayed if the user has not submitted the form
[/validation-content]
You can tell the user if the login name he chooses is available or not when he completes the registration form or the profile form. Insert into the Code field the cotillion below:
[indicator login]
To indicate the availability of his email address, insert the cotillion below:
[indicator email-address]
And to indicate the strength of the password he chose, insert the cotillion below:
[indicator password]
You can customize the messages displayed by the indicators through the interface of Commerce Manager.
All attributes (except id) of the <span>
HTML tag are also available for the [indicator]
cotillion, with an identical role.
Insert into your posts/pages/widgets the cotillion:
[commerce-global-statistics]
to display the global statistics of the client[commerce-orders-statistics]
to display the statistics of orders of the client[commerce-recurring-payments-statistics]
to display the statistics of recurring payments of the clientFor example, this cotillion allows you to display all the statistics of the client:
[commerce-statistics-form redirection=#]
<div id="statistics">
[commerce-global-statistics]
[commerce-orders-statistics]
[commerce-recurring-payments-statistics]
</div>
To understand how to create your pages relating to client area, refer to this section.
You can customize the statistics provided to clients through the Statistics module of the Front Office page of Commerce Manager. You can enter into the Code field some HTML code and all the cotillions available on your website.
To display a content only if a condition is verified, insert into the Code field a cotillion like this:
[if condition]Content displayed only if the condition is verified[/if]
by replacing condition with:
You can also define a content that will be displayed if the condition is not verified, like this:
[if condition]
Content displayed only if the condition is verified
[else]Content displayed only if the condition is not verified[/if]
Example:
[if order]
<p>Number of orders: [client-counter data=orders range=form][number][/client-counter]</p>
[else]<p>No orders</p>[/if]
To repeat a content for each item of a list, insert into the Code field a cotillion like this:
[foreach list]Content repeated for each item of the list[/foreach]
by replacing list with:
Example:
[foreach order]
<tr>
<td>[order date]</td>
<td><a href="[product url filter=htmlspecialchars]">[product name]</a></td>
<td>[order amount] [commerce-manager currency-code] [order-invoice-content](<a href="[order-invoice-url filter=htmlspecialchars]">Invoice</a>)[/order-invoice-content]</td>
</tr>[/foreach]
When you don't use the id attribute of a cotillion, it is automatically set to the IDs of each item of the list.
By default, the items are sorted by date descending. You can sort them differently by using the orderby and order attributes that work as in the SQL language.
Example:
[foreach order orderby=id order=asc]
<tr>
<td>[order date]</td>
<td><a href="[product url filter=htmlspecialchars]">[product name]</a></td>
<td>[order amount] [commerce-manager currency-code] [order-invoice-content](<a href="[order-invoice-url filter=htmlspecialchars]">Invoice</a>)[/order-invoice-content]</td>
</tr>[/foreach]
In this example, the orders are sorted by ID ascending. You can find all possible values of the orderby attribute in the tables.php file of Commerce Manager.
The status is available for the [if]
and [foreach]
cotillions and allows you to count only the items corresponding to a certain status, like this:
[if condition status=status]Content[/if]
[foreach list status=status]Content repeated for each item of the list[/foreach]
Example (statistics of processed and unrefunded orders):
[if order status=processed]
<table style="width: 100%;">
<tr style="vertical-align: top;">
<th>Date</th>
<th>Product</th>
<th>Amount</th>
</tr>
[foreach order status=processed]
<tr style="vertical-align: top;">
<td>[order date]</td>
<td><a href="[product url filter=htmlspecialchars]">[product name]</a></td>
<td>[order amount] [commerce-manager currency-code] [order-invoice-content](<a href="[order-invoice-url filter=htmlspecialchars]">Invoice</a>)[/order-invoice-content]</td>
</tr>[/foreach]
</table>
[else]<p>No orders</p>[/if]
The status attribute can take the following values:
You can set yourself the tax percentage for each of your products, or apply the tax percentage according to the options of the merchant account that receives the payments. If you choose this second option, you can not include the tax in the price.
PayPal allows you to adjust the tax percentage according to the buyer's country. You must set yourself different percentages of tax through your merchant account, if this one allows you to do this.
You also can specify a tax percentage for each country through the Taxes percentages per country module of the Options page of Commerce Manager or the edit page of the product. If you have not specified a tax percentage for a country, then the value you entered in the Tax percentage field just above the Taxes percentages per country module is applied.
To apply the tax percentage of the customer's country, check the Apply a tax and Apply the tax of the customer's country boxes at the top of the Tax module and use the [country-selector]
cotillion in your purchase form to allow the customer to select his country from a dropdown list, like this:
<p><strong>[label country]Your country[/label]</strong> [country-selector]</p>
If the options of Commerce Manager don't perfectly fit your needs, you can specify a custom tax percentage through the custom instructions of form submission.
Check the Execute custom instructions box in the Form submission submodule of the Custom instructions module in the Options page of Commerce Manager, and in the PHP Code field just below this box, enter a cotillion like this:
if (is_numeric($id)) {
$custom_tax_percentage = ???;
}
Replace $custom_tax_percentage = ???; with a PHP code giving the value you want to the $custom_tax_percentage variable, based on data entered by the user in your purchase form. If you don't give any value to this variable, the options of Commerce Manager will apply.
The custom instructions of form submission are executed inside the includes/forms/processing.php file of Commerce Manager. You can execute different instructions depending on the form by doing a test on the $id variable set in the forms.php file of Commerce Manager.
You can set yourself the shipping cost for each of your products, or apply the shipping cost according to the options of the merchant account that receives the payments.
You must set yourself different shipping costs through your merchant account, if this one allows you to do this.
You also can specify a shipping cost for each country through the Shipping costs per country module of the Options page of Commerce Manager or the edit page of the product. If you have not specified a shipping cost for a country, then the value you entered in the Shipping cost field just above the Shipping costs per country module is applied.
To apply the shipping cost of the customer's country, check the Apply a shipping cost and Apply the shipping cost of the customer's country boxes at the top of the Shipping module and use the [country-selector]
cotillion in your purchase form to allow the customer to select his country from a dropdown list, like this:
<p><strong>[label country]Your country[/label]</strong> [country-selector]</p>
If the options of Commerce Manager don't perfectly fit your needs, you can specify a custom shipping cost through the custom instructions of form submission.
Check the Execute custom instructions box in the Form submission submodule of the Custom instructions module in the Options page of Commerce Manager, and in the PHP Code field just below this box, enter a cotillion like this:
if (is_numeric($id)) {
$custom_shipping_cost = ???;
}
Replace $custom_shipping_cost = ???; with a PHP code giving the value you want to the $custom_shipping_cost variable, based on data entered by the user in your purchase form. If you don't give any value to this variable, the options of Commerce Manager will apply.
The custom instructions of form submission are executed inside the includes/forms/processing.php file of Commerce Manager. You can execute different instructions depending on the form by doing a test on the $id variable set in the forms.php file of Commerce Manager.
Commerce Manager is compatible with several payment modes but not all of them support all the features of Commerce Manager. If you find an incompatibility, choose another payment mode. You can add a payment mode that is not natively integrated with Commerce Manager. To do this, follow these instructions.
So that Commerce Manager works with PayPal, you must simply enter the email address of your PayPal account in the Payment modes module of the Options page of Commerce Manager or the edit page of your product. You can enter a PayPal email address for each of your products.
So that Commerce Manager works with PayPlug, you must enter your live secret key and your test secret key in the Payment modes module of the Options page of Commerce Manager. You can get these informations by logging into your PayPlug account. You can leave the Live public key and Test public key fields blank. These keys are not mandatory.
So that Commerce Manager works with Paysite-cash, you must enter the ID of your website and your API key in the Payment modes module of the Options page of Commerce Manager. You can get these informations by logging into your Paysite-cash account.
You must also, in your Paysite-cash account, specify the backoffice confirmation URL. Enter this: url/wp-content/plugins/commerce-manager/gateways/paysite-cash.php, where url is the URL of the directory where you installed WordPress.
So that Commerce Manager works with Stripe, you must enter your live public key, your live secret key, your test public key and your test secret key in the Payment modes module of the Options page of Commerce Manager. You can get these informations by logging into your Stripe account.
If you want the payment to be made on your website rather than the website of Stripe, you can uncheck the Redirect the user to Stripe for the payment box in the Payment modes module of the Options page of Commerce Manager. You can also create a purchase form through the Add Form page of Commerce Manager and insert the First name, Last name, Email address, Card number, Expiry date and CVC fields, as in the example below:
[validation-content][other]<p class="error">[error unfilled-fields] [error invalid-fields]</p>[/validation-content]
[stripe-error]
<table style="width: 100%;">
<tr><td><strong>First name</strong></td>
<td>[input first-name required=yes]<br />[error first-name]</td></tr>
<tr><td><strong>Last name</strong></td>
<td>[input last-name required=yes]<br />[error last-name]</td></tr>
<tr><td><strong>Email address</strong></td>
<td>[input email-address required=yes]<br />[error email-address]</td></tr>
<tr><td><strong>Card number</strong></td>
<td>[stripe-card-number]</td></tr>
<tr><td><strong>Expiry date</strong></td>
<td>[stripe-card-expiry-date]</td></tr>
<tr><td><strong>CVC (3 digits at the back)</strong></td>
<td>[stripe-card-cvc]</td></tr>
</table>
<div id="[prefix]progress" style="display: none; margin: 0.5em; text-align: center;">Payment in progress…</div>
<div style="text-align: center;">[input submit value="Purchase"]</div>
You can automatically send invoices in PDF format to your customers.
To send your customers a link allowing them to download an invoice for their order, use the following cotillion:
[order-invoice-url]
And to send them a link allowing them to download an invoice for the recurring payment they just did, use the following cotillion:
[recurring-payment-invoice-url]
In the Body field of your order confirmation email, you can insert a cotillion like this:
[order-invoice-content]Click on the link below to download your invoice:
[order-invoice-url][/order-invoice-content]
The content between [order-invoice-content]
and [/order-invoice-content]
appears only if the order amount is not 0.
And in the Body field of your recurring payment confirmation email, insert a cotillion like this:
Click on the link below to download your invoice:
[recurring-payment-invoice-url]
You can also send to your customers a link allowing them to download an invoice for the refund of their order, by using the following cotillion:
[order-refund-invoice-url]
And for the refund of a recurring payment, use the following cotillion:
[recurring-payment-refund-invoice-url]
You can personalize your invoices through the Invoices module of the Options page of Commerce Manager or the edit page of the product.
Enter some informations about your company into the Code field as well as all legally required notices.
You can use the [isoyear]
, [month]
, [monthday]
, [weekday]
, [year]
, [yearday]
and [yearweek]
cotillions described in the Time And Date section of the Easy Timer's documentation, in order to display the date of the order/recurring payment, like this:
Date: [month date=item format=2]/[monthday date=item format=2]/[year date=item]
The client area allows your clients to view the list of their orders and download their invoices. The client area is optional. If you want to create it, don't forget to configure the options of the Client Area page, and the options of the Registration as a client module of the Options page.
This section explains with examples how to create your pages relating to client area (registration page, registration confirmation page, password reset page, login page, profile edit page…), if you want to create a client area. You can create these pages with a single click through the Front Office page of Commerce Manager.
To know and understand all the cotillions used, refer to the Contents Restricted To Clients, Pages Restricted To Clients, Display Of Informations About The Client, Display Of The Options, Display Of Forms and Display Of Statistics sections.
The creation of pages relating to client area needs custom fields. If you don't see the module of custom fields, follow these instructions, or click on Screen Options at the top right of the page and check the Custom fields box in order to display it.
To allow users to register as clients, create a new page in WordPress. In the edit page of this page, create the commerce custom field and enter as the value a cotillion like this:
[commerce-redirection condition=session url=URL]
by replacing URL with the URL to which you want to redirect the user if he's logged in as a client (URL of the clients home page for example).
In the text area of this page, through the Text tab, enter a cotillion like this:
<p>Registration is fast and free!</p>
[commerce-registration-form]
The [commerce-registration-form]
cotillion displays the registration form.
When a user registers as a client, he's redirected to a registration confirmation page. You can customize the URL of this page through the Client Area page of Commerce Manager.
Your clients can forget their password. To allow them to reset it, create a new page in WordPress. In the edit page of this page, create the commerce custom field and enter as the value a cotillion like this:
[commerce-redirection condition=session url=URL]
by replacing URL with the URL to which you want to redirect the user if he's logged in as a client (URL of the clients home page for example).
In the text area of this page, through the Text tab, enter a cotillion like this:
<p>If you have forgotten your password, you can reset it and your new password will be sent by email.</p>
[commerce-password-reset-form]
<p style="text-align: center;"><a href="URL of the registration page">Register</a> | <a href="URL of the login page">Login</a></p>
The [commerce-password-reset-form]
cotillion displays the password reset form.
To allow your clients to login, create a new page in WordPress. In the edit page of this page, create the commerce custom field and enter as the value a cotillion like this:
[commerce-redirection condition=session url=URL]
by replacing URL with the URL to which you want to redirect the user if he's logged in as a client (URL of the clients home page for example).
In the text area of this page, through the Text tab, enter a cotillion like this:
[commerce-login-form]
<p style="text-align: center;"><a href="URL of the registration page">Register</a> | <a href="URL of the password reset page">Lost password</a></p>
The [commerce-login-form]
cotillion displays the login form.
You can create a logout page with a custom redirection URL. Create a new page in WordPress. In the edit page of this page, create the commerce custom field and enter as the value a cotillion like this:
[commerce-redirection action=logout url=URL]
by replacing URL with the URL to which you want to redirect the user.
Access to this page will have the effect of logout the client and redirect him to the specified URL.
When your clients login, you can redirect them to a page that explains them your client area. Create a new page in WordPress. In the edit page of this page, create the commerce custom field and enter as the value a cotillion like this:
[commerce-redirection condition=!session url=URL]
by replacing URL with the URL to which you want to redirect the user if he's not logged in as a client (URL of the login page for example).
In the text area of this page, through the Text tab, enter a cotillion like this:
<p>Welcome to the client area, [client first-name]!</p>
[purchase-content id=1]
Content visible only by the clients who ordered the first product (download link of this product for example)
[other]
Content visible only by the clients who dit not order the first product (purchase button of this product for example)
[/purchase-content]
[purchase-content id=2]
Content visible only by the clients who ordered the second product (download link of this product for example)
[other]
Content visible only by the clients who dit not order the second product (purchase button of this product for example)
[/purchase-content]
[purchase-content id=3]
Content visible only by the clients who ordered the third product (download link of this product for example)
[other]
Content visible only by the clients who dit not order the third product (purchase button of this product for example)
[/purchase-content]
…
To allow your clients to edit their personal informations, create a new page in WordPress. In the edit page of this page, create the commerce custom field and enter as the value a cotillion like this:
[commerce-redirection condition=!session url=URL]
by replacing URL with the URL to which you want to redirect the user if he's not logged in as a client (URL of the login page for example).
In the text area of this page, through the Text tab, enter a cotillion like this:
<p style="text-align: center;">[client-data-download-link text="Download your personal data"]</p>
<p>You can edit your personal informations. Fields marked with * are required.</p>
[commerce-profile-form]
The [commerce-profile-form]
cotillion displays the profile form.
To allow your clients to view their orders, create a new page in WordPress. In the edit page of this page, create the commerce custom field and enter as the value a cotillion like this:
[commerce-redirection condition=!session url=URL]
by replacing URL with the URL to which you want to redirect the user if he's not logged in as a client (URL of the login page for example).
In the text area of this page, through the Text tab, enter a cotillion like this:
<p style="text-align: center;">[client-orders-download-link text="Download data about your orders"]</p>
<p>Enter a start date and an end date in the <em>YYYY-MM-DD</em> format, and click on <em>Display</em> to view your orders.</p>
<div style="text-align: center;">
[commerce-statistics-form redirection=#]
</div>
<div id="statistics">
[commerce-global-statistics]
[commerce-orders-statistics]
[commerce-recurring-payments-statistics]
</div>
The [commerce-statistics-form]
cotillion displays the statistics form. The [commerce-global-statistics]
, [commerce-orders-statistics]
and [commerce-recurring-payments-statistics]
cotillions display the global statistics, and the statistics of orders and recurring payments.
To facilitate the navigation of your clients in the pages that are restricted to them, you can display a navigation menu into these pages. Insert this cotillion:
[commerce-pages-menu]
You can customize this navigation menu through the Menu module of the Front Office page of Commerce Manager.
The GDPR, which came into force on May 25, 2018, introduces the right to portability, which offers individuals the ability to receive their personal data, in a structured, commonly used and machine-readable format.
To allow your clients to download a CSV file containing their personal data, insert into one of the pages of your client area a cotillion like this:
[client-data-download-link text="Download your personal data"]
Don't forget to include the quotes at the beginning and the end of the value of the text attribute.
And to allow them to download a CSV file containing data about their orders, insert into one of the pages of your client area a cotillion like this:
[client-orders-download-link text="Download data about your orders"]
All attributes (except href) of the <a>
HTML tag are also available for the [client-data-download-link]
and [client-orders-download-link]
cotillions, with an identical role.
You can, through the Back Office page of Commerce Manager, add an unlimited number of custom fields in the Add Product, Add Product Category, Add Form, Add Form Category, Add Client, Add Client Category, Add Order and Add Recurring Payment pages to record additional data. Enter a name and a key for each custom field.
For example, if you want to save the favorite color of the client (person registered to your client area and visible in the Clients page of Commerce Manager), enter Favorite color as the name and favorite-color as the key.
To display a custom information about a client, insert into your posts/pages/widgets a cotillion like this (don't forget the custom-field- prefix just before the key):
[client custom-field-key]
by replacing key with the key of the custom field.
To allow the client to fill this field, insert into the Code field of your forms a cotillion like this (don't forget the custom-field- prefix just before the key):
[input custom-field-key]
by replacing key with the key of the custom field.
Commerce Manager is designed to work with a WordPress site, but you can also use it with a non-WordPress static website, by following the instructions below.
Download WordPress and install it on your website. You will not use WordPress as a CMS to manage the pages of your website, but as an interface allowing you to manage your products and orders.
If the files of your website have the extension .htm or .html, replace it with .php. Open them with a text editor like Notepadd++, click on File, and then click on Save as…. A window opens. In the Type field, select PHP and click on Save.
You can also recreate these files with this model.
To load the WordPress functions in the files of your website, add on top of these files the following cotillion:
<?php
$wordpress_directory = 'WordPress directory';
$file = $wordpress_directory.'/wp-load.php';
while (strstr($file, '//')) { $file = str_replace('//', '/', $file); }
if (substr($file, 0, 1) == '/') { $file = substr($file, 1); }
$i = 0; while ((!file_exists($file)) && ($i < 8)) { $file = '../'.$file; $i = $i + 1; }
include_once $file;
?>
Replace WordPress directory with the name of the directory where you installed WordPress. If you installed it at the root of your website, replace this line:
$wordpress_directory = 'WordPress directory';
by this one:
$wordpress_directory = '';
Insert this line of cotillion:
<?php wp_head(); ?>
just before the </head>
tag, and this line of cotillion:
<?php wp_footer(); ?>
just before the </body>
tag.
The documentation of Commerce Manager provides you several cotillions. To use these cotillions in the PHP files of your website, insert a cotillion like this:
<?php echo do_shortcode('[your-cotillion]'); ?>
You can display a different navigation menu for the clients (persons registered to your client area and visible in the Clients page of Commerce Manager). Create your menu through the Menus page of the Appearance menu in WordPress (Appearance => Menus). For each item of your menu, select what you want for the Visibility field.
For more flexibility, you can instead use Menu Item Visibility Control. Create your menu through the Menus page of the Appearance menu in WordPress (Appearance => Menus). For each item of your menu, enter commerce_session() as the value for the Visibility field if you want that this item appears only if the user is logged in as a client. Or enter !commerce_session() as the value if you want that this item appears only if the user is not logged in as a client.
Without Menu Item Visibility Control, you can also do it like this:
Through the Menus page of the Appearance menu in WordPress (Appearance => Menus), create a menu for the clients and a menu for the other users.
In your WordPress theme (most often in the header.php file), you should find one or several lines containing a call to the wp_nav_menu function, like this:
wp_nav_menu(array( … ));
Immediately after array(
, add this cotillion:
'menu' => (((function_exists('commerce_session')) && (commerce_session())) ? M : N),
Replace M with the ID of the menu for the clients, and N with the ID of the menu for the other users. The ID of a menu is the number located at the end of the URL of the page allowing to edit it.
You should get a cotillion like this:
wp_nav_menu(array('menu' => (((function_exists('commerce_session')) && (commerce_session())) ? M : N)… ));
Commerce Manager has several functions for generating passwords and evaluating their strength. These functions are defined in the libraries/passwords-functions.php file of the plugin. You can replace them with your own functions by creating a plugin containing all of the following functions:
<?php function kleor_generate_password($length = 0) {
$length = (int) $length; if ($length <= 0) { $length = 12; }
$characters = 'bcdfghjklmnpqrstvwxzBCDFGHJKLMNPQRSTVWXZ01234567890123456789()[]{}-+=*.!?,:@#$%&';
$minimum_strength = min(64, $length*(3 + log($length, 2)) - ($length == 1 ? 2 : 3));
$n = 0; $best_password = ''; $best_strength = 0;
while (($n < 8) && ($best_strength < $minimum_strength)) {
$password = ''; for ($i = 0; $i < $length; $i++) { $password .= substr($characters, mt_rand(0, 79), 1); }
if ((function_exists('strip_shortcodes')) && ($password != strip_shortcodes($password))) { $password = str_replace('[', '(', $password); }
$n += 1; $strength = kleor_password_strength($password);
if ($strength > $best_strength) { $best_strength = $strength; $best_password = $password; } }
return $best_password; }
function kleor_generate_password_js() { ?>
<script>
function kleor_generate_password(length) {
var length = parseInt(length); if (length <= 0) { length = 12; }
var characters = 'bcdfghjklmnpqrstvwxzBCDFGHJKLMNPQRSTVWXZ01234567890123456789()[]{}-+=*.!?,:@#$%&';
if (length == 1) { var minimum_strength = 1; }
else { var minimum_strength = Math.min(64, length*(3 + (Math.log(length))/Math.LN2) - 3); }
var n = 0; var best_password = ''; var best_strength = 0;
while ((n < 8) && (best_strength < minimum_strength)) {
var password = ''; for (i = 0; i < length; i++) { password += characters.substr(Math.floor(80*Math.random()), 1); }
n += 1; strength = kleor_password_strength(password);
if (strength > best_strength) { best_strength = strength; best_password = password; } }
return best_password; }
</script>
<?php }
function kleor_password_strength($password) {
$password = kleor_strip_accents($password);
$length = strlen($password); $strength = 0;
if ($length > 0) {
if ((strtolower($password) != $password) && (strtoupper($password) != $password)) { $strength += 1; }
foreach (array('/[0-9]/', '/[^a-zA-Z0-9 ]/') as $pattern) {
if (preg_replace($pattern, '', $password) != $password) { $strength += 1; } }
$characters = array(); for ($i = 0; $i < $length; $i++) { $characters[] = substr($password, $i, 1); }
$strength = $length*($strength + log(count(array_unique($characters)), 2)); }
return $strength; }
function kleor_password_strength_js() { ?>
<script>
function kleor_password_strength(password) {
var password = kleor_strip_accents(password);
var length = password.length; var strength = 0;
if (length > 0) {
if ((password.toLowerCase() != password) && (password.toUpperCase() != password)) { strength += 1; }
if (password.replace(/[0-9]/g, '') != password) { strength += 1; }
if (password.replace(/[^a-zA-Z0-9 ]/g, '') != password) { strength += 1; }
var characters = []; for (i = 0; i < length; i++) {
var character = password.substr(i, 1);
if (password.substr(0, i).indexOf(character) == -1) { characters.push(character); } }
strength = length*(strength + (Math.log(characters.length))/Math.LN2); }
return strength; }
</script>
<?php }
Of course, you can change the source code of these functions, but don't change their names.
You can add an autoresponder that is not natively integrated with Commerce Manager. To do this, create a plugin with a cotillion like this (simple version):
function add_my_autoresponder($autoresponders) {
$autoresponders['My Autoresponder'] = array('function' => 'subscribe_to_my_autoresponder');
return $autoresponders; }
add_filter('commerce_autoresponders', 'add_my_autoresponder');
function subscribe_to_my_autoresponder($list, $contact) {
…
…
}
or like this one (more elaborate version):
function add_my_autoresponder($autoresponders) {
$autoresponders['My Autoresponder'] = array(
'function' => 'subscribe_to_my_autoresponder',
'display_function' => 'display_my_autoresponder',
'update_function' => 'update_my_autoresponder');
return $autoresponders; }
add_filter('commerce_autoresponders', 'add_my_autoresponder');
function subscribe_to_my_autoresponder($list, $contact) {
…
…
}
function display_my_autoresponder($options, $back_office_options) { ?>
<table class="form-table"><tbody>
<tr style="vertical-align: top;"><th scope="row" style="width: 20%;"><strong><label for="my_autoresponder_api_key"><?php _e('API key', 'commerce-manager'); ?></label></strong></th>
<td><textarea style="padding: 0 0.25em; height: 1.75em; width: 50%;" name="my_autoresponder_api_key" id="my_autoresponder_api_key" rows="1" cols="50"><?php echo (isset($options['my_autoresponder_api_key']) ? $options['my_autoresponder_api_key'] : ''); ?></textarea>
<span class="description" style="vertical-align: 25%;"><a target="<?php echo $back_office_options['documentations_links_target']; ?>" href="https://www.kleor.com/commerce-manager/documentation/#my-autoresponder"><?php _e('More informations', 'commerce-manager'); ?></a></span></td></tr>
<tr style="vertical-align: top;"><th scope="row" style="width: 20%;"></th>
<td><input type="submit" class="button-secondary" name="submit" value="<?php _e('Update', 'commerce-manager'); ?>" /></td></tr>
</tbody></table>
<?php }
function update_my_autoresponder($options) {
if (isset($_POST['my_autoresponder_api_key'])) {
$_POST['my_autoresponder_api_key'] = trim($_POST['my_autoresponder_api_key']);
$options['my_autoresponder_api_key'] = $_POST['my_autoresponder_api_key']; }
return $options; }
The subscribe_to_my_autoresponder function subscribes the user in a list of the autoresponder. The display_my_autoresponder function displays the options of the autoresponder in the Autoresponders integration module of the Options page of Commerce Manager. And the update_my_autoresponder function updates these options when submitting the form of this page.
To better understand how to do this, look at the source code of this plugin.
You can add a payment mode that is not natively integrated with Commerce Manager. To do this, create a plugin with a cotillion like this (simple version):
function add_my_payment_mode($payment_modes) {
$payment_modes['My Payment Mode'] = array('file' => plugin_dir_path(__FILE__).'/my-payment-mode.php');
return $payment_modes; }
add_filter('commerce_payment_modes', 'add_my_payment_mode');
or like this one (more elaborate version):
function add_my_payment_mode($payment_modes) {
$payment_modes['My Payment Mode'] = array(
'file' => plugin_dir_path(__FILE__).'/my-payment-mode.php',
'display_function' => 'display_my_payment_mode',
'update_function' => 'update_my_payment_mode');
return $payment_modes; }
add_filter('commerce_payment_modes', 'add_my_payment_mode');
function display_my_payment_mode($options, $back_office_options) { ?>
<table class="form-table"><tbody>
<tr style="vertical-align: top;"><th scope="row" style="width: 20%;"><strong><label for="my_payment_mode_api_key"><?php _e('API key', 'commerce-manager'); ?></label></strong></th>
<td><textarea style="padding: 0 0.25em; height: 1.75em; width: 50%;" name="my_payment_mode_api_key" id="my_payment_mode_api_key" rows="1" cols="50"><?php echo (isset($options['my_payment_mode_api_key']) ? $options['my_payment_mode_api_key'] : ''); ?></textarea>
<span class="description" style="vertical-align: 25%;"><a target="<?php echo $back_office_options['documentations_links_target']; ?>" href="https://www.kleor.com/commerce-manager/documentation/#my-payment-mode"><?php _e('More informations', 'commerce-manager'); ?></a></span></td></tr>
<tr style="vertical-align: top;"><th scope="row" style="width: 20%;"></th>
<td><input type="submit" class="button-secondary" name="submit" value="<?php _e('Update', 'commerce-manager'); ?>" /></td></tr>
</tbody></table>
<?php }
function update_my_payment_mode($options) {
if (isset($_POST['my_payment_mode_api_key'])) {
$_POST['my_payment_mode_api_key'] = trim($_POST['my_payment_mode_api_key']);
$options['my_payment_mode_api_key'] = $_POST['my_payment_mode_api_key']; }
return $options; }
The my-payment-mode.php file redirects the user to the payment mode and processes the instant notifications of payment. The display_my_payment_mode function displays the options of the payment mode in the Payment modes module of the Options page of Commerce Manager. And the update_my_payment_mode function updates these options when submitting the form of this page.
To better understand how to do this, look at the source code of this plugin.
You can replace all Commerce Manager files (except commerce-manager.php) with your own files. For this, create the commerce-manager-custom-files folder in the plugins directory (the one where you installed Commerce Manager) of your website.
For example, if you want to replace the includes/data.php file of Commerce Manager with a file you have customized, create the includes folder in the commerce-manager-custom-files folder, and upload your data.php file to this folder.
You can set yourself the directory where your custom files are stored, by inserting this line:
define('COMMERCE_MANAGER_CUSTOM_FILES_PATH', ABSPATH.'custom-files/commerce-manager/');
just after:
if ( !defined('ABSPATH') )
define('ABSPATH', dirname(__FILE__) . '/');
in your wp-config.php file.
Replace custom-files/commerce-manager with what you want. The value of COMMERCE_MANAGER_CUSTOM_FILES_PATH must end with a /.
Commerce Manager is developed in English and contains files that translate it in French. If you wish, you can translate it into another language.
To do this, create your custom files directory by following these guidelines. Create the languages folder inside of it, and upload your translation files to this folder.
You can create your translation files with the languages/commerce-manager.pot file of the plugin, and by using the free software Poedit. Your MO and PO translation files must be named like this:
commerce-manager-ll_CC.mo
commerce-manager-ll_CC.po
ll_CC is the value displayed by this line of cotillion:
echo get_locale();
when it's executed in one of the files of your WordPress website.
Yes. You can insert all the cotillions available on your website in most fields of Commerce Manager admin pages. This allows an unlimited number of possibilities, including the automatic modification of a product price according to the date or the sales number.
To schedule an automatic modification of the price of a product according to the date, install and activate the free plugin Easy Timer and insert into the Price field a cotillion like this:
[countdown date=2017/10/15]37[after]57[/countdown]
In this example, the price will automatically switch from 37 dollars to 57 dollars.
To schedule an automatic modification of the price of a product according to the sales number, insert into the Price field a cotillion like this:
[sales-counter limit=100]37[after]57[/sales-counter]
In this example, the price of the product will automatically switch from 37 dollars to 57 dollars when 100 copies have been sold.
Refer to the Sales Counters section to learn about all available options.
To specify different commissions percentages for each recurring payment, install and activate the free plugin Content Switcher and insert into the Commission percentage field a cotillion like this:
[variable-content type=globals name=payment-number values=/1/2]Default commission percentage (applies if the buyer pays at once, or if the payment's number does not match any of the listed values for the values attribute)[other]Commission percentage for the first payment[other]Commission percentage for the second payment[/variable-content]
Example 1:
[variable-content type=globals name=payment-number values=/1]30[other]80[/variable-content]
In this example, the commission percentage for the first payment is 80 %. In all other cases (including if the customer pays at once), the commission percentage is 30 %.
Example 2:
[variable-content type=globals name=payment-number values=/1/2]30[other]80[other]50[/variable-content]
In this example, the commission percentage for the first payment is 80 % and the commission percentage for the second payment is 50 %. In all other cases (including if the customer pays at once), the commission percentage is 30 %.
You can also, similarly, specify different commissions amounts for each recurring payment
Insert into the PHP files of your theme a cotillion like this:
<?php echo do_shortcode('[your-cotillion]'); ?>
Edit the functions.php file (create it if it doesn't exist) of your WordPress theme and add this line of cotillion:
add_filter('comment_text', 'do_shortcode');
You can use cotillions in most attributes of Commerce Manager cotillions, provided to replace [ by ( and ] by ), like this:
[your-cotillion attribute='(your-other-cotillion)']
Don't forget to include the quotes at the beginning and the end of the cotillion.
When you nest several identical cotillions, you must add an integer between 1 and 3 at the end of the tags of these cotillions, like this:
[purchase-content…]…
[purchase-content1…]…
[purchase-content2…]…
[purchase-content3…]…
[/purchase-content3]…
[/purchase-content2]…
[/purchase-content1]…
[/purchase-content]
[category-selector]
cotillion[compact-shopping-cart]
cotillion[add-to-cart-link]
and [add-to-cart-url]
cotillions[shopping-cart-counter]
cotillion[add-to-cart-button]
cotillion[shopping-cart]
and [add-to-cart-button]
cotillions[commerce-pages-menu]
cotillion[purchase-form]
cotillion[payment-mode-selector]
and [product-selector]
cotillions[order-refund-invoice-url]
and [recurring-payment-refund-invoice-url]
cotillions[purchase-button]
, [purchase-link]
and [purchase-form]
cotillions[commerce-content]
, [commerce-redirection]
and [commerce-comments]
cotillions