{"id":13255,"date":"2024-03-20T15:41:07","date_gmt":"2024-03-20T14:41:07","guid":{"rendered":"https:\/\/helpcenter.blendee.com\/article\/how-to-create-a-custom-template\/"},"modified":"2024-03-20T15:41:09","modified_gmt":"2024-03-20T14:41:09","slug":"how-to-create-a-custom-template","status":"publish","type":"article","link":"https:\/\/helpcenter.streamwise.it\/en\/article\/how-to-create-a-custom-template\/","title":{"rendered":"How to create a custom template"},"content":{"rendered":"\n<p>Blendee allows, in addition to the default templates, to create custom templates for both <strong>Recommendations<\/strong> and <strong>Behavioural messages.<\/strong><\/p>\n\n<p>Let&#8217;s see point by point how to do it:<\/p>\n\n<p>The first step is to go to the Settings-&gt;Template Management section, choose the type of web personalization for which we want to create the template: whether behavioral message, recommendations, email or widget.<\/p>\n\n<p><\/p>\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/helpcenter.blendee.com\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-22-alle-10.23.30.png\" data-lbwps-width=\"366\" data-lbwps-height=\"754\" data-lbwps-srcsmall=\"https:\/\/helpcenter.blendee.com\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-22-alle-10.23.30.png\"><img data-original=\"https:\/\/helpcenter.blendee.com\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-22-alle-10.23.30.png\" alt=\"\" class=\"wp-image-10531\"\/><\/a><\/figure>\n\n<p>In this case, let&#8217;s take the example with a behavioural message, but the procedure is the same for the other elements as well.<\/p>\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/helpcenter.blendee.com\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-22-alle-10.27.21.png\" data-lbwps-width=\"1897\" data-lbwps-height=\"849\" data-lbwps-srcsmall=\"https:\/\/helpcenter.blendee.com\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-22-alle-10.27.21.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"458\" src=\"https:\/\/helpcenter.blendee.com\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-22-alle-10.27.21-1024x458.png\" alt=\"\" class=\"wp-image-10532\" srcset=\"https:\/\/helpcenter.streamwise.it\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-22-alle-10.27.21-1024x458.png 1024w, https:\/\/helpcenter.streamwise.it\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-22-alle-10.27.21-300x134.png 300w, https:\/\/helpcenter.streamwise.it\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-22-alle-10.27.21-768x344.png 768w, https:\/\/helpcenter.streamwise.it\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-22-alle-10.27.21-1536x687.png 1536w, https:\/\/helpcenter.streamwise.it\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-22-alle-10.27.21.png 1897w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n<p>Clicking on Template for Behavioural Message opens a page where there are three tabs containing the templates:<\/p>\n\n<p><strong>General<\/strong>: i.e. the default ones that Blendee provides<br\/><strong>Personal: <\/strong>these are those customized by the user,<br\/><strong>Archived: <\/strong>this is the section where we can archive unused templates.<\/p>\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/helpcenter.blendee.com\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-22-alle-10.36.28.png\" data-lbwps-width=\"1897\" data-lbwps-height=\"603\" data-lbwps-srcsmall=\"https:\/\/helpcenter.blendee.com\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-22-alle-10.36.28.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"325\" src=\"https:\/\/helpcenter.blendee.com\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-22-alle-10.36.28-1024x325.png\" alt=\"\" class=\"wp-image-10535\" srcset=\"https:\/\/helpcenter.streamwise.it\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-22-alle-10.36.28-1024x325.png 1024w, https:\/\/helpcenter.streamwise.it\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-22-alle-10.36.28-300x95.png 300w, https:\/\/helpcenter.streamwise.it\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-22-alle-10.36.28-768x244.png 768w, https:\/\/helpcenter.streamwise.it\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-22-alle-10.36.28-1536x488.png 1536w, https:\/\/helpcenter.streamwise.it\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-22-alle-10.36.28.png 1897w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n<p>Next we are going to clone the template we want to use as the basis for our customizations using the <em>clone<\/em> button at the bottom right for each template.<br\/>By pressing clone, a template configuration wizard opens, where we can set, in the first step, the name of the template and whether or not it should contain product recommendations. It is also possible to set the type of template whether overlay or not, i.e. whether it will appear as an element on a layer placed above our starting page or as an integrated element within those present on the page, thus modifying the structure of the DOM.<\/p>\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/helpcenter.blendee.com\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-22-alle-10.36.57.png\" data-lbwps-width=\"1897\" data-lbwps-height=\"1038\" data-lbwps-srcsmall=\"https:\/\/helpcenter.blendee.com\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-22-alle-10.36.57.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"560\" src=\"https:\/\/helpcenter.blendee.com\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-22-alle-10.36.57-1024x560.png\" alt=\"\" class=\"wp-image-10536\" srcset=\"https:\/\/helpcenter.streamwise.it\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-22-alle-10.36.57-1024x560.png 1024w, https:\/\/helpcenter.streamwise.it\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-22-alle-10.36.57-300x164.png 300w, https:\/\/helpcenter.streamwise.it\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-22-alle-10.36.57-768x420.png 768w, https:\/\/helpcenter.streamwise.it\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-22-alle-10.36.57-1536x840.png 1536w, https:\/\/helpcenter.streamwise.it\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-22-alle-10.36.57.png 1897w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n<p>In step 2 we can set the keys that will be interpreted during the insertion phase within the page and that allow us to set variables for the customization of the template, such as colors, sizes and fields.<\/p>\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/helpcenter.blendee.com\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-22-alle-10.37.44.png\" data-lbwps-width=\"1897\" data-lbwps-height=\"1038\" data-lbwps-srcsmall=\"https:\/\/helpcenter.blendee.com\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-22-alle-10.37.44.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"560\" src=\"https:\/\/helpcenter.blendee.com\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-22-alle-10.37.44-1024x560.png\" alt=\"\" class=\"wp-image-10537\" srcset=\"https:\/\/helpcenter.streamwise.it\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-22-alle-10.37.44-1024x560.png 1024w, https:\/\/helpcenter.streamwise.it\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-22-alle-10.37.44-300x164.png 300w, https:\/\/helpcenter.streamwise.it\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-22-alle-10.37.44-768x420.png 768w, https:\/\/helpcenter.streamwise.it\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-22-alle-10.37.44-1536x840.png 1536w, https:\/\/helpcenter.streamwise.it\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-22-alle-10.37.44.png 1897w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n<p>In the last step you can insert the HTML and CSS part related to our custom template.<\/p>\n\n<p><br\/>Once the configuration is complete, we will find the custom template in the &#8220;<strong>\n  <strong>Personal&#8221; section.<\/strong>\n<\/strong><\/p>\n\n<p>To edit the template you just created, simply go to the Personals tab and click on &#8220;Edit&#8221; to return to the configuration section.<\/p>\n\n<p>Once the template has been created, it will be available in the &#8220;<strong>Personal<\/strong>&#8221; section when creating the behavioral message.<\/p>\n\n<p>With <strong>Blendee<\/strong> it is possible to insert <strong>recommended products<\/strong> both in <strong>Behavioral Messages<\/strong> and in <strong>Recommendation<\/strong>, in fact, by cloning a template it is possible to modify the code in order to customize it in the best possible way.<\/p>\n\n<p>Let&#8217;s see how you can add the code base to be able to insert recommended products anywhere.<\/p>\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">foreach.{{products}}\n\n..inserire il proprio codice html da ripetere per ogni elemento, ad esempio:\n\n &lt;div class=\"ADB_IDRCTX_PLACEHOLDER_price_product ADB_hidden_##ADB_sc_card_price_bool##\"&gt;\n                    &lt;div class=\"ADB_IDRCTX_PLACEHOLDER_price_original_product\"&gt;\n                        &lt;span class=\"ADB_IDRCTX_PLACEHOLDER_amount\"&gt;{{products}}.{{priceOriginal}}&lt;\/span&gt;\n                        &lt;span class=\"ADB_IDRCTX_PLACEHOLDER_currency\"&gt;{{products}}.{{currencySymbol}}&lt;\/span&gt;\n                    &lt;\/div&gt;\n                    &lt;div class=\"ADB_IDRCTX_PLACEHOLDER_price_discount_product\"&gt;\n                        &lt;span class=\"ADB_IDRCTX_PLACEHOLDER_amount\"&gt;{{products}}.{{priceDiscounted}}&lt;\/span&gt;\n                        &lt;span class=\"ADB_IDRCTX_PLACEHOLDER_currency\"&gt;{{products}}.{{currencySymbol}}&lt;\/span&gt;\n                    &lt;\/div&gt;\n                &lt;\/div&gt;\n...\n\nendforeach<\/pre>\n\n<p>The code we see above is used to repeat the HTML structure inserted for each product shown, extracted from the algorithm.<\/p>\n\n<p>Access to the values related to the recommended product is possible thanks to the use of the keys:<\/p>\n\n<p><strong>{{products}}. {{nomecampo}}<\/strong><\/p>\n\n<p>As we can see from the code above, it is also possible to change the name of the classes in real time through the use of the keys created during the customization of the template (e.g.: <em>##ADB_sc_card_price_bool##<\/em> in the code above which will take on the value true\/false depending on the value selected in the side menu visible below)<\/p>\n\n<figure class=\"wp-block-image size-large is-resized\"><a href=\"https:\/\/helpcenter.blendee.com\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-22-alle-10.46.27.png\" data-lbwps-width=\"1897\" data-lbwps-height=\"1038\" data-lbwps-srcsmall=\"https:\/\/helpcenter.blendee.com\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-22-alle-10.46.27.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"560\" src=\"https:\/\/helpcenter.blendee.com\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-22-alle-10.46.27-1024x560.png\" alt=\"\" class=\"wp-image-10542\" style=\"width:840px;height:auto\" srcset=\"https:\/\/helpcenter.streamwise.it\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-22-alle-10.46.27-1024x560.png 1024w, https:\/\/helpcenter.streamwise.it\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-22-alle-10.46.27-300x164.png 300w, https:\/\/helpcenter.streamwise.it\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-22-alle-10.46.27-768x420.png 768w, https:\/\/helpcenter.streamwise.it\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-22-alle-10.46.27-1536x840.png 1536w, https:\/\/helpcenter.streamwise.it\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-22-alle-10.46.27.png 1897w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n<p>The keys that can be used for the products are:<\/p>\n\n<p><strong>{{products}}.{{image}}:<\/strong> Product image URL<\/p>\n\n<p><strong>{{products}}.{{priceOriginal}}:<\/strong> Original price of the Product<\/p>\n\n<p><strong>{{products}}.{{priceDiscounted}}:<\/strong> Final price of the Product<\/p>\n\n<p><strong>{{products}}.{{priceDelivery}}:<\/strong> Shipping price<\/p>\n\n<p><strong>{{products}}.{{name}}:<\/strong> Product Title<\/p>\n\n<p><strong>{{products}}.{{descriptionShort}}:<\/strong> Short Description of the Product<\/p>\n\n<p><strong>{{products}}.{{discount}}:<\/strong> Percentage of discount on the Product<\/p>\n\n<p><strong>{{products}}.{{shopLink}}:<\/strong> Link to the product<\/p>\n\n<p><strong>{{products}}.{{currencySymbol}}:<\/strong> Currency symbol<\/p>\n\n<p><strong>{{products}}.{{sku}}:<\/strong> Product SKU<\/p>\n\n<p><strong>{{products}}.{{idExt}}:<\/strong> Product ID<\/p>\n\n<p><strong>{{products}}.{{brand}}:<\/strong> Brand of the product<\/p>\n\n<p><strong>{{products}}.{{model}}:<\/strong> Product model<\/p>\n\n<p><strong>{{products}}.{{availableQuantity}}:<\/strong> Available quantity of the product<\/p>\n\n<p><strong>{{products}}.{{insertionDate}}:<\/strong> Membership category IDs separated by space<\/p>\n\n<p><strong>{{products}}.{{categoryIds}}:<\/strong> Id of the categories associated with the product separated by commas.<\/p>\n<div class=\"wrap-post-useful post_useful_13255\">\n<p><div style=\"color: black; margin-bottom: 15px;\"><strong>Was this content useful?<\/strong><\/div><\/p>\n<p class=\"post_useful_success post_useful_success_13255\">Thanks for contributing!<\/p>\n<div class=\"post-useful-buttons post_useful_buttons_13255\">\n<a href=\"javascript:;\" style=\"border:0px;\" title=\"Yes\" class=\"post-useful-vote post-useful-vote-yes\" data-id=\"13255\" data-rate=\"1\">Yes<\/a>\n<a href=\"javascript:;\" style=\"border:0px;\" title=\"No\" class=\"post-useful-vote post-useful-vote-no\" data-id=\"13255\" data-rate=\"0\">No<\/a>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Blendee allows, in addition to the default templates, to create custom templates for both Recommendations and Behavioural messages. Let&#8217;s see point by point how to do it: The first step is to go to the Settings-&gt;Template Management section, choose the type of web personalization for which we want to create the template: whether behavioral message, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"menu_order":0,"template":"","format":"standard","article-category":[563],"article-tag":[639,589,170,190],"class_list":["post-13255","article","type-article","status-publish","format-standard","hentry","article-category-template-en","article-tag-behavioral-message-en","article-tag-personalization","article-tag-recommendation-en","article-tag-template-en"],"_links":{"self":[{"href":"https:\/\/helpcenter.streamwise.it\/en\/wp-json\/wp\/v2\/article\/13255"}],"collection":[{"href":"https:\/\/helpcenter.streamwise.it\/en\/wp-json\/wp\/v2\/article"}],"about":[{"href":"https:\/\/helpcenter.streamwise.it\/en\/wp-json\/wp\/v2\/types\/article"}],"author":[{"embeddable":true,"href":"https:\/\/helpcenter.streamwise.it\/en\/wp-json\/wp\/v2\/users\/1"}],"version-history":[{"count":3,"href":"https:\/\/helpcenter.streamwise.it\/en\/wp-json\/wp\/v2\/article\/13255\/revisions"}],"predecessor-version":[{"id":13258,"href":"https:\/\/helpcenter.streamwise.it\/en\/wp-json\/wp\/v2\/article\/13255\/revisions\/13258"}],"wp:attachment":[{"href":"https:\/\/helpcenter.streamwise.it\/en\/wp-json\/wp\/v2\/media?parent=13255"}],"wp:term":[{"taxonomy":"article-category","embeddable":true,"href":"https:\/\/helpcenter.streamwise.it\/en\/wp-json\/wp\/v2\/article-category?post=13255"},{"taxonomy":"article-tag","embeddable":true,"href":"https:\/\/helpcenter.streamwise.it\/en\/wp-json\/wp\/v2\/article-tag?post=13255"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}