| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- <?xml version="1.0" encoding="utf-8"?>
- <modification>
- <name>Reverb Integration</name>
- <code>reverb</code>
- <version>1.0.3</version>
- <author>Reverb OpenCart</author>
- <link>https://reverb.com/au/page/integrations</link>
- <!--
- ========================================================================
- FILE: admin/view/template/catalog/product.twig
- Injects a Reverb tab into the product edit page.
- Tab content is loaded via AJAX from extension/module/reverb/productTab
- so no PHP controller patching is required. Saving is handled by the
- OC event hooks registered in the module install() method.
- error="skip" on each operation means a single search miss will not
- abort the other operation.
- ========================================================================
- -->
- <file path="admin/view/template/catalog/product.twig">
- <!-- Tab nav item — inserted after the SEO tab -->
- <operation error="skip">
- <search><![CDATA[<li><a href="#tab-seo" data-toggle="tab">{{ tab_seo }}</a></li>]]></search>
- <add position="after"><![CDATA[<li><a href="#tab-reverb" data-toggle="tab">Reverb</a></li>]]></add>
- </operation>
- <!-- Tab pane placeholder + AJAX loader — inserted before the SEO pane -->
- <operation error="skip">
- <search><![CDATA[<div class="tab-pane" id="tab-seo">]]></search>
- <add position="before"><![CDATA[
- <div class="tab-pane" id="tab-reverb">
- <div id="reverb-tab-content" style="padding:20px;">
- <i class="fa fa-spinner fa-spin"></i> Loading…
- </div>
- </div>
- <script>
- (function () {
- $(document).ready(function () {
- var p = new URLSearchParams(window.location.search);
- var url = 'index.php?route=extension/module/reverb/productTab'
- + '&user_token=' + encodeURIComponent(p.get('user_token') || '')
- + '&product_id=' + encodeURIComponent(p.get('product_id') || 0);
- $.get(url).done(function (html) {
- $('#reverb-tab-content').html(html);
- }).fail(function () {
- $('#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 correctly.</p>');
- });
- });
- }());
- </script>
- ]]></add>
- </operation>
- </file>
- </modification>
|