/
Add Element to SRP/VDP

Add Element to SRP/VDP

Note that this guide is written for the version 2 standard templates. Selectors may need to be changed for version 1 or custom templates. Contact Andrew Pitts if you need assistance with this.

Add Element to SRP

Place this script in the domain node’s footer section to insert an element into the SRP below the price wrapper. Replace {PLACE ELEMENT HERE} with the element to be inserted.

<script> $(document).ready(function () { $('.unit-list .unit').each(function () { $(this).find('.unit-price-wrapper').after('<div class = "srp-misc-element-wrapper">{PLACE ELEMENT HERE}</div>') }); //lazy/AJAX loaded listing page units $('.ajax-unit-list').on('unit-loaded', function (e, unit) { $(unit).find('.unit-price-wrapper').after('<div class = "srp-misc-element-wrapper">{PLACE ELEMENT HERE}</div>') }); }); </script>

Add Element to VDP

This script can be placed in the footer scripts area on the site’s dynamic-inventory-detail page. Replace {PLACE ELEMENT HERE} with the element to be inserted.

<script> $(document).ready(function () { $(this).find('.unit-price-wrapper').after('<div class = "vdp-misc-element-wrapper">{PLACE ELEMENT HERE}</div>') }); </script>

Add Phone Number to SRP (Template v2)

A single phone number can be added to each vehicle listing on SRPs by adding this script to the domain node’s footer section. You will need to replace any spot with “+ phone +” with the appropriate phone number in the script.

<script> $(document).ready(function () { $('.unit-list .unit').each(function () { var phone = $(this).find('.detailsContainer').data('phone') $(this).find('.unit-price-wrapper').after('<div class = "listing-phone-link"><a href = "tel:' + phone + '">Call Today! ' + phone + '</a></div>') }); //lazy/AJAX loaded listing page units $('.ajax-unit-list').on('unit-loaded', function (e, unit) { var phone = $(unit).find('.detailsContainer').data('phone') $(unit).find('.unit-price-wrapper').after('<div class = "listing-phone-link"><a href = "tel:' + phone + '">Call Today! ' + phone + '</a></div>') }); }); </script>

Add Phone Number to VDP (Template v2)

This script can be placed in the footer scripts area on the site’s dynamic-inventory-detail page.

It is also possible to add this on a multi-location site and have the number change depending on the lot of the unit. More on that coming soon!

Add Phone Number to SRP (Template v1)

Place this script in the footer scripts area on the site’s domain node.

 

Add Phone Number to VDP (Template v1)

This script can be placed in the footer scripts area on the site’s dynamic-inventory-detail page.

Related content