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: Zahlarten entfernt

    jupp

    • Frisch an Board
    • Beiträge: 77
    • Geschlecht:
    Zahlarten entfernt
    am: 13. Oktober 2014, 09:00:56
    Hallo,

    ich habe noch einen Shop bei dem ich nur eine einzige Zahlart (Vorkasse) angeboten habe und  (vermutlich) bei der checkout_payment.php diese Auswahl der anderen Zahlarten entfernt habe, so das die Auswahl beim Bestellvorgang nicht mehr auftaucht.. Leider weiß ich das nicht mehr wo das war, vielleicht war es auch in einer anderen Datei. Kann mir hier vielleicht jemand weiterhelfen und sagen in welchen Dateien u. an welcher Zeile ungefähr ich noch suchen kann.

    Grüße Jupp


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

    awids

    • Experte
    • Beiträge: 3.803
    • Geschlecht:
    Re: Zahlarten entfernt
    Antwort #1 am: 13. Oktober 2014, 09:34:31
    Das Beste wird es sein, wenn du deine checkout_payment.php und aus dem Template-Ordner die /module/checkout_payment.html hier hochlädst, dann kann man sich angucken, wenn du gemacht hast und dir optimal helfen. Die Experten können aus deiner Anfrage vielleicht schon alle nötigen Antworten herleiten, vielleicht aber auch nicht. Am Schnellsten geht es halt, wenn man Einblick in die Dateien erhält, somal du ja noch nicht einmal einen Link zum Shop angegeben hast, wo man im Quelltext schauen könnte.

    Du könntest auch die beiden o. g. Dateien umbenennen, z. B. in "_checkout_payment.php" und "_checkout_payment.html" und diese dann durch Originaldateien ersetzen.

    fishnet

    • Fördermitglied
    • Beiträge: 4.821
    • Geschlecht:
    Re: Zahlarten entfernt
    Antwort #2 am: 13. Oktober 2014, 10:00:12
    Oder aus dem Original Download die Dateien abspeichern und mittels WinMerge mit deiner Version vergleichen. Je nachdem welche Shopversion du hast.

    jupp

    • Frisch an Board
    • Beiträge: 77
    • Geschlecht:
    Re: Zahlarten entfernt
    Antwort #3 am: 13. Oktober 2014, 13:45:19
    Hi danke für die Anworten bis jetzt! Die Dateie checkout_payment.php aus dem Originalshop Download habe ich schon versuch zu ersetzen, da blieb der Bestellvorgang bei dem Payment nur noch weiß. Mein Problem ist, dass es sich um eine alte Shop-Version handelt und die Datei sich daher vermutlich nicht so einfach ersetzen läßt. Grobe bzw. bekannte Sicherhetslücken habe ich manuell behoben, aber leider keine kompletten Updates mehr gemacht. Der Grund liegt darin, dass ich mir damals ein Mindestmengenmodul installieren lassen habe, das bei einem Update wieder weg wäre u. ich selbst keine Ahnung habe wie das installiert wurde. Der bei dem ich das mal gekauft hatte meldet sich nicht mehr. Sicher ein Problem mit dem alten Shop, aber den kann ich deswegen erst Updaten wenn Modified das Mindestbestellmengenmodul standartmäßig einbaut.
    Ich habe jetzt hier mal die zwei Dateien zur Einsicht:

    checkout_payment.php

    Code: PHP  [Auswählen]
    <?php
    /* -----------------------------------------------------------------------------------------
    $Id: checkout_payment.php 2791 2012-04-27 13:10:18Z web28 $

    modified eCommerce Shopsoftware - community made shopping
    http://www.modified eCommerce Shopsoftware.org

    Copyright (c) 2010 modified eCommerce Shopsoftware
    -----------------------------------------------------------------------------------------
    based on:
    (c) 2000-2001 The Exchange Project (earlier name of osCommerce)
    (c) 2002-2003 osCommerce(checkout_payment.php,v 1.110 2003/03/14); www.oscommerce.com
    (c) 2003 nextcommerce (checkout_payment.php,v 1.20 2003/08/17); www.nextcommerce.org
    (c) 2006 XT-Commerce (checkout_payment.php 1325 2005-10-30)

    Released under the GNU General Public License
    -----------------------------------------------------------------------------------------
    Third Party contributions:
    agree_conditions_1.01 Autor: Thomas Plänkers (webmaster@oscommerce.at)

    Customers Status v3.x (c) 2002-2003 Copyright Elari elari@free.fr | www.unlockgsm.com/dload-osc/ | CVS : http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/elari/?sortby=date#dirlist

    Credit Class/Gift Vouchers/Discount Coupons (Version 5.10)
    http://www.oscommerce.com/community/contributions,282
    Copyright (c) Strider | Strider@oscworks.com
    Copyright (c) Nick Stanko of UkiDev.com, nick@ukidev.com
    Copyright (c) Andre ambidex@gmx.net
    Copyright (c) 2001,2002 Ian C Wilson http://www.phesis.org

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


    include ('includes/application_top.php');

    //web28 - 2012-04-27 - pre-selection the first payment option
    if (!defined('CHECK_FIRST_PAYMENT_MODUL')) {
    define ('CHECK_FIRST_PAYMENT_MODUL', true); //true, false - default false
    }
    // create smarty elements
    $smarty = new Smarty;
    // include boxes
    require (DIR_FS_CATALOG . 'templates/' . CURRENT_TEMPLATE . '/source/boxes.php');
    // include needed functions
    require_once (DIR_FS_INC . 'xtc_address_label.inc.php');
    require_once (DIR_FS_INC . 'xtc_get_address_format_id.inc.php');
    require_once (DIR_FS_INC . 'xtc_check_stock.inc.php');
    unset ($_SESSION['tmp_oID']);
    unset ($_SESSION['transaction_id']); //Dokuman - 2009-10-02 - added moneybookers payment module version 2.4

    // if the customer is not logged on, redirect them to the login page
    if (!isset ($_SESSION['customer_id'])) {
    if (ACCOUNT_OPTIONS == 'guest') {
    xtc_redirect(xtc_href_link(FILENAME_CREATE_GUEST_ACCOUNT, '', 'SSL'));
    } else {
    xtc_redirect(xtc_href_link(FILENAME_LOGIN, '', 'SSL'));
    }
    }

    // if there is nothing in the customers cart, redirect them to the shopping cart page
    if ($_SESSION['cart']->count_contents() < 1)
    xtc_redirect(xtc_href_link(FILENAME_SHOPPING_CART));

    // if no shipping method has been selected, redirect the customer to the shipping method selection page
    if (!isset ($_SESSION['shipping']))
    xtc_redirect(xtc_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'));

    // avoid hack attempts during the checkout procedure by checking the internal cartID
    if (isset ($_SESSION['cart']->cartID) && isset ($_SESSION['cartID'])) {
    if ($_SESSION['cart']->cartID != $_SESSION['cartID'])
    xtc_redirect(xtc_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'));
    }

    if (isset ($_SESSION['credit_covers']))
    unset ($_SESSION['credit_covers']); //ICW ADDED FOR CREDIT CLASS SYSTEM
    // Stock Check
    if ((STOCK_CHECK == 'true') && (STOCK_ALLOW_CHECKOUT != 'true')) {
    $products = $_SESSION['cart']->get_products();
    $any_out_of_stock = 0;
    for ($i = 0, $n = sizeof($products); $i < $n; $i++) {
    if (xtc_check_stock($products[$i]['id'], $products[$i]['quantity']))
    $any_out_of_stock = 1;
    }
    if ($any_out_of_stock == 1)
    xtc_redirect(xtc_href_link(FILENAME_SHOPPING_CART));
    }

    // if no billing destination address was selected, use the customers own address as default
    if (!isset ($_SESSION['billto'])) {
    $_SESSION['billto'] = $_SESSION['customer_default_address_id'];
    } else {
    // verify the selected billing address
    $check_address_query = xtc_db_query("select count(*) as total
    from "
    . TABLE_ADDRESS_BOOK . "
    where customers_id = '"
    . (int) $_SESSION['customer_id'] . "'
    and address_book_id = '"
    . (int) $_SESSION['billto'] . "'");
    $check_address = xtc_db_fetch_array($check_address_query);

    if ($check_address['total'] != '1') {
    $_SESSION['billto'] = $_SESSION['customer_default_address_id'];
    if (isset ($_SESSION['payment'])) {
    unset ($_SESSION['payment']);
    }
    }
    }

    if (!isset ($_SESSION['sendto']) || $_SESSION['sendto'] == "") {
    $_SESSION['sendto'] = $_SESSION['billto'];
    }
    require (DIR_WS_CLASSES . 'order.php');
    $order = new order();

    require (DIR_WS_CLASSES . 'order_total.php'); // GV Code ICW ADDED FOR CREDIT CLASS SYSTEM
    $order_total_modules = new order_total(); // GV Code ICW ADDED FOR CREDIT CLASS SYSTEM

    $total_weight = $_SESSION['cart']->show_weight();

    // $total_count = $_SESSION['cart']->count_contents();
    $total_count = $_SESSION['cart']->count_contents_virtual(); // GV Code ICW ADDED FOR CREDIT CLASS SYSTEM

    if ($order->billing['country']['iso_code_2'] != '' && $order->delivery['country']['iso_code_2'] == '') {
    $_SESSION['delivery_zone'] = $order->billing['country']['iso_code_2'];
    } else {
    $_SESSION['delivery_zone'] = $order->delivery['country']['iso_code_2'];
    }

    // load all enabled payment modules
    require_once (DIR_WS_CLASSES . 'payment.php');
    $payment_modules = new payment;

    $order_total_modules->process();
    // redirect if Coupon matches ammount

    $breadcrumb->add(NAVBAR_TITLE_1_CHECKOUT_PAYMENT, xtc_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'));
    $breadcrumb->add(NAVBAR_TITLE_2_CHECKOUT_PAYMENT, xtc_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'));

    $smarty->assign('FORM_ACTION', xtc_draw_form('checkout_payment', xtc_href_link(FILENAME_CHECKOUT_CONFIRMATION, '', 'SSL'), 'post', 'onSubmit="return check_form();"'));
    $smarty->assign('ADDRESS_LABEL', xtc_address_label($_SESSION['customer_id'], $_SESSION['billto'], true, ' ', '<br />'));
    $smarty->assign('BUTTON_ADDRESS', '<a href="' . xtc_href_link(FILENAME_CHECKOUT_PAYMENT_ADDRESS, '', 'SSL') . '">' . xtc_image_button('button_change_address.gif', IMAGE_BUTTON_CHANGE_ADDRESS) . '</a>');
    $smarty->assign('BUTTON_CONTINUE', xtc_image_submit('button_continue.gif', IMAGE_BUTTON_CONTINUE));
    $smarty->assign('FORM_END', '</form>');

    require (DIR_WS_INCLUDES . 'header.php');
    $module_smarty = new Smarty;
    $order_total = $xtPrice->xtcFormat($order->info['total'],false); //web28 2012-04-27 - rounded $order_total
    if ($order_total > 0) {
    if (isset ($_GET['payment_error']) && is_object(${ $_GET['payment_error'] }) && ($error = ${$_GET['payment_error']}->get_error())) {
    $smarty->assign('error', htmlspecialchars($error['error']));

    }

    $selection = $payment_modules->selection();

    $radio_buttons = 0;
    for ($i = 0, $n = sizeof($selection); $i < $n; $i++) {

    $selection[$i]['radio_buttons'] = $radio_buttons;
    if ((isset($_SESSION['payment']) && $selection[$i]['id'] == $_SESSION['payment']) || (!isset($_SESSION['payment']) && $i == 0 && CHECK_FIRST_PAYMENT_MODUL)) { //web28 - 2012-04-27 - FIX pre-selection the first payment option
    $selection[$i]['checked'] = 1;
    } else {
    $selection[$i]['checked'] = 0;
    }

    if (sizeof($selection) > 1) {
    $selection[$i]['selection'] = xtc_draw_radio_field('payment', $selection[$i]['id'], ($selection[$i]['checked']), 'id="'.($i+1).'"'); //web28 - 2010-11-23 - FIX pre-selection the first payment option
    } else {
    $selection[$i]['selection'] = xtc_draw_hidden_field('payment', $selection[$i]['id']);
    }

    if (!isset ($selection[$i]['error'])) {
    $radio_buttons++;
    }
    }

    $module_smarty->assign('module_content', $selection);
    } else {
    $smarty->assign('GV_COVER', 'true');
    if (isset ($_SESSION['payment'])){
    unset ($_SESSION['payment']); //web28 - 2012-04-27 - Fix for order_total <= 0
    }
    }

    if (ACTIVATE_GIFT_SYSTEM == 'true') {
    $smarty->assign('module_gift', $order_total_modules->credit_selection());
    }

    $module_smarty->caching = 0;
    $payment_block = $module_smarty->fetch(CURRENT_TEMPLATE . '/module/checkout_payment_block.html');

    $smarty->assign('COMMENTS', xtc_draw_textarea_field('comments', 'soft', '60', '5', isset($_SESSION['comments']) ? $_SESSION['comments'] : '') . xtc_draw_hidden_field('comments_added', 'YES'));

    //check if display conditions on checkout page is true
    if (DISPLAY_CONDITIONS_ON_CHECKOUT == 'true') {
    if (GROUP_CHECK == 'true') {
    $group_check = "and group_ids LIKE '%c_" . $_SESSION['customers_status']['customers_status_id'] . "_group%'";
    }

    $shop_content_query = xtc_db_query("SELECT content_title,
    content_heading,
    content_text,
    content_file
    FROM "
    . TABLE_CONTENT_MANAGER . "
    WHERE content_group='3'
    "
    . $group_check . "
    AND languages_id='"
    . $_SESSION['languages_id'] . "'
    LIMIT 1"
    ); //DokuMan - 2011-05-13 - added LIMIT 1


    $shop_content_data = xtc_db_fetch_array($shop_content_query);

    if ($shop_content_data['content_file'] != '') {
    /* BOF - Hetfield - 2010-01-21 - Bugfix including contentfiles at SSL-Proxy */
    //$conditions = '<iframe SRC="' . DIR_WS_CATALOG . 'media/content/' . $shop_content_data['content_file'] . '" width="100%" height="300">';
    $conditions = '<div class="agbframe">' . file_get_contents(DIR_FS_DOCUMENT_ROOT . 'media/content/' . $shop_content_data['content_file']) . '</div>';
    /* EOF - Hetfield - 2010-01-21 - Bugfix including contentfiles at SSL-Proxy */
    } else {
    /* BOF - Hetfield - 2010-01-20 - Remove agb-textarea from checkout_payment */
    //$conditions = '<textarea name="blabla" cols="60" rows="10" readonly="readonly">' . strip_tags(str_replace('<br />', "\n", $shop_content_data['content_text'])) . '</textarea>';
    $conditions = '<div class="agbframe">' . $shop_content_data['content_text'] . '</div>';
    /* EOF - Hetfield - 2010-01-20 - Remove agb-textarea from checkout_payment */
    }

    $smarty->assign('AGB', $conditions);
    $smarty->assign('AGB_LINK', $main->getContentLink(3, MORE_INFO,'SSL')); //Hetfield - 2009-07-29 - SSL for Content-Links per getContentLink

    // BOF - Tomcraft - 2009-10-01 - AGB checkbox re-implemented
    if (isset ($_GET['step']) && $_GET['step'] == 'step2') {
    $smarty->assign('AGB_checkbox', '<input type="checkbox" value="conditions" name="conditions" checked />');
    } else {
    $smarty->assign('AGB_checkbox', '<input type="checkbox" value="conditions" name="conditions" />');
    }
    // EOF - Tomcraft - 2009-10-01 - AGB checkbox re-implemented
    }

    $smarty->assign('language', $_SESSION['language']);
    $smarty->assign('PAYMENT_BLOCK', $payment_block);
    $main_content = $smarty->fetch(CURRENT_TEMPLATE . '/module/checkout_payment.html');
    $smarty->assign('language', $_SESSION['language']);
    $smarty->assign('main_content', $main_content);
    $smarty->caching = 0;
    if (!defined('RM')) {
    $smarty->load_filter('output', 'note');
    }
    $smarty->display(CURRENT_TEMPLATE . '/index.html');
    include ('includes/application_bottom.php');
    ?>

    checkout_payment.html

    Code: XML  [Auswählen]
    {config_load file="$language/lang_$language.conf" section="checkout_payment"}
    {config_load file="$language/lang_$language.conf" section="checkout_navigation"}
    <ul id="checkoutnavigation">
    </ul>
    <div style="clear:both"></div>
    <br />
    {if $error!=''}<div class="errormessage">{$error}</div>{/if}
    {if $step2!='true'}
    <h1>{#title_address#}</h1>
    {$FORM_ACTION}
    <p>{$ADDRESS_LABEL}</p>
    <p>{$BUTTON_ADDRESS}</p>
    <h1>{#title_payment#}</h1>
    <p>{#text_payment#}</p>
    {/if}
    {if $GV_COVER!='true'}{$PAYMENT_BLOCK}{$module_gift}{else}{#text_gccover#}{/if}
    {if $step2!='true'}
    <h2>{#title_comments#}</h2>
    <p class="checkoutcomment">{$COMMENTS}</p>
    <h2>{#title_agb#}</h2>
    <!-- BOF - mollvision - 2010-07-23 - SCROLLBOX REVOCATION AND AGB ON CHECKOUT SITE //-->
    <div id="scrollbox">
    <p class="checkoutagb">{$AGB}</p>
    </div>
    <br />
    <!-- EOF - mollvision - 2010-07-23 - SCROLLBOX REVOCATION AND AGB ON CHECKOUT SITE //-->
    <table width="100%" border="0" cellspacing="0" cellpadding="4">
    <tr>
    <td>{$AGB_checkbox}</td>
    <td width="100%"><strong>{#text_accept_agb#}</strong></td>
    </tr>
    </table>
    {/if}
    <p>{$BUTTON_CONTINUE}</p>
    {$FORM_END}

    Grüße Jupp

    fishnet

    • Fördermitglied
    • Beiträge: 4.821
    • Geschlecht:
    Re: Zahlarten entfernt
    Antwort #4 am: 13. Oktober 2014, 17:39:53
    (der Link auf deinem Häuschen ist nicht dein Ernst, oder?... nur mal laut gedacht)
    Verrätst du uns auch irgendwann deine Shopversion? Findest du im Admin rechts oben wenn du auf CREDITS klickst.

    jupp

    • Frisch an Board
    • Beiträge: 77
    • Geschlecht:
    Re: Zahlarten entfernt
    Antwort #5 am: 13. Oktober 2014, 17:51:41
    v1.05 dated: 2010-07-18 SP1d

    fishnet

    • Fördermitglied
    • Beiträge: 4.821
    • Geschlecht:
    Re: Zahlarten entfernt
    Antwort #6 am: 13. Oktober 2014, 18:16:55
    Ich hab gerade Feierabend, hier aber noch schnell die beiden 1.05 1D Originaldateien zum Vergleich durch WinMerge (NICHT: zum Übernudeln und alte Datei löschen).

    jupp

    • Frisch an Board
    • Beiträge: 77
    • Geschlecht:
    Re: Zahlarten entfernt
    Antwort #7 am: 13. Oktober 2014, 19:48:44
    hmm..  das kann fast nicht an diesen Dateien liegen. Ich habe eben die beiden Dateien mal verglichen und getauscht, aber die Bezahlartauswahl taucht nicht auf. In den lang oder includes vielleicht irgendwo? Im alten Forum gabs damals einen Thread darüber, der ist leider hier nicht mehr.

    Godzilla

    • Schreiberling
    • Beiträge: 489
    Re: Zahlarten entfernt
    Antwort #8 am: 13. Oktober 2014, 21:04:02
    Gibt es vielleicht auf der checkout_shipping.php einen redirect zur checkout_confirmation.php?
    Wurden die anderen Zahlungsmodule nur deaktiviert oder ganz enfernt?

    jupp

    • Frisch an Board
    • Beiträge: 77
    • Geschlecht:
    Re: Zahlarten entfernt
    Antwort #9 am: 13. Oktober 2014, 21:57:36
    die checkout_shipping.php wurde geändert weil ohne Versandartmodul die Bestellung nicht mehr ging und sieht jetzt so aus:

    Code: PHP  [Auswählen]
    <?php
    /* -----------------------------------------------------------------------------------------
       $Id: checkout_shipping.php 2454 2011-12-06 14:44:38Z franky-n-modified eCommerce Shopsoftware $

       modified eCommerce Shopsoftware - community made shopping
       http://www.modified eCommerce Shopsoftware.org

       Copyright (c) 2010 modified eCommerce Shopsoftware
       -----------------------------------------------------------------------------------------
       based on:
       (c) 2000-2001 The Exchange Project  (earlier name of osCommerce)
       (c) 2002-2003 osCommerce(checkout_shipping.php,v 1.15 2003/04/08); www.oscommerce.com
       (c) 2003 nextcommerce (checkout_shipping.php,v 1.20 2003/08/20); www.nextcommerce.org
       (c) 2006 xtCommerce (checkout_shipping.php 1037 2005-07-17)

       Released under the GNU General Public License
       -----------------------------------------------------------------------------------------
       Third Party contribution:

       Credit Class/Gift Vouchers/Discount Coupons (Version 5.10)
       http://www.oscommerce.com/community/contributions,282
       Copyright (c) Strider | Strider@oscworks.com
       Copyright (c) Nick Stanko of UkiDev.com, nick@ukidev.com
       Copyright (c) Andre ambidex@gmx.net
       Copyright (c) 2001,2002 Ian C Wilson http://www.phesis.org

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

    include ('includes/application_top.php');
    //web28 - 2012-04-27 - pre-selection the cheapest shipping option
    if (!defined('CHECK_CHEAPEST_SHIPPING_MODUL')) {
      define ('CHECK_CHEAPEST_SHIPPING_MODUL', false); //true, false - default false
    }
    // create smarty elements
    $smarty = new Smarty;
    // include boxes
    require (DIR_FS_CATALOG.'templates/'.CURRENT_TEMPLATE.'/source/boxes.php');
    // include needed functions

    require_once (DIR_FS_INC.'xtc_address_label.inc.php');
    require_once (DIR_FS_INC.'xtc_get_address_format_id.inc.php');
    require_once (DIR_FS_INC.'xtc_count_shipping_modules.inc.php');

    require (DIR_WS_CLASSES.'http_client.php');

    // check if checkout is allowed
    if (isset($_SESSION['allow_checkout']) && $_SESSION['allow_checkout'] == 'false') {
            xtc_redirect(xtc_href_link(FILENAME_SHOPPING_CART));
    }

    // if the customer is not logged on, redirect them to the login page
    if (!isset ($_SESSION['customer_id'])) {
            if (ACCOUNT_OPTIONS == 'guest') {
                    xtc_redirect(xtc_href_link(FILENAME_CREATE_GUEST_ACCOUNT, '', 'SSL'));
            } else {
                    xtc_redirect(xtc_href_link(FILENAME_LOGIN, '', 'SSL'));
            }
    }
     
    // if there is nothing in the customers cart, redirect them to the shopping cart page
    if ($_SESSION['cart']->count_contents() < 1) {
            xtc_redirect(xtc_href_link(FILENAME_SHOPPING_CART));
    }
    //BOF - Dokuman - 2009-06-06 - checkout only if minimum order value is reached
    if ($_SESSION['cart']->show_total() > 0 ) {
      if ($_SESSION['cart']->show_total() < $_SESSION['customers_status']['customers_status_min_order'] ) {
        xtc_redirect(xtc_href_link(FILENAME_SHOPPING_CART));
      }
    }
    //EOF - Dokuman - 2009-06-06 - checkout only if minimum order value is reached

    // if no shipping destination address was selected, use the customers own address as default
    if (!isset ($_SESSION['sendto'])) {
            $_SESSION['sendto'] = $_SESSION['customer_default_address_id'];
    } else {
            // verify the selected shipping address
            $check_address_query = xtc_db_query("select count(*) as total from ".TABLE_ADDRESS_BOOK." where customers_id = '".(int) $_SESSION['customer_id']."' and address_book_id = '".(int) $_SESSION['sendto']."'");
            $check_address = xtc_db_fetch_array($check_address_query);

            if ($check_address['total'] != '1') {
                    $_SESSION['sendto'] = $_SESSION['customer_default_address_id'];
                    if (isset ($_SESSION['shipping']))
                            unset ($_SESSION['shipping']);
            }
    }

    require (DIR_WS_CLASSES.'order.php');
    $order = new order();

    //BOF - DokuMan - 2010-08-30 - check for cartID also in checkout_shipping
    // avoid hack attempts during the checkout procedure by checking the internal cartID
    if (isset ($_SESSION['cart']->cartID) && isset ($_SESSION['cartID'])) {
        if ($_SESSION['cart']->cartID !== $_SESSION['cartID']) {
          unset($_SESSION['shipping']);
          unset($_SESSION['payment']);
        }
    }
    //EOF - DokuMan - 2010-08-30 - check for cartID also in checkout_shipping

    // register a random ID in the session to check throughout the checkout procedure
    // against alterations in the shopping cart contents
    $_SESSION['cartID'] = $_SESSION['cart']->cartID;

    // if the order contains only virtual products, forward the customer to the billing page as
    // a shipping address is not needed
    if ($order->content_type == 'virtual' || ($order->content_type == 'virtual_weight') || ($_SESSION['cart']->count_contents_virtual() == 0)) { // GV Code added
            $_SESSION['shipping'] = false;
            $_SESSION['sendto'] = false;
            xtc_redirect(xtc_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'));
    }

    $total_weight = $_SESSION['cart']->show_weight();
    $total_count = $_SESSION['cart']->count_contents();

    if ($order->delivery['country']['iso_code_2'] != '') {
            $_SESSION['delivery_zone'] = $order->delivery['country']['iso_code_2'];
    }
    // load all enabled shipping modules
    require (DIR_WS_CLASSES.'shipping.php');
    $shipping_modules = new shipping;

    if (defined('MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING') && (MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING == 'true')) {
            switch (MODULE_ORDER_TOTAL_SHIPPING_DESTINATION) {
                    case 'national' :
                            if ($order->delivery['country_id'] == STORE_COUNTRY)
                                    $pass = true;
                            break;
                    case 'international' :
                            if ($order->delivery['country_id'] != STORE_COUNTRY)
                                    $pass = true;
                            break;
                    case 'both' :
                            $pass = true;
                            break;
                    default :
                            $pass = false;
                            break;
            }

            $free_shipping = false;
            if (($pass == true) && ($order->info['total'] - $order->info['shipping_cost'] >= $xtPrice->xtcFormat(MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING_OVER, false, 0, true))) {
                    $free_shipping = true;

                    include (DIR_WS_LANGUAGES.$_SESSION['language'].'/modules/order_total/ot_shipping.php');
            }
    } else {
            $free_shipping = false;
    }

    // process the selected shipping method
    if (isset ($_POST['action']) && ($_POST['action'] == 'process')) {

            if ((xtc_count_shipping_modules() > 0) || ($free_shipping == true)) {
                    if ((isset ($_POST['shipping'])) && (strpos($_POST['shipping'], '_'))) {
                            $_SESSION['shipping'] = $_POST['shipping'];

                            list ($module, $method) = explode('_', $_SESSION['shipping']);
                            if ((isset($$module) && is_object($$module) ) || ($_SESSION['shipping'] == 'free_free')) {
                                    if ($_SESSION['shipping'] == 'free_free') {
                                            $quote[0]['methods'][0]['title'] = FREE_SHIPPING_TITLE;
                                            $quote[0]['methods'][0]['cost'] = '0';
                                    } else {
                                            $quote = $shipping_modules->quote($method, $module);
                                    }
                                    if (isset ($quote['error'])) {
                                            unset ($_SESSION['shipping']);
                                    } else {
                                            if ((isset ($quote[0]['methods'][0]['title'])) && (isset ($quote[0]['methods'][0]['cost']))) {
                                                    $_SESSION['shipping'] = array ('id' => $_SESSION['shipping'],
                                               'title' => (($free_shipping == true) ? $quote[0]['methods'][0]['title'] : $quote[0]['module'].' ('.$quote[0]['methods'][0]['title'].')'),
                                               'cost' => $quote[0]['methods'][0]['cost']);

                                                    xtc_redirect(xtc_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'));
                                            }
                                    }
                            } else {
                                    unset ($_SESSION['shipping']);
                            }
    // kept code of SP1b, otherwise vpe-module doesn't work, 07.2012, noRiddle
                    }
            } else {
                    $_SESSION['shipping'] = false;

                    xtc_redirect(xtc_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'));
            }
    }


    // get all available shipping quotes
    $quotes = $shipping_modules->quote();

    // if no shipping method has been selected, automatically select the cheapest method.
    // if the modules status was changed when none were available, to save on implementing
    // a javascript force-selection method, also automatically select the cheapest shipping
    // method if more than one module is now enabled
    if ((!isset ($_SESSION['shipping']) && CHECK_CHEAPEST_SHIPPING_MODUL) || (isset ($_SESSION['shipping']) && ($_SESSION['shipping'] == false) && (xtc_count_shipping_modules() > 1))) { //web28 - 2012-04-27 - pre-selection the cheapest shipping option
            $_SESSION['shipping'] = $shipping_modules->cheapest();
    }
    $breadcrumb->add(NAVBAR_TITLE_1_CHECKOUT_SHIPPING, xtc_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'));
    $breadcrumb->add(NAVBAR_TITLE_2_CHECKOUT_SHIPPING, xtc_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'));

    require (DIR_WS_INCLUDES.'header.php');

    $smarty->assign('FORM_ACTION', xtc_draw_form('checkout_address', xtc_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL')).xtc_draw_hidden_field('action', 'process'));
    $smarty->assign('ADDRESS_LABEL', xtc_address_label($_SESSION['customer_id'], $_SESSION['sendto'], true, ' ', '<br />'));
    $smarty->assign('BUTTON_ADDRESS', '<a href="'.xtc_href_link(FILENAME_CHECKOUT_SHIPPING_ADDRESS, '', 'SSL').'">'.xtc_image_button('button_change_address.gif', IMAGE_BUTTON_CHANGE_ADDRESS).'</a>');
    // DokuMan - 2009-06-01 - do not correct the name 'BUTON_CONTINUE' to remain compatible to standard templates
    $smarty->assign('BUTON_CONTINUE', xtc_image_submit('button_continue.gif', IMAGE_BUTTON_CONTINUE));
    $smarty->assign('FORM_END', '</form>');

    $module_smarty = new Smarty;
    $shipping_block = ''; //DokuMan - 2010-08-30 - set undefined variable
    if (xtc_count_shipping_modules() > 0) {
            $showtax = $_SESSION['customers_status']['customers_status_show_price_tax'];
            $module_smarty->assign('FREE_SHIPPING', $free_shipping);
            # free shipping or not...
            if ($free_shipping == true) {
                    $module_smarty->assign('FREE_SHIPPING_TITLE', FREE_SHIPPING_TITLE);
                    $module_smarty->assign('FREE_SHIPPING_DESCRIPTION', sprintf(FREE_SHIPPING_DESCRIPTION, $xtPrice->xtcFormat(MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING_OVER, true, 0, true)).xtc_draw_hidden_field('shipping', 'free_free'));
                    $module_smarty->assign('FREE_SHIPPING_ICON', $quotes[$i]['icon']);
            } else {
                    $radio_buttons = 0;
                    #loop through installed shipping methods...
                    for ($i = 0, $n = sizeof($quotes); $i < $n; $i ++) {
                            if (!isset ($quotes[$i]['error'])) {
                                    for ($j = 0, $n2 = sizeof($quotes[$i]['methods']); $j < $n2; $j ++) {
                                            # set the radio button to be checked if it is the method chosen
                                            $quotes[$i]['methods'][$j]['radio_buttons'] = $radio_buttons;
                                            $checked = ((isset($_SESSION['shipping']) && $quotes[$i]['id'].'_'.$quotes[$i]['methods'][$j]['id'] == $_SESSION['shipping']['id']) ? true : false);
                                            if (($checked == true) || ($n == 1 && $n2 == 1)) {
                                                    $quotes[$i]['methods'][$j]['checked'] = 1;
                                            }
                                            if (($n > 1) || ($n2 > 1)) {
                                                    if ($_SESSION['customers_status']['customers_status_show_price_tax'] == 0 || !isset($quotes[$i]['tax'])) {
                                                            $quotes[$i]['tax'] = 0;
                }
                                                    $quotes[$i]['methods'][$j]['price'] = $xtPrice->xtcFormat(xtc_add_tax($quotes[$i]['methods'][$j]['cost'], $quotes[$i]['tax']), true, 0, true);                                         
                $quotes[$i]['methods'][$j]['radio_field'] = xtc_draw_radio_field('shipping', $quotes[$i]['id'].'_'.$quotes[$i]['methods'][$j]['id'], $checked, 'id="'.($i+1).'"');
                                            } else {
                                                    if ($_SESSION['customers_status']['customers_status_show_price_tax'] == 0) {
                                                            $quotes[$i]['tax'] = 0;
                }
                $quotes[$i]['methods'][$j]['price'] = $xtPrice->xtcFormat(xtc_add_tax($quotes[$i]['methods'][$j]['cost'], isset($quotes[$i]['tax']) ? $quotes[$i]['tax'] : 0), true, 0, true).xtc_draw_hidden_field('shipping', $quotes[$i]['id'].'_'.$quotes[$i]['methods'][$j]['id']);
                                            }
                                            $radio_buttons ++;
                                    }
                            }
                    }
                    $module_smarty->assign('module_content', $quotes);
            }
            $module_smarty->caching = 0;
            $shipping_block = $module_smarty->fetch(CURRENT_TEMPLATE.'/module/checkout_shipping_block.html');
    }

    $smarty->assign('language', $_SESSION['language']);
    $smarty->assign('SHIPPING_BLOCK', $shipping_block);
    $main_content = $smarty->fetch(CURRENT_TEMPLATE.'/module/checkout_shipping.html');
    $smarty->assign('main_content', $main_content);
    $smarty->caching = 0;
    if (!defined('RM'))
            $smarty->load_filter('output', 'note');
    $smarty->display(CURRENT_TEMPLATE.'/index.html');
    include ('includes/application_bottom.php');
    ?>

    Godzilla

    • Schreiberling
    • Beiträge: 489
    Re: Zahlarten entfernt
    Antwort #10 am: 13. Oktober 2014, 23:35:30
    Wieviele Versandarten sind aktuell aktiviert?

    jupp

    • Frisch an Board
    • Beiträge: 77
    • Geschlecht:
    Re: Zahlarten entfernt
    Antwort #11 am: 14. Oktober 2014, 08:43:21
    Keine, aber das hatte ich auch schon versucht in dem ich Versandart aktiviert habe und die checkout_shipping.php wieder in den Originalzustand zurück setzte, dann funktioniert der Bestellvorgang aber nicht mehr, sprich die Seite kann nicht weitergeklickt werden.
    Shop Hosting
    1 Antworten
    2268 Aufrufe
    09. Juli 2010, 14:32:05 von Tomcraft
    2 Antworten
    2021 Aufrufe
    11. Juni 2015, 11:45:35 von webald
    3 Antworten
    3037 Aufrufe
    03. April 2013, 12:34:52 von WayneTsun
    2 Antworten
    2592 Aufrufe
    07. Juli 2011, 12:07:39 von Alphagen2901
               
    anything