Neuigkeiten
  • Die modified eCommerce Shopsoftware ist kostenlos, aber nicht umsonst.
    Spenden
  • Damit wir die modified eCommerce Shopsoftware auch zukünftig kostenlos anbieten können:
    Spenden
  • Thema: MODUL: Staffelpreise in der Artikelübersicht

    jenni

    • Fördermitglied
    • Beiträge: 102
    • Geschlecht:
    Re: MODUL: Staffelpreise in der Artikelübersicht
    Antwort #15 am: 14. November 2014, 10:35:26
    Hallo,

    wie muss ich den die datei ändern das der richtige Preis auch oben angezeigt wird?
    Die Staffelpreise sind drin, aber oben steht wie in diesen Beispielschreenshot sieht "27,50" und nicht "ab 26,xx €".

    LG

    Jenni

    Bonsai

    • Viel Schreiber
    • Beiträge: 4.127
    • Geschlecht:
    Re: MODUL: Staffelpreise in der Artikelübersicht
    Antwort #16 am: 14. November 2014, 11:31:04
    Hast Du das so? [ Für Gäste sind keine Dateianhänge sichtbar ]

    Die Felder im Backend sind nicht klar beschriftet .... aus Sicht von Usability ein Bug ...

    marpieitservices

    • Neu im Forum
    • Beiträge: 4
    Re: MODUL: Staffelpreise in der Artikelübersicht
    Antwort #17 am: 06. Dezember 2014, 02:39:17
    Hat jemand schon eine Lösung für die 1.06er Version gefunden, und/oder das Skript angepasst oder umgeschrieben?

    manne35

    • Fördermitglied
    • Beiträge: 615
    • Geschlecht:
    Re: MODUL: Staffelpreise in der Artikelübersicht
    Antwort #18 am: 06. Dezember 2014, 16:29:48
    Das müsste doch auch fuer die 1.06 funktionieren.

    Bonsai

    • Viel Schreiber
    • Beiträge: 4.127
    • Geschlecht:
    Re: MODUL: Staffelpreise in der Artikelübersicht
    Antwort #19 am: 07. Dezember 2014, 15:09:17
    Das funktioniert schon .... wenn man die Preise richtig eingibt.

    marpieitservices

    • Neu im Forum
    • Beiträge: 4
    Re: MODUL: Staffelpreise in der Artikelübersicht
    Antwort #20 am: 07. Dezember 2014, 18:38:30
    Ich bekomme jedenfalls nichts angezeigt. Werde es jetzt noch einmal kurz testen - sollte es dann nicht funktionieren, würde ich hier mal die betroffenen Dateien anhängen. Vielleicht fällt euch ja ein Fehler aus.

    Danke

    EDIT:
    Folgende Ansicht habe ich zur Zeit - der Shop ist noch nicht produktiv.
    http://fit4home-sportnahrung.com/index.php?cPath=10_8

    Und wenn ich das richtig verstehe, sollten ja hier die Staffelpreise schon angezeigt werden, oder irre ich da? Eingebaut habe ich nach meinem Verständnis eigentlich alles richtig. Habe mal die beiden Dateien angehängt, sowie ein Bild der Staffelpreise.

    Mache ich irgendwas falsch oder liegt es am Template?

    manne35

    • Fördermitglied
    • Beiträge: 615
    • Geschlecht:
    Re: MODUL: Staffelpreise in der Artikelübersicht
    Antwort #21 am: 07. Dezember 2014, 22:21:23
    Hallo Marpietsch,
    das schaut schon richtig aus so.

    mr.mc.mauser

    • Fördermitglied
    • Beiträge: 343
    • Geschlecht:
    Re: MODUL: Staffelpreise in der Artikelübersicht
    Antwort #22 am: 08. Dezember 2014, 07:16:45
    @marpieitservices

    der Staffelpreis wird in deinem demoshop im Produktlisting angezeigt.

    wo ist denn dein Problem ?

    marpieitservices

    • Neu im Forum
    • Beiträge: 4
    Re: MODUL: Staffelpreise in der Artikelübersicht
    Antwort #23 am: 08. Dezember 2014, 07:55:42
    Jetzt sehe ich ihn auch - ehrlich gestern Abend habe ich ihn nicht gesehen - trotz Cacheleerung.

    OK - dann passts ja...sorry für die Aufregung. :)

    Bonsai

    • Viel Schreiber
    • Beiträge: 4.127
    • Geschlecht:
    Re: MODUL: Staffelpreise in der Artikelübersicht
    Antwort #24 am: 08. Dezember 2014, 12:43:21
    Beim Entwickeln die Seite im Browser IMMER mit Strg + F5 neu laden, dann umgeht der Browser seinen eigenen Cache.

    osito

    • Neu im Forum
    • Beiträge: 3
    Re: MODUL: Staffelpreise in der Artikelübersicht
    Antwort #25 am: 01. Februar 2015, 19:52:17
    Hallo,

    wir sind kurz davor unseren Shop auf modified umzustellen und haben das Modul installiert (also die beiden Dateien product.php und product_listing_v1 so wie sie waren hochgeladen). Die Staffelpreise werden auch angezeigt, nur die Staffelpreise stimmen nicht; in der Artikel-Liste rechnet der Shop plötzlich 19 % MwSt auf den Nettopreis und nicht 7 % - wie es sein sollte und im Artikel auch eingestellt wurde. Auf der Detailseite ist alles richtig.

    Installierte Shopversion: 1.06 4642 SP2 - mit dem Standard-Template

    Darstellung in der Artikelliste mit falsch berechneten Staffel-Preisen:
    [ Für Gäste sind keine Dateianhänge sichtbar ]

    Darstellung auf der Detailseite mit den richtigen Staffel-Preisen:
    [ Für Gäste sind keine Dateianhänge sichtbar ]

    Was müssen wir ändern?

    Danke für Eure Hilfe und viele Grüße

    Mark

    Bonsai

    • Viel Schreiber
    • Beiträge: 4.127
    • Geschlecht:
    Re: MODUL: Staffelpreise in der Artikelübersicht
    Antwort #26 am: 02. Februar 2015, 15:19:37
    Zitat
    (also die beiden Dateien product.php und product_listing_v1 so wie sie waren hochgeladen)
    eine product.php aus 1.05 in einen 1.06er Shop hochgeladen?

    In dem Post steht was für eine 1.06 zu machen wäre:
    http://www.modified-shop.org/forum/index.php?topic=7164.msg168289#msg168289

    osito

    • Neu im Forum
    • Beiträge: 3
    Re: MODUL: Staffelpreise in der Artikelübersicht
    Antwort #27 am: 12. Februar 2015, 10:59:45
    Hallo Bonsai,

    Danke für den Hinweis. Das hatte ich probiert, nur dann ging garnix (weiße Seite nachdem ích die Produkt.php hochgeladen hatte). Ein neuer Versuch in Ruhe brachte gestern das gleiche Ergebnis. Ich vermute, dass ich den Code an die falsche Stelle gesetzt habe. Hier der Code meiner product.php. Den Code aus diesem Modul habe ich in den Zeilen 462 - 500 sowie in den Zeilen 506 und 538 eingefügt.

    Code: PHP  [Auswählen]
    <?php
    /* -----------------------------------------------------------------------------------------
       $Id: product.php 2696 2012-03-04 10:44: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(Coding Standards); www.oscommerce.com
       (c) 2006 XT-Commerce (product.php 1316 2005-10-21)

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


    class product {

      /**
      *
      * Constructor
       *
       * @param integer $pID
       * @return product
       */

      function product($pID = 0) {
        $this->pID = (int)$pID; // DokuMan - 2010-08-28 - typecasting

        //set default select, using in function getAlsoPurchased, getCrossSells, getReverseCrossSells
        $this->default_select ='p.products_fsk18,
                                p.products_id,
                                p.products_price,
                                p.products_tax_class_id,
                                p.products_image,
                                p.products_quantity,
                                p.products_vpe,
                                p.products_vpe_status,
                                p.products_vpe_value,
                                p.products_model,
                                pd.products_name,
                                pd.products_short_description'
    ;

        // BOF - Tomcraft - 2009-10-30 - noimage.gif is displayed, when no image is defined
        //$this->useStandardImage=false;
        $this->useStandardImage=true;
        // EOF - Tomcraft - 2009-10-30 - noimage.gif is displayed, when no image is defined
        $this->standardImage='noimage.gif';
        if ($pID == 0) {
          $this->isProduct = false;
          return;
        }
        // query for Product
        $group_check = "";
        if (GROUP_CHECK == 'true') {
          $group_check = " AND p.group_permission_".$_SESSION['customers_status']['customers_status_id']."=1 ";
        }

        $fsk_lock = "";
        if ($_SESSION['customers_status']['customers_fsk18_display'] == '0') {
          $fsk_lock = ' AND p.products_fsk18!=1';
        }

        $product_query = "SELECT *
                            FROM "
    .TABLE_PRODUCTS." AS p
                            JOIN "
    .TABLE_PRODUCTS_DESCRIPTION." AS pd ON p.products_status = '1'
                             AND p.products_id = '"
    .$this->pID."'
                             AND pd.products_id = p.products_id "
    .$group_check.$fsk_lock."
                             AND pd.language_id = '"
    .(int)$_SESSION['languages_id']."'";

        $product_query = xtDBquery($product_query);

        if (!xtc_db_num_rows($product_query, true)) {
          $this->isProduct = false;
        } else {
          $this->isProduct = true;
          $this->data = xtc_db_fetch_array($product_query, true);
        }
      }

      /**
       * Query for attributes count
       *
       * @return integer
       */

    function getAttributesCount($pID = 0) {
      $pID = $pID ? $pID : $this->pID;
        $products_attributes_query = xtDBquery("SELECT count(*) AS total
                                                  FROM "
    .TABLE_PRODUCTS_OPTIONS." popt,
                                                       "
    .TABLE_PRODUCTS_ATTRIBUTES." patrib
                                                 where patrib.products_id="
    .$pID."
                                                   AND patrib.options_id = popt.products_options_id
                                                   AND popt.language_id = "
    .(int) $_SESSION['languages_id']
                                              );
        $products_attributes = xtc_db_fetch_array($products_attributes_query, true);
        return $products_attributes['total'];
      }

      /**
       * Query for reviews count
       *
       * @return integer
       */

      function getReviewsCount() {
        $reviews_query = xtDBquery("SELECT count(*) AS total
                                      FROM "
    .TABLE_REVIEWS." r,
                                           "
    .TABLE_REVIEWS_DESCRIPTION." rd
                                     WHERE r.products_id = "
    .$this->pID."
                                       AND r.reviews_id = rd.reviews_id
                                       AND rd.languages_id = "
    .(int)$_SESSION['languages_id']."
                                       AND rd.reviews_text !=''
                                  "
    );
        $reviews = xtc_db_fetch_array($reviews_query, true);
        return $reviews['total'];
      }

      /**
       * getReviewsAverage
       *
       * @return array
       */

      function getReviews() {
        $data_reviews = array ();
        $reviews_query = xtDBquery("SELECT r.reviews_rating,
                                           r.reviews_id,
                                           r.customers_name,
                                           r.date_added,
                                           r.last_modified,
                                           r.reviews_read,
                                           rd.reviews_text
                                      FROM "
    .TABLE_REVIEWS." r,
                                           "
    .TABLE_REVIEWS_DESCRIPTION." rd
                                     WHERE r.products_id = '"
    .$this->pID."'
                                       AND r.reviews_id = rd.reviews_id
                                       AND rd.languages_id = '"
    .(int)$_SESSION['languages_id']."'
                                  ORDER BY reviews_id DESC
                                  "
    );
        if (xtc_db_num_rows($reviews_query, true)) {
          $row = 0;
          $data_reviews = array ();
          while ($reviews = xtc_db_fetch_array($reviews_query, true)) {
            $row ++;
            $data_reviews[] = array ('AUTHOR' => $reviews['customers_name'],
                                     'DATE' => xtc_date_short($reviews['date_added']),
                                     'RATING' => xtc_image('templates/'.CURRENT_TEMPLATE.'/img/stars_'.$reviews['reviews_rating'].'.gif', sprintf(TEXT_OF_5_STARS, $reviews['reviews_rating']),'','','itemprop="rating"'),
                                     'TEXT' => nl2br($reviews['reviews_text']));
            if ($row == PRODUCT_REVIEWS_VIEW)
              break;
          }
        }
        return $data_reviews;
      }

      /**
       * return name if set, else return model
       *
       * @return string
       */

      function getBreadcrumbModel() {
        if ($this->data['products_model'] != "") {
          return $this->data['products_model'];
        }
        return $this->data['products_name'];
      }

      /**
       * get also purchased products related to current
       *
       * @return array
       */

      function getAlsoPurchased() {
        global $xtPrice;

        $module_content = array ();

        $fsk_lock = "";
        if ($_SESSION['customers_status']['customers_fsk18_display'] == '0') {
          $fsk_lock = ' AND p.products_fsk18!=1';
        }
        $group_check = "";
        if (GROUP_CHECK == 'true') {
          $group_check = " AND p.group_permission_".$_SESSION['customers_status']['customers_status_id']."=1 ";
        }

        $orders_query = "SELECT ".$this->default_select."
                           FROM "
    .TABLE_ORDERS_PRODUCTS." op1
                           JOIN "
    .TABLE_ORDERS_PRODUCTS." op2 on op2.orders_id = op1.orders_id
                           JOIN "
    .TABLE_ORDERS." o on o.orders_id = op2.orders_id
                           JOIN "
    .TABLE_PRODUCTS." p on p.products_id = op2.products_id
                           JOIN "
    .TABLE_PRODUCTS_DESCRIPTION." pd on pd.products_id = op2.products_id
                          WHERE op1.products_id = "
    .$this->pID."
                            AND op2.products_id != "
    .$this->pID."
                            AND p.products_status = 1
                            AND trim(pd.products_name) != ''
                            AND pd.language_id = "
    .(int) $_SESSION['languages_id']
                                .$group_check
                                .$fsk_lock."
                       GROUP BY p.products_id
                       ORDER BY o.date_purchased desc
                          LIMIT "
    .MAX_DISPLAY_ALSO_PURCHASED;

        $orders_query = xtDBquery($orders_query);
        while ($orders = xtc_db_fetch_array($orders_query, true)) {
          $module_content[] = $this->buildDataArray($orders);
        }
        return $module_content;
      }

      /**
       * Get Cross sells
       *
       * @return array
       */

      function getCrossSells() {
        global $xtPrice;

        $cs_groups = "SELECT products_xsell_grp_name_id
                        FROM "
    .TABLE_PRODUCTS_XSELL."
                       WHERE products_id = '"
    .$this->pID."'
                    GROUP BY products_xsell_grp_name_id"
    ;
        $cs_groups = xtDBquery($cs_groups);
        $cross_sell_data = array ();
        if (xtc_db_num_rows($cs_groups, true) > 0) {
          while ($cross_sells = xtc_db_fetch_array($cs_groups, true)) {
            $fsk_lock = '';
            if ($_SESSION['customers_status']['customers_fsk18_display'] == '0') {
              $fsk_lock = ' AND p.products_fsk18!=1';
            }
            $group_check = "";
            if (GROUP_CHECK == 'true') {
              $group_check = " AND p.group_permission_".$_SESSION['customers_status']['customers_status_id']."=1 ";
            }
            $cross_query = "SELECT ".$this->default_select.",
                                   xp.sort_order
                              FROM "
    .TABLE_PRODUCTS_XSELL." xp,
                                   "
    .TABLE_PRODUCTS." p,
                                   "
    .TABLE_PRODUCTS_DESCRIPTION." pd
                             WHERE xp.products_id = "
    .$this->pID."
                               AND xp.xsell_id = p.products_id "

                                   .$fsk_lock
                                   .$group_check."
                               AND p.products_id = pd.products_id
                               AND xp.products_xsell_grp_name_id='"
    .$cross_sells['products_xsell_grp_name_id']."'
                               AND pd.language_id = "
    .(int)$_SESSION['languages_id']."
                               AND trim(pd.products_name) != ''
                               AND p.products_status = 1
                          ORDER BY xp.sort_order asc"
    ;
            $cross_query = xtDBquery($cross_query);
            if (xtc_db_num_rows($cross_query, true) > 0)
              $cross_sell_data[$cross_sells['products_xsell_grp_name_id']] = array ('GROUP' => xtc_get_cross_sell_name($cross_sells['products_xsell_grp_name_id']),
                                                                                    'PRODUCTS' => array ()
                                                                                   );
            while ($xsell = xtc_db_fetch_array($cross_query, true)) {
              $cross_sell_data[$cross_sells['products_xsell_grp_name_id']]['PRODUCTS'][] = $this->buildDataArray($xsell);
            }
          }
          return $cross_sell_data;
        }
      }

      /**
       * get reverse cross sells
       *
       * @return array
       */

      function getReverseCrossSells() {
        global $xtPrice;
        $fsk_lock = '';
        if ($_SESSION['customers_status']['customers_fsk18_display'] == '0') {
          $fsk_lock = ' AND p.products_fsk18!=1';
        }
        $group_check = '';
        if (GROUP_CHECK == 'true') {
          $group_check = " AND p.group_permission_".$_SESSION['customers_status']['customers_status_id']."=1 ";
        }

        $cross_query = xtDBquery("SELECT ".$this->default_select.",
                                         xp.sort_order
                                    FROM "
    .TABLE_PRODUCTS_XSELL." xp,
                                         "
    .TABLE_PRODUCTS." p,
                                         "
    .TABLE_PRODUCTS_DESCRIPTION." pd
                                   WHERE xp.xsell_id = '"
    .$this->pID."'
                                     AND xp.products_id = p.products_id "

                                         .$fsk_lock
                                         .$group_check."
                                     AND p.products_id = pd.products_id
                                     AND pd.language_id = "
    .(int)$_SESSION['languages_id']."
                                     AND trim(pd.products_name) != ''
                                     AND p.products_status = 1
                                ORDER BY xp.sort_order asc"
    );

        $cross_sell_data = array();
        while ($xsell = xtc_db_fetch_array($cross_query, true)) {
          $cross_sell_data[] = $this->buildDataArray($xsell);
        }
        return $cross_sell_data;
      }

      /**
       * getGraduated
       *
       * @return array
       */

      function getGraduated() {
        global $xtPrice;

        $discount = $xtPrice->xtcCheckDiscount($this->pID);
        $staffel_query = xtDBquery("SELECT quantity,
                                           personal_offer
                                      FROM "
    .TABLE_PERSONAL_OFFERS_BY.(int) $_SESSION['customers_status']['customers_status_id']."
                                     WHERE products_id = "
    .$this->pID."
                                  ORDER BY quantity ASC"
    );
        $staffel = array ();
        while ($staffel_values = xtc_db_fetch_array($staffel_query, true)) {
          $staffel[] = array ('stk' => $staffel_values['quantity'],
                              'price' => $staffel_values['personal_offer']
                             );
        }
        $staffel_data = array ();
        for ($i = 0, $n = sizeof($staffel); $i < $n; $i ++) {
          if ($staffel[$i]['stk'] == 1 || (array_key_exists($i +1, $staffel) && $staffel[$i +1]['stk'] != '')){ //DokuMan - 2010-10-13 - added array_key_exists()
            $quantity = $staffel[$i]['stk'];
            if (array_key_exists($i + 1, $staffel) && $staffel[$i +1]['stk'] != '' && $staffel[$i +1]['stk'] != $staffel[$i]['stk'] + 1) //DokuMan - 2010-10-13 - added array_key_exists()
              $quantity .= ' - '. ($staffel[$i +1]['stk'] - 1);
          } else {
            $quantity = GRADUATED_PRICE_MAX_VALUE.' '.$staffel[$i]['stk'];
          }
         $vpe = '';
         if (isset($this->data) && $this->data['products_vpe_status'] == 1 && $this->data['products_vpe_value'] != 0.0 && $staffel[$i]['price'] > 0) {
            $vpe = $staffel[$i]['price'] - $staffel[$i]['price'] / 100 * $discount;
            $vpe = $vpe * (1 / $this->data['products_vpe_value']);
            $vpe = BASICPRICE_VPE_TEXT.$xtPrice->xtcFormat($vpe, true, $this->data['products_tax_class_id']).TXT_PER.xtc_get_vpe_name($this->data['products_vpe']);
          }
          $staffel_data[$i] = array ('QUANTITY' => $quantity,
                                     'VPE' => $vpe,
                                     'PRICE' => $xtPrice->xtcFormat($staffel[$i]['price'] - $staffel[$i]['price'] / 100 * $discount, true, $this->data['products_tax_class_id']));
        }
        return $staffel_data;
      }

      /**
       * valid flag
       *
       * @return boolean
       */

      function isProduct() {
        return $this->isProduct;
      }

      /**
       * getBuyNowButton
       *
       * @param integer $id
       * @param string $name
       * @return string
       */

      function getBuyNowButton($id, $name) {
        global $PHP_SELF;
        return '<a href="'.xtc_href_link(basename($PHP_SELF), 'action=buy_now&BUYproducts_id='.$id.'&'.xtc_get_all_get_params(array ('action')), 'NONSSL').'">'.xtc_image_button('button_buy_now.gif', TEXT_BUY.$name.TEXT_NOW).'</a>';
      }

      /**
       * getVPEtext
       *
       * @param unknown_type $product
       * @param unknown_type $price
       * @return unknown
       */

      function getVPEtext($product, $price) {
        global $main;
        return $main->getVPEtext($product, $price); //change to main class
      }

      /**
       * buildDataArray
       *
       * @param array $array
       * @return array
       */

    function buildDataArray(&$array,$image='thumbnail') {
        global $xtPrice,$main,$PHP_SELF;

        //get tax rate
        $tax_rate = isset($xtPrice->TAX[$array['products_tax_class_id']]) ? $xtPrice->TAX[$array['products_tax_class_id']] : 0; //DokuMan: set Undefined index

        //get products price , returns array
        $products_price = $xtPrice->xtcGetPrice($array['products_id'], $format = true, 1, $array['products_tax_class_id'], $array['products_price'], 1);

        //create buy now button
    // [++] web0null - attributes-in-listing
    /*
    $buy_now = '';
    if ($_SESSION['customers_status']['customers_status_show_price'] != '0' && defined('SHOW_BUTTON_BUY_NOW') && SHOW_BUTTON_BUY_NOW != 'false') {
      if ($_SESSION['customers_status']['customers_fsk18'] == '1') {
        if (isset($array['products_fsk18']) && $array['products_fsk18'] == '0')
          $buy_now = $this->getBuyNowButton($array['products_id'], $array['products_name']);
      } else {
        $buy_now = $this->getBuyNowButton($array['products_id'], $array['products_name']);
      }
    }
    */

    $buy_now = $add_cart_button = $add_qty = '';
    if ($_SESSION['customers_status']['customers_status_show_price'] != '0' && defined('SHOW_BUTTON_BUY_NOW') && SHOW_BUTTON_BUY_NOW != 'false') {
      if ($_SESSION['customers_status']['customers_fsk18'] == '1') {
        if (isset($array['products_fsk18']) && $array['products_fsk18'] == '0') {
          $buy_now         = $this->getBuyNowButton($array['products_id'], $array['products_name']);
          $add_cart_button = xtc_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART);
          $add_qty         = xtc_draw_input_field('products_qty', '1', 'size="3"').' '.xtc_draw_hidden_field('products_id', $array['products_id']);
        }
      } else {
        $buy_now         = $this->getBuyNowButton($array['products_id'], $array['products_name']);
        $add_cart_button = xtc_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART);
        $add_qty         = xtc_draw_input_field('products_qty', '1', 'size="3"').' '.xtc_draw_hidden_field('products_id', $array['products_id']);
      }
    }
    // [--] web0null - attributes-in-listing

        //get $shipping_status_name, $shipping_status_image
        // BOF - Tutorial: Umsetzung der EU-Verbraucherrichtlinie vom 13.06.2014
        /*
        if (isset($array['products_shippingtime']) && ACTIVATE_SHIPPING_STATUS == 'true') {
          $shipping_status_name = $main->getShippingStatusName($array['products_shippingtime']);
          $shipping_status_image = $main->getShippingStatusImage($array['products_shippingtime']);
        } else {
          $shipping_status_name = '';
          $shipping_status_image = '';
        }
        */

        $shipping_status_name = $shipping_status_image = $shipping_status_link = '';
        if (isset($array['products_shippingtime']) && ACTIVATE_SHIPPING_STATUS == 'true') {
          $shipping_status_name = $main->getShippingStatusName($array['products_shippingtime']);
          $shipping_status_image = $main->getShippingStatusImage($array['products_shippingtime']);
          $shipping_status_link = $main->getShippingStatusName($array['products_shippingtime'], true);
        }
        // EOF - Tutorial: Umsetzung der EU-Verbraucherrichtlinie vom 13.06.2014

        //get products image, imageinfo array
        $products_image = $this->productImage($array['products_image'], $image);
        $p_img = substr($products_image,strlen(DIR_WS_BASE)); //web28 - 2011-01-24 - FIX DIR_WS_BASE
        $img_attr = '';
        if (file_exists($p_img)) {
          list($width, $height, $type, $img_attr) = getimagesize($p_img);
        }

    // [++] web0null - attributes-in-listing
    if ($_SESSION['customers_status']['customers_status_show_price'] != '0' && defined('SHOW_BUTTON_BUY_NOW') && SHOW_BUTTON_BUY_NOW != 'false') {
      if ($this->getAttributesCount($array['products_id']) > 0) {
        $options_template = xtDBquery("-- " . __LINE__ . __FILE__ . "
          SELECT options_template
          FROM   "
    .TABLE_PRODUCTS."
          WHERE  products_id = "
    .$array['products_id']
        );
        $options_template          = xtc_db_fetch_array($options_template);
        $array['options_template'] = $options_template['options_template'];
        require_once DIR_FS_INC.'xtc_get_vpe_name.inc.php';
        include DIR_WS_MODULES.'product_attributes_listing.php';
        $attributes = $module;
      }
    }
    // [--] web0null - attributes-in-listing

                    //ANFANG Erweiterung zur Anzeige von Staffelpreisen auch auf der Produkt-Übersichts-Seite (product_listing)
                    $staffelda = $_SESSION['customers_status']['customers_status_graduated_prices'];
                    $products_rabatt= $xtPrice->xtcCheckDiscount($array['products_id']);
                    $staffel_query = xtDBquery("SELECT quantity, personal_offer
                                               FROM        "
    .TABLE_PERSONAL_OFFERS_BY.(int) $_SESSION['customers_status']['customers_status_id']."
                                               WHERE products_id = '"
    .$array['products_id']."'
                                               ORDER BY quantity ASC"
    );
                    $land=$_SESSION['currency'];
                    $waehrung_query = xtDBquery("select value FROM ".TABLE_CURRENCIES." where code = '" . $land. "'");
                    while($waehrung = @mysql_fetch_array($waehrung_query, MYSQL_ASSOC))
                    $faktor = $waehrung['value'];
                    $staffel = array ();
                    while ($staffel_values = xtc_db_fetch_array($staffel_query, true)) {
                            $staffel[] = array ('stk' => $staffel_values['quantity'], 'price' => $staffel_values['personal_offer']);
                    }
                    $staffel_data = array ();
                    for ($i = 0, $n = sizeof($staffel); $i < $n; $i ++) {
                            if ($staffel[$i]['stk'] == 1) {
                                    $quantity = $staffel[$i]['stk'];
                                    if ($staffel[$i +1]['stk'] != '')
                                            $quantity = $staffel[$i]['stk'].'-'. ($staffel[$i +1]['stk'] - 1);
                            } else {
                                    $quantity = ' ab '.$staffel[$i]['stk'];
                                    if ($staffel[$i +1]['stk'] != '')
                                            $quantity = $staffel[$i]['stk'].'-'. ($staffel[$i +1]['stk'] - 1);
                            }
                            $vpe = '';
                            if ($product_info['products_vpe_status'] == 1 && $product_info['products_vpe_value'] != 0.0 && $staffel[$i]['price'] > 0) {
                                    $vpe = $staffel[$i]['price'] - $staffel[$i]['price'] / 100 * $discount;
                                    $vpe = $vpe * (1 / $product_info['products_vpe_value']);
                                    $vpe = $xtPrice->xtcFormat($vpe, true, $product_info['products_tax_class_id']).TXT_PER.xtc_get_vpe_name($product_info['products_vpe']);
                            }
                            if ($_SESSION['customers_status']['customers_status_show_price_tax'] != 0) {
                                    $staffel_data[$i] = array ('RABATT' => $products_rabatt,'QUANTITY' => $quantity, 'VPE' => $vpe, 'PRICE' => $xtPrice->xtcFormat($staffel[$i]['price'] * $faktor  - $staffel[$i]['price'] * $faktor / 100 * $products_rabatt, + $staffel[$i]['price'] * $faktor / 100 * $tax_rate  , true, $this->data['products_tax_class_id']));
                            }else{
                                    $staffel_data[$i] = array ('QUANTITY' => $quantity, 'VPE' => $vpe, 'PRICE' => $xtPrice->xtcFormat($staffel[$i]['price'] * $faktor + $price  - $staffel[$i]['price'] * $faktor / 100 * $products_rabatt, true, $this->data['products_tax_class_id']));
                            }
                    }
                    //ENDE Erweiterung zur Anzeige von Staffelpreisen auch auf der Produkt-Übersichts-Seite (product_listing)


    //products data array
    $productData = array ('PRODUCTS_NAME' => $array['products_name'],
                              'COUNT' => isset($array['ID']) ? $array['ID'] : 0,
                             'STAFFELDA'=> $staffelda, //Erweiterung zur Anzeige von Staffelpreisen auch auf der Produkt-Übersichts-Seite (product_listing)
                              'PRODUCTS_ID'=> $array['products_id'],
                              'PRODUCTS_MODEL'=> isset($array['products_model']) ? $array['products_model'] : '',
                              'PRODUCTS_EAN' => isset($array['products_ean']) ? $array['products_ean'] : '',
                              'PRODUCTS_MANUFACTURERS_MODEL' => isset($array['products_manufacturers_model']) ? $array['products_manufacturers_model'] : '',
                              'PRODUCTS_VPE' => $main->getVPEtext($array, $products_price['plain']),
                              'PRODUCTS_IMAGE' => $products_image,
                              'PRODUCTS_IMAGE_SIZE' => $img_attr,
                              'PRODUCTS_IMAGE_TITLE' => str_replace('"','',$array['products_name']),
                              'PRODUCTS_LINK' => xtc_href_link(FILENAME_PRODUCT_INFO, xtc_product_link($array['products_id'], $array['products_name'])),
                              'PRODUCTS_PRICE' => $products_price['formated'],
                              'PRODUCTS_TAX_INFO' => $main->getTaxInfo($tax_rate),
                              'PRODUCTS_SHIPPING_LINK' => $main->getShippingLink(),
                              'PRODUCTS_BUTTON_BUY_NOW' => $buy_now,
                              'PRODUCTS_SHIPPING_NAME'=>$shipping_status_name,
                              'PRODUCTS_SHIPPING_IMAGE'=>$shipping_status_image,
                              // BOF - Tutorial: Umsetzung der EU-Verbraucherrichtlinie vom 13.06.2014
                              'PRODUCTS_SHIPPING_NAME_LINK' => $shipping_status_link,
                              // EOF - Tutorial: Umsetzung der EU-Verbraucherrichtlinie vom 13.06.2014
                              'PRODUCTS_DESCRIPTION' => isset($array['products_description']) ? $array['products_description'] : '', //DokuMan - 2010-02-26 - set Undefined index
    'PRODUCTS_QUANTITY' => isset($array['products_quantity']) ? $array['products_quantity'] : '',
    // [++] web0null - attributes-in-listing
    'PRODUCTS_ADD_CART_BUTTON' => $add_cart_button,
    'PRODUCT_ATTRIBUTES' => $attributes,
    'FORM_ACTION' => xtc_draw_form('cart_quantity',xtc_href_link(basename($PHP_SELF), xtc_get_all_get_params(array ('action')).'action=add_product')),
    'FORM_END' => '</form>',
    'ADD_QTY'=> $add_qty,
    // [--] web0null - attributes-in-listing
                              'PRODUCTS_EXPIRES' => isset($array['expires_date']) ? $array['expires_date'] : 0, //DokuMan - 2010-02-26 - set Undefined index
                              'PRODUCTS_CATEGORY_URL' => isset($array['cat_url']) ? $array['cat_url'] : '', //DokuMan - 2010-02-26 - set Undefined index
                              'PRODUCTS_SHORT_DESCRIPTION' => isset($array['products_short_description']) ? $array['products_short_description'] : '', //DokuMan - 2010-02-26 - set Undefined index
                              'PRODUCTS_FSK18' => isset($array['products_fsk18']) ? $array['products_fsk18'] : 0, //DokuMan - 2010-02-26 - set Undefined index
                           'STAFFELUNG'=> $staffel_data // Erweiterung zur Anzeige von Staffelpreisen auch auf der Produkt-Übersichts-Seite (product_listing)
                              'PRODUCTS_BUTTON_DETAILS' => '<a href="'.xtc_href_link(FILENAME_PRODUCT_INFO, xtc_product_link($array['products_id'], $array['products_name'])).'">'.xtc_image_button('button_product_more.gif', $array['products_name'].TEXT_NOW).'</a>' //GTB - 2010-08-27 make Button Details global
                             );

        return $productData;
      }

      /**
       * productImage
       *
       * @param string $name
       * @param string $type
       * @return string
       */

      function productImage($name, $type) {
        switch ($type) {
          case 'info' :
            $path = DIR_WS_INFO_IMAGES;
            break;
          case 'thumbnail' :
            $path = DIR_WS_THUMBNAIL_IMAGES;
            break;
          case 'popup' :
            $path = DIR_WS_POPUP_IMAGES;
            break;
        }

        if (empty($name)) { // vr - 2010-04-09 no distinction between "name is null" and "name == ''"
          // BOF - Tomcraft - 2009-11-12 - noimage.gif is displayed, when no image is defined
          //if ($this->useStandardImage == 'true' && $this->standardImage != '') // comment in when "noimage.gif" should be displayed when there is no image defined in the database
          //  return $path.$this->standardImage; // comment in when "noimage.gif" should be displayed when there is no image defined in the database
          return $name; // comment out when "noimage.gif" should be displayed when there is no image defined in the database
          // EOF - Tomcraft - 2009-11-12 - noimage.gif is displayed, when no image is defined
        } else {
          // check if image exists
          if (!file_exists($path.$name)) {
            if ($this->useStandardImage == 'true' && $this->standardImage != '') {
              $name = $this->standardImage;
            }
          }
          return $path.$name;
        }
      }
    }
    ?>

    Oder ist das Problem, dass einige Dinge nun doppelt definiert werden (siehe Zeile 313 oder 319). Im dem Bereich wird anscheinend die Anzeige der Staffelpreise auf der Detail-Seite definiert.

    Ratlose Grüße

    Mark

    Bonsai

    • Viel Schreiber
    • Beiträge: 4.127
    • Geschlecht:
    Re: MODUL: Staffelpreise in der Artikelübersicht
    Antwort #28 am: 12. Februar 2015, 11:34:42
    weiße seite -> errorreporting an! error_log des Webservers anschauen

    osito

    • Neu im Forum
    • Beiträge: 3
    Re: MODUL: Staffelpreise in der Artikelübersicht
    Antwort #29 am: 12. Februar 2015, 12:22:37
    Hallo!

    errorreporting habe ich nun eingeschaltet (Leere Datei _error_reporting.all in den Ordner Export hochgeladen)

    Die Seite ist weiterhin weiß und es wird keine Fehlermeldung angezeigt.

    error_log ?? Wo finde ich diese Datei. Im Handbuch ist nichts zu finden und die Forumssuche hat auch nicht weiter geholfen

    Viele Grüße

    Mark
    1 Antworten
    8390 Aufrufe
    06. September 2011, 13:23:27 von Tomcraft
    5 Antworten
    5726 Aufrufe
    23. März 2012, 11:27:36 von wandbilderxxl
    2 Antworten
    2696 Aufrufe
    15. März 2011, 11:43:38 von Tomcraft
    51 Antworten
    25353 Aufrufe
    13. Oktober 2023, 00:08:42 von Timm