On 04-07-19 we released a new version of BidJS (V2.0) that made significant changes to the installation and implementation of BidJS and its associated Modules. 


The most significant change is that we have simplified the software configuration, particularly focusing on consolidating the BidJS and Modules configuration into one. We realise that updating to the new configuration might have an impact on you in the short term, however we are confident that going forwards this will make things much simpler for you (for example when updating the BidJS version or adding a new module). 


What will this mean for me? 

Firstly, if you want to make use of our newest feature, which is a simple invoice view for users, then you will need to upgrade to BidJS V2.0 and Modules V1.5. 

Secondly, to do so, you will need to make significant changes to the layout of your code, so you'll need help from your technician. If you require assistance, we can help and/or provide recommendations for outsourcing your development work. 


What if I don't want to or can't upgrade right now? 

The good news is you don't need to act straight away, it just means you won't be able to take advantage of our full set of features. We will continue to support BidJS V1.4 and V1.5 for now. 


I'm a bit lost with this change...

Don't panic! We know this is a big change, so we're here to help. If you have queries please contact us on support@bidlogix.net and we'll be happy to help you set things straight.


Okay, I'm ready to upgrade. Let's get technical.

Great news! So here are the changes we have made: 


We have consolidated the main BidJS config and the Modules config. The JavaScript Snippet configuration code that was placed within the <body> used to look like this: 

<script>
  window.addEventListener('DOMContentLoaded', function() {
      (function($) {
          $(document).ready(function() {
            PageApp.start({
                apiBase: "MY_API_BASE_ENDPOINT",
                clientId: "/MY_CLIENT_ID",
                staticBase: "MY_STATIC_URL/VERSION",
                useApi: true,
                options: {
                    optionA: value,
                    optionB: value
                }
              });
          });
      })(jQuery);
  });
  ...
</script>


And the modules code placed at the end of the <head> section used to look like this: 

<script>
window.bidjs = {  
config: {    
apiBase: 'MY_API_BASE_ENDPOINT',
clientId: 'MY_CLIENT_ID',
googleMapsApiKey: 'YOUR_KEY' 
staticBase: 'MY_STATIC_URL/VERSION', 
staticCDN: 'https://static.bidjs.com',
staticVersion: 'MY_STATIC_VERSION', 
templateVariant: 'bootstrap3'
 },  
modules: {    auctionDetails: '#!/auctionDetails/%AUCTION_ID%',    
auctionsArchived: true,
mySales: true  },  
options: {}}
</script>




Now it will be just the following and should be placed within the <head>, or at least before other elements: 

<script>
window.bidjs = {  
config: {    
          apiBase: 'MY_API_BASE_ENDPOINT', // e.g. //demo.eu-west-2.bidjs.com/auction-007/api 
          clientId: 'MY_CLIENT_ID', // e.g. demonstration 
          googleMapsApiKey: 'YOUR_KEY',
          staticBase: 'MY_STATIC_URL/VERSION', // e.g. //demo.eu-west-2.bidjs.com/static/2.0
          staticCDN: 'https://static.bidjs.com', // Do not change    
          staticVersion: 'MY_STATIC_VERSION', // e.g. 1.5
          templateVariant: 'bootstrap3' // either 'bootstrap3' or 'bootstrap4'  
 },  
modules: {    
          auctionDetails: '#!/auctionDetails/%AUCTION_ID%',
          auctionsArchived: true,
          invoices: true,
          lotDetails: '#!/itemDetails/%ITEM_ID%',
          mySales: true
  },  
options: {
          allowTitleChange: true,
          allowMetaDescriptionChange: true,
          standalone: false,
          unsupportedBrowserMessage: 'Your browser is not supported. Please use a browser such as Google Chrome or Microsoft Edge to ensure full functionality'
}}
</script>


Here are a collection of documents showing both the old configuration and the new: