Rebuy uses Vue.JS and prebuilt templates that are loaded in with Rebuy.JS for all widgets and the Smart Cart. These templates can be brought into the theme code and customized in order to provide additional functionality and layout that may not be accomplished with the standard settings.

To learn more about Vue.JS and the the useful attributes you can visit this link here.

Widget Specificity

All widgets start with a default template which is loaded in with Rebuy JS. A custom template can be added to the theme files in order to change the markup as desired.

Rebuy templates can be specified to work for a specific widget or all widgets of that widget type by either including or excluding the widget ID in the opening script tag of the template. In order to make the template work for that specific widget change the id of the script tog to "rebuy-widget-xxxx" where the x's are the Id of the specific widget you would like to customize such as the example below.

<script id="rebuy-widget-1234" type="text/template"></script>

The highest level of specificity are instance based templates. This is where the widgets div opening and closing tags wrap the whole template. Anything inside of the div tag will be used as the template for the widget. The widget div can be found on the widget settings page under the placement dropdown.

Global Functions

These templates can accept any globally available JavaScript functions as needed. So, if you need to create some functionality that is not available from the Rebuy settings then you can create a new function that is globally available on the pages the widget will load in on and apply as needed.

Many developers have built onto our standard templates in order to provide stunning functionality and design.

In order to get more specific information on Rebuy templates please see the templates section for the Smart Cart or the Widgets.