Difference between revisions of "Wordpress Connection"

From QmazeWiki
Jump to: navigation, search
(On Qmaze)
(On Qmaze)
Line 7: Line 7:
 
*If there is need to place a "Add to cart" button on the Qmaze environment please add the following code into an outputscript, and don't forget to link it in your configuration outputscript:
 
*If there is need to place a "Add to cart" button on the Qmaze environment please add the following code into an outputscript, and don't forget to link it in your configuration outputscript:
  
<nowiki><div></nowiki>
+
- <nowiki><div></nowiki>
  
<button class="q-btn-send" id="submit-form" type="button">Voeg toe aan Winkelmand</button>
+
- <button class="q-btn-send" id="submit-form" type="button">Voeg toe aan Winkelmand</button>
  
<nowiki></div></nowiki>  
+
- <nowiki></div></nowiki>  
  
<script src="Scripts/wpapi.js"></script>
+
- <script src="Scripts/wpapi.js"></script>
  
 
*Make sure that in the wpapi.js file the following is adjusted based on the wordpress site you want to connect to:
 
*Make sure that in the wpapi.js file the following is adjusted based on the wordpress site you want to connect to:
Line 23: Line 23:
 
  - {generateconfiguration.groupe-beneteau}
 
  - {generateconfiguration.groupe-beneteau}
  
  {redirect:configure.aspx}
+
- {redirect:configure.aspx}
 +
 
 +
 
 +
== On the Wordpress site ==
 +
 
 +
* Install the qmaze-loader plugin, which you can find here.
 +
* Configure the plugin in the admin panel, add the configuration URL, set the height and the username if needed.

Revision as of 11:04, 21 March 2019

This Wiki page will help you setting up a connection between Wordpress en Qmaze. You will need to make some adjustments to both Wordpress as Qmaze.

On Qmaze

  • Make sure the file wpapi.js is present in the Scripts folder, if not, you can download it here and upload it to the Qmaze environment.
  • If there is need to place a "Add to cart" button on the Qmaze environment please add the following code into an outputscript, and don't forget to link it in your configuration outputscript:
- <div>
- <button class="q-btn-send" id="submit-form" type="button">Voeg toe aan Winkelmand</button>
- </div> 
- <script src="Scripts/wpapi.js"></script>
  • Make sure that in the wpapi.js file the following is adjusted based on the wordpress site you want to connect to:
- In "var settings" adjust the base url to the url of the wordpress site (Note: Make sure that is always a secured HTTPS connection)
- Make sure to adjust the ConsumerKey and ConsumerSecret keys, you can get these keys in the Wordpress website at "Woocommerce - Settings - Advanced - REST API - Add key"
  • Make sure the configuration outputscripts are correctly configured for example :
- {generateconfiguration.groupe-beneteau}
- {redirect:configure.aspx}


On the Wordpress site

  • Install the qmaze-loader plugin, which you can find here.
  • Configure the plugin in the admin panel, add the configuration URL, set the height and the username if needed.