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,235 @@
@ox-quickview-height: 550px;
@ox-modal--width: 960px;
& when (@media-common = true) {
#ox_quickview_wrapper{
html{
overflow: hidden;
}
}
.ox_quickview-preloader{
box-sizing: border-box;
width: 80px;
height: 30px;
content:url('../Olegnax_Quickview/images/preloader.svg');
position: absolute;
left: 50%;
top: 50%;
margin-top: -15px;
margin-left: -40px;
}
.ox-quickview-catalog-product-view,
.ox_quickview-catalog_product-view {
.bundle-options-container{
position: absolute;
width: 100%;
left: 0;
top:0;
background: #fff;
margin-bottom: 0;
.product-add-form{
padding: 50px;
}
}
.ox-product-labels-wrapper{
&.ox-product-labels--top-left{
padding-left: 20px;
padding-top: 20px;
}
&.ox-product-labels--top-right{
padding-top: 20px;
}
&.ox-product-labels--bottom-left{
padding-left: 20px;
padding-bottom: 20px;
}
&.ox-product-labels--bottom-right{
padding-bottom: 20px;
}
}
&.catalog-product-view .column.main{
-webkit-flex-direction: row;
-ms-flex-direction: row;
flex-direction: row;
}
.product.media{
.gallery-placeholder {
&.ox-custom-cursor.ox-gallery{
cursor: move;
cursor: -webkit-grab;
cursor: -moz-grab;
cursor: -o-grab;
cursor: -ms-grab;
cursor: grab;
.fotorama__grab{
cursor: move;
cursor: -webkit-grab;
cursor: -moz-grab;
cursor: -o-grab;
cursor: -ms-grab;
cursor: grab;
}
}
}
}
.product-info-main{
width: 48%;
padding: 50px 40px 0 40px;
margin-bottom:0;
overflow-y: auto;
.swatch-attribute{
margin-bottom: 10px;
}
.product-reviews-summary{
margin: -15px 0 17px 0;
}
.page-title-wrapper .page-title{
margin-bottom: 18px;
}
.product.attribute.overview{
margin-bottom:30px;
}
}
.box-tocart .action.tocart {
width: 100%;
}
.page-wrapper .page-main {
padding: 0!important;
min-height: 300px;
}
.reviews-actions .add {
display: none;
}
&.page-product-downloadable {
.product-add-form{
border: none;
padding: 0;
margin-bottom: 30px;
.box-tocart{
width: 100%;
margin-bottom: 30px;
.product-addto-links{
display:flex;
}
}
}
.product-options-wrapper,
.product-options-bottom {
float: none;
width: 100%;
}
.product-options-bottom {
.price-box {
display: none;
}
}
}
.product-add-form, .product-options-bottom .box-tocart,
.product-options-bottom .actions--right-to-cart{
margin-bottom: 30px;
}
.product-info-main .product-info-price,
.product-options-bottom .product-info-price{
margin-bottom: 24px;
}
.swatch-opt{
margin: 20px 0 30px 0;
}
.product-add-form .fieldset{
margin: 0 0 30px;
}
}
/*.box-gotoproduct #product-gotoproduct-button {
}*/
/*.page-products .product-item .ox-quickview {
display: none
}*/
.ox-quickview-catalog-product-view,
.ox_quickview-catalog_product-view {
.page-wrapper {
min-height: auto !important;
}
}
}
@media (min-width: @ox-modal--width){
.ox-quickview-catalog-product-view,
.ox_quickview-catalog_product-view {
&.page-product-bundle{
overflow-y:auto!important;
}
.fotorama{
max-height:@ox-quickview-height;
height:@ox-quickview-height;
}
.product.media{
width: 52%;
margin-bottom:0;
#ox-zoom-cursor{
display:none;
}
.fotorama__nav,
.fotorama__nav--thumbs,
.fotorama__nav-wrap--horizontal{
margin:0;
display:none!important;
}
.fotorama__wrap .fotorama__grab{
cursor: move;
cursor: -webkit-grab;
cursor: -moz-grab;
cursor: -o-grab;
cursor: -ms-grab;
cursor: grab;
}
.fotorama__stage{
height:@ox-quickview-height!important;
max-height: @ox-quickview-height!important;
}
}
.product-info-main{
height: @ox-quickview-height;
max-height: 100vh;
.product-addto-links,
.product-options-bottom {
.action.tocompare{
display: inline-block;
}
}
}
&.ox-quickview-sa .product-info-main .box-tocart{
.actions .action.tocart{
padding: 0 36px;
min-width: 189px;
}
.field.qty{
max-width: 112px;
}
}
}
}
.media-width(@extremum, @break) when (@extremum = 'min') and (@break = @screen__xs) {
.ox_quickview-catalog_product-view .product-info-main .box-tocart .field.qty{
max-width: 130px;
}
}
.media-width(@extremum, @break) when (@extremum = 'min') and (@break = @screen__m) {
.ox-quickview-catalog-product-view,
.ox_quickview-catalog_product-view {
&.catalog-product-view .breadcrumbs,
&.catalog-product-view .columns,
&.catalog-product-view .page.messages,
&.catalog-product-view .page-title-wrapper {
max-width: 100%;
width: 100%;
margin: 0 auto;
}
}
}
@@ -0,0 +1,56 @@
<svg id="athlete_preloader" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 80 30">
<defs>
<style type="text/css"><![CDATA[
@keyframes athlete_preloader {
0%{
transform-origin:left;
transform: scale(0, 1);
}
70% {
transform-origin:left;
transform: scale(1, 1);
}
70.01% {
transform-origin:right;
transform: scale(1, 1);
}
100% {
transform-origin:right;
transform: scale(0, 1);
}
}
@-webkit-keyframes athlete_preloader {
0%{
-webkit-transform-origin:left;
-webkit-transform: scale(0, 1);
transform-origin:left;
transform: scale(0, 1);
}
70% {
-webkit-transform-origin:left;
-webkit-transform: scale(1, 1);
transform-origin:left;
transform: scale(1, 1);
}
70.01% {
-webkit-transform-origin:right;
-webkit-transform: scale(1, 1);
transform-origin:right;
transform: scale(1, 1);
}
100% {
-webkit-transform-origin:right;
-webkit-transform: scale(0, 1);
transform-origin:right;
transform: scale(0, 1);
}
}
.athlete_preloader_fill{
transform-origin:left;
animation: athlete_preloader 3s infinite;
}
]]></style>
</defs>
<path d="M0,0V30H80V0H0ZM76,26H4V4H76V26Z"/>
<rect width="80" height="30" class="athlete_preloader_fill"/>
</svg>

After

Width:  |  Height:  |  Size: 1.4 KiB

@@ -0,0 +1,131 @@
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
define([
'jquery',
'Magento_Catalog/js/product/view/product-ids-resolver',
'catalogAddToCart',
'jquery-ui-modules/widget',
'jquery-ui-modules/core',
], function ($, idsResolver) {
'use strict';
$.widget('mage.OxQuickviewcatalogAddToCart', $.mage.catalogAddToCart, {
disableAddToCartButton: function (form) {
this.element.addClass('ox-add-to-cart-loading');
this._super(form);
},
enableAddToCartButton: function (form) {
this.element.removeClass('ox-add-to-cart-loading');
this._super(form);
},
/**
* @param {jQuery} form
*/
ajaxSubmit: function (form) {
var self = this,
productIds = idsResolver(form),
formData;
$(window.parent.document.body).find(self.options.minicartSelector).trigger('contentLoading');
self.disableAddToCartButton(form);
formData = new FormData(form[0]);
window.parent.ajaxCartTransport = false;
window.parent.jQuery.ajax({
url: form.attr('action'),
data: formData,
type: 'post',
dataType: 'json',
cache: false,
contentType: false,
processData: false,
/** @inheritdoc */
beforeSend: function () {
if (self.isLoaderEnabled()) {
$(window.parent.document.body).trigger(self.options.processStart);
}
},
/** @inheritdoc */
success: function (res) {
var eventData, parameters;
$(window.parent.document).trigger('ajax:addToCart', {
'sku': form.data().productSku,
'productIds': productIds,
'form': form,
'response': res
});
if (self.isLoaderEnabled()) {
$(window.parent.document.body).trigger(self.options.processStop);
}
if (res.backUrl) {
eventData = {
'form': form,
'redirectParameters': []
};
// trigger global event, so other modules will be able add parameters to redirect url
$(window.parent.document.body).trigger('catalogCategoryAddToCartRedirect', eventData);
if (eventData.redirectParameters.length > 0) {
parameters = res.backUrl.split('#');
parameters.push(eventData.redirectParameters.join('&'));
res.backUrl = parameters.join('#');
}
self._redirect(res.backUrl);
return;
}
if (res.messages) {
$(window.parent.document.body).find(self.options.messagesSelector).html(res.messages);
}
if (res.minicart) {
$(window.parent.document.body).find(self.options.minicartSelector).replaceWith(res.minicart);
$(window.parent.document.body).find(self.options.minicartSelector).trigger('contentUpdated');
}
if (res.product && res.product.statusText) {
$(window.parent.document.body).find(self.options.productStatusSelector)
.removeClass('available')
.addClass('unavailable')
.find('span')
.html(res.product.statusText);
}
self.enableAddToCartButton(form);
window.parent.ajaxCartTransport = !window.OXAjaxNShowMCart;
},
/** @inheritdoc */
error: function (res) {
$(window.parent.document).trigger('ajax:addToCart:error', {
'sku': form.data().productSku,
'productIds': productIds,
'form': form,
'response': res
});
self.enableAddToCartButton(form);
},
/** @inheritdoc */
complete: function (res) {
if (res.state() === 'rejected') {
window.parent.location.reload();
}
}
});
},
});
return $.mage.OxQuickviewcatalogAddToCart;
});
+27
View File
@@ -0,0 +1,27 @@
define(['jquery', 'OxQuickview', 'OXmodal'], function ($, quickview) {
"use strict";
$.widget('mage.OxQuickviewInit', {
_create: function () {
$('#ox_quickview_wrapper').OXmodal({
defaultModalClass: 'ox-dialog ox-smallmodal',
type: 'modal',
overlayClass: "ox-slideout-shadow",
closeButtonTrigger: '.ox-overlay-close-btn',
"htmlClass": "ox-fixed",
});
$(document.body).on('click.OxQuickview', '.ox-quickview-button', function (event) {
event.preventDefault();
var prodUrl = $(this).attr('data-quickview-url');
if (prodUrl) {
quickview.displayContent(prodUrl);
}
}).on('closeOxQuickview', function () {
quickview.close();
});
},
});
return $.mage.OxQuickviewInit;
});
@@ -0,0 +1,46 @@
define( [
'jquery',
'OXmodal'
], function ( $ ) {
"use strict";
var oxquickview = {
displayContent: function ( prodUrl ) {
if ( !prodUrl.length ) {
return false;
}
var a = $( '#ox_quickview_wrapper' );
if ( !a.length ) {
a = $( '<div>' ).attr( 'id', 'ox_quickview_wrapper' );
$( 'body' ).append( a );
a.OXmodal( {
defaultModalClass: 'ox-dialog ox-smallmodal',
type: 'modal',
overlayClass: "ox-slideout-shadow",
closeButtonTrigger: '.ox-overlay-close-btn',
"htmlClass": "ox-fixed",
} );
}
a.find( '.ox_quickview-preloader' ).show();
a.find( 'iframe' ).remove();
a.append( $( '<iframe>' ).attr( {
src: prodUrl,
frameborder: 0,
allowfullscreen: 0,
style: 'opacity: 0;width: 100%;height: 100%;',
} ) );
(a.data( 'mageOXmodal' ) || a.data( 'mage-OXmodal' )).open();
a.parent().on( 'click', function ( e ) {
(a.data( 'mageOXmodal' ) || a.data( 'mage-OXmodal' )).close();
} );
},
close:function () {
let a = $( '#ox_quickview_wrapper' );
(a.data( 'mageOXmodal' ) || a.data( 'mage-OXmodal' )).close();
}
};
window.oxquickview = oxquickview;
return oxquickview;
} );
@@ -0,0 +1,48 @@
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
define([
'jquery',
'mage/mage',
'Magento_Catalog/product/view/validation',
'OxQuickviewcatalogAddToCart'
], function ($) {
'use strict';
$.widget('mage.productValidate', {
options: {
bindSubmit: false,
radioCheckboxClosest: '.nested'
},
/**
* Uses Magento's validation widget for the form object.
* @private
*/
_create: function () {
var bindSubmit = this.options.bindSubmit;
this.element.validation({
radioCheckboxClosest: this.options.radioCheckboxClosest,
/**
* Uses OxQuickviewcatalogAddToCart widget as submit handler.
* @param {Object} form
* @returns {Boolean}
*/
submitHandler: function (form) {
var jqForm = $(form).OxQuickviewcatalogAddToCart({
bindSubmit: bindSubmit
});
jqForm.OxQuickviewcatalogAddToCart('submitForm', jqForm);
return false;
}
});
}
});
return $.mage.productValidate;
});