Chiptuning Reseller Wordpress Plugin V6

Download the latest version from our site.

To view the old plugin's documentation, click here.

Getting Started

Before using the Wordpress plugin, make sure you have the following set up (important!):

Generating API key

With a paid account for our data platform (https://data.chiptuningreseller.com) you can generate an API key via: Main Menu -> API Keys. On the right top corner then enter a name for a key and click 'Create token'. A pop-up will appear with a new API token that you can use. Please copy the full token (including the numbers before the | sign) and paste them into the API key field in the WP Plugin.

Screenshot

Plugin Dashboard

Within the Chiptuning Reseller plugin Dashboard you can find various setting for customisation an other advanced settings.

Screenshot

Plugin main functions

Option Description
API Key Enter the API key you obtained from the CTR dashboard
Cache Settings Cache is enabled by default. You can clear cache by clicking either one of the buttons
Specifications start url The main url the plugin should listen to. That means that for example, if customers enter yoursite.com/chip-tuning, they will see the car selector
Display language Language is obtained automatically from Wordpress-wide settings - Is a translation missing? Ask our support for translating!
Sitemap You can create a google-friendly sitemap to let search engines index all the dynamic generated pages

Plugin Layout & Customisation

Here you can adjust various settings in the plugin's display and layout settings
Screenshot

Option Description
Vehicle types to show You can select the type of vehicles you want to show
Tuning types to show You can select the type of tunings you want to show
Hide theme header? You can choose to disable the 'get_header()' function in the templates
Hide theme sidebar? You can choose to disable the 'get_sidebar()' function in the templates
SEO Settings You can change the page title for each type of page

Stage page settings

In this tab you can change the lay-out and display of stage pages.
Screenshot

Option Description
Visual graphics You can show or hide a Bar Chart or a Dyno Chart for tuning data (make sure your subscription supports this)
Stage graph and dyno colors Edit the colors of the bar and dyno chart
Show stages in graphs You can either show or hide different stages in the charts
ECU and detailed engine information Show more advanced information regarding an engine / model
Currency Currency to display prices (can be left empty by entering a SPACE)
Stage X fixed price You can add fixed prices here, or even texts
Display prices Either show or hide the prices in the stage tables

Custom templates

Our advanced plugin allows you to create and customise the lay out of almost all pages that your customer sees. Read all about it here.
To edit your templates, just go to the ChiptuningReseller plugin and click the tab 'Template editor'.
If you haven't already done, click 'Copy the default templates to your (child) theme folder'
After this, go to the default Wordpress Theme Editor to edit the files (they are in the 'chiptuningreseller' subfolder)

Brands template (brands.php)

Tag Transforms into (will be auto translated if applicable)
$vehicle_type Contains the vehicle type as shown in the url
$brand This variable contains all brand details
$brand['url] This variable contains the url to a brand
$brand['image_url] This variable contains the url to a brand's image
$brand['name] This variable contains the brand name
$brand['slug] This variable contains the brand slug

Series template (series.php)

Tag Transforms into (will be auto translated if applicable)
$vehicle_type Contains the vehicle type as shown in the url
$serie This variable contains all serie details
$serie['url] This variable contains the url to a serie
$serie['image_url] This variable contains the url to a serie's image
$serie['name] This variable contains the serie name
$serie['slug] This variable contains the serie slug

Models template (models.php)

Tag Transforms into (will be auto translated if applicable)
$vehicle_type Contains the vehicle type as shown in the url
$model This variable contains all model details
$model['url] This variable contains the url to a model
$model['image_url] This variable contains the url to a model's image
$model['name] This variable contains the model name
$model['slug] This variable contains the model slug

Engines template

Tag Transforms into (will be auto translated if applicable)
$vehicle_type Contains the vehicle type as shown in the url
$engine This variable contains all engine details
$engine['url] This variable contains the url to an engine
$engine['hp] This variable contains the engine's stock power in HP
$engine['fuel_type] This variable contains the engine's fuel type
$engine['image_url] This variable contains the url to a engine's image
$engine['name] This variable contains the engine name
$engine['slug] This variable contains the engine slug

Stages template

This is an extensive template due to all the variables available. Very handy for people who know a bit of HTML. You can make wonderful pages.
The interesting part is that you can use partials inside your templates:

Tag Transforms into (will be auto translated if applicable)
$brand (Array) Contains brand data
$serie (Array) Contains serie data
$model (Array) Contains model data
$engine (Array) Contains engine data
$stages (Array) Contains stages data
$show_price Show or hide prices
$currency Currency to show

Extended data to show in your template

To be able to show even more details in your templates, you can use these extended variables. When integrating these you can for example show more engine details.

Stage details (only available on the stages and stage-partials pages)

The dataStages object is an array* with stages in it! Can only be used in a loop, for example (pseudo-code):

....

// Run through the stages
foreach($stages as $stage)
    In Development: $stage['in_development'];
    Name: $stage['name'];

    // If a stage is in development, do nothing
    if(isset($stage['in_development'])) {
        // do nothing
    }

    elseif(is_array($stageItem['data']) && $stageItem['show']) {
        HP original: $stage['data']['hp_ori'];
        HP tuning: $stage['data']['hp_tuning'];
        Nm original: $stage['data']['nm_ori'];
        Nm tuning: $stage['data']['nm_tuning'];
        Price: $currency; $stage['price'];
    }
endforeach

....

* Please use the proper for-loops where neccessary in Arrays! Look into the 'partials/stage-table.php' for more details.

Inject shortcodes anywhere you want

With our plugin it is also possible to inject shortcodes on every template, using the default Wordpress 'do_shortcode'. For example:

echo do_shortcode("[wpforms id='147']");

This example inserts the Elementor form, with the parameters 'id' and the value 1234. It is even possible to add the ChiptuningReseller variables here! For example:

echo do_shortcode(" wpforms id='1234', brand=$brand['name']);

Include other template files

You can use the following function to include other template files (they must be present!)

ctr_get_template('partials/template-file-name.php', ['engine' => $engine, 'serie' => $serie, ...]);

Make sure you always pass the correct parameters to the template if you want to use them inside that file!

Statements

Tag Note
if (boolean) if logic-conditional
elseif (boolean) else if logic-conditional
else else logic

Loops

for($variable;$condition;$increment) { ... logic here ... }

Generates a loop until the condition is meet and the variable is incremented for each loop

Tag Note Example
$variable is a variable that should be initialized. $i=0
$condition is the condition that must be true, otherwise the cycle will end. $i<10
$increment is how the variable is incremented in each loop. $i++

Example:

for ($i = 0; $i < 10; $i++){
    echo "The current value is $i";
}

Returns:

The current value is 0
The current value is 1
The current value is 2
The current value is 3
The current value is 4
The current value is 5
The current value is 6
The current value is 7
The current value is 8
The current value is 9

Chiptuning Reseller Backend Management

In the Chiptuning Reseller Backend Management system, you can manage all data that is being shown on your website. These functionality is only available to premium and higher customers (with an own database).

Manage Brands, Series, Builds and Engines

You can change everything in the CMS here (depending on your subscription type), for example, adjust a brand's name or add a Serie. It is also possible to hide (disable) items here that you don't want to show in your webpage.

Manage Stages and bulk edit Prices

You can also change stages here. This is handy if you have different values for stages than the default values we use. To edit stages, please click Tuning data > Stages.

Screenshot

Tag Description
1 Check or uncheck all items
2 Delete checked items
3 Show price update form for checked items


To update the stage prices click the last button (no. 3) and a popup will show where you can update the stage prices. Here, you can select wether to increase (+), decrease (-) or to set the prices to a value you enter here. After updating, this will be shown in your website also -> Make sure you clear the cache in your plugin on your WP Site!

Change all prices for stages for build X

As an example, we want to update all prices for Audi A1 2010 8X versions. We enter the following data: Screenshot

Tag Description
1 The brand, which is Audi
2 The series, which is A1
4 Then make sure you show at least 50 rows to edit all of them
5 Then check all items
6 And then click the bulk edit button


Screenshot The price editor will show up and you can then set the price. You can either Increase, Decrease or fixed Set the prices. You can use the selector (A) to set this and then enter the value in the field (B) next to it. Click 'Upgrade' (C) to set the prices.

WP Rocket

IMPORTANT: If you are using a caching plugin on your site (especially WP Rocket) and you are experiencing problems you must exclude the start url from WP Rocket's caching.

  • 1. In WP Rocket settings
  • 2. Go to WP Rocket Advanced Rules tab.
  • 3. Locate the box Never cache (URLs).
  • 4. Enter the URL of the path you wish to exclude. You can either enter the full URL e.g. http://www.yoursite.com/chip-tuning or you can just enter the part after the domain name, e.g. /chip-tuning/* . Either way will work.
  • For multiple pages, enter each one on its own line