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: Fehler bei Modul "Gutschein- und Kupon-Erweiterung"

    Boris

    • Fördermitglied
    • Beiträge: 102
    Hi,
    habe versucht das Modul "Gutschein- und Kupon-Erweiterung" in modified eCommerce Shopsoftware 1.05 einzubauen.

    Folgenden Fehler bekomme ich wenn ich diesen Code in die "/admin/customers.php" einbaue.

    Code: PHP  [Auswählen]
    <?php // GUTHABEN - ABFRAGE
    require_once (DIR_FS_INC . 'coupon_mod_functions.php');
    $guthaben = get_rest_amount($_GET['cID']);
    ?>
    <tr>
            <td colspan="3" class="main"><?php echo ACTUAL_GV_AMOUNT . $guthaben; ?></td>
    </tr>

    Fehlermeldung:

    Zitat
    Fatal error: Cannot redeclare class currencies in /is/htdocs/wpxxxxx/modified eCommerce Shopsoftwareodi/admin/includes/classes/currencies.php on line 21

    Kundengruppe:

    [ Für Gäste sind keine Dateianhänge sichtbar ]

    Hat das schon jemand am laufen?
    Gruß
    Boris



    Linkback: https://www.modified-shop.org/forum/index.php?topic=12754.0

    viogrande

    • Fördermitglied
    • Beiträge: 2
    Fehler bei Modul "Gutschein- und Kupon-Erweiterung"
    Antwort #1 am: 09. Juni 2011, 11:18:04
    Hi,

    Ich habe beim Gutschein Modul noch einen Fehler entdeckt. Falls man ein "Rabatt Kupon" als "Willkommens-Rabatt Kupon Code" anlegt, kann man diesen in der Übersicht "versandte Gutscheine" nicht einzeln auswählen. Es fehlt der Zugriff mit der unique_id.

    Diesen Fehler habe ich behoben:

    gv_sent.php - Zeile 78

    Code: PHP  [Auswählen]
    <?php
      $gv_query_raw = "select c.coupon_amount, c.coupon_code, c.coupon_id, et.unique_id, et.sent_firstname, et.sent_lastname, et.customer_id_sent, et.emailed_to, et.date_sent, c.coupon_id from " . TABLE_COUPONS . " c, " . TABLE_COUPON_EMAIL_TRACK . " et where c.coupon_id = et.coupon_id";
      $gv_split = new splitPageResults($_GET['page'], '20', $gv_query_raw, $gv_query_numrows);
      $gv_query = xtc_db_query($gv_query_raw);
      while ($gv_list = xtc_db_fetch_array($gv_query)) {
        if (((!$_GET['gid']) || (@$_GET['gid'] == $gv_list['coupon_id'])) && ((!$_GET['gid']) || (@$_GET['uid'] == $gv_list['unique_id'])) && (!$gInfo)) {
        $gInfo = new objectInfo($gv_list);
        }
        if ( (is_object($gInfo)) && ($gv_list['coupon_id'] == $gInfo->coupon_id) && ($gv_list['unique_id'] == $gInfo->unique_id) ) {
          echo '              <tr class="dataTableRowSelected" onmouseover="this.style.cursor=\'pointer\'" onclick="document.location.href=\'' . xtc_href_link('gv_sent.php', xtc_get_all_get_params(array('gid', 'uid' , 'action')) . 'gid=' . $gInfo->coupon_id . '&uid=' . $gInfo->unique_id . '&action=edit') . '\'">' . "\n";
        } else {
          echo '              <tr class="dataTableRow" onmouseover="this.className=\'dataTableRowOver\';this.style.cursor=\'pointer\'" onmouseout="this.className=\'dataTableRow\'" onclick="document.location.href=\'' . xtc_href_link('gv_sent.php', xtc_get_all_get_params(array('gid', 'uid' , 'action')) . 'gid=' . $gv_list['coupon_id'] . '&uid=' . $gv_list['unique_id']) . '\'">' . "\n";
        }
    ?>
                    <td class="dataTableContent"><?php echo $gv_list['sent_firstname'] . ' ' . $gv_list['sent_lastname']; ?></td>
                    <td class="dataTableContent" align="center"><?php echo $currencies->format($gv_list['coupon_amount']); ?></td>
                    <td class="dataTableContent" align="center"><?php echo $gv_list['coupon_code']; ?></td>
                    <td class="dataTableContent" align="right"><?php echo xtc_date_short($gv_list['date_sent']); ?></td>
    <!-- BOF - Tomcraft - 2009-06-10 - added some missing alternative text on admin icons -->
    <!--
                    <td class="dataTableContent" align="right"><?php if ( (is_object($gInfo)) && ($gv_list['coupon_id'] == $gInfo->coupon_id) && ($gv_list['unique_id'] == $gInfo->unique_id) ) { echo xtc_image(DIR_WS_IMAGES . 'icon_arrow_right.gif'); } else { echo '<a href="' . xtc_href_link(FILENAME_GV_SENT, 'page=' . $_GET['page'] . '&gid=' . $gv_list['coupon_id'] . '&uid=' . $gv_list['unique_id']) . '">' . xtc_image(DIR_WS_IMAGES . 'icon_info.gif', IMAGE_ICON_INFO) . '</a>'; } ?> </td>
    -->
                    <td class="dataTableContent" align="right"><?php if ( (is_object($gInfo)) && ($gv_list['coupon_id'] == $gInfo->coupon_id) && ($gv_list['unique_id'] == $gInfo->unique_id)) { echo xtc_image(DIR_WS_IMAGES . 'icon_arrow_right.gif', ICON_ARROW_RIGHT); } else { echo '<a href="' . xtc_href_link(FILENAME_GV_SENT, 'page=' . $_GET['page'] . '&gid=' . $gv_list['coupon_id'] . '&uid=' . $gv_list['unique_id']) . '">' . xtc_image(DIR_WS_IMAGES . 'icon_info.gif', IMAGE_ICON_INFO) . '</a>'; } ?> </td>
    <!-- EOF - Tomcraft - 2009-06-10 - added some missing alternative text on admin icons -->
                  </tr>
    <?php
      }
    ?>
                  <tr>
                    <td colspan="5"><table border="0" width="100%" cellspacing="0" cellpadding="2">
                      <tr>
                        <td class="smallText" valign="top"><?php echo $gv_split->display_count($gv_query_numrows, '20', $_GET['page'], TEXT_DISPLAY_NUMBER_OF_GIFT_VOUCHERS); ?></td>
                        <td class="smallText" align="right"><?php echo $gv_split->display_links($gv_query_numrows, '20', MAX_DISPLAY_PAGE_LINKS, $_GET['page']); ?></td>
                      </tr>
                    </table></td>
                  </tr>
                </table></td>
    <?php
      $heading = array();
      $contents = array();

      $heading[] = array('text' => '[' . $gInfo->coupon_id . '] ' . ' ' . $currencies->format($gInfo->coupon_amount));
      $redeem_query = xtc_db_query("select * from " . TABLE_COUPON_REDEEM_TRACK . " where coupon_id = '" . $gInfo->coupon_id . "' and unique_id = '" . $gInfo->unique_id . "'" );
      $redeemed = 'No';
      if (xtc_db_num_rows($redeem_query)> 0) $redeemed = 'Yes';
      $contents[] = array('text' => TEXT_INFO_SENDERS_ID . ' ' . $gInfo->customer_id_sent);
      $contents[] = array('text' => TEXT_INFO_AMOUNT_SENT . ' ' . $currencies->format($gInfo->coupon_amount));
      $contents[] = array('text' => TEXT_INFO_DATE_SENT . ' ' . xtc_date_short($gInfo->date_sent));
      $contents[] = array('text' => TEXT_INFO_VOUCHER_CODE . ' ' . $gInfo->coupon_code);
      $contents[] = array('text' => TEXT_INFO_EMAIL_ADDRESS . ' ' . $gInfo->emailed_to);
      if ($redeemed=='Yes') {
        $redeem = xtc_db_fetch_array($redeem_query);
        $contents[] = array('text' => '<br />' . TEXT_INFO_DATE_REDEEMED . ' ' . xtc_date_short($redeem['redeem_date']));
        $contents[] = array('text' => TEXT_INFO_IP_ADDRESS . ' ' . $redeem['redeem_ip']);
        $contents[] = array('text' => TEXT_INFO_CUSTOMERS_ID . ' ' . $redeem['customer_id']);
      } else {
        $contents[] = array('text' => '<br />' . TEXT_INFO_NOT_REDEEMED);
      }

      if ( (xtc_not_null($heading)) && (xtc_not_null($contents)) ) {
        echo '            <td width="25%" valign="top">' . "\n";

        $box = new box;
        echo $box->infoBox($heading, $contents);

        echo '            </td>' . "\n";
      }
    ?>
     
    Schöne Grüße
    viogrande

    Tomcraft

    • modified Team
    • Gravatar
    • Beiträge: 46.369
    • Geschlecht:
    Fehler bei Modul "Gutschein- und Kupon-Erweiterung"
    Antwort #2 am: 09. Juni 2011, 11:26:26
    Danke für's Teilen deiner Lösung! :thx:

    Grüße

    Torsten

    Blaumann

    • Frisch an Board
    • Beiträge: 59
    Re: Fehler bei Modul "Gutschein- und Kupon-Erweiterung"
    Antwort #3 am: 04. Oktober 2011, 23:35:59
    Hallo,

    der oben angesprochene Fehler liegt in der "/inc/coupon_mod_functions.php".

    Zeile 42:

    Code: PHP  [Auswählen]
    require(DIR_WS_CLASSES . 'currencies.php');

    ändern in:

    Code: PHP  [Auswählen]
    require_once(DIR_WS_CLASSES . 'currencies.php');

    Beste Grüße

    Tomcraft

    • modified Team
    • Gravatar
    • Beiträge: 46.369
    • Geschlecht:
    Re: Fehler bei Modul "Gutschein- und Kupon-Erweiterung"
    Antwort #4 am: 05. Oktober 2011, 01:11:22
    Vielleicht hast du ja Lust das Modul mal für modified eCommerce Shopsoftware anzupassen und eine komplette Anleitung bereit zu stellen? ;-)

    Grüße

    Torsten
    8 Antworten
    3958 Aufrufe
    19. November 2011, 19:18:16 von Tomcraft
    6 Antworten
    4737 Aufrufe
    12. November 2011, 11:11:02 von schimanski99
    0 Antworten
    1791 Aufrufe
    21. März 2014, 10:32:57 von marsbewohner