This is the main library for custom widgets

Over time, several upgrades were done for DDC widgets. They were either to remedy a bug in the platform or to give enhanced functionality

My plan was to create a sort of javascript platform to allow for easier widget customization. You can see it by looking at the different files in this folder: the first had CSS and JS files separated, some simply throw an error is Jquery is not loaded, some include htmlMaker directly, and the later ones have a system to load and wait on their respective dependencies.

Core Files

The core files are libraries used by other widgets in this list. I wanted to build out a platform to better build out custom widgets, but ran out of time.

ddcLibrary is a library of functions useful on DDC sites, such as language or page type (index, vlp, vdp) detection.

htmlMaker is simply an html generator. It allows the quick and easy creation of html tags (or potentially xml). To note that HTML is just text.

Relevant Files

Our Staff - Bilingual departments

The DDC staff widget allows for named departments, but only in one language. This code allows to translate french departments into english

CSS & JS files to install on the page. Initialization code is at the bottom of the JS.

Mapping is done with an object array {fr:en,fr:en,...}. The FR department is not case-sensitive and the EN department is placed exactly as is.

Relevant Files

Video tab for NPV

The video module simply doesn't work on NPV. This widget places a tab on the VDPs so clients can play a youtube video.

A field in the inventory needs to be used to house the video code, usually NIV as is it rarely used in NPV. If the field for a vehicle is set, the widget places the tab with an iframe of the video.

Relevant Files

AB pricing for NPV

DDC never implemented the AB pricing functionality (rebate between 2 prices) on the NPV platform. I did.

This is the first in my all-inclusive scripts. You place it on a site, a few lines of code to initialize it and the widget does the rest.

You give the classes for the original and final prices and the label for the rebate in both languages. If the display configs are properly done, poof it works. 99% of the time problems comme from incorrect config.

Relevant Files

Google Reviews

The module uses the Google Maps API to fetch the last 5 reviews starting with the address.

It's possible to filter those 5 according to star rating, but it's not possible to fetch more than the last 5 reviews total. If you filter out, you will get less than 5

Like the custom google maps, the client will need to activate a key for the google javascript api.

Relevant Files

Payment Calculator

Calculates the financing according to given parameters. Was created to give more freedom than DDC's calculator. Notably we can set the parameters according to different circumstances.

Relevant Files

Custom Popup

Custom popup that can be installed on a particular page.

You give it a page (ideally fragment) and it pops when the page opens.

Relevant Files

Some CSS files

CSS files written by Mathieu St-Pierre

social-header.css & T11-ajustement.css are 2 files to help resolved a few visual bugs in DDC's T11 platform. Notably the fuel pump icon in the VDPs...

responsivebuttonblockv9 is an attempt to style that widget on regular V9 (non-T11). The widget functions but doesn't have any styling unless on T11.

Add to Homescreen

Allows the creation of a link on the phone's homepage.

CSS & JS files to add to a mobile site.

Add to Homescreen v3.2.3 ~ (c) 2015 Matteo Spinelli ~ @license: http://cubiq.org/license