Ankündigung

Einklappen
Keine Ankündigung bisher.

Checkout Without Account (COWOA) -Problem

Einklappen
X
 
  • Filter
  • Zeit
  • Anzeigen
Alles löschen
neue Beiträge

    Checkout Without Account (COWOA) -Problem

    Hallo liebes ZC-Forum,

    habe heute auf Kundenwunsch das schon in der Überschrifft genannte Modul installiert (letze Version für Zencart 138 Deutsch https://forenarchiv.zen-cart-pro.at/...d=7&linkid=148)

    habe mich genau an die installationsanleitung gehalten ... aber es scheint nicht ganz zu funktionieren ...

    Das zusätzliche Feld (keine Ahnung wie es aussehen sollte) erscheint nicht wenn ich mit einem Artikel im Warenkorb zur Kasse gehe) siehe Anhang.

    und wenn ich jetzt auf den "Stammkunden Anmelden-Button" klicke bekomm ich diese Fehlermeldung (Firefox 3.0.6 - Alle Caches geleert):

    -------------
    1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ':email AND COWOA_account != 1' at line 9
    in:
    [SELECT customers_id, customers_firstname, customers_password, customers_email_address, customers_default_address_id, customers_authorization, customers_referral FROM customers WHERE customers_email_address = :email AND COWOA_account != 1]
    -----------------------

    habe natürlich überprüft von welcher Datei die Fehlermeldung kommt ...
    es ist die: /includes/modules/pages/login/header_php.php

    hier ein auzszug aus der datei aenderungen.txt
    Code:
    /includes/modules/pages/login/header_php.php
    ====================================================================
    
    SUCHE:
    -
    
      $check_customer_query = "SELECT customers_id, customers_firstname, customers_password,
    
                                        customers_email_address, customers_default_address_id,
    
                                        customers_authorization, customers_referral
    
                               FROM " . TABLE_CUSTOMERS . "
    
                               WHERE customers_email_address = :email";
    
    -
    
    ERSETZE MIT:
    -
    
      $check_customer_query = "SELECT customers_id, customers_firstname, customers_password,
    
                                        customers_email_address, customers_default_address_id,
    
                                        customers_authorization, customers_referral
    
                               FROM " . TABLE_CUSTOMERS . "
    
                               WHERE customers_email_address = :email
                               AND COWOA_account != 1";
    wenn ich die Date in den ursprünglichen Zustand zurückversetze bekomme ich zwar keine Fehlermeldung mehr ... aber der Punkt "einkaufen ohne KundenKonto bzw COWOA" erscheint natürlich auch nicht im Kassenbereich.

    Kenn mich mit PHP leider nicht so gut aus ... aber anscheinend wird was abgefragt was nicht initialisiert wurde ...

    bitte um Hilfe bzw. einen Wink mit dem Zaunpfahl !


    lg & Danke im Voraus

    AlexxJ

    #2
    Hab das jetzt nochmals in einem 1.3.8 installiert und kann das nicht nachstellen.

    Mir ist aber aufgefallen, dass die includes/modules/pages/login/header_php.php in der aktuellen 1.3.8 im relevanten Abschnitt so aussieht:

    Code:
    // Check if email exists
        $check_customer_query = "SELECT customers_id, customers_firstname, customers_lastname, customers_password,
                                        customers_email_address, customers_default_address_id,
                                        customers_authorization, customers_referral
                               FROM " . TABLE_CUSTOMERS . "
                               WHERE customers_email_address = :emailAddress";
    Also emailAddress statt email

    Daher probiere es mal in der COWOA Version mit:

    Code:
     // Check if email exists
       $check_customer_query = "SELECT customers_id, customers_firstname, customers_password,
    
                                        customers_email_address, customers_default_address_id,
    
                                        customers_authorization, customers_referral
    
                               FROM " . TABLE_CUSTOMERS . "
    
                               WHERE customers_email_address = :emailAddress
                               AND COWOA_account != 1";
    Bei mir funktionieren beide Varianten.

    Kommentar


      #3
      Hi Webchills !!!

      danke nochmal für die schnell Antwort ... aber

      MEA CULPA / Tschuldigung / Sorry ...

      habe den Fehler mittlerweile selbst gefunden ...

      habe in der

      /includes/templates/DEINTEMPLATE/templates/tpl_login_default.php

      ERSETZT statt ANGEFÜGT

      sorry .. bin manchmal echt betriebsblind ...

      lg

      Alexx

      Kommentar


        #4
        Hallo webchills,

        ich bekomme das Bestellen ohne Kundenkonto nicht angezeigt.

        Gemäß der Anleitung habe ich das Modul installiert. Es brauchten keine Dateien manuell eingetragen werden, da es sich um eine Neuinstallation handelte.

        Anhand der Anleitung habe ich noch einmal sämtliche Dateien überprüft, ob evtl irgendwas versehntlich überschrieben wurde, doch sind alle Dateien identisch.

        Nur warum bekomme ich die Auswahl auch ohne Kundenkonto zu bestellen nicht angezeigt???

        Kommentar


          #5
          Konfiguration > Layouteinstellungen
          Anmeldeseite geteilt anzeigen hast Du auf true?

          Kommentar


            #6
            Ha neu...

            Entschuldigung an die Einstellung hatte ich nicht gedacht und sie auch prombt überlesen!

            Danke webchills, du bist der Retter in der Not und bringst Licht ins Dunkle!

            So manchmal sieht man dann doch den Wald vor Bäumen nicht!

            Danke nochmals!

            Kommentar


              #7
              Servus,

              muss das Thema auch aufgreifen - habe heute bemerkt, dass meine Kundenanmeldung nicht funktioniert und ich ebenfalls die Fehlermeldung bekomme:
              HTML-Code:
              1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ':email AND COWOA_account != 1' at line 9
              in:
              [SELECT customers_id, customers_firstname, customers_password,                                      customers_email_address, customers_default_address_id,                                      customers_authorization, customers_referral                             FROM customers                             WHERE customers_email_address = :email                            AND COWOA_account != 1]
              Meine header_php.php in /shop/includes/modules/pages/login sieht m.M. korrekt aus.

              HTML-Code:
              <?php
              /**
               * Login Page
               *
               * @package page
               * @copyright Copyright 2003-2007 Zen Cart Development Team
               * @copyright Portions Copyright 2003 osCommerce
               * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
               * @version $Id: header_php.php 6783 2007-08-23 21:16:16Z wilt $
               */
              
              // This should be first line of the script:
              $zco_notifier->notify('NOTIFY_HEADER_START_LOGIN');
              
              // redirect the customer to a friendly cookie-must-be-enabled page if cookies are disabled (or the session has not started)
              if ($session_started == false) {
                zen_redirect(zen_href_link(FILENAME_COOKIE_USAGE));
              }
              
              // if the customer is logged in already, redirect them to the My account page
              if (isset($_SESSION['customer_id']) and $_SESSION['customer_id'] != '') {
                zen_redirect(zen_href_link(FILENAME_ACCOUNT, '', 'SSL'));
              }
              
              require(DIR_WS_MODULES . zen_get_module_directory('require_languages.php'));
              include(DIR_WS_MODULES . zen_get_module_directory(FILENAME_CREATE_ACCOUNT));
              
              $error = false;
              if (isset($_GET['action']) && ($_GET['action'] == 'process')) {
                $email_address = zen_db_prepare_input($_POST['email_address']);
                $password = zen_db_prepare_input($_POST['password']);
              
                /* Privacy-policy-read does not need to be checked during "login"
                if (DISPLAY_PRIVACY_CONDITIONS == 'true') {
                if (!isset($_POST['privacy_conditions']) || ($_POST['privacy_conditions'] != '1')) {
                $error = true;
                $messageStack->add('create_account', ERROR_PRIVACY_STATEMENT_NOT_ACCEPTED, 'error');
                }
                }
                */
              
                if ((!isset($_SESSION['securityToken']) || !isset($_POST['securityToken'])) || ($_SESSION['securityToken'] !== $_POST['securityToken'])) {
                  $error = true;
                  $messageStack->add('login', ERROR_SECURITY_ERROR);
                } else {
              
                  // Check if email exists
                  $check_customer_query = "SELECT customers_id, customers_firstname, customers_password,
              
                                                  customers_email_address, customers_default_address_id,
              
                                                  customers_authorization, customers_referral
              
                                         FROM " . TABLE_CUSTOMERS . "
              
                                         WHERE customers_email_address = :email
                                         AND COWOA_account != 1";
              
                  $check_customer_query  =$db->bindVars($check_customer_query, ':emailAddress', $email_address, 'string');
                  $check_customer = $db->Execute($check_customer_query);
              
                  if (!$check_customer->RecordCount()) {
                    $error = true;
                    $messageStack->add('login', TEXT_LOGIN_ERROR);
                  } elseif ($check_customer->fields['customers_authorization'] == '4') {
                    // this account is banned
                    $zco_notifier->notify('NOTIFY_LOGIN_BANNED');
                    $messageStack->add('login', TEXT_LOGIN_BANNED);
                  } else {
                    // Check that password is good
                    if (!zen_validate_password($password, $check_customer->fields['customers_password'])) {
                      $error = true;
                      $messageStack->add('login', TEXT_LOGIN_ERROR);
                    } else {
                      if (SESSION_RECREATE == 'True') {
                        zen_session_recreate();
                      }
              
                      $check_country_query = "SELECT entry_country_id, entry_zone_id
                                            FROM " . TABLE_ADDRESS_BOOK . "
                                            WHERE customers_id = :customersID
                                            AND address_book_id = :addressBookID";
              
                      $check_country_query = $db->bindVars($check_country_query, ':customersID', $check_customer->fields['customers_id'], 'integer');
                      $check_country_query = $db->bindVars($check_country_query, ':addressBookID', $check_customer->fields['customers_default_address_id'], 'integer');
                      $check_country = $db->Execute($check_country_query);
              
                      $_SESSION['customer_id'] = $check_customer->fields['customers_id'];
                      $_SESSION['customer_default_address_id'] = $check_customer->fields['customers_default_address_id'];
                      $_SESSION['customers_authorization'] = $check_customer->fields['customers_authorization'];
                      $_SESSION['customer_first_name'] = $check_customer->fields['customers_firstname'];
                      $_SESSION['customer_last_name'] = $check_customer->fields['customers_lastname'];
                      $_SESSION['customer_country_id'] = $check_country->fields['entry_country_id'];
                      $_SESSION['customer_zone_id'] = $check_country->fields['entry_zone_id'];
              
                      $sql = "UPDATE " . TABLE_CUSTOMERS_INFO . "
                            SET customers_info_date_of_last_logon = now(),
                                customers_info_number_of_logons = customers_info_number_of_logons+1
                            WHERE customers_info_id = :customersID";
              
                      $sql = $db->bindVars($sql, ':customersID',  $_SESSION['customer_id'], 'integer');
                      $db->Execute($sql);
                      $zco_notifier->notify('NOTIFY_LOGIN_SUCCESS');
              
                      // bof: contents merge notice
                      // save current cart contents count if required
                      if (SHOW_SHOPPING_CART_COMBINED > 0) {
                        $zc_check_basket_before = $_SESSION['cart']->count_contents();
                      }
              
                      // bof: not require part of contents merge notice
                      // restore cart contents
                      $_SESSION['cart']->restore_contents();
                      // eof: not require part of contents merge notice
              
                      // check current cart contents count if required
                      if (SHOW_SHOPPING_CART_COMBINED > 0 && $zc_check_basket_before > 0) {
                        $zc_check_basket_after = $_SESSION['cart']->count_contents();
                        if (($zc_check_basket_before != $zc_check_basket_after) && $_SESSION['cart']->count_contents() > 0 && SHOW_SHOPPING_CART_COMBINED > 0) {
                          if (SHOW_SHOPPING_CART_COMBINED == 2) {
                            // warning only do not send to cart
                            $messageStack->add_session('header', WARNING_SHOPPING_CART_COMBINED, 'caution');
                          }
                          if (SHOW_SHOPPING_CART_COMBINED == 1) {
                            // show warning and send to shopping cart for review
                            $messageStack->add_session('shopping_cart', WARNING_SHOPPING_CART_COMBINED, 'caution');
                            zen_redirect(zen_href_link(FILENAME_SHOPPING_CART, '', 'NONSSL'));
                          }
                        }
                      }
                      // eof: contents merge notice
              
                      if (sizeof($_SESSION['navigation']->snapshot) > 0) {
                        //    $back = sizeof($_SESSION['navigation']->path)-2;
                        //if (isset($_SESSION['navigation']->path[$back]['page'])) {
                        //    if (sizeof($_SESSION['navigation']->path)-2 > 0) {
                        $origin_href = zen_href_link($_SESSION['navigation']->snapshot['page'], zen_array_to_string($_SESSION['navigation']->snapshot['get'], array(zen_session_name())), $_SESSION['navigation']->snapshot['mode']);
                        //            $origin_href = zen_back_link_only(true);
                        $_SESSION['navigation']->clear_snapshot();
                        zen_redirect($origin_href);
                      } else {
                        zen_redirect(zen_href_link(FILENAME_DEFAULT, '', $request_type));
                      }
                    }
                  }
                }
              }
              if ($error == true) {
                $zco_notifier->notify('NOTIFY_LOGIN_FAILURE');
              }
              
              $breadcrumb->add(NAVBAR_TITLE);
              
              // Check for PayPal express checkout button suitability:
              $paypalec_enabled = (defined('MODULE_PAYMENT_PAYPALWPP_STATUS') && MODULE_PAYMENT_PAYPALWPP_STATUS == 'True');
              // Check for express checkout button suitability:
              $ec_button_enabled = ($paypalec_enabled && ($_SESSION['cart']->count_contents() > 0 && $_SESSION['cart']->total > 0));
              
              
              // This should be last line of the script:
              $zco_notifier->notify('NOTIFY_HEADER_END_LOGIN');
              ?>
              Allerdings schein bei der tpl_login_default.php (/shop/includes/templates/viennablood/templates) was nicht zu passen.
              Sie sieht bei mir so aus:

              HTML-Code:
              <?php
              /**
               * Page Template
               *
               * @package templateSystem
               * @copyright Copyright 2003-2007 Zen Cart Development Team
               * @copyright Portions Copyright 2003 osCommerce
               * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
               * @version $Id: tpl_login_default.php 5926 2007-02-28 18:15:39Z drbyte $
               */
              ?>
              <div class="centerColumn" id="loginDefault">
              
              <h1 id="loginDefaultHeading"><?php echo HEADING_TITLE; ?></h1>
              
              <?php if ($messageStack->size('login') > 0) echo $messageStack->output('login'); ?>
              
              
              <?php if ( USE_SPLIT_LOGIN_MODE == 'True' || $ec_button_enabled) { ?>
              <!--BOF PPEC split login- DO NOT REMOVE-->
              <fieldset class="floatingBox back">
              <legend><?php echo HEADING_NEW_CUSTOMER_SPLIT; ?></legend>
              <?php // ** BEGIN PAYPAL EXPRESS CHECKOUT ** ?>
              <?php if ($ec_button_enabled) { ?>
              <div class="information"><?php echo TEXT_NEW_CUSTOMER_INTRODUCTION_SPLIT; ?></div>
              
                <div class="center"><?php require(DIR_FS_CATALOG . DIR_WS_MODULES . 'payment/paypal/tpl_ec_button.php'); ?></div>
              <hr />
              <?php echo TEXT_NEW_CUSTOMER_POST_INTRODUCTION_DIVIDER; ?>
              <?php } ?>
              <?php // ** END PAYPAL EXPRESS CHECKOUT ** ?>
              <div class="information"><?php echo TEXT_NEW_CUSTOMER_POST_INTRODUCTION_SPLIT; ?></div>
              
              <?php echo zen_draw_form('create', zen_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL')); ?>
              <div class="buttonRow forward"><?php echo zen_image_submit(BUTTON_IMAGE_CREATE_ACCOUNT, BUTTON_CREATE_ACCOUNT_ALT); ?></div>
              </form>
              </fieldset>
              
              <fieldset class="floatingBox forward">
              <legend><?php echo HEADING_RETURNING_CUSTOMER_SPLIT; ?></legend>
              <div class="information"><?php echo TEXT_RETURNING_CUSTOMER_SPLIT; ?></div>
              
              <?php echo zen_draw_form('login', zen_href_link(FILENAME_LOGIN, 'action=process', 'SSL')); ?>
              <label class="inputLabel" for="login-email-address"><?php echo ENTRY_EMAIL_ADDRESS; ?></label>
              <?php echo zen_draw_input_field('email_address', '', 'size="18" id="login-email-address"'); ?>
              <br class="clearBoth" />
              
              <label class="inputLabel" for="login-password"><?php echo ENTRY_PASSWORD; ?></label>
              <?php echo zen_draw_password_field('password', '', 'size="18" id="login-password"'); ?>
              <?php echo zen_draw_hidden_field('securityToken', $_SESSION['securityToken']); ?>
              <br class="clearBoth" />
              
              <div class="buttonRow forward"><?php echo zen_image_submit(BUTTON_IMAGE_LOGIN, BUTTON_LOGIN_ALT); ?></div>
              <div class="buttonRow back important"><?php echo '<a href="' . zen_href_link(FILENAME_PASSWORD_FORGOTTEN, '', 'SSL') . '">' . TEXT_PASSWORD_FORGOTTEN . '</a>'; ?></div>
              </form>
              </fieldset>
              <br class="clearBoth" />
              
              <?php
                if ($_SESSION['cart']->count_contents() > 0) { ?>
                  <fieldset>
                  <legend>Checkout Without Account</legend>
                  <?php echo TEXT_RATHER_COWOA; ?>
                  <div class="buttonRow forward">
                  <?php echo "<a href=\"" . zen_href_link(FILENAME_NO_ACCOUNT, '', 'SSL') . "\">"; ?>
                  <?php echo zen_image_button(BUTTON_IMAGE_CONTINUE, BUTTON_CONTINUE_ALT); ?></a></div>
                  <br class="clearBoth" />
                  </fieldset>
              <?php } ?>
              
              
              
              <!--EOF PPEC split login- DO NOT REMOVE-->
              <?php } else { ?>
              <!--BOF normal login-->
              <?php
                if ($_SESSION['cart']->count_contents() > 0) {
              ?>
              <div class="advisory"><?php echo TEXT_VISITORS_CART; ?></div>
              <?php
                }
              ?>
              <?php echo zen_draw_form('login', zen_href_link(FILENAME_LOGIN, 'action=process', 'SSL')); ?>
              <fieldset>
              <legend><?php echo HEADING_RETURNING_CUSTOMER; ?></legend>
              
              <label class="inputLabel" for="login-email-address"><?php echo ENTRY_EMAIL_ADDRESS; ?></label>
              <?php echo zen_draw_input_field('email_address', '', zen_set_field_length(TABLE_CUSTOMERS, 'customers_email_address', '40') . ' id="login-email-address"'); ?>
              <br class="clearBoth" />
              
              <label class="inputLabel" for="login-password"><?php echo ENTRY_PASSWORD; ?></label>
              <?php echo zen_draw_password_field('password', '', zen_set_field_length(TABLE_CUSTOMERS, 'customers_password', '40') . ' id="login-password"'); ?>
              <br class="clearBoth" />
              <?php echo zen_draw_hidden_field('securityToken', $_SESSION['securityToken']); ?>
              </fieldset>
              
              <div class="buttonRow forward"><?php echo zen_image_submit(BUTTON_IMAGE_LOGIN, BUTTON_LOGIN_ALT); ?></div>
              <div class="buttonRow back important"><?php echo '<a href="' . zen_href_link(FILENAME_PASSWORD_FORGOTTEN, '', 'SSL') . '">' . TEXT_PASSWORD_FORGOTTEN . '</a>'; ?></div>
              </form>
              <br class="clearBoth" />
              
              <?php echo zen_draw_form('create_account', zen_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL'), 'post', 'onsubmit="return check_form(create_account);"') . zen_draw_hidden_field('action', 'process') . zen_draw_hidden_field('email_pref_html', 'email_format'); ?>
              <fieldset>
              <legend><?php echo HEADING_NEW_CUSTOMER; ?></legend>
              
              <div class="information"><?php echo TEXT_NEW_CUSTOMER_INTRODUCTION; ?></div>
              
              <?php require($template->get_template_dir('tpl_modules_create_account.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_create_account.php'); ?>
              
              </fieldset>
              
              <div class="buttonRow forward"><?php echo zen_image_submit(BUTTON_IMAGE_SUBMIT, BUTTON_SUBMIT_ALT); ?></div>
              </form>
              <!--EOF normal login-->
              <?php } ?>
              </div>
              Sorry für den langen Eintrag, aber ich brüte schon seit heute Mittag darüber........

              Was habe ich hier verdusselt??

              Grüße

              Zengy
              Zuletzt geändert von zengy; 11.01.2010, 00:04.

              Kommentar


                #8
                Ersetze mal in der includes/modules/pages/login/header_php.php

                Code:
                // Check if email exists
                    $check_customer_query = "SELECT customers_id, customers_firstname, customers_password,
                
                                                    customers_email_address, customers_default_address_id,
                
                                                    customers_authorization, customers_referral
                
                                           FROM " . TABLE_CUSTOMERS . "
                
                                           WHERE customers_email_address = :email
                                           AND COWOA_account != 1";
                mit:

                Code:
                // Check if email exists
                    $check_customer_query = "SELECT customers_id, customers_firstname, customers_password,
                
                                                    customers_email_address, customers_default_address_id,
                
                                                    customers_authorization, customers_referral
                
                                           FROM " . TABLE_CUSTOMERS . "
                
                                           WHERE customers_email_address = :emailAddress
                                           AND COWOA_account != 1";

                Kommentar


                  #9
                  Klasse - das war´s! Leider habe ich wohl gestern nacht einen Wurm in meine SQL-DB gebracht, wenn ich jetzt ohne Anmelden kaufen will, kommt folgendes:

                  HTML-Code:
                  1062 Duplicate entry '2' for key 1
                  in:
                  [insert into customers_info                           (customers_info_id, customers_info_number_of_logons,                            customers_info_date_account_created)               values ('2', '0', now())]
                  Grüße und Danke für die super Unterstützung!

                  Zengy

                  Kommentar


                    #10
                    Hat sich erledigt - manchmal sind DB-Sicherungen ganz hilfreich

                    Grüße

                    Zengy

                    Kommentar


                      #11
                      Jetzt habe ich ein Problem mit dem Modul.
                      Ich hab alles so gemacht wie es in der Anleitung stand.
                      Wenn ich etwas kaufen will ohne Account wird mir das auch angezeigt- nur dann kommt eine Seite mit "Rechnungsinformation"- die ist dann aber komplett leer. Woran kanns liegen?

                      Kommentar


                        #12
                        Hallo,

                        Zitat zengy oder onlinedeniz ?
                        Hat sich erledigt - manchmal sind DB-Sicherungen ganz hilfreich
                        kann es sein das du eine Backup
                        eingespielt hast wo die Daten vom Modul gefehlt haben?

                        LG
                        bewusst

                        Kommentar

                        Info zu diesem Forenarchiv:
                        Mit Release von 1.5.7 wurde die deutsche Zen Cart Version auf eine reine DIY-Lösung umgestellt.
                        Für einen Support via Forum stehen keine personellen und zeitlichen Ressourcen mehr zur Verfügung.
                        Dieses Supportforum bleibt im Nur-Lesen-Modus als Wissensarchiv noch online verfügbar.
                        PM Funktionalität, Registrierung und Posten neuer Beiträge sind deaktiviert.
                        Zugriff auf Anhänge in den Postings ist auch ohne Registrierung/Einloggen möglich.
                        FAQ und Downloadbereich des Forums wurden in die neue umfangreiche Knowledgebase auf der zen-cart-pro.at Website übernommen.

                        Das Development der deutschen Zen Cart Version geht wie bisher auf Github weiter.
                        Wir werden auch weiterhin neue Versionen bereitstellen und die Onlinedokumentation/Knowledgebase aktualisieren.
                        Fehler in der Software können auf Github als Issues gemeldet werden.
                        Follow us
                        aktuelle version
                        Zen Cart 1.5.7g deutsch
                        vom 12.12.2023
                        [Download]
                        Lädt...
                        X