install.xml 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <modification>
  3. <name>Reverb Integration</name>
  4. <code>reverb</code>
  5. <version>1.0.4</version>
  6. <author>Reverb OpenCart</author>
  7. <link>https://reverb.com/au/page/integrations</link>
  8. <!--
  9. ========================================================================
  10. FILE: admin/view/template/catalog/product_form.twig
  11. (OC3 uses product_form.twig, NOT product.twig)
  12. Injects a Reverb tab into the product edit page.
  13. Tab content is loaded via AJAX from extension/module/reverb/productTab.
  14. Saving is handled by OC event hooks registered in module install().
  15. ========================================================================
  16. -->
  17. <file path="admin/view/template/catalog/product_form.twig">
  18. <!-- Tab nav item — inserted after the Design tab (last tab in OC3) -->
  19. <operation error="skip">
  20. <search><![CDATA[<li><a href="#tab-design" data-toggle="tab">{{ tab_design }}</a></li>]]></search>
  21. <add position="after"><![CDATA[<li><a href="#tab-reverb" data-toggle="tab">Reverb</a></li>]]></add>
  22. </operation>
  23. <!-- Tab pane + AJAX loader — inserted before the Design pane -->
  24. <operation error="skip">
  25. <search><![CDATA[<div class="tab-pane" id="tab-design">]]></search>
  26. <add position="before"><![CDATA[
  27. <div class="tab-pane" id="tab-reverb">
  28. <div id="reverb-tab-content" style="padding:20px;">
  29. <i class="fa fa-spinner fa-spin"></i> Loading&hellip;
  30. </div>
  31. </div>
  32. <script type="text/javascript">
  33. (function () {
  34. $(document).ready(function () {
  35. var p = new URLSearchParams(window.location.search);
  36. var url = 'index.php?route=extension/module/reverb/productTab'
  37. + '&user_token=' + encodeURIComponent(p.get('user_token') || '')
  38. + '&product_id=' + encodeURIComponent(p.get('product_id') || 0);
  39. $.get(url).done(function (html) {
  40. $('#reverb-tab-content').html(html);
  41. }).fail(function () {
  42. $('#reverb-tab-content').html('<p class="text-danger"><i class="fa fa-exclamation-circle"></i> Could not load Reverb tab. Check that the Reverb module is installed and enabled.</p>');
  43. });
  44. });
  45. }());
  46. </script>
  47. ]]></add>
  48. </operation>
  49. </file>
  50. </modification>