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: Neue Variable in der xtcPrice.php erstellen

    Rizzm

    • Neu im Forum
    • Beiträge: 9
    Neue Variable in der xtcPrice.php erstellen
    am: 09. April 2014, 19:27:34
    Hallo, ich habe die Suche benutzt und leider nicht das passende gefunden.

    Zum "Problem":

    Auf der Hauptseite in der Vorschau mit den neuen Produkten will ich anstatt der Preisumgestaltung beim Angebot (diese sprengt meinen Rahmen) ein Bild mit % über die Artikelbildvorschau legen. Das legen an sich ist kein Problem, nur das es eben nur dann kommt, wenn es im Angebot ist.

    Code: PHP  [Auswählen]
      function xtcFormatSpecial($pID, $sPrice, $pPrice, $format, $vpeStatus = 0, $pimg) {
        if ($format) {
          if (!isset($pPrice) || $pPrice == 0)
            $discount = 0;
          else
            $discount = ($pPrice - $sPrice) / $pPrice * 100;
          $price = '<span class="productOldPrice"><small>' . INSTEAD . '</small><del>' . $this->xtcFormat($pPrice, $format) . '</del></span><br />' . ONLY . $this->checkAttributes($pID) . $this->xtcFormat($sPrice, $format) . '<br /><small>' . YOU_SAVE . round($discount) . ' % /' . $this->xtcFormat($pPrice - $sPrice, $format) . '</small>';
          $pimg = '<img src=\"img\/angebote.png\">';
          if ($vpeStatus == 0) {
            return $price;
          } else {
            return array(
              'formated' => $price,
              'plain' => $sPrice
            );
          }
        } else {
          return round($sPrice, $this->currencies[$this->actualCurr]['decimal_places']);
        }
      }

    die variable $pimg war mein Test, ich weiss nur nicht wie ich es weiter machen soll

    Linkback: https://www.modified-shop.org/forum/index.php?topic=29919.0
    2 Antworten
    2247 Aufrufe
    21. Oktober 2016, 14:52:55 von Hendrik1
    45 Antworten
    19224 Aufrufe
    08. Dezember 2020, 17:16:55 von servsens
    2 Antworten
    3747 Aufrufe
    07. Januar 2011, 17:58:27 von Shorty
    3 Antworten
    2484 Aufrufe
    07. September 2016, 14:55:07 von noRiddle (revilonetz)