Files
nextcloud-nodered-woocommerce/nodes/woocommerce-config.html
T

55 lines
2.4 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<script type="text/javascript">
RED.nodes.registerType("woocommerce-config", {
category: "config",
defaults: {
name: { value: "" },
baseUrl: { value: "https://example.com/wp-json/wc/v3", required: true }
},
credentials: {
consumerKey: { type: "text" },
consumerSecret: { type: "password" }
},
label: function () {
return this.name || this.baseUrl || "WooCommerce";
},
labelStyle: function () {
return this.name ? "node_label_italic" : "";
}
});
</script>
<script type="text/x-red" data-template-name="woocommerce-config">
<div class="form-row">
<label for="node-config-input-name"><i class="fa fa-tag"></i> Name</label>
<input type="text" id="node-config-input-name" placeholder="WooCommerce Config">
</div>
<div class="form-row">
<label for="node-config-input-baseUrl"><i class="fa fa-server"></i> Base URL</label>
<input type="text" id="node-config-input-baseUrl" placeholder="https://example.com/wp-json/wc/v3">
</div>
<div class="form-row">
<label for="node-config-input-consumerKey"><i class="fa fa-key"></i> Consumer Key</label>
<input type="text" id="node-config-input-consumerKey" autocomplete="off">
</div>
<div class="form-row">
<label for="node-config-input-consumerSecret"><i class="fa fa-lock"></i> Consumer Secret</label>
<input type="password" id="node-config-input-consumerSecret" autocomplete="off">
<div class="form-tips" style="color:#888; font-size:11px; margin-top:4px;">
Create API key at: WooCommerce → Settings → Advanced → REST API.<br>
Key must have <b>Read</b> permission (preferably Read/Write).<br>
User bound to key must be <b>Administrator</b> or equivalent.
</div>
</div>
</script>
<script type="text/x-red" data-help-name="woocommerce-config">
<p>WooCommerce REST API configuration node.</p>
<h3>Details</h3>
<p>Configure your WooCommerce store connection.</p>
<ul>
<li><b>Base URL</b> – Your WooCommerce REST API URL, e.g. <code>https://example.com/wp-json/wc/v3</code></li>
<li><b>Consumer Key</b> – From WooCommerce → Settings → Advanced → REST API</li>
<li><b>Consumer Secret</b> – Paired with Consumer Key</li>
</ul>
</script>