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,21 @@
<?xml version="1.0"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceContainer name="content">
<referenceBlock name="product.info.addto2">
<block class="Magento\Wishlist\Block\Catalog\Product\View\AddTo\Wishlist" name="view.addto.wishlist2"
template="Magento_Wishlist::catalog/product/view/addto/wishlist.phtml" />
</referenceBlock>
<referenceBlock name="product.info.addto2.additional">
<block class="Magento\Wishlist\Block\Catalog\Product\View\AddTo\Wishlist" name="view.addto.wishlist2.additional"
template="Magento_Wishlist::catalog/product/view/addto/wishlist.phtml" />
</referenceBlock>
</referenceContainer>
</body>
</page>
@@ -0,0 +1,21 @@
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
// @codingStandardsIgnoreFile
$showWishlist = $this->helper('Olegnax\Athlete2\Helper\Helper')->getConfig('athlete2_settings/products_listing/wishlist');
/** @var Magento\Wishlist\Block\Catalog\Product\ProductList\Item\AddTo\Wishlist $block */
?>
<?php if ($block->getWishlistHelper()->isAllow() && $showWishlist): ?>
<a href="#"
class="action towishlist"
title="<?= $block->escapeHtmlAttr(__('Add to Wish List')) ?>"
aria-label="<?= $block->escapeHtmlAttr(__('Add to Wish List')) ?>"
data-post='<?= /* @noEscape */ $block->getAddToWishlistParams($block->getProduct()) ?>'
data-action="add-to-wishlist"
role="button">
<span><?= $block->escapeHtml(__('Add to Wish List')) ?></span>
</a>
<?php endif; ?>
@@ -0,0 +1,39 @@
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
// @codingStandardsIgnoreFile
/** @var Wishlist $block */
use Magento\Wishlist\Block\Catalog\Product\View\AddTo\Wishlist;
$wishlist_disabled = $this->helper('Olegnax\Athlete2\Helper\Helper')->getConfig('athlete2_settings/product/wishlist_disable');
if(!$wishlist_disabled):
$_helper = $this->helper( 'Olegnax\Athlete2\Helper\CssFiles' );
$theme_helper = $this->helper('Olegnax\Athlete2\Helper\Helper');
$actions_position = $theme_helper->getConfig('athlete2_settings/product/actions_position');
?>
<?php if ($block->isWishListAllowed()) : ?>
<?php if ('2' == $actions_position) { ?>
<a href="#"
class="action towishlist athlete2-icon-heart a2-tooltip-btn"
data-post='<?= /* @noEscape */ $block->getWishlistParams() ?>'
data-action="add-to-wishlist"><span class="a2-tooltip"><?= $block->escapeHtml(__('Add to Wish List')) ?></span></a>
<?php } else { ?>
<a href="#"
class="action towishlist athlete2-icon-heart"
data-post='<?= /* @noEscape */ $block->getWishlistParams() ?>'
data-action="add-to-wishlist"><span><?= $block->escapeHtml(__('Add to Wish List')) ?></span></a>
<?php } ?>
<?php endif; ?>
<script type="text/x-magento-init">
{
"body": {
"addToWishlist": <?= /* @noEscape */ $block->getWishlistOptionsJson() ?>
}
}
</script>
<?php endif; ?>
@@ -0,0 +1,122 @@
<?php
$minicart_type = $this->helper('Olegnax\Athlete2\Helper\Helper')->getConfig( 'athlete2_settings/header/minicart_type' );
$icon = '<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="19" height="17" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 18.9 17" style="enable-background:new 0 0 18.9 17;" xml:space="preserve">
<path d="M17.3,1.6C16.1,0.6,14.5,0,13,0.1c-1.3,0.2-2.6,0.8-3.5,1.8C8.3,0.9,7.2,0,5.9,0C4.3-0.1,2.8,0.5,1.7,1.6
C0.6,2.7,0,4.3,0,5.9c0.1,1.3,0.5,2.5,1.3,3.5c0.4,0.5,4.2,4.4,6.4,6.6c0,0,0.8,1,1.7,1c0.8,0,1.7-1,1.7-1c2.4-2.4,6.5-6.5,6.9-7.3
c0.5-0.8,0.9-1.8,0.9-2.8C19,4.3,18.4,2.8,17.3,1.6z M16.2,7.7l-6.8,7.1L3,8.3C2.4,7.6,2.1,6.8,2,5.9C2,4.8,2.4,3.8,3.1,3
c0.8-0.7,1.8-1.1,2.8-1c1.3,0,3.5,2.5,3.5,2.5s2.4-2.4,3.5-2.4c1.1-0.1,2.1,0.3,2.9,1c0.7,0.8,1.1,1.8,1.1,2.8
C16.8,6.5,16.6,7.2,16.2,7.7z"/>
</svg>';
?>
<div class=" header__item header__item-wishlist">
<a class="button js-item-wishlist-action" data-bind="scope: 'wishlist'" aria-label="Wishlist">
<img class="lts-header-icon lts-header-icon--wishlist"
src="<?= $block->escapeUrl($block->getViewFileUrl('Magento_Theme::images/lts-header/header_wishlist_icon.png')) ?>"
width="20" height="20" alt="" aria-hidden="true"/>
<span class="label"><?= $block->escapeHtml(__('Wishlist')) ?></span>
<!-- ko if: wishlist().counter -->
<span class="header__item-badge" data-bind="text: wishlist().counter.replace(/[^0-9]*/igm, '')"></span>
<!-- /ko -->
</a>
<div class="header__item-dropdown-content"
data-role="OXmodal"
data-mage-init='{"OXmodalWishlist":{
"triggerTarget":".js-item-wishlist-action",
"overlayClass":"ox-slideout-shadow",
"timeout": "500",
"closeOnEscape": true,
"closeButtonTrigger":"#btn-wishllist-close",
"closeOnMouseLeave": <?php echo 'dropdown-hover' == $minicart_type ? 'true' : 'false'; ?>,
"hoverOpen": <?php echo 'dropdown-hover' == $minicart_type ? 'true' : 'false'; ?>,
"type": "<?php echo 'slideout' == $minicart_type ? 'slideout' : ''; ?>",
"positionSlideout": "right",
"htmlClass":"ox-fixed"
}}'>
<div class="block block-wishlist" data-bind="scope: 'wishlist'">
<div class="block-content">
<!-- ko if: wishlist().counter -->
<div class="items-total">
<span data-bind="text: wishlist().counter" class="amount"></span>
<span class="label">
<?= $block->escapeHtml(__('in Wish list')) ?>
</span>
<button type="button" id="btn-wishllist-close" class="ox-overlay-close-btn" aria-label="Close Modal" data-action="close"><span></span></button>
</div>
<ol class="product-items no-display" id="wishlist-sidebar" data-bind="foreach: wishlist().items, css: {'no-display': null}">
<li class="product-item">
<div class="product-item-info">
<a class="product-item-photo" data-bind="attr: { href: product_url, title: product_name }">
<!-- ko template: {name: $data.image.template, data: $data.image} --><!-- /ko -->
</a>
<div class="product-item-details">
<strong class="product-item-name">
<a data-bind="attr: { href: product_url }" class="product-item-link">
<span data-bind="text: product_name"></span>
</a>
</strong>
<div data-bind="html: product_price"></div>
<div class="product actions">
<!-- ko if: product_is_saleable_and_visible -->
<div class="actions-primary">
<!-- ko if: product_has_required_options -->
<a href="#" data-bind="attr: {'data-post': add_to_cart_params}" class="action tocart primary"><span><?= $block->escapeHtml(__('Add to Cart')) ?></span></a>
<!-- /ko -->
<!-- ko ifnot: product_has_required_options -->
<button type="button" class="action tocart primary" data-bind="attr: {'data-post': add_to_cart_params}"><span><?= $block->escapeHtml(__('Add to Cart')) ?></span></button>
<!-- /ko -->
</div>
<!-- /ko -->
<div class="secondary">
<a href="#" data-bind="attr: {'data-post': delete_item_params}"
title="<?= $block->escapeHtmlAttr(__('Remove This Item')) ?>"
class="btn-remove action delete">
<span><?= $block->escapeHtml(__('Remove This Item')) ?></span>
</a>
</div>
</div>
</div>
</div>
</li>
</ol>
<div class="dropdown-bottom-wrapper">
<div class="subtotal">
<span class="label">
<?= $block->escapeHtml(__('Total Products')) ?>
</span>
<div class="amount" data-bind="text: wishlist().counter.replace(/[^0-9]*/igm, '')"></div>
</div>
<div class="dropdown-bottom-actions">
<a class="action secondary details"
href="<?= $block->escapeUrl($this->helper('Magento\Wishlist\Helper\Data')->getListUrl()) ?>"
title="<?= $block->escapeHtmlAttr(__('View my Wishlist')) ?>"><span><?= $block->escapeHtml(__('View my Wishlist')) ?></span></a>
</div>
</div>
<!-- /ko -->
<!-- ko ifnot: wishlist().counter -->
<div class="empty-wishlist-wrapper">
<div class="athlete2-icon-heart empty-wishlist-icon"></div>
<div class="subtitle empty"><?= $block->escapeHtml(__('You have no items in your wish list.')) ?></div>
<button type="button" id="btn-wishllist-close" class="button continue primary" data-action="close"><span><?= $block->escapeHtml(__('Continue Shopping')) ?></span></button>
</div>
<!-- /ko -->
</div>
</div>
<script type="text/x-magento-init">
{
"*": {
"Magento_Ui/js/core/app": {
"components": {
"wishlist": {
"component": "Magento_Wishlist/js/view/wishlist"
}
}
}
}
}
</script>
</div>
</div>
@@ -0,0 +1,434 @@
// /**
// * Copyright © Magento, Inc. All rights reserved.
// * See COPYING.txt for license details.
// */
//
// Common
// _____________________________________________
& when (@media-common = true) {
.form.wishlist.items {
.actions-toolbar {
&:extend(.abs-reset-left-margin all);
}
}
.block-wishlist{
.empty-wishlist-wrapper{
display: block;
font-size: 14px;
padding: 40px 0 80px;
text-align: center;
margin:auto;
.empty-wishlist-icon{
font-size: 106px;
text-align: center;
color: #ececec;
line-height:1;
margin-bottom: 5px;
}
}
}
.product-info-main,
.product-options-bottom,
.block-bundle-summary {
.action.towishlist {
display:inline-block;
text-decoration: none;
color: #000;
height: @add-to-cart-button__height;
width: @add-to-cart-button__height;
position: relative;
padding: 0;
text-align: center;
&:before{
font-size: 18px;
position: relative;
top: calc(~"50% - 9px");
}
}
}
.product-items,
.products.list.items,
.table-comparison {
.action {
&.towishlist {
&:before{
content:'\6b';
font-family: "athlete2";
font-size: 16px;
text-transform:initial!important;
line-height:43px;
color:@grid-action-icon-color;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
vertical-align: middle;
display: inline-block;
font-weight: normal;
speak: none;
margin-bottom:-2px;
text-align: center;
}
}
}
}
.account .table-wrapper .data.table.wishlist {
.lib-table-bordered(
@_table_type: horizontal
);
thead > tr > th {
border-bottom: 0;
}
tbody > tr:last-child > td {
border-bottom: 1px solid @table__border-color;
}
.product.name {
display: inline-block;
margin-bottom: @indent__s;
}
.box-tocart {
margin: @indent__s 0;
.qty {
vertical-align: middle;
&:extend(.abs-input-qty all);
}
}
.col {
&.item {
width: 50%;
}
&.photo {
max-width: 150px;
}
&.selector {
max-width: 15px;
}
}
textarea {
margin: @indent__s 0;
}
.input-text.qty {
margin-bottom: @indent__s;
}
.action.primary {
vertical-align: top;
}
.price {
font-weight: @font-weight__bold;
}
}
.block-wishlist {
.block-title {
> strong {
.lib-heading(h5);
text-transform:uppercase;
}
}
.counter {
&:extend(.abs-block-items-counter all);
}
/*.product-item-name {
margin-right: @indent__m;
}*/
}
.products-grid.wishlist {
/*.product-item-info{
padding: 0;
}*/
+ .actions-toolbar{
.action{
margin-bottom:5px;
}
}
.product {
&-item {
margin-bottom: 40px;
&-photo {
display: block;
margin-bottom: 10px;
}
&-name {
margin-top: 0;
}
.price-box {
margin: 0;
}
&-tooltip {
}
.comment-box {
.label {
&:extend(.abs-visually-hidden all);
}
}
&-comment {
display: block;
height: 42px;
margin-bottom:15px;
}
&-actions {
margin-top:10px;
display: block;
> a {
margin-right: 5px;
display: inline-block;
width: auto;
font-weight: @font-weight__bold;
border-bottom: 2px solid;
text-transform: uppercase;
&:last-child {
margin-right: 0;
}
}
.action.tocart{
width:100%;
}
}
.price-as-configured{
margin-bottom:10px;
}
.box-tocart {
.field.qty {
margin: 0 0 10px;
label{
display:none;
}
}
input.qty {
height: 46px;
text-align: center;
width: 100%;
min-width: 80px;
padding: 0 22px;
padding-bottom: 1px;
background: #f4f4f4;
border: none;
font-size: 18px;
font-weight: @font-weight__bold;
}
}
}
}
}
.header__item-dropdown-content{
.block-wishlist{
.product-item{
display: block;
padding-bottom: 10px;
width: 100%;
.product-item-photo{
margin-bottom:0;
}
.price-box{
margin-top:4px;
}
.product-item-name{
a{
font-size: 14px;
}
}
.price{
font-size: 1.4rem;
font-weight: @font-weight__bold;
}
.product-item-details{
margin-left: 15px;
position: relative;
width: 100%;
padding-right: 25px;
}
.action.tocart {
padding: 6px 8px 7px 8px;
margin-left: 4px;
span{
font-size: 12px;
}
}
.actions{
.secondary{
position: absolute;
right: 0;
top: 0;
.delete {
.lib-icon-font(
@icon-remove,
@_icon-font-size: 10px,
@_icon-font-line-height: 23px,
@_icon-font-text-hide: true,
@_icon-font-color: #000000,
@_icon-font-color-hover: #ffffff,
@_icon-font-color-active: #ffffff
);
background: transparent;
padding:0;
&:before{
width:23px;
}
&:hover{
background: #000000;
}
&:after{
content:none;
}
}
}
}
}
.product-item-info{
background: #f5f5f5;
padding: 15px;
display: flex;
width: 100%;
}
.dropdown-bottom-wrapper{
.subtotal{
display:none!important;
.amount{
font-size: 15px;
font-weight: @font-weight__black;
}
}
}
.dropdown-bottom-actions{
.action{
width: 100%;
padding: 15px;
}
}
}
}
}
//
// Mobile
// _____________________________________________
.media-width(@extremum, @break) when (@extremum = 'max') and (@break = @screen__xs) {
.wishlist-index-index {
.product {
&-item {
width: 100%;
}
}
}
}
.media-width(@extremum, @break) when (@extremum = 'max') and (@break = @screen__s) {
//
// Grid view for wishlist
// -----------------------------------------
.wishlist-index-index {
.product {
&-item {
width: 50%;
&-info {
width: auto;
}
}
}
.products-grid.wishlist {
+ .actions-toolbar{
display:block;
.action{
width:100%;
}
}
}
}
}
//
// Desktop
// _____________________________________________
.media-width(@extremum, @break) when (@extremum = 'min') and (@break = @screen__m) {
.ox-dropdown{
.block-wishlist{
.empty-wishlist-wrapper{
padding: 60px 0 50px;
.button.continue{
display:none;
}
}
}
}
.products-grid.wishlist {
margin-bottom: 20px;
.product {
&-item {
&-tooltip {
display: inline-block;
}
.box-tocart {
.actions-primary {
margin: 0;
}
.stock {
margin: @indent__base 0 0;
}
}
}
}
}
.wishlist-index-index {
.product {
&-item {
&-info {
width: 240px;
}
}
}
.main {
.form-wishlist-items {
.actions-toolbar {
&:extend(.abs-reset-left-margin-desktop all);
}
}
}
}
}
.media-width(@extremum, @break) when (@extremum = 'min') and (@break = @screen__l) {
.wishlist-index-index {
.products-grid {
.product-items {
margin: 0;
}
.product-item {
padding: 0;
width: 25%;
}
}
}
}