Managed Server
Neuigkeiten
  • Die modified eCommerce Shopsoftware ist kostenlos, aber nicht umsonst.
    Spenden
  • Damit wir die modified eCommerce Shopsoftware auch zukünftig kostenlos anbieten können:
    Spenden
  • Thema: MODUL: Ausklappbarer Warenkorb

    fishnet

    • Fördermitglied
    • Beiträge: 4.821
    • Geschlecht:
    Re: MODUL: Ausklappbarer Warenkorb
    Antwort #15 am: 19. August 2011, 23:06:37
    Hast du dir die Dateien heruntergeladen und angeschaut ?

    general.js.php:

    Code: PHP  [Auswählen]
    <script type="text/javascript" src="<?php echo 'templates/'.CURRENT_TEMPLATE; ?>/javascript/prototype.js" ></script>
    <script type="text/javascript" src="<?php echo 'templates/'.CURRENT_TEMPLATE; ?>/lightbox/js/scriptaculous.js?load=effects" ></script>
    <script type="text/javascript" src="<?php echo 'templates/'.CURRENT_TEMPLATE; ?>/lightbox/js/lightbox.js" ></script>

    Wo ist das Problem ?

    Generell sollst du natürlich nicht einfach deine Dateien überspielen sondern die alten vorher sichern, z.B. umbenennen in "general.js.php.bak".

    Am Besten legst du dir eine Kopie von deinem Shop als "Sandkasten" an zum Spielen.  ;-)

    Gruß
    Karsten

    Modulfux

    • Experte
    • Beiträge: 3.590
    • Geschlecht:
    Re: MODUL: Ausklappbarer Warenkorb
    Antwort #16 am: 19. August 2011, 23:12:33
    Sorry, aber das ist doch hier gerade eine Mandeloperation in rektaler Ausführung.

    Einfaches jQuery (wie es zum Beispiel beim webs-Shop) eingesetzt wird, reicht doch auch. Es ist doch völlig unnötig hier nochmals zusätzliche Bibliotheken zu integrieren, die sich im schlimmsten Fall noch mit dem an Bord befindlichen jQuery beißt.

    Gruß
    Ronny

    Tomcraft

    • modified Team
    • Gravatar
    • Beiträge: 46.369
    • Geschlecht:
    Re: MODUL: Ausklappbarer Warenkorb
    Antwort #17 am: 19. August 2011, 23:55:20
    :good:

    Grüße

    Torsten

    sammar

    • Frisch an Board
    • Beiträge: 93
    Re: MODUL: Ausklappbarer Warenkorb
    Antwort #18 am: 09. Januar 2013, 11:17:52
    Hallo,
    nach dem Einbau bekomme ich folgende Fehlermeldung:
    Parse error: syntax error, unexpected $end in templates/meintemplate/source/boxes/shopping_cart.php on line 120
    hier mein shopping_cart.php code
    Code: PHP  [Auswählen]
    <?php

    /* -----------------------------------------------------------------------------------------
       $Id: shopping_cart.php 1281 2005-10-03 09:30:17Z mz $

       XT-Commerce - community made shopping
       http://www.(( Wir dulden keine kommerziellen Werbelinks - Bitte <a href="index.php?topic=3013.0">Forenregeln</a> beachten! ))

       Copyright (c) 2003 XT-Commerce
       -----------------------------------------------------------------------------------------
       based on:
       (c) 2000-2001 The Exchange Project  (earlier name of osCommerce)
       (c) 2002-2003 osCommerce(shopping_cart.php,v 1.18 2003/02/10); www.oscommerce.com
       (c) 2003      nextcommerce (shopping_cart.php,v 1.15 2003/08/17); www.nextcommerce.org

       Released under the GNU General Public License
       ---------------------------------------------------------------------------------------*/

    $box_smarty = new smarty;
    $box_smarty->assign('tpl_path', 'templates/'.CURRENT_TEMPLATE.'/');
    $box_content = '';
    $box_price_string = '';
    $products_in_cart = array (); //DokuMan - 2010-02-28 - Undefined variable: products_in_cart
    $qty = 0; //DokuMan - 2010-02-28 - Undefined variable: qty
    // include needed files
    require_once (DIR_FS_INC.'xtc_recalculate_price.inc.php');
    require_once (DIR_FS_INC.'xtc_format_price.inc.php');

    if (strstr($PHP_SELF, FILENAME_CHECKOUT_PAYMENT) or strstr($PHP_SELF, FILENAME_CHECKOUT_CONFIRMATION) or strstr($PHP_SELF, FILENAME_CHECKOUT_SHIPPING))
            $box_smarty->assign('deny_cart', 'true');

    if ($_SESSION['cart']->count_contents() > 0) {
            $products = $_SESSION['cart']->get_products();
            //$products_in_cart = array (); //DokuMan - 2010-02-28 - Undefined variable: products_in_cart
            //$qty = 0; //DokuMan - 2010-02-28 - Undefined variable: qty
            for ($i = 0, $n = sizeof($products); $i < $n; $i ++) {
                    $qty += $products[$i]['quantity'];
                    $products_in_cart[] = array ( 'QTY' => $products[$i]['quantity'],
    'LINK' => xtc_href_link(FILENAME_PRODUCT_INFO,
    xtc_product_link($products[$i]['id'],$products[$i]['name'])),
    'NAME' => $products[$i]['name'],
    'IMG' => $products[$i]['image'],
    'PRICE' => xtc_format_price($products[$i]['price'],true,true));

            }
            $box_smarty->assign('PRODUCTS', $qty);
            $box_smarty->assign('empty', 'false');
    } else {
            // cart empty
            $box_smarty->assign('empty', 'true');
    }

    if ($_SESSION['cart']->count_contents() > 0) {

            $total =$_SESSION['cart']->show_total();
            $discount = 0; //DokuMan - 2010-03-01 - set undefined variable
    if ($_SESSION['customers_status']['customers_status_ot_discount_flag'] == '1' && $_SESSION['customers_status']['customers_status_ot_discount'] != '0.00') {
            if ($_SESSION['customers_status']['customers_status_show_price_tax'] == 0 && $_SESSION['customers_status']['customers_status_add_tax_ot'] == 1) {
                    $price = $total-$_SESSION['cart']->show_tax(false);
            } else {
                    $price = $total;
            }
            $discount = $xtPrice->xtcGetDC($price, $_SESSION['customers_status']['customers_status_ot_discount']);
            $box_smarty->assign('DISCOUNT', $xtPrice->xtcFormat(($discount * (-1)), $price_special = 1, $calculate_currencies = false));

    }


    if ($_SESSION['customers_status']['customers_status_show_price'] == '1') {
            if ($_SESSION['customers_status']['customers_status_show_price_tax'] == 0 && $_SESSION['customers_status']['customers_status_add_tax_ot'] == 0) $total-=$discount;
            if ($_SESSION['customers_status']['customers_status_show_price_tax'] == 0 && $_SESSION['customers_status']['customers_status_add_tax_ot'] == 1) $total-=$discount;
            if ($_SESSION['customers_status']['customers_status_show_price_tax'] == 1) $total-=$discount;
            $box_smarty->assign('TOTAL', $xtPrice->xtcFormat($total, true));
    }


            $box_smarty->assign('UST', $_SESSION['cart']->show_tax());

            if (SHOW_SHIPPING=='true') {
                    //BOF - DokuMan - 2009-08-09 - fixed wrong quotationmark position and fixed wrong question mark on KeepThis=true
                    //$box_smarty->assign('SHIPPING_INFO',' '.SHIPPING_EXCL.'<a target="_blank" href="'.xtc_href_link(FILENAME_POPUP_CONTENT, 'coID='.SHIPPING_INFOS.'?KeepThis=true&TB_iframe=true&height=400&width=600"').' title="Information" class="thickbox"">'.SHIPPING_COSTS.'</a>');
                    $box_smarty->assign('SHIPPING_INFO',' '.SHIPPING_EXCL.' <a target="_blank" href="'.xtc_href_link(FILENAME_POPUP_CONTENT, 'coID='.SHIPPING_INFOS.'&KeepThis=true&TB_iframe=true&height=400&width=600', $request_type).'" title="Information" class="thickbox">'.SHIPPING_COSTS.'</a>'); // web28 - 2010-11-05 - change SSL -> $request_type
                    //EOF - DokuMan - 2009-08-09 - fixed wrong quotationmark position and fixed wrong question mark on KeepThis=true
            }
    }
    if (ACTIVATE_GIFT_SYSTEM == 'true') {
            $box_smarty->assign('ACTIVATE_GIFT', 'true');
    }

    // GV Code Start
    if (isset ($_SESSION['customer_id'])) {
            $gv_query = xtc_db_query("select amount from ".TABLE_COUPON_GV_CUSTOMER." where customer_id = '".$_SESSION['customer_id']."'");
            $gv_result = xtc_db_fetch_array($gv_query);
            if ($gv_result['amount'] > 0) {
                    $box_smarty->assign('GV_AMOUNT', $xtPrice->xtcFormat($gv_result['amount'], true, 0, true));
                    $box_smarty->assign('GV_SEND_TO_FRIEND_LINK', '<a href="'.xtc_href_link(FILENAME_GV_SEND).'">');
            }
    }
    if (isset ($_SESSION['gv_id'])) {
            $gv_query = xtc_db_query("select coupon_amount from ".TABLE_COUPONS." where coupon_id = '".$_SESSION['gv_id']."'");
            $coupon = xtc_db_fetch_array($gv_query);
            $box_smarty->assign('COUPON_AMOUNT2', $xtPrice->xtcFormat($coupon['coupon_amount'], true, 0, true));
    }
    if (isset ($_SESSION['cc_id'])) {
            //BOF - DokuMan - 2010-11-26 - FIX LOST cID - 2010-11-05 - add SSL FIX -> $request_type and correct href and added title tag
            //$box_smarty->assign('COUPON_HELP_LINK', '<a href="javascript:popupWindow(\''.xtc_href_link(FILENAME_POPUP_COUPON_HELP, 'cID='.$_SESSION['cc_id']).'\')">');
            $box_smarty->assign('COUPON_HELP_LINK', '<a target="_blank" class="thickbox" title="Information" href="'.xtc_href_link(FILENAME_POPUP_COUPON_HELP, 'cID='.$_SESSION['cc_id'].'&KeepThis=true&TB_iframe=true&height=400&width=600', $request_type).'">Information</a>');
            //EOF - DokuMan - 2010-11-26 - FIX LOST cID - 2010-11-05 - add SSL FIX -> $request_type and correct href and added title tag
    }
    // GV Code End
    if ($_SESSION['customers_status']['customers_status_show_price'] == '1') {
    $box_smarty->assign('UST_CONTENT', $_SESSION['cart']->show_tax());
    $box_smarty->assign('LINK_CART', xtc_href_link(FILENAME_SHOPPING_CART, '', 'NONSSL')); // web28 - 2011-04-14 - change SSL -> NONSSL
    $box_smarty->assign('products', $products_in_cart);
    $box_smarty->caching = 0;
    $box_smarty->assign('language', $_SESSION['language']);
    $box_shopping_cart = $box_smarty->fetch(CURRENT_TEMPLATE.'/boxes/box_cart.html');
    $smarty->assign('box_CART', $box_shopping_cart);
    ?>

    bin mehrmals Anleitung durchgegangen und habe alle Klammern und sonstiges überprüft, Warenkorb in Header verschieben hatte ich schon vorher, für Hilfe bin ich sehr Dankbar.

    Guenter59

    • Viel Schreiber
    • Beiträge: 1.484
    Re: MODUL: Ausklappbarer Warenkorb
    Antwort #19 am: 09. Januar 2013, 11:24:43
    @sammar
    Ich würde sagen da fehlt eine Klammer ' } ' wahrscheinlich vor ?>

    Gruß
    Günter

    sammar

    • Frisch an Board
    • Beiträge: 93
    Re: MODUL: Ausklappbarer Warenkorb
    Antwort #20 am: 09. Januar 2013, 12:08:54
    Hallo,
    Danke erstmal für die schnelle Antwort, habe die Klammer eingefügt und bekomme nun diese Fehlermeldung:

    Parse error: syntax error, unexpected '?' in /templates/meintemplate/javascript/general.js.php on line 18

    hier meine general.js.php:

    Code: PHP  [Auswählen]
    <?php
    /* -----------------------------------------------------------------------------------------
       $Id: general.js.php 1262 2005-09-30 10:00:32Z mz $

       XT-Commerce - community made shopping
       http://www.(( Wir dulden keine kommerziellen Werbelinks - Bitte <a href="index.php?topic=3013.0">Forenregeln</a> beachten! ))

       Copyright (c) 2003 XT-Commerce
       -----------------------------------------------------------------------------------------
       Released under the GNU General Public License
       ---------------------------------------------------------------------------------------*/



       // this javascriptfile get includes at the BOTTOM of every template page in shop
       // you can add your template specific js scripts here
    ?>
    <script src="<?php echo 'templates/'.CURRENT_TEMPLATE; ?>/javascript/jquery.js"></script>
    <script type="text/javascript" src="<?php echo 'templates/'.CURRENT_TEMPLATE; ?
    >/javascript/prototype.js" ></script>
    <script type="
    text/javascript">
    count = 0;
    function changetext(){
    if (count%2 == 0){
    jQuery("
    .expandable").text("<?php echo TEXT_WK_COLLAPSE ?>");
    }
    else {
    jQuery(".expandable").text("<?php echo TEXT_WK_EXTEND ?>");
    } count++;
    }
    jQuery(document).ready(function(){
    jQuery(".expandable").click(function(e){
    e.preventDefault();
    })
    })
    //--></script>
    <script src="<?php echo 'templates/'.CURRENT_TEMPLATE; ?>/javascript/jquery.js" type="text/javascript"></script>
    <script src="<?php echo 'templates/'.CURRENT_TEMPLATE; ?>/javascript/thickbox.js" type="text/javascript"></script>
    <script src="<?php echo 'templates/'.CURRENT_TEMPLATE; ?>/javascript/jquery.cycle.all.js" type="text/javascript"></script>
            <script src="<?php echo 'templates/'.CURRENT_TEMPLATE; ?>/javascript/jquery.easing.1.3.js" type="text/javascript"></script>
            <script type="text/javascript"><!--
            $(function() {
              $('#bestseller').cycle({
                fx:     'turnDown',
                delay:  -6000
              });
            });
            --></script>
    <!-- Imageslider (c)2008 by Hetfield - www.MerZ-IT-SerVice.de - Begin -->
    <script src="<?php echo 'templates/'.CURRENT_TEMPLATE; ?>/javascript/jquery.innerfade.js" type="text/javascript"></script>
    <script src="<?php echo 'templates/'.CURRENT_TEMPLATE; ?>/javascript/imageslider.js" type="text/javascript"></script>
    <!-- Imageslider (c)2008 by Hetfield - www.MerZ-IT-SerVice.de - End -->
    <script src="<?php echo 'templates/'.CURRENT_TEMPLATE; ?>/javascript/jquery.nivo.slider.js" type="text/javascript"></script>
    <script type="text/javascript">
    $(window).load(function() {
        $('#slider').nivoSlider({
            effect:'fade', //Specify sets like: 'fold,fade,sliceDown'
            slices:10, //Anzahl der Slices beim Slice Effekt
            animSpeed:650, //Slide transition speed
            pauseTime:6000, //Angabe in Milisekunden
            startSlide:0, //Set starting Slide (0 index)
            directionNav:false, //Next & Prev
            directionNavHide:true, //Only show on hover
            controlNav:true, //1,2,3...
            controlNavThumbs:false, //Use thumbnails for Control Nav
            controlNavThumbsFromRel:false, //Use image rel for thumbs
            controlNavThumbsSearch: '.jpg', //Replace this with...
            controlNavThumbsReplace: '_thumb.jpg', //...this in thumb Image src
            keyboardNav:false, //Use left & right arrows
            pauseOnHover:true, //Stop animation while hovering
            manualAdvance:false, //Force manual transitions
            captionOpacity:0.8, //Universal caption opacity
            beforeChange: function(){},
            afterChange: function(){},
            slideshowEnd: function(){}, //Triggers after all slides have been shown
            lastSlide: function(){}, //Triggers when last slide is shown
            afterLoad: function(){} //Triggers when slider has loaded
        });
    });
    </script>
    <script src="<?php echo 'templates/'.CURRENT_TEMPLATE; ?>/javascript/superfish.js"></script>
    <script src="<?php echo 'templates/'.CURRENT_TEMPLATE; ?>/javascript/supersubs.js"></script>
    <script src="<?php echo 'templates/'.CURRENT_TEMPLATE; ?>/javascript/hoverIntent.js"></script>
    <script type='text/javascript'>
        $(document).ready(function(){
            $("ul.sf-menu").supersubs({
                minWidth:    12,   // minimum width of sub-menus in em units
                maxWidth:    27,   // maximum width of sub-menus in em units
                extraWidth:  1     // extra width can ensure lines don't sometimes turn over
                                   // due to slight rounding differences and font-family
            }).superfish();  // call supersubs first, then superfish, so that subs are
                             // not display:none when measuring. Call before initialising
                             // containing tabs for same reason.
        });
    </script>
    <?php// BOF - web28 - 2010-07-09 - TABS/ACCORDION in product_info ?>
    <?php
    if (strstr($PHP_SELF, FILENAME_PRODUCT_INFO )) {
    ?>
    <script src="<?php echo 'templates/'.CURRENT_TEMPLATE; ?>/javascript/jquery-ui.js" type="text/javascript"></script>
    <script type="text/javascript">
            $(function() {
                    $("#tabbed_product_info").tabs();
                    $("#accordion_product_info").accordion({ autoHeight: false });
            });
    </script>
    <noscript>
            <link rel="stylesheet" href="<?php echo 'templates/'.CURRENT_TEMPLATE; ?>/css/no_javascript.css" type="text/css" media="screen" />
    </noscript>
    <?php
    }
    ?>
    <?php// EOF - web28 - 2010-07-09 - TABS/ACCORDION in product_info ?>

    Danke

    Guenter59

    • Viel Schreiber
    • Beiträge: 1.484
    Re: MODUL: Ausklappbarer Warenkorb
    Antwort #21 am: 09. Januar 2013, 12:23:51
    Hi sammer

    Die Zeile 18 muß alles in eine Zeile bis </script> ( passt hier nicht )
    <script type="text/javascript" src="<?php echo 'templates/'.CURRENT_TEMPLATE; ?>/javascript/prototype.js" ></script>

    Das Ende

    <?php// EOF - web28 - 2010-07-09 - TABS/ACCORDION in product_info ?>

    muß so

    <?php
    // EOF - web28 - 2010-07-09 - TABS/ACCORDION in product_info
     ?>

    sammar

    • Frisch an Board
    • Beiträge: 93
    Re: MODUL: Ausklappbarer Warenkorb
    Antwort #22 am: 09. Januar 2013, 16:06:06
    Hallo,
    vielen Dank Günther, es war das Leerzeichen dazwischen.  :thx:
    7 Antworten
    9007 Aufrufe
    14. Juni 2018, 20:33:45 von martin-schulz1
    19 Antworten
    1520 Aufrufe
    16. Juni 2024, 08:18:51 von voodoopupp
    0 Antworten
    1993 Aufrufe
    22. September 2015, 13:56:45 von chaploo
    5 Antworten
    5072 Aufrufe
    29. Oktober 2010, 16:12:16 von XTCM-User
               
    anything