Home › Forums › WoodMart support forum › Visual composer Products tab issue
Visual composer Products tab issue
- This topic has 4 replies, 2 voices, and was last updated 6 years, 5 months ago by Elise Noromit.
-
AuthorPosts
-
July 23, 2018 at 6:42 am #68779
SyncStudiosParticipantHello,
i am using woodmart theme Lingerie demo.
my issue is i am using product tab extension issue image load not properly please check this url https://ibb.co/hWNPJd
i have resolve this issue urgently.
Thanks,
NitinAttachments:
You must be logged in to view attached files.July 23, 2018 at 7:46 am #68795
Elise NoromitMemberHello,
Thank you very much for choosing our theme and contacting us.
Please add this code to function.php of your child theme:
function woodmart_owl_carousel_init( $atts = array() ) { extract( shortcode_atts( woodmart_get_owl_atts(), $atts ) ); $func_name = 'carousel_' . $carousel_id; $func_name = function() use( $carousel_id, $slides_per_view, $autoplay, $autoheight, $speed, $hide_pagination_control, $hide_prev_next_buttons, $scroll_per_page, $wrap, $dragEndSpeed, $custom_sizes, $center_mode, $post_type, $sliding_speed, $animation, $content_animation ) { $items = woodmart_get_owl_items_numbers( $slides_per_view, $post_type ); if ( ! empty( $custom_sizes ) ) $items = $custom_sizes; ob_start(); ?> jQuery( document ).ready(function( $ ) { var owl = $("#<?php echo esc_js( $carousel_id ); ?> .owl-carousel"); $( window ).bind( "vc_js", function() { owl.trigger('refresh.owl.carousel'); } ); var options = { rtl: $('body').hasClass('rtl'), items: <?php echo esc_js( $items['desktop'] ); ?>, responsive: { 979: { items: <?php echo esc_js( $items['desktop'] ); ?> }, 768: { items: <?php echo esc_js( $items['desktop_small'] ); ?> }, 479: { items: <?php echo esc_js( $items['tablet'] ); ?> }, 0: { items: <?php echo esc_js( $items['mobile'] ); ?> } }, autoplay: <?php echo ($autoplay == 'yes') ? 'true' : 'false'; ?>, <?php if ( $autoplay == 'yes' ): ?> autoplayHoverPause: <?php echo apply_filters( 'woodmart_autoplay_hover_pause', 'true' ); ?>, <?php endif; ?> autoplayTimeout: <?php echo esc_js( $speed ); ?>, dots: <?php echo ($hide_pagination_control == 'yes') ? 'false' : 'true'; ?>, nav: <?php echo ($hide_prev_next_buttons == 'yes') ? 'false' : 'true'; ?>, autoHeight: <?php echo ($autoheight == 'yes') ? 'true' : 'false'; ?>, slideBy: <?php echo ($scroll_per_page == 'yes') ? '\'page\'' : 1; ?>, navText:false, center: <?php echo ($center_mode == 'yes') ? 'true' : 'false'; ?>, loop: <?php echo ($wrap == 'yes') ? 'true' : 'false'; ?>, dragEndSpeed: <?php echo esc_js( $dragEndSpeed ); ?>, onRefreshed: function() { $(window).resize(); } <?php if( $sliding_speed ): ?> ,smartSpeed: <?php echo esc_js( $sliding_speed ); ?>, dragEndSpeed: <?php echo esc_js( $sliding_speed ); ?> <?php endif; ?> <?php if( $animation ): ?> ,animateOut: '<?php echo esc_js( $animation ); ?>' ,mouseDrag: false <?php endif; ?> <?php if( $content_animation ): ?> ,onTranslated: determinePseudoActive <?php endif; ?> }; owl.owlCarousel(options); <?php if( $content_animation ): ?> determinePseudoActive(); function determinePseudoActive() { var id = owl.find('.owl-item.active').find('.woodmart-slide').attr('id'); owl.find('.owl-item.pseudo-active').removeClass('pseudo-active'); var els = owl.find('[id="' + id + '"]'); els.each(function() { if( ! $(this).parent().hasClass('active') ) { $(this).parent().addClass('pseudo-active'); } }); } <?php endif; ?> }); <?php return ob_get_clean(); }; if( $carousel_js_inline == 'yes' ) { echo '<script type="text/javascript">' . $func_name() . '</script>'; } else { wp_add_inline_script( 'woodmart-theme', $func_name(), 'after' ); } }
Best Regards
July 23, 2018 at 8:00 am #68798
SyncStudiosParticipantcan you please provid me script tag in code and error free code currently show error unexpected if error.
function woodmart_owl_carousel_init( $atts = array() ) {
extract( shortcode_atts( woodmart_get_owl_atts(), $atts ) );
$func_name = ‘carousel_’ . $carousel_id;
$func_name = function() use( $carousel_id, $slides_per_view, $autoplay, $autoheight, $speed, $hide_pagination_control, $hide_prev_next_buttons, $scroll_per_page, $wrap, $dragEndSpeed, $custom_sizes, $center_mode, $post_type, $sliding_speed, $animation, $content_animation ) {$items = woodmart_get_owl_items_numbers( $slides_per_view, $post_type );
if ( ! empty( $custom_sizes ) ) $items = $custom_sizes;
ob_start();
?>
<script type=”text/javascript”>
jQuery( document ).ready(function( $ ) {
var owl = $(“#<?php echo esc_js( $carousel_id ); ?> .owl-carousel”);
$( window ).bind( “vc_js”, function() {
owl.trigger(‘refresh.owl.carousel’);
} );
var options = {
rtl: $(‘body’).hasClass(‘rtl’),
items: <?php echo esc_js( $items[‘desktop’] ); ?>,
responsive: {
979: {
items: <?php echo esc_js( $items[‘desktop’] ); ?>
},
768: {
items: <?php echo esc_js( $items[‘desktop_small’] ); ?>
},
479: {
items: <?php echo esc_js( $items[‘tablet’] ); ?>
},
0: {
items: <?php echo esc_js( $items[‘mobile’] ); ?>
}
},
autoplay: <?php echo ($autoplay == ‘yes’) ? ‘true’ : ‘false’; ?>,
<?php if ( $autoplay == ‘yes’ ): ?>
autoplayHoverPause: <?php echo apply_filters( ‘woodmart_autoplay_hover_pause’, ‘true’ ); ?>,
<?php endif; ?>
autoplayTimeout: <?php echo esc_js( $speed ); ?>,
dots: <?php echo ($hide_pagination_control == ‘yes’) ? ‘false’ : ‘true’; ?>,
nav: <?php echo ($hide_prev_next_buttons == ‘yes’) ? ‘false’ : ‘true’; ?>,
autoHeight: <?php echo ($autoheight == ‘yes’) ? ‘true’ : ‘false’; ?>,
slideBy: <?php echo ($scroll_per_page == ‘yes’) ? ‘\’page\” : 1; ?>,
navText:false,
center: <?php echo ($center_mode == ‘yes’) ? ‘true’ : ‘false’; ?>,
loop: <?php echo ($wrap == ‘yes’) ? ‘true’ : ‘false’; ?>,
dragEndSpeed: <?php echo esc_js( $dragEndSpeed ); ?>,
onRefreshed: function() {
$(window).resize();
}<?php if( $sliding_speed ): ?>
,smartSpeed: <?php echo esc_js( $sliding_speed ); ?>,
dragEndSpeed: <?php echo esc_js( $sliding_speed ); ?>
<?php endif; ?>
<?php if( $animation ): ?>
,animateOut: ‘<?php echo esc_js( $animation ); ?>’
,mouseDrag: false
<?php endif; ?>
<?php if( $content_animation ): ?>
,onTranslated: determinePseudoActive
<?php endif; ?>
};
owl.owlCarousel(options);
<?php if( $content_animation ): ?>
determinePseudoActive();
function determinePseudoActive() {
var id = owl.find(‘.owl-item.active’).find(‘.woodmart-slide’).attr(‘id’);
owl.find(‘.owl-item.pseudo-active’).removeClass(‘pseudo-active’);
var els = owl.find(‘[id=”‘ + id + ‘”]’);
els.each(function() {
if( ! $(this).parent().hasClass(‘active’) ) {
$(this).parent().addClass(‘pseudo-active’);
}
});
}
<?php endif; ?>
});
</script>
<?php
return ob_get_clean();
};
if( $carousel_js_inline == ‘yes’ ) {
echo ‘<script type=”text/javascript”>’ . $func_name() . ‘</script>’;
} else {
wp_add_inline_script( ‘woodmart-theme’, $func_name(), ‘after’ );
}
}July 23, 2018 at 8:04 am #68799
SyncStudiosParticipantits working now thank you for your help.
July 23, 2018 at 8:34 am #68807
Elise NoromitMemberYou are welcome! If you have any questions please feel free to contact us.
Best Regards
-
AuthorPosts
The topic ‘Visual composer Products tab issue’ is closed to new replies.
- You must be logged in to create new topics. Login / Register