YePix Posted January 30, 2019 Posted January 30, 2019 Hi guys, Does anyone know how the display must be changed so that the products are displayed in the box only as the defined amount? Normally, different values are displayed for certain display sizes. at itemsDesktop 3 at itemsTablet 2 and itemsMobile 1 // local template script, loaded in footer $footer_scripts = '<script type="text/javascript"> $(document).ready(function() { var owl = $("#i-new-products"); owl.owlCarousel({ items : 3, // This variable allows you to set the maximum amount of items displayed at a time with the widest browser width itemsDesktop : [1199,3], // This allows you to preset the number of slides visible with a particular browser width. For example [1199,3] means that if(window<=1199){ show 3 slides per page} itemsTablet: [569,2], // As above itemsMobile : [479,1], // As above autoPlay: ' . (MODULE_CONTENT_INDEX_NEW_PRODUCTS_CAROUSEL_AUTOPLAY == 'True' ? (MODULE_CONTENT_INDEX_NEW_PRODUCTS_CAROUSEL_AUTOPLAY_SPEED > '0' ? MODULE_CONTENT_INDEX_NEW_PRODUCTS_CAROUSEL_AUTOPLAY_SPEED : 'true') : 'false') . ', // by default, when true, auto plays every 5 secs (5000), change true to false to NOT auto play or to another value ie 4000 to change auto play speed stopOnHover: true, // Stop autoplay on mouse hover scrollPerPage: true, // Scroll per page not per item. itemsScaleUp: true, // Option to stretch items when it is less than the supplied items. navigation: true, // Display "next" and "prev" buttons. rewindSpeed: 1500, // Rewind speed in milliseconds paginationSpeed: ' . (MODULE_CONTENT_INDEX_NEW_PRODUCTS_CAROUSEL_PAGE_SLIDE_SPEED > '0' ? MODULE_CONTENT_INDEX_NEW_PRODUCTS_CAROUSEL_PAGE_SLIDE_SPEED : '800') . ', // Page slide speed in milliseconds - default 800 slideSpeed: ' . (MODULE_CONTENT_INDEX_NEW_PRODUCTS_CAROUSEL_NAV_SLIDE_SPEED > '0' ? MODULE_CONTENT_INDEX_NEW_PRODUCTS_CAROUSEL_NAV_SLIDE_SPEED : '700') . ', // Slide speed (using nav buttons) in milliseconds - default 700 navigationText: [\'<span class="fa fa-angle-left pull-left"></span><span class="sr-only">' . MODULE_CONTENT_INDEX_NEW_PRODUCTS_CAROUSEL_CONTROL_SR_PREV . '</span>\', \'<span class="fa fa-angle-right pull-right"></span><span class="sr-only">' . MODULE_CONTENT_INDEX_NEW_PRODUCTS_CAROUSEL_CONTROL_SR_NEXT . '</span>\'] }); var box_height = $("#i-new-products .box-height"); var item_height = $("#i-new-products .item-height"); var img_height = $("#i-new-products .img-height"); var caption_height = $("#i-new-products .caption-height"); var price_height = $("#i-new-products .price-height"); var text_height = false; if ($("#i-new-products .text-height").is(":visible")) { text_height = $("#i-new-products .text-height"); } function new_equalHeight(group, resize) { var resize = resize || false; var maxHeight = 0; if (resize) { group.height(\'auto\'); // need this for window resize } group.each(function() { if ($(this).height() > maxHeight) { maxHeight = $(this).height(); } }); group.height(maxHeight); } var timer; $(window).resize(function() { clearTimeout(timer); timer = setTimeout(function() { new_equalHeight(img_height, true); new_equalHeight(caption_height, true); new_equalHeight(price_height, true); if (text_height != false) { new_equalHeight(text_height, true); } new_equalHeight(item_height, true); new_equalHeight(box_height, true); }, 200); }); new_equalHeight(img_height); new_equalHeight(caption_height); new_equalHeight(price_height); if (text_height != false) { new_equalHeight(text_height); } new_equalHeight(item_height); new_equalHeight(box_height); }); </script>' . PHP_EOL; $oscTemplate->addBlock($footer_scripts, 'footer_scripts'); I have rebuilt it a bit and would like to directly define the quantity display from the module but something does not work and the values are ignored. items : ' . MODULE_CONTENT_INDEX_NEW_PRODUCTS_CAROUSEL_NUMBER_OF_ITEMS . ', // This variable allows you to set the maximum amount of items displayed at a time with the widest browser width itemsDesktop : [1199,' . MODULE_CONTENT_INDEX_NEW_PRODUCTS_CAROUSEL_NUMBER_OF_ITEMS . '], // This allows you to preset the number of slides visible with a particular browser width. For example [1199,3] means that if(window<=1199){ show 3 slides per page} itemsTablet: [569,' . MODULE_CONTENT_INDEX_NEW_PRODUCTS_CAROUSEL_NUMBER_OF_ITEMS . '], // As above itemsMobile : [479,' . MODULE_CONTENT_INDEX_NEW_PRODUCTS_CAROUSEL_NUMBER_OF_ITEMS . '], // As above
♥JcMagpie Posted January 30, 2019 Posted January 30, 2019 You will get a better responce if you posted in the support thread for your add-on. Did the add-on work before your modification, ie 3 in pc 2 in tablet and 1 in mobile? Also when you run your changed add-on when you inspect the html output is the script showing the corect values you have entered or not?
YePix Posted January 31, 2019 Author Posted January 31, 2019 yes it still works with 3, 2, 1 although it is rebuilt
♥JcMagpie Posted January 31, 2019 Posted January 31, 2019 Then you have an error in your code, pm or post link to site so the script can be checked. I would imagin that MODULE_CONTENT_INDEX_NEW_PRODUCTS_CAROUSEL_NUMBER_OF_ITEMS is not outputing the number in the script.
♥JcMagpie Posted January 31, 2019 Posted January 31, 2019 😁 ok do you see the mistake you have made? you are using this for all the script veriables so you will set all views to the same number! MODULE_CONTENT_INDEX_NEW_PRODUCTS_CAROUSEL_NUMBER_OF_ITEMS
♥JcMagpie Posted January 31, 2019 Posted January 31, 2019 You need to change it to MODULE_CONTENT_INDEX_NEW_PRODUCTS_CAROUSEL_NUMBER_OF_ITEMS MODULE_CONTENT_INDEX_NEW_PRODUCTS_CAROUSEL_NUMBER_OF_ITEMSDESKTOP MODULE_CONTENT_INDEX_NEW_PRODUCTS_CAROUSEL_NUMBER_OF_ITEMSTABLET MODULE_CONTENT_INDEX_NEW_PRODUCTS_CAROUSEL_NUMBER_OF_ITEMSMOBILE Then you can define the view for each device.
YePix Posted February 1, 2019 Author Posted February 1, 2019 It's true, but I want the same value in all views 1
♥JcMagpie Posted February 1, 2019 Posted February 1, 2019 check you html output to see if script is been changed! If not you have a problem with the code. what do you see for this in html, owl.owlCarousel({ items : 3, // This variable allows you to set the maximum amount of items displayed at a time with the widest browser width itemsDesktop : [1199,3], // This allows you to preset the number of slides visible with a particular browser width. For example [1199,3] means that if(window<=1199){ show 3 slides per page} itemsTablet: [569,2], // As above itemsMobile : [479,1], // As above
YePix Posted February 4, 2019 Author Posted February 4, 2019 exactly as it stands there owl.owlCarousel({ items : 3, // This variable allows you to set the maximum amount of items displayed at a time with the widest browser width itemsDesktop : [1199,3], // This allows you to preset the number of slides visible with a particular browser width. For example [1199,3] means that if(window<=1199){ show 3 slides per page} itemsTablet: [569,2], // As above itemsMobile : [479,1], // As above but I need it that way owl.owlCarousel({ items : 1, // This variable allows you to set the maximum amount of items displayed at a time with the widest browser width itemsDesktop : [1199,1], // This allows you to preset the number of slides visible with a particular browser width. For example [1199,3] means that if(window<=1199){ show 3 slides per page} itemsTablet: [569,1], // As above itemsMobile : [479,1], // As above
♥JcMagpie Posted February 4, 2019 Posted February 4, 2019 so post the code you are using both bit's as on of them has a problem! Posting a link would solve this problem in seconds!
♥JcMagpie Posted February 4, 2019 Posted February 4, 2019 if you have edited your script like this, items : ' . MODULE_CONTENT_INDEX_NEW_PRODUCTS_CAROUSEL_NUMBER_OF_ITEMS . ', // This variable allows you to set the maximum amount of items displayed at a time with the widest browser width itemsDesktop : [1199,' . MODULE_CONTENT_INDEX_NEW_PRODUCTS_CAROUSEL_NUMBER_OF_ITEMS . '], // This allows you to preset the number of slides visible with a particular browser width. For example [1199,3] means that if(window<=1199){ show 3 slides per page} itemsTablet: [569,' . MODULE_CONTENT_INDEX_NEW_PRODUCTS_CAROUSEL_NUMBER_OF_ITEMS . '], // As above itemsMobile : [479,' . MODULE_CONTENT_INDEX_NEW_PRODUCTS_CAROUSEL_NUMBER_OF_ITEMS . '], // As above and you have entered 1 in admin for MODULE_CONTENT_INDEX_NEW_PRODUCTS_CAROUSEL_NUMBER_OF_ITEMS Then it is not posiable for the out put to be this owl.owlCarousel({ items : 3, // This variable allows you to set the maximum amount of items displayed at a time with the widest browser width itemsDesktop : [1199,3], // This allows you to preset the number of slides visible with a particular browser width. For example [1199,3] means that if(window<=1199){ show 3 slides per page} itemsTablet: [569,2], // As above itemsMobile : [479,1], // As above This will only happen if your edited script is not being used by the add-on.
YePix Posted February 6, 2019 Author Posted February 6, 2019 yes, that's how I did it. Thank you very much for your effort JcMagpie My shop is very changed in the code. I use the old bs edge version, half hard coded and half standard I do not want to confuse anyone with the scripts that I use because of that I do not post here too much in the forum. I absolutely need with this script the issue of 1 product all views and do not care how I should do it ******************************************* this is my code from the module: <?php /* $Id: new_products_carousel.php, v1.2.1 auzStar$ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2016 osCommerce Released under the GNU General Public License */ // template with panel border // carousel slide preperation $new_prods_content = NULL; $new_prods_content .= '<div id="i-new-products" class="owl-carousel owl-theme">'; $wrapper_slides = ''; while ($new_products = tep_db_fetch_array($new_products_query)) { $wrapper_slides .= ' <div class="item box-height" itemprop="itemListElement" itemscope="" itemtype="http://schema.org/Product">'; $wrapper_slides .= ' <div class="thumbnail item-height">'; $wrapper_slides .= ' <div class="img-height">'; // Ribbonimage if ( SHOW_RIBBON_NEW == 'true' ) { $image_ribbon_new = '<div class="ribbon_new yellow"><span>'. RIBBON_TEXT_NEW_PRODUCTS .'</span></div>'; } if (PRODUCT_LIST_IMAGE > 0) { $wrapper_slides .= ' <br><a href="' . tep_href_link('product_info.php', 'products_id=' . $new_products['products_id']) . '">' . tep_image('images/' . $new_products['products_image'], $new_products['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'itemprop="image"') . '</a><p>'; } $wrapper_slides .= ' </div>'; $wrapper_slides .= ' <div class="caption">'; $wrapper_slides .= ' <br><p class="text-center caption-height"><a itemprop="url" href="' . tep_href_link('product_info.php', 'products_id=' . $new_products['products_id']) . '"><span itemprop="name">' . $new_products['products_name'] . $image_ribbon_new . '</span></a></p>'; // PLS Taxinfo, Shippinginfo, Baseprice start $pls_taxinfo = ( DISPLAY_TAX_INFO == 'true' ) ? ( DISPLAY_PRICE_WITH_TAX == 'true' ) ? '<br /><span class="pls_taxInfomodules">'. sprintf(TEXT_INCL_VAT, tep_get_tax_rate($new_products['products_tax_class_id']).'%') . '</span>' : '<br /><span class="pls_taxInfomodules">' . TEXT_EXCL_VAT . '</span>' : ''; $pls_shipping_info = ( SHOW_SHIPPING_COST == 'true' ) ? '<br><span class="pls_Shippingtext" align="center">' . MODULE_STORE_SHIPPING_TITLE . '</span>' : ''; $pls_baseprice_query = "SELECT products_baseprice FROM " . TABLE_PRODUCTS . " WHERE products_status = '1' AND products_id = '" . $new_products['products_id'] . "'"; if ($new_products['products_baseprice'] > ' ') { $pls_baseprice = ' <br><span class="pls_basePrice">' . $new_products['products_baseprice'] . '</span>'; } // PLS Taxinfo, Shippinginfo, Baseprice ende // Show the products description if enabled in Admin if ( $show_description ) { $wrapper_slides .= ' <p class="text-height">'; if ( strlen($new_products['products_description']) > MODULE_CONTENT_INDEX_NEW_PRODUCTS_CAROUSEL_DESCRIPTION_LENGTH ) { $description_text = tep_i_new_products_carousel_limit_text( $new_products['products_description'], MODULE_CONTENT_INDEX_NEW_PRODUCTS_CAROUSEL_DESCRIPTION_LENGTH, MODULE_CONTENT_INDEX_NEW_PRODUCTS_CAROUSEL_WORD_LENGTH ); $wrapper_slides .= ' <span itemprop="description">' . $description_text . '</span> <a href="' . tep_href_link ('product_info.php', 'products_id=' . $new_products['products_id']) . '" style="white-space: nowrap;">' . MODULE_CONTENT_INDEX_NEW_PRODUCTS_CAROUSEL_DESCRIPTION_SHOW_MORE . '</a>'; } else { $wrapper_slides .= ' <span itemprop="description">' . $new_products['products_description'] . '</span>'; } $wrapper_slides .= ' </p>'; } $wrapper_slides .= ' <img src="../images/bestsellerpixel.gif" alt="" height="1" width="100%" border="0" />'; $wrapper_slides .= ' <div class="price-height">'; $wrapper_slides .= ' <p class="text-center" itemprop="offers" itemscope itemtype="http://schema.org/Offer"><meta itemprop="priceCurrency" content="' . tep_output_string($currency) . '" />'; if (tep_not_null($new_products['specials_new_products_price'])) { // eresparnis start if ( SHOW_SAVING_TEXT == 'true' ) { $priceold = $currencies->display_raw($new_products['products_price'], tep_get_tax_rate($new_products['products_tax_class_id'])); $pricenew = $currencies->display_raw($new_products['specials_new_products_price'], tep_get_tax_rate($new_products['products_tax_class_id'])); $difference = $currencies->display_price($new_products['products_price'] - $pricenew, tep_get_tax_rate($new_products['products_tax_class_id'])); $savings = (($pricenew - $priceold) / $priceold) * 100; $pls_saving_info = '<br><span class="pls_pricesavingstext">' . TEXT_PRICE_SAVINGS . '</span></span><span class="pls_pricesavings"> '. $difference .' (' . round($savings, TAX_DECIMAL_PLACES) . '%)</span>'; } // eresparnis ende // Show the products old price if enabled in Admin if ($show_old_price) { $wrapper_slides .= ' <del>' . $currencies->display_price($new_products['products_price'], tep_get_tax_rate($new_products['products_tax_class_id'])) . '</del><br />'; } $wrapper_slides .= ' <span class="productSpecialPrice" itemprop="price" content="' . $currencies->display_raw($new_products['products_price'], tep_get_tax_rate($new_products['products_tax_class_id'])) . '">' . $currencies->display_price($new_products['specials_new_products_price'], tep_get_tax_rate($new_products['products_tax_class_id'])) . $pls_baseprice . $pls_taxinfo . $pls_saving_info . $pls_shipping_info .'</span>'; } else { if ($new_products['products_price']> '0'){ $wrapper_slides .= ' <span itemprop="price" content="' . $currencies->display_raw($new_products['products_price'], tep_get_tax_rate($new_products['products_tax_class_id'])) . '">' . $currencies->display_price($new_products['products_price'], tep_get_tax_rate($new_products['products_tax_class_id'])) . $pls_baseprice . $pls_taxinfo . $pls_shipping_info .'</span>'; } else { $wrapper_slides .= TEXT_RETURN_CALL_FOR_PRICE; } } $wrapper_slides .= ' </p>'; $wrapper_slides .= ' </div>'; $wrapper_slides .= ' <div class="text-center">'; $wrapper_slides .= ' <div class="btn-group">'; if (SHOW_BUTTON_ASK_AND_BUY == 'true') { if ($new_products['products_quantity'] > '0') { if (ATTRIBUTE_CHECK_FREE == 'true') { if (tep_has_product_attributes($new_products['products_id'])) { $wrapper_slides .= '<img src="../images/bestsellerpixel.gif" alt="" height="1" width="100%" border="0" />'; $wrapper_slides .= '<a href="' . tep_href_link('product_info.php', tep_get_all_get_params(array('action')) . 'products_id=' . $new_products['products_id']) . '" class="btn btn-success btn-block btn-pls" role="button">' .'<i class="fa fa-pie-chart"></i> '. IMAGE_BUTTON_SELECT_ATTRIBUTE . '</a>'; }else{ $wrapper_slides .= '<img src="../images/bestsellerpixel.gif" alt="" height="1" width="100%" border="0" /><a href="' . tep_href_link('product_info.php', tep_get_all_get_params(array('action')) . 'products_id=' . $new_products['products_id']) . '" class="btn btn-default" role="button">' .'<i class="fa fa-eye"></i> '. MODULE_CONTENT_INDEX_NEW_PRODUCTS_CAROUSEL_BUTTON_VIEW . '</a>'; if (SHOW_BUTTON_BUY_NOW == 'true') { if ($new_products['products_price']> '0') $wrapper_slides .= '<a href="' . tep_href_link($PHP_SELF, tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $new_products['products_id']) . '" class="btn btn-success" role="button">' .'<i class="fa fa-shopping-cart"></i> '. MODULE_CONTENT_INDEX_NEW_PRODUCTS_CAROUSEL_BUTTON_BUY . '</a>'; }} }else{ $wrapper_slides .= '<img src="../images/bestsellerpixel.gif" alt="" height="1" width="100%" border="0" /><div class="buttonSet"><a href="' . tep_href_link('product_info.php', tep_get_all_get_params(array('action')) . 'products_id=' . $new_products['products_id']) . '" class="btn btn-success" role="button">' .'<i class="fa fa-eye"></i> '. MODULE_CONTENT_INDEX_NEW_PRODUCTS_CAROUSEL_BUTTON_VIEW_DETAIL . '</a></div>'; } }else{ if (tep_session_is_registered('customer_id') || (ALLOW_ASK_A_QUESTION == 'true')) { $wrapper_slides .= '<img src="../images/bestsellerpixel.gif" alt="" height="1" width="100%" align="middle" border="0" /><a href="' . tep_href_link('product_info.php', tep_get_all_get_params(array('action')) . 'products_id=' . $new_products['products_id']) . '" class="btn btn-default" role="button">' .'<i class="fa fa-eye"></i> '. MODULE_CONTENT_INDEX_NEW_PRODUCTS_CAROUSEL_BUTTON_VIEW . '</a>'; $wrapper_slides .= '<a href="' . tep_href_link('ask_a_question.php', 'products_id=' . $new_products['products_id']) . '" class="btn btn-reviews" role="button">' .'<i class="fa fa-question"></i> '. TEXT_ASK . '</a>'; }else{ $wrapper_slides .= '<img src="../images/bestsellerpixel.gif" alt="" height="1" width="100%" border="0" />' . tep_draw_button(XSELL_SMALL_IMAGE_BUTTON_VIEW_DETAIL, 'fa fa-question', tep_href_link('product_info.php', tep_get_all_get_params(array('action')) . 'products_id=' . $new_products['products_id']), null, null, 'btn-default btn-block btn-pls') . ''; } }}else{ if (ATTRIBUTE_CHECK_FREE == 'true') { if (tep_has_product_attributes($new_products['products_id'])) { $wrapper_slides .= '<img src="../images/bestsellerpixel.gif" alt="" height="1" width="100%" border="0" />'; $wrapper_slides .= '<a href="' . tep_href_link('product_info.php', tep_get_all_get_params(array('action')) . 'products_id=' . $new_products['products_id']) . '" class="btn btn-success btn-block btn-pls" role="button">' .'<i class="fa fa-pie-chart"></i> '. IMAGE_BUTTON_SELECT_ATTRIBUTE . '</a>'; }else{ $wrapper_slides .= '<img src="../images/bestsellerpixel.gif" alt="" height="1" width="100%" border="0" /><a href="' . tep_href_link('product_info.php', tep_get_all_get_params(array('action')) . 'products_id=' . $new_products['products_id']) . '" class="btn btn-default" role="button">' .'<i class="fa fa-eye"></i> '. MODULE_CONTENT_INDEX_NEW_PRODUCTS_CAROUSEL_BUTTON_VIEW . '</a>'; if (SHOW_BUTTON_BUY_NOW == 'true') { if ($new_products['products_price']> '0') $wrapper_slides .= '<a href="' . tep_href_link($PHP_SELF, tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $new_products['products_id']) . '" class="btn btn-success" role="button">' .'<i class="fa fa-shopping-cart"></i> '. MODULE_CONTENT_INDEX_NEW_PRODUCTS_CAROUSEL_BUTTON_BUY . '</a>'; }} }else{ $wrapper_slides .= '<img src="../images/bestsellerpixel.gif" alt="" height="1" width="100%" border="0" /><div class="buttonSet"><a href="' . tep_href_link('product_info.php', tep_get_all_get_params(array('action')) . 'products_id=' . $new_products['products_id']) . '" class="btn btn-success" role="button">' .'<i class="fa fa-eye"></i> '. MODULE_CONTENT_INDEX_NEW_PRODUCTS_CAROUSEL_BUTTON_VIEW_DETAIL . '</a></div>'; } } $wrapper_slides .= ' </div>'; $wrapper_slides .= ' </div>'; $wrapper_slides .= ' </div>'; $wrapper_slides .= ' </div>'; $wrapper_slides .= ' </div>'; } $new_prods_content .= $wrapper_slides; $new_prods_content .= '</div>'; ?> <!-- local template css --> <style type="text/css"> #i-new-products { padding: 0 10px 0 10px; } #i-new-products .item { margin: 15px 10px 15px 10px; } #i-new-products .thumbnail:hover { border: 1px solid #D20001; background: #FFFFEA; } #i-new-products .owl-pagination { margin-top: -15px; } #i-new-products .img-height { padding-top: 5px; } #i-new-products .owl-prev, #i-new-products .owl-next { position: absolute; top: 50%; margin-top: -40px; font-size: 50px; height: 60px; } #i-new-products .owl-prev { left: -2px; padding-left: 18px; } #i-new-products .owl-next { right: -2px; padding-right: 18px; } </style> <!-- carousel slide output --> <div id="i_new_products_carousel" class="pls_caruselboxmargin col-sm-<?php echo $content_width; ?> new-products"> <div class="pls_boxpanel pls_boxpanel-default" itemscope itemtype="http://schema.org/ItemList"> <?php if (MODULE_CONTENT_INDEX_NEW_PRODUCTS_CAROUSEL_HEADING_ON == 'True') {?> <div class="pls_boxpanel-heading"> <h3><i class="fa fa-hand-o-right"></i> <?php echo MODULE_CONTENT_INDEX_NEW_PRODUCTS_CAROUSEL_HEADING . ' ' . tep_draw_button(MODULE_CONTENT_INDEX_NEW_PRODUCTS_CAROUSEL_HEADING_SHOW_MORE, '', tep_href_link('products_new.php'), 'primary', null, 'btn-default btn-sm'); ?></h3><img src="../images/bestsellerpixel.gif" alt="" height="1" width="100%" align="middle" border="0" /> <!-- <h3><i class="fa fa-hand-o-right"></i> <?php echo sprintf(MODULE_CONTENT_INDEX_NEW_PRODUCTS_CAROUSEL_HEADING, strftime('%B')) . ' ' . tep_draw_button(MODULE_CONTENT_INDEX_NEW_PRODUCTS_CAROUSEL_HEADING_SHOW_MORE, '', tep_href_link('products_new.php'), 'primary', null, 'btn-default btn-sm'); ?></h3><img src="../images/bestsellerpixel.gif" alt="" height="1" width="100%" align="middle" border="0" /> --> </div> <?php }?> <div class="panel-body" style="padding-bottom: 0px; padding-top: 0px;"> <div class="row" itemtype="http://schema.org/ItemList"> <meta itemprop="numberOfItems" content="<?php echo (int)$num_new_products; ?>" /> <div class="col-sm-<?php echo $product_width; ?>" itemprop="itemListElement" itemscope="" itemtype="http://schema.org/Product"> <?php echo $new_prods_content; ?> </div> </div> </div> </div> </div> <?php // local template script, loaded in footer $footer_scripts = '<script type="text/javascript"> $(document).ready(function() { var owl = $("#i-new-products"); owl.owlCarousel({ items : ' . MODULE_CONTENT_INDEX_NEW_PRODUCTS_CAROUSEL_NUMBER_OF_ITEMS . ', // This variable allows you to set the maximum amount of items displayed at a time with the widest browser width itemsDesktop : [1199,' . MODULE_CONTENT_INDEX_NEW_PRODUCTS_CAROUSEL_NUMBER_OF_ITEMS . '], // This allows you to preset the number of slides visible with a particular browser width. For example [1199,3] means that if(window<=1199){ show 3 slides per page} itemsTablet: [569,' . MODULE_CONTENT_INDEX_NEW_PRODUCTS_CAROUSEL_NUMBER_OF_ITEMS . '], // As above itemsMobile : [479,' . MODULE_CONTENT_INDEX_NEW_PRODUCTS_CAROUSEL_NUMBER_OF_ITEMS . '], // As above autoPlay: ' . (MODULE_CONTENT_INDEX_NEW_PRODUCTS_CAROUSEL_AUTOPLAY == 'True' ? (MODULE_CONTENT_INDEX_NEW_PRODUCTS_CAROUSEL_AUTOPLAY_SPEED > '0' ? MODULE_CONTENT_INDEX_NEW_PRODUCTS_CAROUSEL_AUTOPLAY_SPEED : 'true') : 'false') . ', // by default, when true, auto plays every 5 secs (5000), change true to false to NOT auto play or to another value ie 4000 to change auto play speed stopOnHover: true, // Stop autoplay on mouse hover scrollPerPage: true, // Scroll per page not per item. itemsScaleUp: true, // Option to stretch items when it is less than the supplied items. navigation: true, // Display "next" and "prev" buttons. rewindSpeed: 1500, // Rewind speed in milliseconds paginationSpeed: ' . (MODULE_CONTENT_INDEX_NEW_PRODUCTS_CAROUSEL_PAGE_SLIDE_SPEED > '0' ? MODULE_CONTENT_INDEX_NEW_PRODUCTS_CAROUSEL_PAGE_SLIDE_SPEED : '800') . ', // Page slide speed in milliseconds - default 800 slideSpeed: ' . (MODULE_CONTENT_INDEX_NEW_PRODUCTS_CAROUSEL_NAV_SLIDE_SPEED > '0' ? MODULE_CONTENT_INDEX_NEW_PRODUCTS_CAROUSEL_NAV_SLIDE_SPEED : '700') . ', // Slide speed (using nav buttons) in milliseconds - default 700 navigationText: [\'<span class="fa fa-angle-left pull-left"></span><span class="sr-only">' . MODULE_CONTENT_INDEX_NEW_PRODUCTS_CAROUSEL_CONTROL_SR_PREV . '</span>\', \'<span class="fa fa-angle-right pull-right"></span><span class="sr-only">' . MODULE_CONTENT_INDEX_NEW_PRODUCTS_CAROUSEL_CONTROL_SR_NEXT . '</span>\'] }); var box_height = $("#i-new-products .box-height"); var item_height = $("#i-new-products .item-height"); var img_height = $("#i-new-products .img-height"); var caption_height = $("#i-new-products .caption-height"); var price_height = $("#i-new-products .price-height"); var text_height = false; if ($("#i-new-products .text-height").is(":visible")) { text_height = $("#i-new-products .text-height"); } function new_equalHeight(group, resize) { var resize = resize || false; var maxHeight = 0; if (resize) { group.height(\'auto\'); // need this for window resize } group.each(function() { if ($(this).height() > maxHeight) { maxHeight = $(this).height(); } }); group.height(maxHeight); } var timer; $(window).resize(function() { clearTimeout(timer); timer = setTimeout(function() { new_equalHeight(img_height, true); new_equalHeight(caption_height, true); new_equalHeight(price_height, true); if (text_height != false) { new_equalHeight(text_height, true); } new_equalHeight(item_height, true); new_equalHeight(box_height, true); }, 200); }); new_equalHeight(img_height); new_equalHeight(caption_height); new_equalHeight(price_height); if (text_height != false) { new_equalHeight(text_height); } new_equalHeight(item_height); new_equalHeight(box_height); }); </script>' . PHP_EOL; $oscTemplate->addBlock($footer_scripts, 'footer_scripts'); ?>
♥JcMagpie Posted February 7, 2019 Posted February 7, 2019 On 2/6/2019 at 12:12 AM, YePix said: I do not want to confuse anyone with the scripts that I use because of that I do not post here too much in the forum. That is not the script in question! This is the script using the MODULE_CONTENT_INDEX_NEW_PRODUCTS_CAROUSEL_NUMBER_OF_ITEMS Post the code in which you declare this. Also you did not answer the other point. If this is the script that is running then it is not posiable for you to get html output you are showing! you must have another scrip running. MODULE_CONTENT_INDEX_NEW_PRODUCTS_CAROUSEL_NUMBER_OF_ITEMS
Recommended Posts
Archived
This topic is now archived and is closed to further replies.