Shop Hosting
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: Versandkostenlink in der box_cart.html

    sgei

    • Fördermitglied
    • Beiträge: 327
    • Geschlecht:
    Versandkostenlink in der box_cart.html
    am: 03. September 2009, 11:32:40
    Hallo,

    ich habe meine box_cart.html etwas umgebaut und in den Header geschoben:

    [ Für Gäste sind keine Dateianhänge sichtbar ]

    In der neuen Warenkorbbox möchte ich auch einen Link mittels Thickbox zu den Versandkosten setzen. Dabei taucht folgendes Problemchen auf:

    Mein Link in der box_cart.html sieht so aus:

    Code: XML  [Auswählen]
    <a class="thickbox" title="Information" href="{php} echo xtc_href_link('popup_content.php');{/php}?coID=1?KeepThis=true&;TB_iframe=true&height=400&width=600" target="_blank" title="Information">Versandkosten</a>
     
    Wenn ich den Shop im Browser öffne und auf den Link gehe sehe ich folgende URL:

    http://DOMAIN/popup_content.php?XTCsid=ddf8a0d097b48e384868041c334cd5c5?coID=1?KeepThis=true&;TB_iframe=true&height=400&width=600

    Es öffnet sich die Thickbox, aber ohne Inhalt.

    [ Für Gäste sind keine Dateianhänge sichtbar ]

    Wenn ich mir mal den Link zu den Versandkosten in der Contentbox anschaue sieht die URL so aus:

    http://DOMAIN/Liefer-und-Versandkosten:_:1.html?XTCsid=ddf8a0d097b48e384868041c334cd5c5

    Sobald ich einmal einen Seitenrefresh gemacht habe bzw. einmal auf den Link aus der Contentbox geklickt habe, sehe ich auch über den Link aus der box_cart.html die Thickbox mit richtigen Inhalt.

    [ Für Gäste sind keine Dateianhänge sichtbar ]

    Was habe ich denn bei dem Link falsch gemacht?
    Der Originallink, der in der box_cart.html drin ist wird garnicht angezeigt:

    Code: XML  [Auswählen]
    {if $SHIPPING_INFO}{$SHIPPING_INFO}{/if}
    Hier ist meine komplette box_cart.html:

    Code: XML  [Auswählen]
    {config_load file="$language/lang_$language.conf" section="boxes"}

    {if $deny_cart neq 'true'}
                    <div id="cart_text">
                            <div id="cart_head">{#heading_cart#}</div>
                            {if $PRODUCTS==''}
                                    Produke: 0
                            {else}
                                    Produkte: {$PRODUCTS}
                            {/if}
                             |
                            {if $TOTAL==''}
                                    {#text_total#}: 0,00 EUR
                            {else}
                                    {#text_total#}: {$TOTAL}
                            {/if}
                            <div id="cart_mwst">
                                    inkl. 19% MwSt., zzgl.
                                    <a class="thickbox" title="Information" href="{php} echo xtc_href_link('popup_content.php');{/php}?coID=1?KeepThis=true&TB_iframe=true&height=400&width=600" target="_blank" title="Information">Versandkosten</a>
                            </div>
                            <div id="cart_links">
                                    <a href="{php}echo xtc_href_link('shopping_cart.php');{/php}">Zum Warenkorb</a>
                                      |  
                                    <a href="{php}echo xtc_href_link('checkout_shipping.php');{/php}">Zur Kasse</a>
                            </div>
                    </div>
    {/if}
     
    Steffen



    Linkback: https://www.modified-shop.org/forum/index.php?topic=1880.0

    Tomcraft

    • modified Team
    • Gravatar
    • Beiträge: 46.369
    • Geschlecht:
    Versandkostenlink in der box_cart.html
    Antwort #1 am: 03. September 2009, 11:37:22
    Versuch es mal so:

    Code: XML  [Auswählen]
    {config_load file="$language/lang_$language.conf" section="boxes"}

    {if $deny_cart neq 'true'}
                    <div id="cart_text">
                            <div id="cart_head">{#heading_cart#}</div>
                            {if $PRODUCTS==''}
                                    Produke: 0
                            {else}
                                    Produkte: {$PRODUCTS}
                            {/if}
                             |
                            {if $TOTAL==''}
                                    {#text_total#}: 0,00 EUR
                            {else}
                                    {#text_total#}: {$TOTAL}
                            {/if}
                            <div id="cart_mwst">
                                    inkl. 19% MwSt., zzgl.
                                    <a class="thickbox" title="Information" href="{php} echo xtc_href_link('popup_content.php');{/php}?coID=1&KeepThis=true&TB_iframe=true&height=400&width=600" target="_blank" title="Information">Versandkosten</a>
                            </div>
                            <div id="cart_links">
                                    <a href="{php}echo xtc_href_link('shopping_cart.php');{/php}">Zum Warenkorb</a>
                                      |
                                    <a href="{php}echo xtc_href_link('checkout_shipping.php');{/php}">Zur Kasse</a>
                            </div>
                    </div>
    {/if}
     
    Du hattest ein doppeltes Fragezeichen in den Parametern. Alle zusätzlichen müssen jedoch mit "kaufmännischen und" angegeben werden.
    Im Demoshop hat es funktioniert.

    Grüße

    Torsten

    sgei

    • Fördermitglied
    • Beiträge: 327
    • Geschlecht:
    Versandkostenlink in der box_cart.html
    Antwort #2 am: 03. September 2009, 11:45:56
    Hallo Tomcraft,

    geht leider auch nicht - gleiches Verhalten.

    Nach einem Seitenrefresh verschwindet die SID aus der URL und dann erst geht's.

    Steffen

    Tomcraft

    • modified Team
    • Gravatar
    • Beiträge: 46.369
    • Geschlecht:
    Versandkostenlink in der box_cart.html
    Antwort #3 am: 03. September 2009, 12:08:17
    Ahso... lol.. nun verstehe ich... =)
    Warum nimmst du denn dafür auch nicht den Smarty, den es schon gibt?
    Gilt auch für den Warenkorb-Link, da existiert auch schon ein SMarty. ;-)
    Noch keinen Kaffee getrunken, gelle?

    Code: XML  [Auswählen]
    {config_load file="$language/lang_$language.conf" section="boxes"}

    {if $deny_cart neq 'true'}
                    <div id="cart_text">
                            <div id="cart_head">{#heading_cart#}</div>
                            {if $PRODUCTS==''}
                                    Produke: 0
                            {else}
                                    Produkte: {$PRODUCTS}
                            {/if}
                             |
                            {if $TOTAL==''}
                                    {#text_total#}: 0,00 EUR
                            {else}
                                    {#text_total#}: {$TOTAL}
                            {/if}
                            <div id="cart_mwst">
                                    <nobr>inkl. 19% MwSt., {$SHIPPING_INFO}</nobr>
                            </div>
                            <div id="cart_links">
                                    <a href="{$LINK_CART}">{#heading_cart#}</a>
                                      |
                                    <a href="{php}echo xtc_href_link('checkout_shipping.php');{/php}">Zur Kasse</a>
                            </div>
                    </div>
    {/if}
     
    Grüße

    Torsten

    sgei

    • Fördermitglied
    • Beiträge: 327
    • Geschlecht:
    Versandkostenlink in der box_cart.html
    Antwort #4 am: 03. September 2009, 12:26:51
    Hallo Torsten,

    doch doch, habe heute schon jede Menge Kaffee inhaliert   :lol:

    Die Smarty-Variable {$SHIPPING_INFO} habe ich natürlich als erstes probiert, doch die scheint irgendwie nicht zu funktionieren. Es wird garnichts angezeigt.

    [ Für Gäste sind keine Dateianhänge sichtbar ]

    Steffen

    Tomcraft

    • modified Team
    • Gravatar
    • Beiträge: 46.369
    • Geschlecht:
    Versandkostenlink in der box_cart.html
    Antwort #5 am: 03. September 2009, 12:59:25
    Dann vergleich mal deine shopping_cart.php mit der aktuellen aus dem projekt:

    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 = '';
    // include needed files
    require_once (DIR_FS_INC.'xtc_recalculate_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 ();
            $qty = 0;
            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']);

            }
            $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();
    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', 'SSL').'" title="Information" class="thickbox">'.SHIPPING_COSTS.'</a>');
              //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'])) {
            $box_smarty->assign('COUPON_HELP_LINK', '<a href="javascript:popupWindow(\''.xtc_href_link(FILENAME_POPUP_COUPON_HELP, 'cID='.$_SESSION['cc_id']).'\')">');
    }
    // GV Code End
    $box_smarty->assign('LINK_CART', xtc_href_link(FILENAME_SHOPPING_CART, '', 'SSL'));
    $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);
    ?>
     
    Grüße

    Torsten

    sgei

    • Fördermitglied
    • Beiträge: 327
    • Geschlecht:
    Versandkostenlink in der box_cart.html
    Antwort #6 am: 03. September 2009, 14:43:44
    Hallo Tomcraft,

    das Problem war in der shopping_cart.php.

    Die Variable "SHIPPING_INFO" wird nur erzeugt, wenn mind. 1 Produkt im Warenkorb ist:

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

    Ich habe den relevanten Teil nochmal ausserhalb der Bedingung reinkopiert:

    Code: PHP  [Auswählen]
    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', 'SSL').'" title="Information" class="thickbox">'.SHIPPING_COSTS.'</a>');
      //EOF - DokuMan - 2009-08-09 - fixed wrong quotationmark position and fixed wrong question mark on KeepThis=true
    }
     
    Steffen

    Tomcraft

    • modified Team
    • Gravatar
    • Beiträge: 46.369
    • Geschlecht:
    Versandkostenlink in der box_cart.html
    Antwort #7 am: 03. September 2009, 17:27:53
    Komisch, bei mir wurder der Link auch ohne Artikel im Korb angezeigt, meine ich...
    Naja, hauptsache es funktioniert jetzt bei dir.

    Sieht schick aus dein Warenkorb!
    Vielleicht kannst du die Änderungen ja mal zusammenfassen und hier veröffentlichen? Ist bestimmt für andere auch interessant. Inklusive Suchfeld im Menü-Balken... schick, schick. =)

    Grüße

    Torsten

    14 Antworten
    7518 Aufrufe
    20. Mai 2012, 17:02:09 von karl
    2 Antworten
    2073 Aufrufe
    10. Juni 2015, 11:21:08 von noEE
    4 Antworten
    2575 Aufrufe
    17. Januar 2017, 17:54:21 von noRiddle (revilonetz)
    0 Antworten
    1865 Aufrufe
    22. Juni 2013, 13:08:12 von Jappi