ltsecurityinc安防产品在线商城代码
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
<script>
|
||||
require( [ "jquery", 'underscore', 'Magento_Ui/js/modal/modal' ], function ( $, _, modal ) {
|
||||
"use strict";
|
||||
|
||||
$( function () {
|
||||
var documentPadding = 0;
|
||||
var parentBody = window.parent.document.body;
|
||||
$( '.ox_quickview-preloader', parentBody ).hide();
|
||||
$( '#ox_quickview_wrapper iframe', parentBody ).animate( { 'opacity': 1 }, 100 );
|
||||
$( '.reviews-actions a' ).attr( 'target', '_parent' );
|
||||
$( '.product-social-links a' ).attr( 'target', '_parent' );
|
||||
$( 'body' ).css( 'overflow', 'hidden' );
|
||||
} );
|
||||
|
||||
$( 'a[href]:not([href="#"])' ).on( 'click', function ( e ) {
|
||||
var $this = $( this ),
|
||||
href = $this.attr( 'href' ).replace( /\#.*$/, '' );
|
||||
if ( 0 >= href.length || $this.data( 'disable-parent' ) || '_blank' === $this.attr( 'target' ) ) {
|
||||
return;
|
||||
}
|
||||
e.preventDefault();
|
||||
top.window.location.href = href;
|
||||
} );
|
||||
|
||||
$( 'body' ).on( 'submit', 'form', function ( event ) {
|
||||
event.stopPropagation();
|
||||
event.preventDefault();
|
||||
var parentBody = window.parent.document.body;
|
||||
var $uenc = $( this ).find( 'input[name=uenc]' );
|
||||
if ( $uenc.length ) {
|
||||
$uenc.attr( 'value', ( function b64EncodeUnicode( str ) {
|
||||
return btoa( encodeURIComponent( str ).replace( /%([0-9A-F]{2})/g,
|
||||
function toSolidBytes( match, p1 ) {
|
||||
return String.fromCharCode( '0x' + p1 );
|
||||
} ) ).replace( /\=$/, '' );
|
||||
} )( window.parent.location.href ) );
|
||||
}
|
||||
$( this ).appendTo( parentBody ).trigger( 'submit' );
|
||||
} )
|
||||
} );
|
||||
</script>
|
||||
@@ -0,0 +1,10 @@
|
||||
<?php $buttonTitle = __('Go To Product');?>
|
||||
<div class="box-gotoproduct">
|
||||
<div class="fieldset">
|
||||
<div class="actions">
|
||||
<a target="_parent" href="<?php /* @escapeNotVerified */ echo $this->getProduct()->getProductUrl() ?>" title="<?php /* @escapeNotVerified */ echo $buttonTitle ?>" class="action primary" id="product-gotoproduct-button">
|
||||
<span><?php /* @escapeNotVerified */ echo $buttonTitle ?></span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,2 @@
|
||||
<div id="ox_quickview_wrapper" style="display:none"><div class="ox_quickview-preloader" data-role="loader"></div><div class="ox-overlay-close-btn"><span></span></div></div>
|
||||
<script>require(['jquery','OxQuickviewInit'],function($){$(function(){$('.ox-quickview-button').OxQuickviewInit({})})});</script>
|
||||
+53
@@ -0,0 +1,53 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright © Magento, Inc. All rights reserved.
|
||||
* See COPYING.txt for license details.
|
||||
*/
|
||||
|
||||
// @codingStandardsIgnoreFile
|
||||
|
||||
/** @var $block View */
|
||||
|
||||
use Magento\Catalog\Block\Product\View;
|
||||
|
||||
?>
|
||||
|
||||
<?php $_product = $block->getProduct(); ?>
|
||||
<?php $buttonTitle = __('Add to Cart'); ?>
|
||||
<?php if ($_product->isSaleable()): ?>
|
||||
<div class="box-tocart">
|
||||
<div class="fieldset">
|
||||
<?php if ($block->shouldRenderQuantity()): ?>
|
||||
<div class="field qty">
|
||||
<label class="label" for="qty"><span><?= /* @escapeNotVerified */ __('Qty') ?></span></label>
|
||||
<div class="control">
|
||||
<input type="number"
|
||||
name="qty"
|
||||
id="qty"
|
||||
value="<?= /* @escapeNotVerified */ $block->getProductDefaultQty() * 1 ?>"
|
||||
title="<?= /* @escapeNotVerified */ __('Qty') ?>"
|
||||
class="input-text qty"
|
||||
data-validate="<?= $block->escapeHtml(json_encode($block->getQuantityValidators())) ?>"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<div class="actions">
|
||||
<button type="submit"
|
||||
title="<?= /* @escapeNotVerified */ $buttonTitle ?>"
|
||||
class="action primary tocart"
|
||||
id="product-addtocart-button">
|
||||
<span><?= /* @escapeNotVerified */ $buttonTitle ?></span>
|
||||
</button>
|
||||
<?= $block->getChildHtml('', true) ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<script type="text/x-magento-init">
|
||||
{
|
||||
"#product_addtocart_form": {
|
||||
"Olegnax_Quickview/js/validate-product": {}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
<?php
|
||||
/** \Magento\Checkout\Block\Cart\Sidebar $bloock */
|
||||
?>
|
||||
<script>
|
||||
window.checkout = <?= /* @noEscape */ $block->getSerializedConfig() ?>;
|
||||
</script>
|
||||
+35
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright © Magento, Inc. All rights reserved.
|
||||
* See COPYING.txt for license details.
|
||||
*/
|
||||
|
||||
// @codingStandardsIgnoreFile
|
||||
|
||||
/**
|
||||
* @var $block Title
|
||||
*/
|
||||
|
||||
use Magento\Theme\Block\Html\Title;
|
||||
|
||||
$helper = $this->helper( 'Olegnax\Quickview\Helper\Helper' );
|
||||
$_product = $helper->getProduct();
|
||||
$cssClass = $block->getCssClass() ? ' ' . $block->getCssClass() : '';
|
||||
$title = '';
|
||||
if (trim((string)$block->getPageHeading())) {
|
||||
$title = '<span class="base" data-ui-id="page-title-wrapper" ' . $block->getAddBaseAttribute() . '>'
|
||||
. $block->escapeHtml($block->getPageHeading()) . '</span>';
|
||||
}
|
||||
?>
|
||||
<?php if ($title): ?>
|
||||
<div class="sss page-title-wrapper<?= /* @escapeNotVerified */ $cssClass ?>">
|
||||
<a href="<?= $_product->getProductUrl(); ?>"><h1 class="page-title"
|
||||
<?php if ($block->getId()): ?> id="<?= /* @escapeNotVerified */ $block->getId() ?>" <?php endif; ?>
|
||||
<?php if ($block->getAddBaseAttributeAria()): ?>
|
||||
aria-labelledby="<?= /* @escapeNotVerified */ $block->getAddBaseAttributeAria() ?>"
|
||||
<?php endif; ?>>
|
||||
<?= /* @escapeNotVerified */ $title ?>
|
||||
</h1></a>
|
||||
<?= $block->getChildHtml() ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
Reference in New Issue
Block a user