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: BETA MODUL: Merkzettel oder Merkliste

    karabey

    • Schreiberling
    • Beiträge: 320
    • Geschlecht:
    Re: BETA MODUL: Merkzettel oder Merkliste
    Antwort #90 am: 26. September 2013, 00:59:25
    Wäre genial wenn registrierte Kunden unterschiedliche Merklisten erstellen und diese auch sharen könnten  :-)
    rechtstexte für onlineshop

    voodoopupp

    • Fördermitglied
    • Beiträge: 1.869
    • Geschlecht:
    Re: BETA MODUL: Merkzettel oder Merkliste
    Antwort #91 am: 26. September 2013, 05:54:44
    Und was sollte das bringen? Ich denke eher, dass du "Wunschzettel" meinst, oder?

    karabey

    • Schreiberling
    • Beiträge: 320
    • Geschlecht:
    Re: BETA MODUL: Merkzettel oder Merkliste
    Antwort #92 am: 26. September 2013, 20:30:25
    Gibt es den ein Funktionsunterschied zwischen ein Merkzettel und Wunschliste?
    Das sharen hat viele Vorteile für den Händler. Wenn ein Kunde seine Merkliste (Wunschliste) verteilt (Foren, Email) bringt es neue Kunden die nicht selbst Produktkombinationen (Bundle) erstellen müssen.

    p3e

    • Experte
    • Beiträge: 2.425
    Re: BETA MODUL: Merkzettel oder Merkliste
    Antwort #93 am: 26. September 2013, 20:51:12
    Wenn der Merkzettel nicht Kundenbezogen ist,  hat das denn Vorteil,  dass man Kunden einen Link auf eine Merkliste schicken kann,  wenn man für den Kunden ein BeispielSortiment zusammen gestellt hat.

    karabey

    • Schreiberling
    • Beiträge: 320
    • Geschlecht:
    Re: BETA MODUL: Merkzettel oder Merkliste
    Antwort #94 am: 28. September 2013, 00:27:26
    Genau so etwas meine ich auch

    StefanS

    • Fördermitglied
    • Beiträge: 53
    • Geschlecht:
    Re: BETA MODUL: Merkzettel oder Merkliste
    Antwort #95 am: 24. Oktober 2013, 12:54:44
    Moin ich hab mal eine Frage,
    ich habe das Modul eingebaut allerdings stelle ich fest dass wenn ich den Button "Merkzettel" klicke dass das Produkt in den Warenkorb gelegt wird und nicht in die Merkliste...

    kann mir jemand verraten wo mein Fehler liegt?

    Liebe Grüße
    Stefan

    jannemann

    • modified Team
    • Beiträge: 6.275
    • Geschlecht:
    Re: BETA MODUL: Merkzettel oder Merkliste
    Antwort #96 am: 24. Oktober 2013, 21:13:38
    Hallo StefanS,

    überprüfe noch mal deinen Einbau.
    Welche Shopversion setzt du denn ein?

    Schöne Grüße,
    Jan

    danielawoe

    • Neu im Forum
    • Beiträge: 5
    Re: BETA MODUL: Merkzettel oder Merkliste
    Antwort #97 am: 11. November 2013, 12:13:02
    Hallo liebe Kollegen,
    ich habe ein kleines Problem, und zwar habe ich einen Shop halbfertig von jemandem übernommen ohne jedwege Dokumentation und leider so, dass der Programmierer und der Kunde im Streit auseinander sind.

    Er hat schon einiges am Code verändert und *räusper* kann mehr PHP als ich... ich bin mehr so die "copy und paste-Fraktion", wenn es aber ans eingemachte geht, hab ich ein Problem.

    Ich habe nun das Merkzettel-Modul eingebaut, habe aber ein Problem mit der cart_actions.php

    Der Kollege hat die Datei bearbeitet und nun weiß ich nicht, wo ich die Codezeilen einfügen soll.
    Wenn ich es an der Stelle einfüge, wo ich es dachte, werden sowohl die Wunschliste, als auch der Warenkorb aktualisiert.

    Oder alternativ funktioniert das Entfernen von Artikeln im Warenkorb nicht mehr... HILFE!

    Für nen Programmierer erschliesst es sich sicher sofort, aber ich komme nicht weiter...

    Im Anhang meine Datei

    MERCI

    Saywer

    • Neu im Forum
    • Beiträge: 43
    Re: BETA MODUL: Merkzettel oder Merkliste
    Antwort #98 am: 08. Januar 2014, 15:23:22
    Vielen Dank für das Modul!

    Eine Frage noch:
    Wie muss der Link lauten, damit der Merkzettel als Popup öffnet?

    Analog zum unten gezeigten Beispiel fehlt mit die ContentID

    Code: XML  [Auswählen]
    <a class="thickbox" title="Box Title"  href="http://www.########.de/shop/popup_content.php?coID=10&amp;KeepThis=true&amp;TB_iframe=true&amp;height=300&amp;width=350" target="_blank" rel="nofollow">Link Text</a>

    Vielen Dank!

    ShadowByte

    • Neu im Forum
    • Beiträge: 30
    • Geschlecht:
    Re: BETA MODUL: Merkzettel oder Merkliste
    Antwort #99 am: 08. Januar 2014, 19:49:51
    Hallo Koala,

    vielen Dank für die Anpassungen. Funktioniert auch alles soweit.

    Allerdings, wenn ich einen Artikel, der zur Zeit nicht Verfügbar ist, auf die Merkliste setzen möchte geht das nicht. Dann wird man jedes mal zum Warenkorb geleitet.

    Kann es sein das es daran liegt das ich noch das MODUL: Produkterinnerung für modified eCommerce Shopsoftware installiert habe?

    Bei Artikeln die Ausverkauft sind, wird dadurch der Warenkorb-Button und das Anzahlkästchen ausgeblendet.

    Vielen Dank im voraus

    Wave

    • Mitglied
    • Beiträge: 146
    Re: BETA MODUL: Merkzettel oder Merkliste
    Antwort #100 am: 25. April 2014, 03:24:45
    Kurz mal die Änderungen die gemacht werden müssen,
    für die Leute die die Anzahl in der Merkliste haben wollen.

    Bisher war ja das Problem,
    daß die Anzahl nicht richtig in den Warenkorb
    übernommen wurde.
    Bzw. wollten manche gar keine Anzahl haben,
    aber das mach ich dann in der nächsten Modul-Version.

    Also die Änderungen die gemacht werden müssen,
    für die Leute die die Anzahl in der Merkliste haben wollen
    und damit die dort gewählte Anzahl auch in den Warenkorb
    übernommen wird. (Der Kunde darf nur "aktualisieren" nicht vergessen):

    ***********************************************
    1) root/includes/modules/order_details_wishlist.php

    das suchen (kann auch so ähnlich aussehn,
    auf jeden Fall nach BUY_NOW suchen):

    Code: PHP  [Auswählen]
    'BUY_NOW' => '<br /><a href="' . xtc_href_link(basename($PHP_SELF), xtc_get_all_get_params(array('action')) . 'action=buy_now&BUYproducts_id=' . $products[$i]['id'], 'NONSSL') . '">' . xtc_image_button('button_buy_now_small.gif', TEXT_BUY . TEXT_NOW)

    hiermit ersetzen:

    Code: PHP  [Auswählen]
    'BUY_NOW' => '<a href="' . xtc_href_link(basename($PHP_SELF), xtc_get_all_get_params(array('action')) . 'action=wishlist_buy_now&BUYproducts_id=' . $products[$i]['id'], 'NONSSL') . '">' . xtc_image_button('button_in_cart.gif', TEXT_BUY . TEXT_NOW)

    2)  root/includes/cart_actions.php

    Code: PHP  [Auswählen]
        // performed by the 'buy now' button in product listings and review page
        case 'buy_now':
          if (isset($_GET['BUYproducts_id'])) {
            $_GET['BUYproducts_id'] = (int)$_GET['BUYproducts_id'];
            // check permission to view product
            $permission_query = xtc_db_query("SELECT group_permission_" . $_SESSION['customers_status']['customers_status_id'] . " as customer_group,
                                                     products_fsk18
                                               from "
    . TABLE_PRODUCTS . "
                                              where products_id='"
    . $_GET['BUYproducts_id'] . "'");
            $permission = xtc_db_fetch_array($permission_query);

            // check for FSK18
            if ($permission['products_fsk18'] == '1' && $_SESSION['customers_status']['customers_fsk18'] == '1') {
              xtc_redirect(xtc_href_link(FILENAME_PRODUCT_INFO, 'products_id=' .$_GET['BUYproducts_id'], 'NONSSL'));
            }
            if ($_SESSION['customers_status']['customers_fsk18_display'] == '0' && $permission['products_fsk18'] == '1') {
              xtc_redirect(xtc_href_link(FILENAME_PRODUCT_INFO, 'products_id=' .$_GET['BUYproducts_id'], 'NONSSL'));
            }
            // check for customer group
            if (GROUP_CHECK == 'true') {
              if ($permission['customer_group'] != '1') {
                xtc_redirect(xtc_href_link(FILENAME_PRODUCT_INFO, 'products_id=' .$_GET['BUYproducts_id']));
              }
            }
            if (xtc_has_product_attributes($_GET['BUYproducts_id'])) {
              xtc_redirect(xtc_href_link(FILENAME_PRODUCT_INFO, 'products_id=' .$_GET['BUYproducts_id']));
            } else {
              if (isset ($_SESSION['cart'])) {
                $cart_quantity = ($_SESSION['cart']->get_quantity(xtc_get_uprid($_GET['BUYproducts_id'],''))+1);
                if ($cart_quantity > MAX_PRODUCTS_QTY) {
                  $cart_quantity = MAX_PRODUCTS_QTY;
                }
                if (isset($econda) && is_object($econda)) {
                  $econda->_emptyCart();
                  $old_quantity = $_SESSION['cart']->get_quantity($_GET['BUYproducts_id']);
                  $econda->_addProduct($_GET['BUYproducts_id'], $cart_quantity, $old_quantity);
                }
                $_SESSION['cart']->add_cart($_GET['BUYproducts_id'], $cart_quantity);
              } else {
                xtc_redirect(xtc_href_link(FILENAME_DEFAULT));
              }
            }
          }
          xtc_redirect(xtc_href_link($goto, xtc_get_all_get_params(array ('action','BUYproducts_id'))));
          break;

    danach einfügen:

    Code: PHP  [Auswählen]
        // performed by the 'buy now' button in wish list
        case 'wishlist_buy_now':
          if (isset($_GET['BUYproducts_id'])) {
            $_GET['BUYproducts_id'] = (int)$_GET['BUYproducts_id'];
            // check permission to view product
            $permission_query = xtc_db_query("SELECT group_permission_" . $_SESSION['customers_status']['customers_status_id'] . " as customer_group,
                                                     products_fsk18
                                               from "
    . TABLE_PRODUCTS . "
                                              where products_id='"
    . $_GET['BUYproducts_id'] . "'");
            $permission = xtc_db_fetch_array($permission_query);

            // check for FSK18
            if ($permission['products_fsk18'] == '1' && $_SESSION['customers_status']['customers_fsk18'] == '1') {
              xtc_redirect(xtc_href_link(FILENAME_PRODUCT_INFO, 'products_id=' .$_GET['BUYproducts_id'], 'NONSSL'));
            }
            if ($_SESSION['customers_status']['customers_fsk18_display'] == '0' && $permission['products_fsk18'] == '1') {
              xtc_redirect(xtc_href_link(FILENAME_PRODUCT_INFO, 'products_id=' .$_GET['BUYproducts_id'], 'NONSSL'));
            }
            // check for customer group
            if (GROUP_CHECK == 'true') {
              if ($permission['customer_group'] != '1') {
                xtc_redirect(xtc_href_link(FILENAME_PRODUCT_INFO, 'products_id=' .$_GET['BUYproducts_id']));
              }
            }
            if (xtc_has_product_attributes($_GET['BUYproducts_id'])) {
              xtc_redirect(xtc_href_link(FILENAME_PRODUCT_INFO, 'products_id=' .$_GET['BUYproducts_id']));
            } else {
              if (isset ($_SESSION['wishList'])) {
                $cart_quantity = ($_SESSION['wishList']->get_quantity(xtc_get_uprid($_GET['BUYproducts_id'],'')));
                if ($cart_quantity > MAX_PRODUCTS_QTY) {
                  $cart_quantity = MAX_PRODUCTS_QTY;
                }
                if (isset($econda) && is_object($econda)) {
                  $econda->_emptyCart();
                  $old_quantity = $_SESSION['cart']->get_quantity($_GET['BUYproducts_id']);
                  $econda->_addProduct($_GET['BUYproducts_id'], $cart_quantity, $old_quantity);
                }
                $_SESSION['cart']->add_cart($_GET['BUYproducts_id'], $cart_quantity);
              } else {
                xtc_redirect(xtc_href_link(FILENAME_DEFAULT));
              }
            }
          }
          xtc_redirect(xtc_href_link($goto, xtc_get_all_get_params(array ('action','BUYproducts_id'))));
          break;

    Ne Idee wieso das bei mir nicht funzt ?

    Vorher konnte ich das ganze in den Warenkorb legen, aber wie oben beschrieben nur 1 Stück ( Obwohl 10 Stück in der Merkliste je Produkt )

    Dann hab ich das ganze eingebaut: Nun springt er direkt zum Produkt anstatt die Artikel in den Warenkorb zu legen.

    Code: PHP  [Auswählen]
    <?php
    /* -----------------------------------------------------------------------------------------
    $Id: order_details_wishlist.php by xtc-shoplayout.de $

    XT-Commerce - community made shopping
    http://www.(( Wir dulden keine kommerziellen Werbelinks - Bitte Forenregeln beachten! ))

    Copyright (c) 2003 XT-Commerce
    -----------------------------------------------------------------------------------------
    based on:
    (c) 2000-2001 The Exchange Project  (earlier name of osCommerce)
    (c) 2002-2003 osCommerce(order_details.php,v 1.8 2003/05/03); www.oscommerce.com
    (c) 2003   nextcommerce (order_details.php,v 1.16 2003/08/17); www.nextcommerce.org

    Released under the GNU General Public License

    ---------------------------------------------------------------------------------------*/

    $module_smarty=new Smarty;
    $module_smarty->assign('tpl_path','templates/'.CURRENT_TEMPLATE.'/');
    // include needed functions
    require_once(DIR_FS_INC . 'xtc_draw_separator.inc.php');
    require_once(DIR_FS_INC . 'xtc_draw_form.inc.php');
    require_once(DIR_FS_INC . 'xtc_draw_input_field.inc.php');
    require_once(DIR_FS_INC . 'xtc_draw_checkbox_field.inc.php');
    require_once(DIR_FS_INC . 'xtc_draw_selection_field.inc.php');
    require_once(DIR_FS_INC . 'xtc_draw_hidden_field.inc.php');
    require_once(DIR_FS_INC . 'xtc_check_stock.inc.php');
    require_once(DIR_FS_INC . 'xtc_get_products_stock.inc.php');
    require_once(DIR_FS_INC . 'xtc_remove_non_numeric.inc.php');
    require_once(DIR_FS_INC . 'xtc_get_short_description.inc.php');
    require_once(DIR_FS_INC . 'xtc_format_price.inc.php');

    $module_content=array();
    $any_out_of_stock='';
    $mark_stock='';

    for ($i=0, $n=sizeof($products); $i<$n; $i++) {
      if (STOCK_CHECK == 'true') {
        $mark_stock= xtc_check_stock($products[$i]['id'], $products[$i]['quantity']);
        if ($mark_stock) $_SESSION['any_out_of_stock']=1;
      }

      $image='';
      if ($products[$i]['image']!='') {
        $image=DIR_WS_THUMBNAIL_IMAGES.$products[$i]['image'];
      }

      $module_content[$i]=array(
      'PRODUCTS_NAME'              => $products[$i]['name'].$mark_stock,
      'PRODUCTS_QTY'               => xtc_draw_input_field('cart_quantity[]', $products[$i]['quantity'], 'size="2"') . xtc_draw_hidden_field('products_id[]', $products[$i]['id']),
      'PRODUCTS_MODEL'             => $products[$i]['model'],
      'PRODUCTS_TAX'               => number_format($products[$i]['tax'], TAX_DECIMAL_PLACES),
      'PRODUCTS_IMAGE'             => $image,
      'IMAGE_ALT'                  => $products[$i]['name'],
      'BOX_DELETE'                 => xtc_draw_checkbox_field('cart_delete[]', $products[$i]['id']),
      'DELETE_ICON'                => '<a href="'. xtc_href_link(FILENAME_SHOPPING_CART, 'action=update_product_cart&products_id='.$products[$i]['id']). '">'.  xtc_image('templates/'.CURRENT_TEMPLATE.'/img/button_cart_delete.jpg', 'l&ouml;schen'). '</a>',
      'PRODUCTS_LINK'              => xtc_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products[$i]['id']),
      'PRODUCTS_PRICE'             => $xtPrice->xtcFormat($products[$i]['price']*$products[$i]['quantity'],true),
      'PRODUCTS_SINGLE_PRICE'      => $xtPrice->xtcFormat($products[$i]['price'],true),
      'PRODUCTS_SHORT_DESCRIPTION' => strip_tags(xtc_get_short_description($products[$i]['id'])),
      'ATTRIBUTES' => '',
      'BUY_NOW' => '<a href="' . xtc_href_link(basename($PHP_SELF), xtc_get_all_get_params(array('action')) . 'action=wishlist_buy_now&BUYproducts_id=' . $products[$i]['id'], 'NONSSL') . '">' . xtc_image_button('button_in_cart.gif', TEXT_BUY . TEXT_NOW)
      );

      // Product options names
      $attributes_exist = ((isset($products[$i]['attributes'])) ? 1 : 0);
      if ($attributes_exist == 1) {
        reset($products[$i]['attributes']);
        while (list($option, $value) = each($products[$i]['attributes'])) {
          if (ATTRIBUTE_STOCK_CHECK == 'true' && STOCK_CHECK == 'true') {
            $attribute_stock_check = xtc_check_stock_attributes($products[$i][$option]['products_attributes_id'], $products[$i]['quantity']);
            if ($attribute_stock_check) $_SESSION['any_out_of_stock']=1;
          }
          $module_content[$i]['ATTRIBUTES'][]=array(
          'ID'         => $products[$i][$option]['products_attributes_id'],
          'MODEL'      => $products[$i][$option]['products_options_model'],
          'NAME'       => $products[$i][$option]['products_options_name'],
          'VALUE_NAME' => $products[$i][$option]['products_options_values_name'].$attribute_stock_check
          );
        }
      }
    }

    $total_content='';
    if ($_SESSION['customers_status']['customers_status_ot_discount_flag'] == '1' && $_SESSION['customers_status']['customers_status_ot_discount'] != '0.00') {
      $discount = xtc_recalculate_price($_SESSION['cart']->show_total(), $_SESSION['customers_status']['customers_status_ot_discount']);
      $total_content= $_SESSION['customers_status']['customers_status_ot_discount'] . ' % ' . SUB_TITLE_OT_DISCOUNT . ' -' . xtc_format_price($discount, $price_special=1, $calculate_currencies=false) .'<br />';
    }

    if ($_SESSION['customers_status']['customers_status_show_price'] == '1') {
      $total_content.= SUB_TITLE_SUB_TOTAL . $xtPrice->xtcFormat($_SESSION['cart']->show_total(),true) . '<br />';
    } else {
      $total_content.= TEXT_INFO_SHOW_PRICE_NO . '<br />';
    }
    // display only if there is an ot_discount
    if ($customer_status_value['customers_status_ot_discount'] != 0) {
      $total_content.= TEXT_CART_OT_DISCOUNT . $customer_status_value['customers_status_ot_discount'] . '%';
    }
    $module_smarty->assign('TOTAL_CONTENT',$total_content);
    $module_smarty->assign('language', $_SESSION['language']);
    $module_smarty->assign('module_content',$module_content);
    $module_smarty->caching = 0;
    $module= $module_smarty->fetch(CURRENT_TEMPLATE.'/module/wish_list_order_details.html');
    $smarty->assign('MODULE_order_details',$module);
    ?>

    Code: PHP  [Auswählen]
    <?php
    /* -----------------------------------------------------------------------------------------
       $Id: cart_actions.php 3255 2012-07-18 18:27:41Z web28 $

       modified eCommerce Shopsoftware
       http://www.modified-shop.org

       Copyright (c) 2009 - 2013 [www.modified-shop.org]
       -----------------------------------------------------------------------------------------
       based on:
       (c) 2000-2001 The Exchange Project  (earlier name of osCommerce)
       (c) 2002-2003 osCommerce(application_top.php,v 1.273 2003/05/19); www.oscommerce.com
       (c) 2003 nextcommerce (application_top.php,v 1.54 2003/08/25); www.nextcommerce.org
       (c) 2006 XT-Commerce (cart_actions.php 168 2007-02-06)

       Released under the GNU General Public License
       -----------------------------------------------------------------------------------------
       Third Party contribution:
       Add A Quickie v1.0 Autor  Harald Ponce de Leon

       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
       ---------------------------------------------------------------------------------------*/


    $action = (isset($_GET['action']) ? $_GET['action'] : '');

    // Shopping cart actions
    if (xtc_not_null($action)) {
      // redirect the customer to a friendly cookie-must-be-enabled page if cookies are disabled
      if ($session_started == false) {
        xtc_redirect(xtc_href_link(FILENAME_COOKIE_USAGE));
      }

      $parameters = array ('action', 'products_id', 'pid');
      if (DISPLAY_CART == 'true') {
        $goto = FILENAME_SHOPPING_CART;
        $parameters[] = 'cPath';
      } else {
        $goto = basename($PHP_SELF);
        if ($_GET['action'] == 'buy_now') {
          $parameters[] = 'BUYproducts_id';
        } else {
          array_push($parameters, 'BUYproducts_id', 'info');
        }
      }

      if (!is_object($_SESSION['cart'])) {
        $_SESSION['cart'] = new shoppingCart();
      }
     
      if (!is_object($_SESSION['wishList'])) {     
            $_SESSION['wishList'] = new WishList();
      }

      switch ($action) {

        case 'remove_product':
          $prd_id = xtc_input_validation($_GET['prd_id'], 'products_id', '');
          $_SESSION['cart'] -> remove($prd_id);
          xtc_redirect(xtc_href_link($goto, xtc_get_all_get_params($parameters), 'NONSSL'));
          break;

       // customer wants to update the product quantity in their shopping cart
        case 'update_product':
         
              if (isset($econda) && is_object($econda)) $econda->_emptyCart();
             
          for ($i = 0, $n = sizeof($_POST['products_id']); $i < $n; $i++) {

            $cart_quantity = $_POST['cart_quantity'][$i] = xtc_remove_non_numeric($_POST['cart_quantity'][$i]);
            $_POST['old_qty'][$i] = xtc_remove_non_numeric($_POST['old_qty'][$i]);
            $_POST['products_id'][$i] = xtc_input_validation($_POST['products_id'][$i], 'products_id', '');
                       
            if ($cart_quantity == 0) $_SESSION['cart']->remove($_POST['products_id'][$i]);
           
                    if($_POST['submit_target'] == 'wishlist') { //WISHLIST ############
                                           
                            if (in_array($_POST['products_id'][$i], (is_array($_POST['cart_delete']) ? $_POST['cart_delete'] : array()))) {
                                   
                                    $_SESSION['wishList']->remove($_POST['products_id'][$i]);

                                    if (is_object($econda)) $econda->_delArticle($_POST['products_id'][$i], $_POST['cart_quantity'][$i], $_POST['old_qty'][$i]);

                            } else {
                                   
                                    if ($cart_quantity > MAX_PRODUCTS_QTY) $cart_quantity = MAX_PRODUCTS_QTY;
                                   
                                    $attributes = ($_POST['id'][$_POST['products_id'][$i]]) ? $_POST['id'][$_POST['products_id'][$i]] : '';

                                    if (is_object($econda)) {
                                   
                                            $old_quantity = $_SESSION['wishList']->get_quantity(xtc_get_uprid($_POST['products_id'][$i], $_POST['id'][$i]));
                                            $econda->_updateProduct($_POST['products_id'][$i], $cart_quantity, $old_quantity);
                                    }

                                    $_SESSION['wishList']->add_cart($_POST['products_id'][$i], $cart_quantity, $attributes, false);
                                    unset($cart_quantity);

                            $goto = 'wish_list.php';
                           
                            }
                           
                    } else { //CART ############
                   
                            if (in_array($_POST['products_id'][$i], (isset($_POST['cart_delete']) && is_array($_POST['cart_delete']) ? $_POST['cart_delete'] : array ()))) {
                             
                              $_SESSION['cart']->remove($_POST['products_id'][$i]);
           
                              if (isset($econda) && is_object($econda)) $econda->_delArticle($_POST['products_id'][$i], $_POST['cart_quantity'][$i], $_POST['old_qty'][$i]);
           
                            } else {
                             
                              if ($cart_quantity > MAX_PRODUCTS_QTY) $cart_quantity = MAX_PRODUCTS_QTY;
                             
                              $attributes = isset($_POST['id'][$_POST['products_id'][$i]]) ? $_POST['id'][$_POST['products_id'][$i]] : '';
           
                              if (isset($econda) && is_object($econda)) {
                                   
                                    $old_quantity = $_SESSION['cart']->get_quantity(xtc_get_uprid($_POST['products_id'][$i], $_POST['id'][$i]));
                                   
                                    $econda->_updateProduct($_POST['products_id'][$i], $cart_quantity, $old_quantity);
                              }
                             
                              $_SESSION['cart']->add_cart($_POST['products_id'][$i], $cart_quantity, $attributes, false);
                             
                              unset($cart_quantity);
                            }
                    }
          }
         
              xtc_redirect(xtc_href_link($goto, xtc_get_all_get_params($parameters), 'NONSSL'));
          break;

        // customer adds a product from the products page
        case 'add_product':
          if (isset ($_POST['products_id']) && is_numeric($_POST['products_id'])) {
                                    $cart_quantity = (xtc_remove_non_numeric($_POST['products_qty']) + $_SESSION['cart']->get_quantity(xtc_get_uprid($_POST['products_id'], isset($_POST['id'])?$_POST['id']:'')));
            if ($cart_quantity > MAX_PRODUCTS_QTY) $cart_quantity = MAX_PRODUCTS_QTY;
           
                    if (isset($econda) && is_object($econda)) {
              $econda->_emptyCart();
              $old_quantity = $_SESSION['cart']->get_quantity(xtc_get_uprid($_POST['products_id'], isset($_POST['id'])?$_POST['id']:''));
              $econda->_addProduct($_POST['products_id'], $cart_quantity, $old_quantity);
            }
             
            //WISHLIST     
            if($_POST['submit_target'] == 'wishlist') {
                           
                            if (!is_object($_SESSION['wishList'])) {
                                   
                                    $_SESSION['wishList'] = new WishList();
                            }
           
                            $_SESSION['wishList']->add_cart((int) $_POST['products_id'], $cart_quantity, isset($_POST['id']) ? $_POST['id'] : '');

                    $goto = 'wish_list.php';
                   
                    } else {

                    $_SESSION['cart']->add_cart((int) $_POST['products_id'], $cart_quantity, isset($_POST['id']) ? $_POST['id'] : ''); //DokuMan - 2012-06-11 - added isset-check for $_POST['id']
                    }
                    //WISHLIST               
             
              }
          xtc_redirect(xtc_href_link($goto, 'products_id=' . (int)$_POST['products_id'] . '&' . xtc_get_all_get_params($parameters)));
          break;   

        case 'check_gift':
          require_once (DIR_FS_INC . 'xtc_collect_posts.inc.php');
          xtc_collect_posts();
          break;

        // customer wants to add a quickie to the cart (called from a box)
        case 'add_a_quickie' :
          $quicky = addslashes($_POST['quickie']);
          if (GROUP_CHECK == 'true') {
            $group_check = "and group_permission_" . $_SESSION['customers_status']['customers_status_id'] . "=1 ";
          }
          $quickie_query = xtc_db_query("select products_fsk18,
                                                products_id
                                          from "
    . TABLE_PRODUCTS . "
                                         where products_model = '"
    . $quicky . "' " . "
                                           AND products_status = '1' "
    . $group_check
                                        );

          if (!xtc_db_num_rows($quickie_query)) {
            if (GROUP_CHECK == 'true') {
              $group_check = "and group_permission_" . $_SESSION['customers_status']['customers_status_id'] . "=1 ";
            }
            $quickie_query = xtc_db_query("select products_fsk18,
                                                  products_id
                                             from "
    . TABLE_PRODUCTS . "
                                            where products_model LIKE '%"
    . $quicky . "%' " . "
                                              AND products_status = '1' "
    . $group_check
                                          );
          }
          if (xtc_db_num_rows($quickie_query) != 1) {
            xtc_redirect(xtc_href_link(FILENAME_ADVANCED_SEARCH_RESULT, 'keywords=' . $quicky, 'NONSSL'));
          }
          $quickie = xtc_db_fetch_array($quickie_query);
          if (xtc_has_product_attributes($quickie['products_id'])) {
            xtc_redirect(xtc_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $quickie['products_id'], 'NONSSL'));
          } else {
            if ($quickie['products_fsk18'] == '1' && $_SESSION['customers_status']['customers_fsk18'] == '1') {
              xtc_redirect(xtc_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $quickie['products_id'], 'NONSSL'));
            }
            if ($_SESSION['customers_status']['customers_fsk18_display'] == '0' && $quickie['products_fsk18'] == '1') {
              xtc_redirect(xtc_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $quickie['products_id'], 'NONSSL'));
            }
            if ($_POST['quickie'] != '') {
              $act_qty = $_SESSION['cart']->get_quantity(xtc_get_uprid($quickie['products_id'], 1));
              if ($act_qty > MAX_PRODUCTS_QTY) {
                $act_qty = MAX_PRODUCTS_QTY - 1;
              }
              $_SESSION['cart']->add_cart($quickie['products_id'], $act_qty +1, 1);
              xtc_redirect(xtc_href_link($goto, xtc_get_all_get_params(array('action')), 'NONSSL'));
            } else {
              xtc_redirect(xtc_href_link(FILENAME_ADVANCED_SEARCH_RESULT, 'keywords=' . $quicky, 'NONSSL'));
            }
          }
          break;

        // performed by the 'buy now' button in product listings and review page
        case 'buy_now':
          if (isset($_GET['BUYproducts_id'])) {
            $_GET['BUYproducts_id'] = (int)$_GET['BUYproducts_id'];
            // check permission to view product
            $permission_query = xtc_db_query("SELECT group_permission_" . $_SESSION['customers_status']['customers_status_id'] . " as customer_group,
                                                     products_fsk18
                                               from "
    . TABLE_PRODUCTS . "
                                              where products_id='"
    . $_GET['BUYproducts_id'] . "'");
            $permission = xtc_db_fetch_array($permission_query);

            // check for FSK18
            if ($permission['products_fsk18'] == '1' && $_SESSION['customers_status']['customers_fsk18'] == '1') {
              xtc_redirect(xtc_href_link(FILENAME_PRODUCT_INFO, 'products_id=' .$_GET['BUYproducts_id'], 'NONSSL'));
            }
            if ($_SESSION['customers_status']['customers_fsk18_display'] == '0' && $permission['products_fsk18'] == '1') {
              xtc_redirect(xtc_href_link(FILENAME_PRODUCT_INFO, 'products_id=' .$_GET['BUYproducts_id'], 'NONSSL'));
            }
            // check for customer group
            if (GROUP_CHECK == 'true') {
              if ($permission['customer_group'] != '1') {
                xtc_redirect(xtc_href_link(FILENAME_PRODUCT_INFO, 'products_id=' .$_GET['BUYproducts_id']));
              }
            }
            if (xtc_has_product_attributes($_GET['BUYproducts_id'])) {
              xtc_redirect(xtc_href_link(FILENAME_PRODUCT_INFO, 'products_id=' .$_GET['BUYproducts_id']));
            } else {
              if (isset ($_SESSION['cart'])) {
                $cart_quantity = ($_SESSION['cart']->get_quantity(xtc_get_uprid($_GET['BUYproducts_id'],''))+1);
                if ($cart_quantity > MAX_PRODUCTS_QTY) {
                  $cart_quantity = MAX_PRODUCTS_QTY;
                }
                if (isset($econda) && is_object($econda)) {
                  $econda->_emptyCart();
                  $old_quantity = $_SESSION['cart']->get_quantity($_GET['BUYproducts_id']);
                  $econda->_addProduct($_GET['BUYproducts_id'], $cart_quantity, $old_quantity);
                }
                $_SESSION['cart']->add_cart($_GET['BUYproducts_id'], $cart_quantity);
              } else {
                xtc_redirect(xtc_href_link(FILENAME_DEFAULT));
              }
            }
          }
          xtc_redirect(xtc_href_link($goto, xtc_get_all_get_params(array ('action','BUYproducts_id'))));
          break;
         
           // performed by the 'buy now' button in wish list
        case 'wishlist_buy_now':
          if (isset($_GET['BUYproducts_id'])) {
            $_GET['BUYproducts_id'] = (int)$_GET['BUYproducts_id'];
            // check permission to view product
            $permission_query = xtc_db_query("SELECT group_permission_" . $_SESSION['customers_status']['customers_status_id'] . " as customer_group,
                                                     products_fsk18
                                               from "
    . TABLE_PRODUCTS . "
                                              where products_id='"
    . $_GET['BUYproducts_id'] . "'");
            $permission = xtc_db_fetch_array($permission_query);

            // check for FSK18
            if ($permission['products_fsk18'] == '1' && $_SESSION['customers_status']['customers_fsk18'] == '1') {
              xtc_redirect(xtc_href_link(FILENAME_PRODUCT_INFO, 'products_id=' .$_GET['BUYproducts_id'], 'NONSSL'));
            }
            if ($_SESSION['customers_status']['customers_fsk18_display'] == '0' && $permission['products_fsk18'] == '1') {
              xtc_redirect(xtc_href_link(FILENAME_PRODUCT_INFO, 'products_id=' .$_GET['BUYproducts_id'], 'NONSSL'));
            }
            // check for customer group
            if (GROUP_CHECK == 'true') {
              if ($permission['customer_group'] != '1') {
                xtc_redirect(xtc_href_link(FILENAME_PRODUCT_INFO, 'products_id=' .$_GET['BUYproducts_id']));
              }
            }
            if (xtc_has_product_attributes($_GET['BUYproducts_id'])) {
              xtc_redirect(xtc_href_link(FILENAME_PRODUCT_INFO, 'products_id=' .$_GET['BUYproducts_id']));
            } else {
              if (isset ($_SESSION['wishList'])) {
                $cart_quantity = ($_SESSION['wishList']->get_quantity(xtc_get_uprid($_GET['BUYproducts_id'],'')));
                if ($cart_quantity > MAX_PRODUCTS_QTY) {
                  $cart_quantity = MAX_PRODUCTS_QTY;
                }
                if (isset($econda) && is_object($econda)) {
                  $econda->_emptyCart();
                  $old_quantity = $_SESSION['cart']->get_quantity($_GET['BUYproducts_id']);
                  $econda->_addProduct($_GET['BUYproducts_id'], $cart_quantity, $old_quantity);
                }
                $_SESSION['cart']->add_cart($_GET['BUYproducts_id'], $cart_quantity);
              } else {
                xtc_redirect(xtc_href_link(FILENAME_DEFAULT));
              }
            }
          }
          xtc_redirect(xtc_href_link($goto, xtc_get_all_get_params(array ('action','BUYproducts_id'))));
          break;

        case 'cust_order':
          if (isset ($_SESSION['customer_id']) && isset ($_GET['pid'])) {
            $_GET['pid'] = (int)$_GET['pid'];
            if (xtc_has_product_attributes($_GET['pid'])) {
              xtc_redirect(xtc_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $_GET['pid']));
            } else {
              $_SESSION['cart']->add_cart($_GET['pid'], $_SESSION['cart']->get_quantity($_GET['pid']) + 1);
            }
          }
          xtc_redirect(xtc_href_link($goto, xtc_get_all_get_params($parameters), 'NONSSL'));
          break;

        // BOF - Tomcraft - 2011-02-01 - Paypal Express Modul
        case 'paypal_express_checkout':
          $o_paypal->paypal_express_auth_call();
          xtc_redirect($o_paypal->payPalURL);
          break;
        // EOF - Tomcraft - 2011-02-01 - Paypal Express Modul
      }
    }
    ?>

    Wave

    • Mitglied
    • Beiträge: 146
    Re: BETA MODUL: Merkzettel oder Merkliste
    Antwort #101 am: 25. April 2014, 03:28:00
    Das ganze funktioniert doch teilweise sehe ich gerade:

    Bei Produkten ohne Attribute = Funtkion 1A

    Mit = Keine Funktion, springt zum Produkt zurück

    Ansonsten Top Modul.

    Pixelmetz

    • Neu im Forum
    • Beiträge: 35
    Re: BETA MODUL: Merkzettel oder Merkliste
    Antwort #102 am: 17. Juni 2014, 14:12:51
    ich habe das Modul eingebaut allerdings stelle ich fest dass wenn ich den Button "Merkzettel" klicke dass das Produkt in den Warenkorb gelegt wird und nicht in die Merkliste...

    kann mir jemand verraten wo mein Fehler liegt?

    Hi Stefan, konntest du dein Problem lösen? Ich hab genau das gleiche Problem...

    otacon

    • Neu im Forum
    • Beiträge: 18
    Re: BETA MODUL: Merkzettel oder Merkliste
    Antwort #103 am: 30. Juni 2014, 14:11:59
    Jemand eine Idee über welche Variable ich die Gesamtproduktanzahl der in der Merkliste befindlichen Artikel auslesen kann?

    web0null

    • Experte
    • Beiträge: 1.998
    Re: BETA MODUL: Merkzettel oder Merkliste
    Antwort #104 am: 01. Juli 2014, 17:06:02
    Das müsste dann eigentlich
    Code: PHP  [Auswählen]
    $_SESSION['wishList']->count_contents()
    sein
    Gruß
    0 Antworten
    1679 Aufrufe
    08. März 2017, 09:06:14 von Buggyboy
    3 Antworten
    4100 Aufrufe
    26. Juni 2013, 12:54:28 von Koala
    5 Antworten
    5075 Aufrufe
    06. August 2011, 08:41:15 von franky_n
               
    anything