Skip to content

Commit c2d45cd

Browse files
fix: gallery slider
1 parent 66056ff commit c2d45cd

File tree

3 files changed

+11
-4
lines changed

3 files changed

+11
-4
lines changed

assets/js/src/shop/app.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/* jshint esversion: 6 */
22
/* global jQuery, CustomEvent */
3+
/* global neveShopSlider */
34
import { tns } from 'tiny-slider/src/tiny-slider';
45

56
(function ($) {
@@ -19,9 +20,8 @@ import { tns } from 'tiny-slider/src/tiny-slider';
1920
}
2021

2122
if (
22-
$body.hasClass('single-product') &&
23-
!$body.hasClass('sp-ct-enabled') &&
24-
!$body.hasClass('nv-left-gallery')
23+
'1' !== neveShopSlider.isSparkActive &&
24+
$body.hasClass('single-product')
2525
) {
2626
handleGallerySlider();
2727
}

assets/scss/components/compat/woocommerce/_sidebar.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
}
5858
}
5959

60-
body:not(.nv-left-gallery, .sp-slider-gallery) {
60+
body:not(.nv-left-gallery):not(.sp-slider-gallery):not([class^="related-products-columns-"]) {
6161

6262
.tns-ovh {
6363
display: flex;

inc/core/front_end.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -465,6 +465,13 @@ private function add_scripts() {
465465
wp_register_script( 'neve-shop-script', NEVE_ASSETS_URL . 'js/build/modern/shop.js', array( 'jquery', 'wc-single-product' ), NEVE_VERSION, true );
466466
wp_enqueue_script( 'neve-shop-script' );
467467
wp_script_add_data( 'neve-shop-script', 'async', true );
468+
wp_localize_script(
469+
'neve-shop-script',
470+
'neveShopSlider',
471+
array(
472+
'isSparkActive' => is_plugin_active( 'sparks-for-woocommerce/sparks-for-woocommerce.php' ),
473+
)
474+
);
468475
}
469476

470477
if ( $this->should_load_comments_reply() ) {

0 commit comments

Comments
 (0)