Jump to content
Latest News: (loading..)

YePix

Members
  • Content count

    128
  • Joined

  • Last visited

Everything posted by YePix

  1. Hi, könnte hier jemand mal nachsehen was da falsch läuft ? Die Angabe Lieferzeiten funzt nur für Deutschland also bei 81 mit 3 bis 7 Tage Kunden aus dem Ausland bekommen die gleiche Angabe 3 bis 7 Tage anstelle von 5 bis 10 Tage general.php // Lieferzeiten start function get_lieferzeitraum($yp_ausland) { // Die Routine geht von 3 Tagen für Lieferdatum_von und 5 Tagen Lieferdatum bis aus. Sollten andere Werte benötigt werden, // // dann die Konstanten c__von und c__bis ändern // Konstanten Inland $c__von_i = 3; // Lieferdatum von in Tagen // $c__bis_i = 7; // Lieferdatum bis in Tagen // $c__heimatland = 81 ; // 81 = Deutschland // wie bereits erwähnt, findet man die Zahlu in der Datenbank // Konstanten Ausland $c__von_a = 5; // Lieferdatum von in Tagen // $c__bis_a = 10; // Lieferdatum bis in Tagen // if ($yp_ausland == $c__heimatland) { // es ist Deutschland // $c__von = $c__von_i; $c__bis = $c__bis_i; } else { $c__von = $c__von_a; $c__bis = $c__bis_a; } $y_von_day = $c__von . ' day'; $lieferdatum_von = strtotime(" . $y_von_day . "); $wochentag_von = strftime("%u",$lieferdatum_von); $y_dazu = 0; if ($wochentag_von == 0) { // es ist ein Sonntag => +1 Tag dazu // $y_dazu = 1; } elseif ($wochentag_von == 6) { // es ist ein Samstag => +2 Tage dazu // $y_dazu = 2; } $y_von_neu = $c__von + $y_dazu; $y_von_neu_day = $y_von_neu . ' day'; $lieferdatum_von = strtotime(" . $y_von_neu_day . "); // Wenn das "Lieferdatum von" schon ein Wochenende war, dann die Anzahl der zu verschiebenen Tage auf das "Lieferdatum bis" hinzuaddieren // $y_bis_start = $c__bis + $y_dazu; $y_bis_day = $y_bis_start . ' day'; $lieferdatum_bis = strtotime(" . $y_bis_day . "); // Überprüfen, ob das "Lieferdatum bis" auf ein Wochenende fällt // $wochentag_bis = strftime("%u",$lieferdatum_bis); $y_dazu=0; if ($wochentag_bis == 0) { // es ist ein Sonntag => +1 Tag dazu // $y_dazu = 1; } elseif ($wochentag_bis == 6) { // es ist ein Samstag => +2 Tage dazu // $y_dazu = 2; } $y_bis_neu = $y_bis_start + $y_dazu; $y_bis_neu_day = $y_bis_neu . ' day'; $lieferdatum_bis = strtotime(" . $y_bis_neu_day . "); $lieferdatum_von = date('d.m.',$lieferdatum_von); $lieferdatum_bis = date('d.m.',$lieferdatum_bis) ; return array($lieferdatum_von, $lieferdatum_bis) ; } // Lieferzeiten ende product_info.php <?php $c__heimatland = 81; // 81 = Deutschland // mit der Zahl kann man sein Heimatland angeben. Das findet mach am Besten in der Datenbank list($lieferdatum_von,$lieferdatum_bis) = get_lieferzeitraum($c__heimatland); $pls_shippingtime = '<span class="pls_basePrice">' . TEXT_LIEFERUNG_PI . $lieferdatum_von . "-" . $lieferdatum_bis . '</span>'; ?>
  2. YePix

    new products carousel

    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
  3. YePix

    new products carousel

    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>&nbsp;'. 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>&nbsp;'. 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>&nbsp;'. 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>&nbsp;'. 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>&nbsp;'. 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>&nbsp;'. 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>&nbsp;'. 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>&nbsp;'. 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>&nbsp;'. 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>&nbsp;'. 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>&nbsp;&nbsp;<?php echo MODULE_CONTENT_INDEX_NEW_PRODUCTS_CAROUSEL_HEADING . '&nbsp;&nbsp;' . 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>&nbsp;&nbsp;<?php echo sprintf(MODULE_CONTENT_INDEX_NEW_PRODUCTS_CAROUSEL_HEADING, strftime('%B')) . '&nbsp;&nbsp;' . 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'); ?>
  4. YePix

    new products carousel

    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
  5. YePix

    new products carousel

    It's true, but I want the same value in all views 1
  6. YePix

    new products carousel

    yes it still works with 3, 2, 1 although it is rebuilt
  7. in der Tabelle PRODUCTS siehst du die products_id und diese muss der Tabelle PRODUCTS_TO_CATEGORIES entsprechen.
  8. wenn du dein backup hast, musst du nur die Verbindung von Produkten zu den entsprechenden Kategorien überprüfen. Vergleiche die Tabellenstruktur ob eventuel etwas anders aufgebaut ist.
  9. Wenn ich mir das Bild so ansehe muss ich feststellen, dass du der nächster bist der erst macht, dann heult und dann handelt. osCommerce ist nicht für den sofortigen Einsatz nach der Installation geeignet !!!!!! Bevor Ihr on-Line geht macht euch ein genaueres Bild davon was alles vom Gesetz vorgeschrieben ist um ein Shop betreiben zu dürfen.
  10. hast du ei Beckup der alten DB gemacht ?
  11. YePix

    countries query

    why complicated when it just works. Thank you
  12. YePix

    countries query

    Hi guys, I really need to read the country from the database. Can someone help me with the query? $countries_query = tep_db_query("select ab.address_book_id as address_book_id, ab.customers_id as customers_id, ab.entry_country_id as entry_country_id, c.countries_id as countries_id, c.countries_name as countries_name from " . TABLE_ADDRESS_BOOK . " ab, " . TABLE_COUNTRIES . " c where countries_id and customers_id = '" . (int)$customer_id . "'"); $countries = tep_db_fetch_array($countries_query);
  13. Hi folks, I have installed the PhpMailer and everything so far ok and without errors. The problem is only the mails are shown as sent but do not arrive. Does anyone have a suggestion for me?
  14. YePix

    SMTP Authentication and OSCommerce

    For those who want or need to send their emails with smtp through authentication. Email not suitable for gmail accounts !!! **************************************************** Step 1. BACKUP ALL FILES BEFORE CHANGE !!! **************************************************** Step 2. Download: www.pl-systeme.de/free_download/PHPMailer.zip transferred to: catalog/ext/modules/PHPMailer **************************************************** Step 3. change class files: catalog/includes/classes.php <?php /* $Id$ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2014 osCommerce */ require_once 'ext/modules/PHPMailer/class.phpmailer.php'; $phpMail = new PHPMailer(); class email { var $html; var $text; var $html_text; var $lf; var $debug = 0; var $debug_output = 'error_log'; function email($headers = '') { global $phpMail; $phpMail->XMailer = 'osCommerce ' . tep_get_version(); $phpMail->SMTPDebug = $this->debug; $phpMail->Debugoutput = $this->debug_output; $phpMail->CharSet = CHARSET; $phpMail->WordWrap = 998; if (EMAIL_LINEFEED == 'CRLF') { $this->lf = "\r\n"; } else { $this->lf = "\n"; } } function add_text($text = '') { global $phpMail; $phpMail->IsHTML(false); $this->text = tep_convert_linefeeds(array("\r\n", "\n", "\r"), $this->lf, $text); } function add_html($html, $text = NULL, $images_dir = NULL) { global $phpMail; $phpMail->IsHTML(true); $this->html = tep_convert_linefeeds(array("\r\n", "\n", "\r"), '<br />', $html); $this->html_text = tep_convert_linefeeds(array("\r\n", "\n", "\r"), $this->lf, $text); if (isset($images_dir)) $this->html = $phpMail->msgHTML($this->html, $images_dir); } function add_attachment($path, $name = '', $encoding = 'base64', $type = '', $disposition = 'attachment') { global $phpMail; $phpMail->AddAttachment($path, $name, $encoding, $type, $disposition); } function build_message() { //out of work function } function send($to_name, $to_addr, $from_name, $from_addr, $subject = '', $reply_to = false) { global $phpMail; if ((strstr($to_name, "\n") != false) || (strstr($to_name, "\r") != false)) { return false; } if ((strstr($to_addr, "\n") != false) || (strstr($to_addr, "\r") != false)) { return false; } if ((strstr($subject, "\n") != false) || (strstr($subject, "\r") != false)) { return false; } if ((strstr($from_name, "\n") != false) || (strstr($from_name, "\r") != false)) { return false; } if ((strstr($from_addr, "\n") != false) || (strstr($from_addr, "\r") != false)) { return false; } $phpMail->From = $from_addr; $phpMail->FromName = $from_name; $phpMail->AddAddress($to_addr, $to_name); if ($reply_to) { $phpMail->AddReplyTo(EMAIL_SMTP_REPLYTO, STORE_NAME); } else { $phpMail->AddReplyTo($from_addr, $from_name); } $phpMail->Subject = $subject; if (!empty($this->html)) { $phpMail->Body = $this->html; $phpMail->AltBody = $this->html_text; } else { $phpMail->Body = $this->text; } if (EMAIL_TRANSPORT == 'smtp' || EMAIL_TRANSPORT == 'gmail') { $phpMail->IsSMTP(); $phpMail->Host = EMAIL_SMTP_HOSTS; $phpMail->SMTPAuth = EMAIL_SMTP_AUTHENTICATION; $phpMail->Username = EMAIL_SMTP_USER; $phpMail->Password = EMAIL_SMTP_PASSWORD; if (EMAIL_TRANSPORT == 'gmail') { $phpMail->Port = 465; $phpMail->SMTPSecure = 'ssl'; } } else { $phpMail->isSendmail(); } if (!$phpMail->Send()) { return false; } return true; } } /* ** Altered for Mail Manager ** */ // eliminate line feeds as <br> class emailMailManager extends email { function add_html($html, $text = NULL, $images_dir = NULL) { $this->html = $html; //tep_convert_linefeeds(array("\r\n", "\n", "\r"), '<br>', $html); $this->html_text = tep_convert_linefeeds(array("\r\n", "\n", "\r"), $this->lf, $text); if (isset($images_dir)) $this->find_html_images($images_dir); } } /* ** EOF alterations for Mail Manager ** */ ?> catalog/admin/includes/classes.php <?php /* $Id$ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2014 osCommerce Released under the GNU General Public License */ require_once '../ext/modules/PHPMailer/class.phpmailer.php'; $phpMail = new PHPMailer(); class email { var $html; var $text; var $html_text; var $lf; var $debug = 0; var $debug_output = 'error_log'; function email($headers = '') { global $phpMail; $phpMail->XMailer = 'osCommerce ' . tep_get_version(); $phpMail->SMTPDebug = $this->debug; $phpMail->Debugoutput = $this->debug_output; $phpMail->CharSet = CHARSET; $phpMail->WordWrap = 998; if (EMAIL_LINEFEED == 'CRLF') { $this->lf = "\r\n"; } else { $this->lf = "\n"; } } function add_text($text = '') { global $phpMail; $phpMail->IsHTML(false); $this->text = tep_convert_linefeeds(array("\r\n", "\n", "\r"), $this->lf, $text); } function add_html($html, $text = NULL, $images_dir = NULL) { global $phpMail; $phpMail->IsHTML(true); $this->html = tep_convert_linefeeds(array("\r\n", "\n", "\r"), '<br />', $html); $this->html_text = tep_convert_linefeeds(array("\r\n", "\n", "\r"), $this->lf, $text); if (isset($images_dir)) $this->html = $phpMail->msgHTML($this->html, $images_dir); } function add_attachment($path, $name = '', $encoding = 'base64', $type = '', $disposition = 'attachment') { global $phpMail; $phpMail->AddAttachment($path, $name, $encoding, $type, $disposition); } function build_message() { //out of work function } function send($to_name, $to_addr, $from_name, $from_addr, $subject = '', $reply_to = false) { global $phpMail; if ((strstr($to_name, "\n") != false) || (strstr($to_name, "\r") != false)) { return false; } if ((strstr($to_addr, "\n") != false) || (strstr($to_addr, "\r") != false)) { return false; } if ((strstr($subject, "\n") != false) || (strstr($subject, "\r") != false)) { return false; } if ((strstr($from_name, "\n") != false) || (strstr($from_name, "\r") != false)) { return false; } if ((strstr($from_addr, "\n") != false) || (strstr($from_addr, "\r") != false)) { return false; } $phpMail->From = $from_addr; $phpMail->FromName = $from_name; $phpMail->AddAddress($to_addr, $to_name); if ($reply_to) { $phpMail->AddReplyTo(EMAIL_SMTP_REPLYTO, STORE_NAME); } else { $phpMail->AddReplyTo($from_addr, $from_name); } $phpMail->Subject = $subject; if (!empty($this->html)) { $phpMail->Body = $this->html; $phpMail->AltBody = $this->html_text; } else { $phpMail->Body = $this->text; } if (EMAIL_TRANSPORT == 'smtp' || EMAIL_TRANSPORT == 'gmail') { $phpMail->IsSMTP(); $phpMail->Host = EMAIL_SMTP_HOSTS; $phpMail->SMTPAuth = EMAIL_SMTP_AUTHENTICATION; $phpMail->Username = EMAIL_SMTP_USER; $phpMail->Password = EMAIL_SMTP_PASSWORD; if (EMAIL_TRANSPORT == 'gmail') { $phpMail->Port = 465; $phpMail->SMTPSecure = 'ssl'; } } else { $phpMail->isSendmail(); } if (!$phpMail->Send()) { return false; } return true; } } /* ** Altered for Mail Manager ** */ // eliminate line feeds as <br> class emailMailManager extends email { function add_html($html, $text = NULL, $images_dir = NULL) { $this->html = $html; //tep_convert_linefeeds(array("\r\n", "\n", "\r"), '<br>', $html); $this->html_text = tep_convert_linefeeds(array("\r\n", "\n", "\r"), $this->lf, $text); if (isset($images_dir)) $this->find_html_images($images_dir); } } /* ** EOF alterations for Mail Manager ** */ ?> **************************************************** Step 4. catalog/admin/functions/general.php find: //// // Sets the status of a product function tep_set_product_status($products_id, $status) { if ($status == '1') { return tep_db_query("update " . TABLE_PRODUCTS . " set products_status = '1', products_last_modified = now() where products_id = '" . (int)$products_id . "'"); } elseif ($status == '0') { return tep_db_query("update " . TABLE_PRODUCTS . " set products_status = '0', products_last_modified = now() where products_id = '" . (int)$products_id . "'"); } else { return -1; } } add below: //// // Sets the password function for db function tep_cfg_password($password) { return preg_replace("|.|", "*", $password); } function tep_cfg_input_password($password) { return tep_draw_password_field('configuration_value', $password); } **************************************************** Step 5. Import sql: INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('SMTP hosts', 'EMAIL_SMTP_HOSTS', '', 'Assign SMTP host senders', '12', '6', now()); INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES ('SMTP authentication', 'EMAIL_SMTP_AUTHENTICATION', 'true', 'Do you want authenticated SMTP server?', '12', '7', 'tep_cfg_select_option(array(\'true\', \'false\'), ', now()); INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) VALUES ('SMTP Password', 'EMAIL_SMTP_PASSWORD', '', 'Add SMTP Password for SMTP protocol', '12', '8', 'tep_cfg_password', 'tep_cfg_input_password(', now()); INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('SMTP User', 'EMAIL_SMTP_USER', '', 'Add SMTP user for SMTP protocol', '12', '9', now()); INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('SMTP Reply To', 'EMAIL_SMTP_REPLYTO', '', 'Add SMTP reply to address', '12', '10', now()); **************************************************** Step 6. go to: http://www.yourDomain.com/admin/configuration.php?gID=12 change the new SMTP email settings and set the email transport method to smtp **************************************************** Step 7. finished.
  15. YePix

    SMTP Authentication and OSCommerce

    So first thanks to @raiwa and @Tsimi. With a few suggestions you helped me a lot. Special thanks to @tgely for his challenging work! The instructions for bootstrap with all changes and source code I will put in soon for other users. The email-class has to be changed, the general.php in the admin has to be provided with a function and the corresponding php-mailer comes as a download.
  16. YePix

    SMTP Authentication and OSCommerce

    I do not know what it should bring but even if the mails were classified as spam, they would arrive. I tested it with gmail and outlook. Emails do not arrive. but still thank you. could someone help me?
  17. YePix

    countries query

    Thanks guys, I solved it. $countries_query = tep_db_query("select ab.customers_id as customers_id, ab.entry_country_id as entry_country_id, c.countries_id as countries_id, c.countries_name as countries_name from " . TABLE_ADDRESS_BOOK . " ab, " . TABLE_COUNTRIES . " c where customers_id = '" . (int)$customer_id . "' and entry_country_id = countries_id"); $countries = tep_db_fetch_array($countries_query);
  18. Im Adminmenü findest du es auch nicht. Es muss direkt in der Datei create_account.php bearbeitet werden.
  19. das ist der code für newsletter: <tr> <td class="fieldKey"><?php echo ENTRY_NEWSLETTER; ?></td> <td class="fieldValue"><?php echo tep_draw_checkbox_field('newsletter', '1') . '&nbsp;' . (tep_not_null(ENTRY_NEWSLETTER_TEXT) ? '<span class="inputRequirement">' . ENTRY_NEWSLETTER_TEXT . '</span>': ''); ?></td> </tr>
  20. das ist der Abschnitt der für das Feld Telefonnummer zuständig ist: if (strlen($telephone) < ENTRY_TELEPHONE_MIN_LENGTH) { $error = true; $messageStack->add('create_account', ENTRY_TELEPHONE_NUMBER_ERROR); } <tr> <td class="fieldKey"><?php echo ENTRY_TELEPHONE_NUMBER; ?></td> <td class="fieldValue"><?php echo tep_draw_input_field('telephone') . '&nbsp;' . (tep_not_null(ENTRY_TELEPHONE_NUMBER_TEXT) ? '<span class="inputRequirement">' . ENTRY_TELEPHONE_NUMBER_TEXT . '</span>': ''); ?></td> </tr>
  21. Also bei dem Wissen über osCommerce ist es schon mal sehr schlecht überhaupt in Erwägung zu ziehen einen Online-Shop frei ins Netz zu stellen. (Sorry nicht böse gemeint) Bevor du dir Gedanken über eventuelle Angabefelder machst, solltest du dir lieber Gedanken über die rechtliche Situation, was das Betreiben eines Shops im Netz angeht machen. Eine Abmahnung wegen fehlender bzw. falscher Angaben kann sehr, sehr teuer werden. (Das nehmen viel zu viele hier leider auf die leichte Schulter) und dann ist das Gehäule gross ! Die besten Ausreden sind immer, Ich möchte nicht viel investieren, da es nur ein kleiner Shop ist und und und..... Es ist ganz egal wie gross der Shop werden soll, auch wen nur ein Produkt verkauft wird. Gesetz ist Gesetz und die Straffen sind sehr hoch bei Verstössen. Ist der Shop irgendwann Abmahnsicher, so kannst du an Verschönerung und Anpassung bestimmter Details denken die du haben möchtest. Nichts für ungut aber denk über meine Worte nach, kann viel Ärger ersparen.
  22. Um die Telefonnummer zu entfernen muss die create_account.php im catalog so wie die customers.php im admin bearbeitet werden. Hierbei alle Abfragen und das Eingabefeld entfernen. Etwas schöner wre eine DB-Abfrage zu installieren um das Telefonfeld über die Administration ab bzw. ein zu schalten.
  23. YePix

    thickbox

    Hello guys and girls, does any of you have experience with thickbox? I want a page opened in a css popup. I tried to link it but without success. Can someone help me ? <?php $option_popup_open = '<a href="'; $option_popup_open .= tep_href_link('product_popup.php', tep_get_all_get_params(array('action')) . 'products_id=' . $list_price['products_id']); $option_popup_open .= '" target="_blank" rel="thickbox" title="' . $list_price['products_name'] . '">' . tep_draw_button(TEXT_LOGIN_INFO, 'fa fa-question', tep_href_link('login.php'), null, null, 'btn-reviews btn-block btn-pls') . '</a>'; echo '<span class="pls_option">' . $option_popup_open . '</span>'; ?>
  24. YePix

    Entscheidungsfindung

    Du brauchst noch den Lieferkostenvermerk in unmittelbarer Nähe zum Preis. Nicht vergessen, die Versandkosten müssen inkl. MwSt. gelten. Bestätigung der AGB, Widerruf und Datenschutzrichtlinien. Die DSGVO Angaben müssen jedem Kunden zugänglich sein. Kontrollkästchen mit Bestätigung der Privatsphere vor dem Versenden des Kontaktformulars. Und, und, und..... An deiner Stelle würde ich erstmal genauer prüffen was alles noch fehlt was rechtlich vorgeschrieben ist bevor der Shop On-Line geht. (kann sehr teuer werden.) PS. Die anderen Shops die im Netz zu finden sind, sind auch nicht ganz ohne und müssen an die Gesetzvorgaben angepasst werden.
×