ltsecurityinc安防产品在线商城代码

This commit is contained in:
2026-09-14 17:47:10 +08:00
parent 57d8444c15
commit 6a3c9c5bd8
14539 changed files with 1775310 additions and 0 deletions
@@ -0,0 +1,39 @@
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<body>
<referenceBlock name="checkout.root">
<arguments>
<argument name="jsLayout" xsi:type="array">
<item name="components" xsi:type="array">
<item name="checkout" xsi:type="array">
<item name="children" xsi:type="array">
<item name="steps" xsi:type="array">
<item name="children" xsi:type="array">
<item name="billing-step" xsi:type="array">
<item name="children" xsi:type="array">
<item name="payment" xsi:type="array">
<item name="children" xsi:type="array">
<item name="afterMethods" xsi:type="array">
<item name="children" xsi:type="array">
<item name="other-ref-num" xsi:type="array">
<item name="component" xsi:type="string">Lts_Checkout/js/view/additional-input</item>
<item name="sortOrder" xsi:type="string">10</item>
<item name="displayArea" xsi:type="string">other-ref-num</item>
<item name="dataScope" xsi:type="string">other_ref_num</item>
<item name="provider" xsi:type="string">checkoutProvider</item>
</item>
</item>
</item>
</item>
</item>
</item>
</item>
</item>
</item>
</item>
</item>
</item>
</argument>
</arguments>
</referenceBlock>
</body>
</page>
@@ -0,0 +1,51 @@
define([
'uiComponent',
'ko',
'Magento_Checkout/js/model/quote',
'jquery',
'mage/url',
'Magento_Checkout/js/model/full-screen-loader'
], function (Component, ko, quote, $, url, fullScreenLoader) {
'use strict';
return Component.extend({
defaults: {
template: 'Lts_Checkout/additional-input',
},
initObservable: function () {
console.log('quote', quote);
this._super()
.observe({otherRefNum: ko.observable(window.checkoutConfig.quoteData.other_ref_num)});
self = this;
this.otherRefNum.subscribe(function (newValue) {
const linkUrls = url.build('lts_checkout/index/savePoNumber');
const formKey = $("input[name=form_key]").val();
fullScreenLoader.startLoader();
$.ajax({
url: linkUrls,
data: {poNumber : newValue},
type: "POST",
form_key: formKey,
dataType: 'json',
success: function (res) {
fullScreenLoader.stopLoader();
},
error: function (res) {
fullScreenLoader.stopLoader();
},
complete: function (res) {
fullScreenLoader.stopLoader();
}
});
});
return this;
},
});
});
@@ -0,0 +1,4 @@
<div class="field custom-comment">
<label for="other_ref_num"><b data-bind="i18n: 'PO Number:'"></b></label>
<input type="text" name="other_ref_num" maxlength="45" data-bind="value: otherRefNum" class="input-text" id="other_ref_num" />
</div>