Shop Hosting
Neuigkeiten
  • Die modified eCommerce Shopsoftware ist kostenlos, aber nicht umsonst.
    Spenden
  • Damit wir die modified eCommerce Shopsoftware auch zukünftig kostenlos anbieten können:
    Spenden
  • Thema: TEMPLATE: Bootstrap - freies responsive Template

    Schreinermeister

    • Fördermitglied
    • Beiträge: 425
    • Geschlecht:
    Re: TEMPLATE: Bootstrap - freies responsive Template
    Antwort #1215 am: 12. Dezember 2016, 20:54:57
    Hallo Rene

    dieser Code ist bei mir nicht vorhanden
    Code: PHP  [Auswählen]
    <img src="#" alt="" />
    hab alle Verzeichnisse und Dateien durchsuchen lassen.

    Wenns mit _error_reporting.all funktioniert, werde ich das bei Gelegenheit mal durchtesten.
    Ev. findet sich ja was.

    Danke für den Tipp.

    Gruß Chris

    MasterChief

    • Mitglied
    • Beiträge: 189
    Re: TEMPLATE: Bootstrap - freies responsive Template
    Antwort #1216 am: 08. Februar 2017, 14:45:52
    Hallo jr,
    du hattest damals geschrieben  "Hat sich erledigt hab es gefunden."
    Das hilft nur leider niemandem in einem Forum  :)

    Würdest du mir verraten wo / was du gefunden hast und geändert hast.  Ich stehe vor dem gleichen Problem und wäre dir dankbar!

    Die popup_content.html existiert im Ordner des Templates nicht. Daher wird auch nix angezeigt.

    Ich habe versucht eine einzufügen. Leider sind mir für den content und die Überschrift die Variablen nicht bekannt.
    Code: PHP  [Auswählen]
    {config_load file="$language/lang_$language.conf" section="popup_content"}
    <div>
          <h1>{#????#}</h1>
         <p>&nbsp;</p>
          <p>{#????#}</p>
    </div>

     

    Da wo die Fragezeichen stehen müssten die Variablen rein.

    EDIT1:

    Hab die Variablen in der popup_content.html im shoproot gefunden, damit funktioniert es aber leider nicht. Die Variablen sind leer.

    Code: PHP  [Auswählen]
    $popup_smarty->assign('content_heading', $content_data['content_heading']);
    $popup_smarty->assign('content_text', $content_data['content_text']);
     

    so sollte es gehen, tut es aber nicht :/
    Code: PHP  [Auswählen]
    {config_load file="$language/lang_$language.conf" section="popup_content"}

    <div>
          <h1>{#content_heading#}</h1>
         <p>&nbsp;</p>
          <p>{#content_text#}</p>
    </div>
     
    gruß

    blackman68

    • Neu im Forum
    • Beiträge: 39
    Re: TEMPLATE: Bootstrap - freies responsive Template
    Antwort #1217 am: 10. Februar 2017, 20:09:38
    Hallo,

    eine kurze Frage, für die ich einfach die Lösung hier nicht finde. Sobald ich Sonderpreise bei einem Artikel eingebe, erscheint in der Produktübersicht nur ein Sternchen.
    Ich habe nichts in der xtcPrice.php geändert und auch ein Auskommentieren in der function.template_styler.php von

    Code: PHP  [Auswählen]
        // Produktpreis und Sonderangebotspreis splitten, damit Preis richtig sortiert wird
        foreach ($data as $k => $v){  
            if (strpos($data[$k]['PRODUCTS_PRICE'],"productOldPrice")){
               preg_match_all('/<span.*?(<del\>.*?<\/del>)<\/span><br \/\>[a-zA-Z ]+(.*?)<br \/\><small.*?<\/small\>/',$data[$k]['PRODUCTS_PRICE'],$Ergebnis);
               $data[$k]['PRODUCTS_PRICE'] = $Ergebnis[2][0]; $data[$k]['PRODUCTS_OLDPRICE'] = "<br /><span class=\"productOldPrice\">".$Ergebnis[1][0]."</span>";
            }
           
        }

    klappt nicht. Kann mir bitte jemand kurz sagen, wo das Problem besprochen wurde, oder was ich ändern muss? Anscheinend passt der Preis-string ja nicht, wie ich gelesen habe, aber ich weiss nicht, wo er geändert worden wäre, dass er nicht mehr dem Standard entspricht.

    1000 Dank für jeden Tipp!

    Bob

    graf_ikea

    • Neu im Forum
    • Beiträge: 9
    Re: TEMPLATE: Bootstrap - freies responsive Template
    Antwort #1218 am: 01. Juli 2017, 20:10:33
    Hallo, gibt es dieses Template auch noch für die Version v1.06 rev 4642 SP2 ?

    Danke ...

    astaller

    • Fördermitglied
    • Beiträge: 684
    • Geschlecht:
    Re: TEMPLATE: Bootstrap - freies responsive Template
    Antwort #1219 am: 02. Juli 2017, 12:06:33
    Hallo graf_ikea,

    soweit ich das sehe, ist dieses Template doc für den 1.06er Shop.
    Für Modified 2.x gitb es das hier.

    MfG
    Achim S.

    graf_ikea

    • Neu im Forum
    • Beiträge: 9
    Re: TEMPLATE: Bootstrap - freies responsive Template
    Antwort #1220 am: 02. Juli 2017, 18:03:27
    Danke Achim, ich dachte wohl durch die Bezeichnung V2 das es für den neuen wäre.

    mephiba

    • Neu im Forum
    • Beiträge: 1
    Re: TEMPLATE: Bootstrap - freies responsive Template
    Antwort #1221 am: 07. September 2017, 12:36:36
    Hey Leute,ich habe mir das theme installiert.Leider habe ich nun das Problem das ich die Menü´s wie Mein Konto, Anmelden usw nicht in einer reihe habe, kann mir jemand ein Tipp geben wie ich das hinbekomme.Die Seite lautet www.outdoor-dillinger.de

    awids

    • Experte
    • Beiträge: 3.782
    • Geschlecht:
    Re: TEMPLATE: Bootstrap - freies responsive Template
    Antwort #1222 am: 07. September 2017, 12:56:17
    Öffne /templates/bootstrap3/index.html, suche:

    Code: PHP  [Auswählen]
                        <li{if strstr($smarty.server.PHP_SELF, 'create_account')} class="active"{/if}><a href="{$create_account}"><span class="glyphicon icon-user-plus" aria-hidden="true"></span><span class="hidden-xs">&nbsp;&nbsp;{#new_customer#}</span></a></li>
                       <li{if strstr($smarty.server.PHP_SELF, 'login')} class="active"{/if}><a href="{$login}"><span class="glyphicon glyphicon-log-in" aria-hidden="true"></span><span class="hidden-xs">&nbsp;&nbsp;{#link_login#}</span></a></li>
                   {/if}
                </ul>
                <ul class="nav nav-pills pull-right" style="clear:right;">
                    <li{if strstr ($smarty.server.PHP_SELF, 'checkout')} class="active"{/if}><a href="{$checkout}"><span class="glyphicon glyphicon-credit-card" aria-hidden="true"></span><span class="hidden-xs">&nbsp;&nbsp;<strong>{#link_checkout#}</strong></span></a></li>

    Ändere:

    Code: PHP  [Auswählen]
                        <li{if strstr($smarty.server.PHP_SELF, 'login')} class="active"{/if}><a href="{$login}"><span class="glyphicon glyphicon-log-in" aria-hidden="true"></span><span class="hidden-xs">&nbsp;&nbsp;{#link_login#}</span></a></li>
                   {/if}
                <!--/ul>
                <ul class="nav nav-pills pull-right" style="clear:right;"-->
                    <li{if strstr ($smarty.server.PHP_SELF, 'checkout')} class="active"{/if}><a href="{$checkout}"><span class="glyphicon glyphicon-credit-card" aria-hidden="true"></span><span class="hidden-xs">&nbsp;&nbsp;<strong>{#link_checkout#}</strong></span></a></li>

    Alexlaiho1980

    • Fördermitglied
    • Beiträge: 52
    • Geschlecht:
    Re: TEMPLATE: Bootstrap - freies responsive Template
    Antwort #1223 am: 09. Januar 2019, 09:44:59
    Ich nutze das Template unter Shop Version v2.0.1.0 rev 10403 und habe das Problem, das mir in den Product Listings (Sonderangebote) nur ein Sternchen anstatt des Preises angezeigt wird.

    Habe hier die in Antwort #1025 vorgeschlagene modifier.price.php eingefügt ohne Erfolg.

    Hallo Karl,

    ich melde mich nochmals, es ist alles ok und danke für diesen Änderungsvorschlag mit der modifier.price.php.

    Irgendetwas war wohl noch im Cache bzw. in der xtcPrice.php nicht in Ordnung.

    Jedenfalls sieht es jetzt so prima aus.

    Danke für die Unterstützung hier im Forum.

    Gruß
    toppi

    In der xtcPrice.php habe ich keine Änderungen vorgenommen, siehe Anhang.

    Code: PHP  [Auswählen]
    <?php
    /* -----------------------------------------------------------------------------------------
       $Id: xtcPrice.php 10325 2016-10-19 13:55:33Z 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(currencies.php,v 1.15 2003/03/17); www.oscommerce.com
       (c) 2003 nextcommerce (currencies.php,v 1.9 2003/08/17); www.nextcommerce.org
       (c) 2006 XT-Commerce (xtcPrice.php 1316 2005-10-21)

       Released under the GNU General Public License
       ---------------------------------------------------------------------------------------
       modified by:
       2006 - Gunnar Tillmann - http://www.gunnart.de
       
       Everywhere a price is displayed you see any existing kind of discount in percent and
       in saved money in your chosen currency
       ---------------------------------------------------------------------------------------*/


    /**
     * This class calculates and formates all prices within the shop frontend
     *
     */

    class xtcPrice {

      var $currencies;
     
      /**
       * Constructor initialises all required values like currencies, tax classes, tax zones etc.
       *
       * @param String $currency
       * @param Integer $cGroup
       * @return xtcPrice
       */

      function __construct($currency, $cGroup) {

        //new module support
        require_once (DIR_FS_CATALOG.'includes/classes/xtcPriceModules.class.php');
        $this->priceModules = new priceModules();
       
        $this->currencies = array();
        $this->cStatus = array();
        $this->actualGroup = (int) $cGroup;
        $this->actualCurr = $currency;
        $this->TAX = array();
        $this->SHIPPING = array();
        $this->showFrom_Attributes = true;
        $this->flagSpecial = false;
       
        $this->show_price_tax = 0;

        if (!defined('HTTP_CATALOG_SERVER') && isset($_SESSION['cart'])) {
          if (is_object($_SESSION['cart'])) {
            $this->content_type = $_SESSION['cart']->get_content_type();
          }
        }

        // select Currencies
        $currencies_query = xtDBquery("SELECT * FROM " . TABLE_CURRENCIES . " WHERE status = '1'");
        while ($currencies = xtc_db_fetch_array($currencies_query, true)) {
          // direct array assignment
          $this->currencies[$currencies['code']] = $currencies;
        }
        // if the currency in user's preference is not existing use default
        if (!isset($this->currencies[$this->actualCurr])) {
          $this->actualCurr = DEFAULT_CURRENCY;
        }

        // select Customers Status data
        $customers_status_query = xtDBquery("SELECT *
                                               FROM "
    . TABLE_CUSTOMERS_STATUS . "
                                              WHERE customers_status_id = '"
    . $this->actualGroup . "'
                                                AND language_id = '"
    . (int) $_SESSION['languages_id'] . "'");
        // direct array assignment
        $this->cStatus = xtc_db_fetch_array($customers_status_query, true);    
       
        // prefetch tax rates for standard zone
        $zones_query = xtDBquery("SELECT tax_class_id as class FROM " . TABLE_TAX_CLASS);
        while ($zones_data = xtc_db_fetch_array($zones_query, true)) {
          // calculate tax based on shipping or deliverey country (for downloads)
          if (isset($_SESSION['billto']) && isset($_SESSION['sendto'])) {
            $tax_address_query = xtc_db_query("SELECT ab.entry_country_id,
                                                      ab.entry_zone_id
                                                 FROM "
    . TABLE_ADDRESS_BOOK . " ab
                                            LEFT JOIN "
    . TABLE_ZONES . " z on (ab.entry_zone_id = z.zone_id)
                                                WHERE ab.customers_id = '"
    . $_SESSION['customer_id'] . "'
                                                  AND ab.address_book_id = '"
    . ($this->content_type == 'virtual' ? $_SESSION['billto'] : $_SESSION['sendto']) . "'");
            $tax_address = xtc_db_fetch_array($tax_address_query);
            $this->TAX[$zones_data['class']] = xtc_get_tax_rate($zones_data['class'], $tax_address['entry_country_id'], $tax_address['entry_zone_id']);
          } else {
            // BOF VERSANDKOSTEN IM WARENKORB
            //$this->TAX[$zones_data['class']]=xtc_get_tax_rate($zones_data['class']);
            $country_id = -1;
            if (isset($_SESSION['country'])) { // && !isset($_SESSION['customer_id'])) {  //Steuerberechnung nach Versandland, auch bei eingeloggten Kunden
              $country_id = $_SESSION['country'];
            }
            $this->TAX[$zones_data['class']]= xtc_get_tax_rate($zones_data['class'], $country_id);        
            // EOF VERSANDKOSTEN IM WARENKORB
          }
        }
       
        $currency = $this->priceModules->construct($currency, $cGroup);
       
      }
     
      /**
       * This function searchs the inividual price for a product using the product id $pID
       *
       * @param Integer $pID product id
       * @param Boolean $format Format the result?
       * @param Double $qty quantity
       * @param Integer $tax_class tax class id
       * @param Double $pPrice product price
       * @param Integer $vpeStatus vpe status
       * @param Integer $cedit_id customer specify tax conditions
       * @return String/Array Price (if format = true both plain and formatted)
       */

      function xtcGetPrice($pID, $format = true, $qty, $tax_class, $pPrice, $vpeStatus = 0, $cedit_id = 0) {
       
        $this->tax_class = $tax_class;
       
        // check if group is allowed to see prices
        if ($this->cStatus['customers_status_show_price'] == '0') {
          return $this->xtcShowNote($vpeStatus);
        }
       
        $this->show_price_tax = ($this->tax_class == '') ? 0 : $this->cStatus['customers_status_show_price_tax'];
     
        // get Tax rate
        if ($cedit_id != 0) {
          if (defined('HTTP_CATALOG_SERVER')) {
            global $order; // edit orders in admin guest account
            $cinfo = get_c_infos($order->customer['ID'], trim($order->delivery['country_iso_2']));
          } else {
            $cinfo = xtc_oe_customer_infos($cedit_id);
          }
          if ($this->cStatus['customers_status_show_price_tax'] == 1
              && $this->cStatus['customers_status_add_tax_ot'] == 0
              && $this->get_content_type_product($pID) == 'virtual'
              )
          {
            $this->tax_class = xtc_get_tax_class($this->tax_class, $cinfo['country_id'], $cinfo['zone_id']);
          }
          $products_tax = xtc_get_tax_rate($this->tax_class, $cinfo['country_id'], $cinfo['zone_id']);
        } else {
          if ($_SESSION['customers_status']['customers_status_show_price_tax'] == 1
              && $_SESSION['customers_status']['customers_status_add_tax_ot'] == 0
              && $this->get_content_type_product($pID) == 'virtual'
              )
          {
            $this->tax_class = xtc_get_tax_class($this->tax_class);
          }
          $products_tax = isset($this->TAX[$this->tax_class]) ? $this->TAX[$this->tax_class] : 0;
        }
       
        if ($this->cStatus['customers_status_show_price_tax'] == '0') {
          $products_tax = '';
        }
       
        // add taxes
        if ($pPrice == 0) {
          $pPrice = $this->getPprice($pID);
        }
        $pPrice = $this->xtcAddTax($pPrice, $products_tax);

        // xs:booster check bid price
        if ($sPrice = $this->xtcCheckXTBAuction($pID)) {
          return $this->xtcFormatSpecial($pID, $sPrice, $pPrice, $format, $vpeStatus);
        }
       
        // check specialprice
        if ($sPrice = $this->xtcCheckSpecial($pID)) {
          return $this->xtcFormatSpecial($pID, $this->xtcAddTax($sPrice, $products_tax), $pPrice, $format, $vpeStatus);
        }
       
        // check graduated
        if ($this->cStatus['customers_status_graduated_prices'] == '1') {
          if ($sPrice = $this->xtcGetGraduatedPrice($pID, $qty)) {
            return $this->xtcFormatSpecialGraduated($pID, $this->xtcAddTax($sPrice, $products_tax), $pPrice, $format, $vpeStatus, $this->tax_class);
          }
        } else {
          // check Group Price
          if ($sPrice = $this->xtcGetGroupPrice($pID, 1)) {
            return $this->xtcFormatSpecialGraduated($pID, $this->xtcAddTax($sPrice, $products_tax), $pPrice, $format, $vpeStatus, $this->tax_class);
          }
        }

        // check Product Discount
        if ($discount = $this->xtcCheckDiscount($pID)) {
          return $this->xtcFormatSpecialDiscount($pID, $discount, $pPrice, $format, $vpeStatus);
        }
        return $this->xtcFormat($pPrice, $format, 0, false, $vpeStatus, $pID);
      }
     
      /**
       * This function returns the reqular price of a product,
       * no mather if its a special offer or has graduated prices
       *
       * @param Integer $pID product id
       * @return Double price
       */

      function getPprice($pID) {
        $pQuery = xtDBquery("SELECT products_price FROM ".TABLE_PRODUCTS." WHERE products_id='".$pID."'");
        $pData = xtc_db_fetch_array($pQuery, true);
        return $pData['products_price'];
      }
     
      /**
       * Adding a tax percentage to a price
       * This function also converts the price with currency factor,
       * so take care to avoid double conversions!
       *
       * @param Double $price net price
       * @param Double $tax tax value(%)
       * @return Double gross price
       */

      function xtcAddTax($price, $tax) {
        $price += $price / 100 * $tax;
        $price = $this->xtcCalculateCurr($price);
        return $this->show_price_tax ? round($price, $this->currencies[$this->actualCurr]['decimal_places']) : $price;
      }

      /**
       * xs:booster (v1.041, 2009-11-28)
       *
       * @param Integer $pID product id
       * @return Mixed
       */

      function xtcCheckXTBAuction($pID) {
        $pID = xtc_get_prid($pID);
        if (!isset($_SESSION['xtb0']) && !isset($_SESSION['xtb0']['tx'])) {
          return false;
        }
        for ($i=0, $n=sizeof($_SESSION['xtb0']['tx']); $i<$n; $i++) {
          if ($_SESSION['xtb0']['tx'][$i]['products_id'] == $pID && $_SESSION['xtb0']['tx'][$i]['XTB_QUANTITYPURCHASED'] != 0) {
            $this->actualCurr = $_SESSION['xtb0']['tx'][$i]['XTB_AMOUNTPAID_CURRENCY'];
            return round($_SESSION['xtb0']['tx'][$i]['XTB_AMOUNTPAID'], $this->currencies[$this->actualCurr]['decimal_places']);
          }
        }
        return false;
      }
     
      /**
       * Returns the product sepcific discount
       *
       * @param Integer $pID product id
       * @return Mixed boolean false if not found or 0.00, double if found and > 0.00
       */

      function xtcCheckDiscount($pID) {
        // check if group got discount
        if ($this->cStatus['customers_status_discount'] != '0.00') {
          $discount_query = xtDBquery("SELECT products_discount_allowed FROM ".TABLE_PRODUCTS." WHERE products_id = '".$pID."'");
          $dData = xtc_db_fetch_array($discount_query, true);
         
          $discount = $dData['products_discount_allowed'];
          if ($this->cStatus['customers_status_discount'] < $discount) {
            $discount = $this->cStatus['customers_status_discount'];
          }
          if ($discount == '0.00') {
            return false;
          }
          return $discount;
        }
        return false;
      }
     
      /**
       * Searches the graduated price of a product for a specified quantity
       *
       * @param Integer $pID product id
       * @param Double $qty quantity
       * @return Double graduated price
       */

      function xtcGetGraduatedPrice($pID, $qty, $graduated = true) {
        if (defined('GRADUATED_ASSIGN') && GRADUATED_ASSIGN == 'true' && $graduated === true) {
          $actual_content_qty = xtc_get_qty($pID);
          $qty = $actual_content_qty > $qty ? $actual_content_qty : $qty;
        }
       
        if (empty($this->actualGroup)) {
          $this->actualGroup = DEFAULT_CUSTOMERS_STATUS_ID_GUEST;
        }
       
        $graduated_price_query = xtDBquery("SELECT max(quantity) AS qty
                                              FROM "
    . TABLE_PERSONAL_OFFERS_BY . $this->actualGroup . "
                                             WHERE products_id = '"
    . $pID . "'
                                               AND quantity <= '"
    . $qty . "'");
        if (xtc_db_num_rows($graduated_price_query, true) > 0) {
          $graduated_price_data  = xtc_db_fetch_array($graduated_price_query, true);

          if ($graduated_price_data['qty'] > 0) {
            $graduated_price_query = xtDBquery("SELECT personal_offer
                                                  FROM "
    . TABLE_PERSONAL_OFFERS_BY . $this->actualGroup . "
                                                 WHERE products_id = '"
    . $pID . "'
                                                   AND quantity = '"
    . $graduated_price_data['qty'] . "'");
            $graduated_price_data  = xtc_db_fetch_array($graduated_price_query, true);
            $sPrice = $graduated_price_data['personal_offer'];

            if ($sPrice != 0.00) {
              return $sPrice;
            }
          }
        } else {
          return;
        }
      }
     
      /**
       * Searches the group price of a product
       *
       * @param Integer $pID product id
       * @param Double $qty quantity
       * @return Double group price
       */

      function xtcGetGroupPrice($pID, $qty) {
        return $this->xtcGetGraduatedPrice($pID, $qty, false);
      }

      /**
       * Returns the option price of a selected option
       *
       * @param Integer $pID product id
       * @param Integer $option option id
       * @param Integer $value value id
       * @return Double option price
       */

      function xtcGetOptionPrice($pID, $option, $value, $qty = 1) {
        $price = $discount = $attributes_weight = 0;
       
        $dataArr = array(
            'weight' => 0,
            'price' => 0,
            'discount' => 0,
            'qty' => $qty,
            'weight_prefix' => '',
            'price_prefix' => ''
          );
         
        $attribute_query = xtDBquery(
           "SELECT p.products_discount_allowed,
                   p.products_tax_class_id,
                   p.products_price,
                   p.products_weight,
                   pa.*
              FROM "
    . TABLE_PRODUCTS_ATTRIBUTES . " pa
              JOIN "
    . TABLE_PRODUCTS . " p
                   ON p.products_id = pa.products_id
             WHERE pa.products_id = '"
    . (int)$pID . "'
               AND pa.options_id = '"
    . (int)$option . "'
               AND pa.options_values_id = '"
    . (int)$value . "'
           "
    );
       
        if (xtc_db_num_rows($attribute_query, true) > 0) {
          $attribute_data  = xtc_db_fetch_array($attribute_query, true);
         
          // calculate weight
          $attributes_weight = $attribute_data['options_values_weight'];
          if ($attribute_data['weight_prefix'] != '+') {
            $attributes_weight *= -1;
          }
         
          // calculate discount
          if ($this->cStatus['customers_status_discount_attributes'] == '1' && $this->cStatus['customers_status_discount'] != 0.00) {
            $discount = $this->cStatus['customers_status_discount'];
            if ($attribute_data['products_discount_allowed'] < $this->cStatus['customers_status_discount']) {
              $discount = $attribute_data['products_discount_allowed'];
            }
          }
         
          // calculate price and several currencies on product attributes
          $CalculateCurr = (($attribute_data['products_tax_class_id'] == 0) ? true : false);
          $price = $this->xtcFormat($attribute_data['options_values_price'], false, $attribute_data['products_tax_class_id'], $CalculateCurr);
          if ($attribute_data['price_prefix'] == '+') {
            $price = $price - ($price / 100 * $discount);
          } else {
            $price *= -1;
          }
       
          $dataArr = array(
            'weight' => $attributes_weight,
            'price' => $price,
            'discount' => $discount,
            'qty' => $qty,
            'weight_prefix' => $attribute_data['weight_prefix'],
            'price_prefix' => $attribute_data['price_prefix']
          );
         
          //new module support
          $dataArr = $this->priceModules->GetOptionPrice($dataArr,$attribute_data,$pID, $option, $value, $qty);
        }
        return $dataArr;
      }
     
      /**
       * Returns the text info for customers, whose customer group isn't allowed to see prices
       *
       * @param Integer $vpeStatus
       * @param Boolean $format
       * @return String / Array of String
       */

      function xtcShowNote($vpeStatus = 0) {
        if ($vpeStatus == 1)
          return array(
            'formated' => NOT_ALLOWED_TO_SEE_PRICES,
            'not_allowed' => NOT_ALLOWED_TO_SEE_PRICES,
            'plain' => 0,
            'from' =>  '',
            'flag' => 'NotAllowed'
          );
        return NOT_ALLOWED_TO_SEE_PRICES;
      }
     
      /**
       * Returns the special offer price of a product
       *
       * @param Integer $pID product id
       * @return Double special offer
       */

      function xtcCheckSpecial($pID) {
        $this->flagSpecial = false;
        if ($this->cStatus['customers_status_specials'] == '1') {
          $special_price = 0;
          $product_query = xtDBquery("SELECT *
                                        FROM "
    .TABLE_SPECIALS."
                                       WHERE products_id = '"
    .(int)$pID."'
                                         AND status = 1
                                         AND (start_date IS NULL
                                              OR start_date <= NOW())
                                     "
    );
          if (xtc_db_num_rows($product_query, true) > 0) {
            $product = xtc_db_fetch_array($product_query, true);
            $this->flagSpecial = true;
           
            $product = $this->priceModules->CheckSpecial($product, $pID);
         
            $special_price = $product['specials_new_products_price'];
          }
         
          $special_price = $this->priceModules->CheckSpecialPrice($special_price, $pID);
         
          return $special_price;
        }
      }
     
      /**
       * Converts the price  with the currency factor
       *
       * @param Double $price
       * @return Double converted price
       */

      function xtcCalculateCurr($price) {
        return $this->currencies[$this->actualCurr]['value'] * $price;
      }
     
      /**
       * Returns the tax part of a net price
       *
       * @param Double $price price
       * @param Double $tax tax value
       * @return Double tax part
       */

      function calcTax($price, $tax) {
        return $price * $tax / 100;
      }
     
      /**
       * Removes the currency factor of a price
       *
       * @param Double $price
       * @return Double
       */

      function xtcRemoveCurr($price) {
        if (DEFAULT_CURRENCY != $this->actualCurr) {
          if ($this->currencies[$this->actualCurr]['value'] > 0) {
            return $price * (1 / $this->currencies[$this->actualCurr]['value']);
          }
        } else {
          return $price;
        }
      }
     
      /**
       * Removes the tax from a price, e.g. to calculate a net price from gross price
       *
       * @param Double $price price
       * @param Double $tax tax value
       * @return Double net price
       */

      function xtcRemoveTax($price, $tax) {
        $price = ($price / (($tax + 100) / 100));
        return $price;
      }
     
      /**
       * Returns the tax part of a gross price
       *
       * @param Double $price price
       * @param Double $tax tax value
       * @return Double tax part
       */

      function xtcGetTax($price, $tax) {
        $tax = $price - $this->xtcRemoveTax($price, $tax);
        return $tax;
      }
     
      /**
       * Removes the discount part of a price
       *
       * @param Double $price price
       * @param Double $dc discount
       * @return Double discount part
       */

      function xtcRemoveDC($price, $dc) {
        $price = $price - ($price / 100 * $dc);
        return $price;
      }
     
      /**
       * Returns the discount part of a price
       *
       * @param Double $price price
       * @param Double $dc discount
       * @return Double discount part
       */

      function xtcGetDC($price, $dc) {
        $dc = $price / 100 * $dc;
        return $dc;
      }
     
      /**
       * Check if the product has attributes which can modify the price
       * If so, it returns a prefix ' from '
       *
       * @param Integer $pID product id
       * @return String
       */

      function checkAttributes($pID) {
        if (!$this->showFrom_Attributes || $pID == 0) return;
       
        $pID = $this->priceModules->checkAttributes($pID);
       
        $products_attributes_query = "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'] . "'
                                         AND patrib.options_values_price > 0"
    ;
        $products_attributes = xtDBquery($products_attributes_query);
        $products_attributes = xtc_db_fetch_array($products_attributes, true);
        if ($products_attributes['total'] > 0) {
          return ' ' . FROM . ' ';
        }
      }
     
      /**
       * xtcCalculateCurrEx
       *
       * @param double $price
       * @param string $curr
       * @return double
       */

      function xtcCalculateCurrEx($price, $curr) {
        return $price * ($this->currencies[$curr]['value'] / $this->currencies[$this->actualCurr]['value']);
      }
     
      /**
       * xtcFormatCurrency
       *
       * @param double $price
       * @param integer $decimal_places
       * @return unknown
       */

      function xtcFormatCurrency($price, $decimal_places = 0, $round = true) {
        $decimal_places = ($decimal_places > 0) ? $decimal_places : $this->currencies[$this->actualCurr]['decimal_places'];
        if ($round === false) {
          $price_array = explode('.', $price, 2);
          $price = intval($price);
          if (count($price_array) > 1) {
            $price .= '.'.substr($price_array[1], 0, $decimal_places);
          }
        }
        $Pprice = number_format(floatval($price), $decimal_places, $this->currencies[$this->actualCurr]['decimal_point'], $this->currencies[$this->actualCurr]['thousands_point']);
        $Pprice = $this->currencies[$this->actualCurr]['symbol_left'] . ' ' . $Pprice . ' ' . $this->currencies[$this->actualCurr]['symbol_right'];
       
        return trim($Pprice);
      }
     
      /**
       * xtcFormat
       *
       * @param double $price
       * @param boolean $format
       * @param integer $tax_class
       * @param boolean $curr
       * @param integer $vpeStatus
       * @param integer $pID
       * @param integer $decimal_places
       * @return unknown
       */

      function xtcFormat($price, $format, $tax_class = 0, $curr = false, $vpeStatus = 0, $pID = 0, $decimal_places = 0) {
        if ($curr) {
          $price = $this->xtcCalculateCurr($price);
        }
        if ($tax_class != 0) {
          $products_tax = ($this->cStatus['customers_status_show_price_tax'] == '0') ? '' : $this->TAX[$tax_class];
          $price = $this->xtcAddTax($price, $products_tax);
        }
        $decimal_places = ($decimal_places > 0) ? $decimal_places : $this->currencies[$this->actualCurr]['decimal_places'];
        $from = $this->checkAttributes($pID);
        if ($format) {
          $sQuery = xtDBquery("SELECT max(po.quantity) AS qty,
                                      p.products_tax_class_id
                                 FROM "
    . TABLE_PERSONAL_OFFERS_BY . $this->actualGroup . " po
                                 JOIN "
    . TABLE_PRODUCTS . " p
                                      ON po.products_id = p.products_id
                                WHERE po.products_id='"
    . $pID . "'
                             GROUP BY p.products_id"
    );
          $sQuery = xtc_db_fetch_array($sQuery, true);
          if (($this->cStatus['customers_status_graduated_prices'] == '1') && ($sQuery['qty'] > 1)) {
            $from = ' ' . FROM . ' ';
            $price = $this->xtcGetGraduatedPrice($pID, $sQuery['qty']);
            if ($curr) {
              $price = $this->xtcCalculateCurr($price);
            }
            if ($sQuery['products_tax_class_id'] != 0) {
              $products_tax = ($this->cStatus['customers_status_show_price_tax'] == '0') ? '' : $this->TAX[$sQuery['products_tax_class_id']];
              $price = $this->xtcAddTax($price, $products_tax);
            }
          }
          $Pprice = $this->xtcFormatCurrency($price, $decimal_places);
         
          if ($this->cStatus['customers_status_show_price_tax'] == '0') {
            $Bprice = $this->xtcFormatCurrency($this->xtcAddTax($price, $this->TAX[$this->tax_class]), $decimal_places);
            $Nprice = $Pprice;
          } else {
            $Bprice = $Pprice;
            $Nprice = $this->xtcFormatCurrency($this->xtcRemoveTax($price, $this->TAX[$this->tax_class]), $decimal_places);
          }
         
          if ($vpeStatus == 0) {
            return $from.$Pprice;
          } else {
            return array(
              'formated' => $from.$Pprice,
              'standard_price' => $Pprice,
              'plain' => $price,
              'from' =>  $from,
              'flag' => 'standard',
              'netto' => $Nprice,
              'brutto' => $Bprice
            );
          }
        } else {
          return $this->show_price_tax ? round($price, $decimal_places) : $price;
        }
      }
     
      /**
       * xtcFormatSpecialDiscount
       *
       * @param integer $pID
       * @param unknown_type $discount
       * @param double $pPrice
       * @param boolean $format
       * @param integer $vpeStatus
       * @return unknown
       */

      function xtcFormatSpecialDiscount($pID, $discount, $pPrice, $format, $vpeStatus = 0) {
        $sPrice = $pPrice - ($pPrice / 100) * $discount;
        if ($format) {
          $old_price = $this->xtcFormat($pPrice, $format);
          $special_price = $this->xtcFormat($sPrice, $format);
          $save_percent = round(($pPrice - $sPrice) / $pPrice * 100);
          $save_diff = $this->xtcFormat($pPrice - $sPrice, $format);
          $from = $this->checkAttributes($pID);
          $price = '<span class="productOldPrice"><small>' . INSTEAD . '</small><del>' . $old_price . '</del></span><br /><span class="productNewPrice">' . ONLY . $from . $special_price . '</span><br /><small class="productSavePrice">' . YOU_SAVE . $save_percent . ' % /' . $save_diff;
          if ($discount != 0) {
            // customer group discount
            $price .= '<br />' . BOX_LOGINBOX_DISCOUNT . ': ' . round($discount) . ' %';
          }
          $price .= '</small>';

          if ($this->cStatus['customers_status_show_price_tax'] == '0') {
            $Bprice = $this->xtcFormatCurrency($this->xtcAddTax($sPrice, $this->TAX[$this->tax_class]));
            $Nprice = $special_price;
          } else {
            $Bprice = $special_price;
            $Nprice = $this->xtcFormatCurrency($this->xtcRemoveTax($sPrice, $this->TAX[$this->tax_class]));
          }

          if ($vpeStatus == 0) {
            return $price;
          } else {
            return array(
              'formated' => $price,
              'plain' => $sPrice,
              'special_price' =>  $special_price,
              'old_price' =>  $old_price,
              'save_percent' =>  $save_percent,
              'save_diff' =>  $save_diff,
              'group_discount' => round($discount),
              'from' =>  $from,
              'flag' => 'SpecialDiscount',        
              'netto' => $Nprice,
              'brutto' => $Bprice
            );
          }
        } else {
          return $this->show_price_tax ? round($sPrice, $this->currencies[$this->actualCurr]['decimal_places']) : $sPrice;
        }
      }
     
      /**
       * xtcFormatSpecial
       *
       * @param integer $pID
       * @param double $sPrice
       * @param double $pPrice
       * @param bpplean $format
       * @param integer $vpeStatus
       * @return unknown
       */

      function xtcFormatSpecial($pID, $sPrice, $pPrice, $format, $vpeStatus = 0) {
        if ($format) {      
          if (!isset($pPrice) || $pPrice == 0) {
            $discount = 0;
          } else {
            $discount = ($pPrice - $sPrice) / $pPrice * 100;
          }
          $old_price = $this->xtcFormat($pPrice, $format);
          $special_price = $this->xtcFormat($sPrice, $format);
          $save_percent = round($discount);
          $save_diff = $this->xtcFormat($pPrice - $sPrice, $format);
          $from = $this->checkAttributes($pID);
          $price = '<span class="productOldPrice"><small>' . INSTEAD . '</small><del>' . $old_price . '</del></span><br /><span class="productNewPrice">' . ONLY . $from . $special_price . '</span><br /><small class="productSavePrice">' . YOU_SAVE . $save_percent . ' % /' . $save_diff . '</small>';

          if ($this->cStatus['customers_status_show_price_tax'] == '0') {
            $Bprice = $this->xtcFormatCurrency($this->xtcAddTax($sPrice, $this->TAX[$this->tax_class]));
            $Nprice = $special_price;
          } else {
            $Bprice = $special_price;
            $Nprice = $this->xtcFormatCurrency($this->xtcRemoveTax($sPrice, $this->TAX[$this->tax_class]));
          }

          if ($vpeStatus == 0) {
            $return = $price;
          } else {
            $return = array(
              'formated' => $price,
              'plain' => $sPrice,
              'special_price' =>  $special_price,
              'old_price' =>  $old_price,
              'save_percent' =>  $save_percent,
              'save_diff' =>  $save_diff,
              'from' =>  $from,
              'flag' => 'Special',
              'netto' => $Nprice,
              'brutto' => $Bprice
            );
          }
        } else {
          $return = $this->show_price_tax ? round($sPrice, $this->currencies[$this->actualCurr]['decimal_places']) : $sPrice;
        }
       
        $return = $this->priceModules->FormatSpecial($return, $pID, $sPrice, $pPrice, $format, $vpeStatus);
       
        return $return;
      }
     
      /**
       * xtcFormatSpecialGraduated
       *
       * @param integer $pID
       * @param double $sPrice
       * @param double $pPrice
       * @param boolean $format
       * @param integer $vpeStatus
       * @param integer $pID
       * @return unknown
       */

      function xtcFormatSpecialGraduated($pID, $sPrice, $pPrice, $format, $vpeStatus = 0, $tax_class) {
        if ($pPrice == 0) {
          return $this->xtcFormat($sPrice, $format, 0, false, $vpeStatus);
        }
        if ($discount = $this->xtcCheckDiscount($pID)) {
          $sPrice -= $sPrice / 100 * $discount;
        }
        if ($format) {
          $sQuery = xtDBquery("SELECT max(quantity) AS qty
                                 FROM "
    . TABLE_PERSONAL_OFFERS_BY . $this->actualGroup . "
                                WHERE products_id='"
    . $pID . "'");
          $sQuery = xtc_db_fetch_array($sQuery, true);
          $old_price = '';
          $special_price = '';
          $from = '';
          $uvp = '';
          if (($this->cStatus['customers_status_graduated_prices'] == '1') && ($sQuery['qty'] > 1)) {
            $bestPrice = $this->xtcGetGraduatedPrice($pID, $sQuery['qty']);
            if ($discount) {
              $bestPrice -= $bestPrice / 100 * $discount;
            }
            $old_price_plain = $this->xtcFormat($bestPrice, false, $tax_class);
            $old_price = $this->xtcFormat($old_price_plain, true);
            $special_price = $this->xtcFormat($sPrice, $format);
            $price = FROM . $old_price . ' <br /><small>' . UNIT_PRICE . $special_price . '</small>';
          } elseif ($sPrice != $pPrice) {
            $old_price_plain = $this->xtcFormat($pPrice, false);
            $old_price = $this->xtcFormat($old_price_plain, true);
            $special_price = $this->xtcFormat($sPrice, $format);
            $from = $this->checkAttributes($pID);
            $uvp = MSRP;
            $price = '<span class="productOldPrice">' . $uvp . ' ' . $old_price . '</span><br />' . YOUR_PRICE . $from . $special_price;
          } else {
            return $this->xtcFormat($sPrice, $format, 0, false, $vpeStatus, $pID);
            //$price = $this->xtcFormat($sPrice, $format);
          }

          if ($this->cStatus['customers_status_show_price_tax'] == '0') {
            $Bprice = $this->xtcFormatCurrency($this->xtcAddTax($old_price_plain, $this->TAX[$this->tax_class]));
            $Nprice = $this->xtcFormatCurrency($old_price_plain);
            $Bspecial_price = $this->xtcFormatCurrency($this->xtcAddTax($sPrice, $this->TAX[$this->tax_class]));
            $Nspecial_price = $this->xtcFormatCurrency($sPrice);
          } else {
            $Bprice = $this->xtcFormatCurrency($old_price_plain);
            $Nprice = $this->xtcFormatCurrency($this->xtcRemoveTax($old_price_plain, $this->TAX[$this->tax_class]));
            $Bspecial_price = $this->xtcFormatCurrency($sPrice);
            $Nspecial_price = $this->xtcFormatCurrency($this->xtcRemoveTax($sPrice, $this->TAX[$this->tax_class]));
          }
         
          if ($vpeStatus == 0) {
            return $price;
          } else {
            return array(
              'formated' => $price,
              'plain' => $sPrice,
              'special_price' =>  $special_price,
              'special_price_netto' =>  $Nspecial_price,
              'special_price_brutto' =>  $Bspecial_price,
              'old_price' =>  $old_price,
              'from' =>  $from,
              'uvp' =>  $uvp,
              'flag' => 'SpecialGraduated',
              'netto' => $Nprice,
              'brutto' => $Bprice
            );
          }
        } else {
          return $this->show_price_tax ? round($sPrice, $this->currencies[$this->actualCurr]['decimal_places']) : $sPrice;
        }
      }
     
      /**
       * get_decimal_places
       *
       * @param unknown_type $code
       * @return unknown
       */

      function get_decimal_places($code) {
        return $this->currencies[$this->actualCurr]['decimal_places'];
      }

      /**
       * get_content_type_product
       *
       * @return unknown
       */

      function get_content_type_product($products_id) {
        $this->content_type_product = array();

        if (DOWNLOAD_ENABLED == 'true') {
          if (defined('DOWNLOAD_MULTIPLE_ATTRIBUTES_ALLOWED') && DOWNLOAD_MULTIPLE_ATTRIBUTES_ALLOWED == 'true') {
            // new routine for multiple attributes for downloads
            $virtual_check_query = xtc_db_query("SELECT pa.products_attributes_id
                                                   FROM "
    .TABLE_PRODUCTS_ATTRIBUTES." pa
                                                   JOIN "
    .TABLE_PRODUCTS_ATTRIBUTES_DOWNLOAD." pad
                                                        ON pa.products_attributes_id = pad.products_attributes_id
                                                  WHERE pa.products_id = '"
    .(int)$products_id."'");
            if (xtc_db_num_rows($virtual_check_query) > 0) {
              $this->content_type_product[$products_id] = 'virtual';
            } else {
              $this->content_type_product[$products_id] = 'physical';
            }
          } else {
            // old routine as standard
            $virtual_check_query1 = xtc_db_query("SELECT products_attributes_id
                                                   FROM "
    .TABLE_PRODUCTS_ATTRIBUTES."
                                                  WHERE products_id = '"
    .(int)$products_id."'");
            $total_attributes = xtc_db_num_rows($virtual_check_query1);

            $virtual_check_query = xtc_db_query("SELECT pa.products_attributes_id
                                                   FROM "
    .TABLE_PRODUCTS_ATTRIBUTES." pa
                                                   JOIN "
    .TABLE_PRODUCTS_ATTRIBUTES_DOWNLOAD." pad
                                                        ON pa.products_attributes_id = pad.products_attributes_id
                                                  WHERE pa.products_id = '"
    .(int)$products_id."'
                                               GROUP BY pa.options_values_id"
    );
            $total_virtual = xtc_db_num_rows($virtual_check_query);
           
            if ($total_virtual == 0) {
              $this->content_type_product[$products_id] = 'physical';
            } elseif ($total_attributes == $total_virtual) {
              $this->content_type_product[$products_id] = 'virtual';
            } elseif ($total_attributes > $total_virtual) {
              $this->content_type_product[$products_id] = 'mixed';
            }          
          }
        } else {
          $this->content_type_product[$products_id] = 'physical';
        }
       
        return $this->content_type_product[$products_id];
      }
     
    }
    ?>

    Wäre über jede Hilfe sehr dankbar!!!

    modifier

    • Neu im Forum
    • Beiträge: 18
    Re: TEMPLATE: Bootstrap - freies responsive Template
    Antwort #1224 am: 23. August 2019, 11:22:19
    Hallo zusammen,
    irgendwie komme ich nicht weiter und bin am verzweifeln. Ich möchte im Bootstrap Template die Artiklenummer in der Produktliste haben. Alle Versuche, dies hinzubekommen sind bis jetzt kläglich gescheitert. Kann mir irgendjemand dabei helfen? Das wär echt klasse.
    Viele Grüße
    Benno

    karsta.de

    • Experte
    • Beiträge: 3.056
    Re: TEMPLATE: Bootstrap - freies responsive Template
    Antwort #1225 am: 23. August 2019, 12:08:51
    An gewünschte Stelle in den folgenden Dateien eintragen:

    templates\bootstrap4\module\includes\product_info_include.html
    templates\bootstrap4\module\includes\product_listing_include.html

    Code: PHP  [Auswählen]
    {if $module_data.PRODUCTS_MODEL}{$module_data.PRODUCTS_MODEL}{/if}

    BG kgd

    modifier

    • Neu im Forum
    • Beiträge: 18
    Re: TEMPLATE: Bootstrap - freies responsive Template
    Antwort #1226 am: 23. August 2019, 13:57:41
    Der helle Wahnsinn!!! Vielen herzlichen Dank. Ich bin begeistert. Das hat funktioniert. Da war ich zwar schon nahe dran, aber eben nur nahe.

    :-) :-) :-)

    LG
    Benno

    fishnet

    • Fördermitglied
    • Beiträge: 4.853
    • Geschlecht:
    Re: TEMPLATE: Bootstrap - freies responsive Template
    Antwort #1227 am: 25. Oktober 2019, 08:30:06
    #gelöscht: falscher thread  :bye:

    Baschtl

    • Mitglied
    • Beiträge: 160
    Re: TEMPLATE: Bootstrap - freies responsive Template
    Antwort #1228 am: 11. März 2020, 16:11:33
    Schönes Template! Nur eine Frage: der Link "Mehr erfahren" auf dem Cookie-Hinweis läuft ins Leere... muss das noch irgendwo eingestellt werden? Wenn ja, wo?!
    66 Antworten
    2362 Aufrufe
    Gestern um 19:24:40 von awids
    1266 Antworten
    403617 Aufrufe
    12. Dezember 2023, 07:46:30 von Karl1
    2020 Antworten
    326543 Aufrufe
    19. März 2024, 08:42:53 von kotzbrocken
    6 Antworten
    1974 Aufrufe
    07. Oktober 2019, 16:35:52 von sEdeMi
               
    anything