Advertisement
Guest User

Untitled

a guest
Jul 16th, 2019
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.00 KB | None | 0 0
  1. <script>
  2. var olapicProductId = 0000000; //Insert here the product ID
  3. var olapicWidgetLanguage = 'id_ID'; //Insert here the language code, example 'es_ES'
  4. var olapicAPIKey = ''; //Insert here the customer API Key
  5. var olapicInstanceIdDesktop = ''; //Insert here the instance ID for the desktop widget
  6. var olapicInstanceIdMobile = ''; //Insert here the instance ID for the mobile widget
  7.  
  8. function doRender(options){
  9. window.olapic.prepareWidget(options, {
  10. 'renderNow' : true,
  11. 'force' : true
  12. });
  13. };
  14. function onOlapicLoad() {
  15. OlapicSDK.conf.set('apikey', olapicAPIKey);
  16. window.olapic = window.olapic || new OlapicSDK.Olapic( function(o){
  17. window.olapic = o;
  18.  
  19. if (window.innerWidth < 769) {
  20. doRender({
  21. 'id': olapicInstanceIdMobile,
  22. 'wrapper':'olapic_specific_widget',
  23. 'tags': olapicProductId,
  24. 'lang': olapicWidgetLanguage
  25. });
  26. } else {
  27. doRender({
  28. 'id':olapicInstanceIdDesktop,
  29. 'wrapper':'olapic_specific_widget',
  30. 'tags': olapicProductId,
  31. 'lang': olapicWidgetLanguage
  32. });
  33. }
  34. });
  35. };
  36. </script>
  37.  
  38. <div id="olapic_specific_widget"></div>
  39.  
  40. <script type="text/javascript" src="//photorankstatics-a.akamaihd.net/81b03e40475846d5883661ff57b34ece/static/frontend/latest/build.min.js" async="async"></script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement