Product Based Dealer Locator Website Code Implementation

Product Based Dealer Locator Website Code Implementation

Step 1: Include script within website

The example below demonstrates what's needed to integrate the Buy Now widget with your site. Simply update desired parameters then copy the snippet into your website.

  1. <script id="omacro-widget-buynow" src="https://buynow.omacro.com/embedded/bn.loader.js?company=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX&country=auto&validate=false&debug=false" async></script>

The company parameter is prefilled with your company identifier, no need to change this value. All snippet parameters are appended to the script source and must conform to the standards of uniform resource identifiers.

company required
This is your Omacro supplied company identifier. This ID was assigned when your company account was originally created which will never change. The snippet example above already includes your company identifier.
country
This is a two digit ISO country code ISO 3166-1 alpha-2 code or auto. If not supplied a map will be presented to allow the user to select their country. When provided and not set to auto the user is immediately presented results for the specified country. When set to auto the country will be automatically determined by the users IP Address.
validate
When true the snippet will verify that each product identifier available on the page is valid and returns a product. Once validation is complete the snippet will add the respective CSS class to the trigger element: obn-validate-pass or obn-validate-fail. While validation is pending the trigger element will have the CSS class obn-validate-pending.
debug
When true the snippet will assist with debugging by logging all activity and notifications to your browser console. It's recommended to disable this feature once debugging is complete.



Step 2: Assign product trigger(s) to buttons

The example below demonstrates a simple anchor tag (link) being used as a product trigger. You can easily use existing, or new elements, on your website by simply adding the required product parameter.

  1. <a href="#obn" data-product="Your Product Identifier">Product Link</a>

Trigger parameters take priority over snippet parameters, this allows for parameters to be set globally with exceptions if needed. All trigger parameters are HTML data attributes which require they start with 'data-'.
product required
This is the product identifier. This could be a GTIN (UPC, EAN or ISBN), SKU, model name or Omacro ID. We strongly suggest using a GTIN, ideally UPC.
country
This is a two digit ISO country code ISO 3166-1 alpha-2 code or auto. If not supplied a map will be presented to allow the user to select their country. When provided and not set to auto the user is immediately presented results for the specified country. When set to auto the country will be automatically determined by the users IP Address.
validate
When true the snippet will verify that that each product identifiers available on the page is valid and returns a product. Once validation is complete the snippet will add the respective CSS class to the trigger element: obn-validate-pass or obn-validate-fail. While validation is pending the trigger element will have the CSS class obn-validate-pending.

 


    • Related Articles

    • General Dealer Locator Website Code Implementation

      omacro has two main types of locator options, this section will refer to setting up the code on your website front-end for the General Locator. This locator produces general dealer results that are not connected to a product. For example online ...
    • Embedding Dealer Locator Within Website Page

      You can embed the locator directly on to a page. Assuming you have gone through the steps of adding omacro's buy now code snippets to your page, use the following example to render the locator within the page itself. To see a live demonstration, ...
    • Distributor Locator Website Code Implementation

      Step 1: Include script within website The example below demonstrates what's needed to integrate the Distributor Locator widget with your site. Simply update desired parameters then copy the snippet into your website. <script id="omacro-widget-buynow" ...
    • Supplier Buy Now Implementation Guide

      The following article discusses various ways to implement Buy Now as a popup or embed within a page as a Product Based Dealer Locator or General Dealer Locator. Buy Now can be configured to open to a specific market (Online or Local) to show one or ...
    • Seller Online Product Feed General Instructions

      Download omacro CSV online product feed template omacro XML online product feed template Google Merchant Center XML and .csv (txt) file formats Sample Files To be part of your suppliers’ online dealer locator, we need a product feed so we know where ...