Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

L. Haase

Pioneers
  • Posts

    85
  • Joined

  • Last visited

Posts posted by L. Haase

  1. Ok, another issue. I have registered my admin email in the mentioned file so that I can get the window that allows me to select either wholesale or retail group however no matter which I select, I am routed back to the login.php. When I look at the source code, I see my email address as well as the password I set up for that account although I do not remember setting the password in english/login.php. Is it supposed to do that? I see nothing about it in the documentation for this file and there is really only 2 edits, simple ones, for that file so I don't see how I could have messed it up. :)

  2. I have done a search here for my issue of my up/down arrows not showing (I am only getting the text from "catalog/admin/includes/languages/english/customers.php". I have uploaded the image files to both catalog/images as well as catalog/admin/images with no luck, I still only get the alt text...no arrows.

     

    There is another image issue when I go to admin/customers/customers groups (customers_groups.php), the "new group" image is not showing and instead I see the text "+Image_new_group".

     

    Everything else seems to work properly. This was an all day affair for me...I still have my altered files up in hopes I can pin point this issue quickly.

     

    Any ideas?

  3. lol - Thanks sweetie pie - I wasnt going to do the instructions,but for you, I'll take a bit of time and try and make it as easy as possible - dont spend to much time on - in fact start removing the module, best to start over with the one I'm going to upload.

     

    I just need to test the welcome gift voucher and discount coupon, I may make a few screen casts. I'm just so busy with work at the moment though :)

     

    Will start removing this weekend. I had to re-do my site anyway and a new version would be wonderful for a totally new site.

  4. I'll be uploading a new package soon.

     

    Buttons have been changed in fav of jquery buttons, the same goes for the date picker.

     

    When you deleted a discount coupon, it wasnt being deleted from the database, it was merely updating the coupons table and setting it to inactive and was being removed from the list. I've added the ability to completely remove the coupon which also then deletes it from the database. You'll be able to set coupons active or inactive.

     

    I'll cleaned up and removed a lot of code that was unnecessary in the coupon_admin.php page. The emails being sent to customers have been improved. HTML Support for the mails, so they no longer just text emails.

     

    When emailing a gift voucher - the email was being sent but not being updated in the database. This has also been fixed. I am busy fixing up the code for the welcome emails, once that is done, I'll upload the package.

     

    There has just been a whole general clean up and improvement.

     

    Melanie,

     

    I look forward to the new version. One quick mention, if possible, could you mention in the instructions the files to edit for custom verbiage in the sent emails as well as listing any known problems in the install file for quick reference. Your instructions are quite explicit which is great however a mention would be nice as an addition.

     

    Guys, this work is great. The module is perfecto and Melanie is the bomb.

  5. Here is the entire file.

     

    <?php

    /*

    $Id: extra_info_pages.php 4.50 2003/06/29 22:50:51 hpdl Exp $

     

    osCommerce, Open Source E-Commerce Solutions

     

    Copyright © 2003 osCommerce

     

    Released under the GNU General Public License

    */

     

    require('includes/application_top.php');

     

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

     

    $languages = tep_get_languages();

     

    // Sets the status of a page

    function tep_set_page_status($pages_id, $status) {

    if ($status == '1') {

    return tep_db_query("update " . TABLE_ABOUT_US . " set status = '1' where pages_id = '" . $pages_id . "'");

    } elseif ($status == '0') {

    return tep_db_query("update " . TABLE_ABOUT_US . " set status = '0' where pages_id = '" . $pages_id . "'");

    } else {

    return -1;

    }

    }

     

    if (tep_not_null($action)) {

    switch ($action) {

    case 'setflag':

    if ( ($_GET['flag'] == '0') || ($_GET['flag'] == '1') ) {

    tep_set_page_status($_GET['bID'], $_GET['flag']);

     

    $messageStack->add_session(SUCCESS_PAGE_STATUS_UPDATED, 'success');

    } else {

    $messageStack->add_session(ERROR_UNKNOWN_STATUS_FLAG, 'error');

    }

     

    tep_redirect(tep_href_link(FILENAME_PAGE_MANAGER, 'page=' . $_GET['page'] . '&bID=' . $_GET['bID']));

    break;

    case 'insert':

    case 'update':

    if (isset($_POST['pages_id'])) $pages_id = tep_db_prepare_input($_POST['pages_id']);

    $pages_title = tep_db_prepare_input($_POST['pages_title']);

    $pages_html_text = tep_db_prepare_input($_POST['pages_html_text']);

    $sort_order = tep_db_prepare_input($_POST['sort_order']);

     

    $intorext = tep_db_prepare_input($_POST['intorext']);

     

    if($intorext == 1) {

    $externallink = tep_db_prepare_input($_POST['externallink']);

    }else{

    $externallink="";

    }

    $page_error = false;

     

    for ($i=0, $n=sizeof($languages); $i<$n; $i++) {

     

    $title_field_name=$_POST['pages_title_'.$languages[$i]['id']];

    if (empty($title_field_name)) {

    $messageStack->add(ERROR_PAGE_TITLE_REQUIRED, 'error');

    $page_error = true;

    }

    }

    if (empty($pages_html_text)) {

    }

    if ($page_error == false) {

    if ($action == 'insert') {

     

    if($page_type == "1" || $page_type == "2" || $page_type == "3" || $page_type == "4" || $page_type == "5" || $page_type == "6" || $page_type == "7" || $page_type == "8" || $page_type == "9") {

    $selectquery=tep_db_query("select count(*) as count from ". TABLE_ABOUT_US ." where page_type=\"$page_type\"");

    $exists = tep_db_fetch_array($selectquery);

     

    if($exists['count'] >= 1) {

    $updateall=tep_db_query("update ". TABLE_ABOUT_US ." set page_type=\"9\" where page_type=\"$page_type\"");

    }

    }

    }

     

     

    if ($action == 'update') {

     

    if($page_type == "1" || $page_type == "2" || $page_type == "3" || $page_type == "4" || $page_type == "5" || $page_type == "6" || $page_type == "7" || $page_type == "8" || $page_type == "9") {

    $selectquery=tep_db_query("select count(*) as count from ". TABLE_ABOUT_US ." where page_type=\"$page_type\" and pages_id != \"(int)$pages_id\"");

    $exists = tep_db_fetch_array($selectquery);

     

    if($exists['count'] >= 1) {

    $updateall=tep_db_query("update ". TABLE_ABOUT_US ." set page_type=\"9\" where page_type=\"$page_type\"");

    }

     

    }

    }

     

    for ($i=0, $n=sizeof($languages); $i<$n; $i++) {

     

     

    $pages_titlem=$_POST['pages_title_'.$languages[$i]['id']];

    $pages_html_textm=$_POST['pages_html_text_'.$languages[$i]['id']];

    $intorextm=$_POST['intorext_'.$languages[$i]['id']];

    $externallinkm=$_POST['externallink_'.$languages[$i]['id']];

    $link_targetm=$_POST['link_target_'.$languages[$i]['id']];

    $language_idm='language_id_'.$languages[$i]['id'];

     

     

     

    $sql_data_array_pages = array('sort_order' => $sort_order,

    'status' => '1',

    'page_type' => $_POST['page_type']);

     

    $sql_data_array_pages_description = array('pages_title' => $pages_titlem,

    'pages_html_text' => stripslashes($pages_html_textm),

    'intorext' => $intorextm,

    'externallink' => $externallinkm,

    'link_target' => $link_targetm);

     

     

     

    if ($action == 'insert') {

     

    $bID="";

     

     

    if ($i == 0) {

     

    tep_db_perform(TABLE_ABOUT_US, $sql_data_array_pages);

     

    $pages_id = tep_db_insert_id();

     

    }

     

    $pageid_merge= array('pages_id' => $pages_id,

    'language_id' => $languages[$i]['id']);

     

    $sql_data_array_pages_desc = array_merge($sql_data_array_pages_description, $pageid_merge);

     

    tep_db_perform(TABLE_ABOUT_US_DESCRIPTION, $sql_data_array_pages_desc);

     

    $messageStack->add_session(SUCCESS_PAGE_INSERTED, 'success');

     

     

    } elseif ($action == 'update') {

     

     

    if ($i == 0) {

    tep_db_perform(TABLE_ABOUT_US, $sql_data_array_pages, 'update', "pages_id = '" . (int)$pages_id . "'");

    }

     

     

    $selectexists=tep_db_query("select count( * ) as `countrecords` from `".TABLE_ABOUT_US_DESCRIPTION."` where pages_id='" . (int)$pages_id . "' and language_id='".$languages[$i]['id']."'");

    $recordexists = tep_db_fetch_array($selectexists);

     

     

     

    if($recordexists['countrecords'] >= 1 ) {

    tep_db_perform(TABLE_ABOUT_US_DESCRIPTION, $sql_data_array_pages_description, 'update', "pages_id = '" . (int)$pages_id . "' and language_id='".$languages[$i]['id']."'");

    }

    else {

     

    $pageid_merge= array('pages_id' => $pages_id,

    'language_id' => $languages[$i]['id']);

     

    $sql_data_array_pages_desc = array_merge($sql_data_array_pages_description, $pageid_merge);

    tep_db_perform(TABLE_ABOUT_US_DESCRIPTION, $sql_data_array_pages_desc);

    }

     

     

    $messageStack->add_session(SUCCESS_PAGE_UPDATED, 'success');

     

    }

     

    } //for

     

     

     

     

    tep_redirect(tep_href_link(FILENAME_PAGE_MANAGER, (isset($_GET['page']) ? 'page=' . $_GET['page'] . '&' : '') . 'bID=' . $pages_id));

    } else {

    $action = 'new';

    }

     

    break;

     

     

    case 'deleteconfirm':

    $pages_id = tep_db_prepare_input($_GET['bID']);

     

    tep_db_query("delete from " . TABLE_ABOUT_US . " where pages_id = '" . (int)$pages_id . "'");

    tep_db_query("delete from " . TABLE_ABOUT_US_DESCRIPTION . " where pages_id = '" . (int)$pages_id . "'");

     

    $messageStack->add_session(SUCCESS_PAGE_REMOVED, 'success');

     

    tep_redirect(tep_href_link(FILENAME_PAGE_MANAGER, 'page=' . $_GET['page']));

    break;

    }

     

    }

    require(DIR_WS_INCLUDES . 'template_top.php');

    ?>

    <script language="javascript">

    function disableIt(a){

    document.getElementById(a).disabled=true;

    }

     

    function enableIt(a){

    document.getElementById(a).disabled=false;

    }

    </script>

    <table border="0" width="100%" cellspacing="0" cellpadding="2">

    <tr>

    <td><table border="0" width="100%" cellspacing="0" cellpadding="0">

    <tr>

    <td class="pageHeading"><?php echo HEADING_TITLE; ?></td>

    <td class="pageHeading" align="right"><?php echo tep_draw_separator('pixel_trans.gif', HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>

    </tr>

    </table></td>

    </tr>

    <?php

     

     

    if ($action == 'new') {

    $form_action = 'insert';

     

    $parameters = array('pages_title' => '',

    'pages_html_text' => '',

    'sort_order' =>'',

    'status' =>'');

     

    $bInfo = new objectInfo($parameters);

     

    if (isset($_GET['bID'])) {

    $form_action = 'update';

     

    $bID = tep_db_prepare_input($_GET['bID']);

     

     

     

    $page_query = tep_db_query("select

    s.status,

    s.sort_order,

    s.page_type,

    p.pages_title,

    p.pages_html_text,

    p.intorext,

    p.externallink,

    p.link_target,

    p.language_id

    from

    " . TABLE_ABOUT_US . " s left join " . TABLE_ABOUT_US_DESCRIPTION . " p on s.pages_id=p.pages_id

    where

    s.pages_id = '" . (int)$bID . "'");

     

    while($page = tep_db_fetch_array($page_query)) {

    $languageid=$page['language_id'];

    $page_type=$page['page_type'];

     

    $pagetitle[$languageid]= $page['pages_title'];

    $sortorder=$page['sort_order'];

    $pages_html_text[$languageid]=$page['pages_html_text'];

    $intorext[$languageid]=$page['intorext'];

    $externallink[$languageid]=$page['externallink'];

    $link_target[$languageid]=$page['link_target'];

    }

     

    } elseif (tep_not_null($_POST)) {

    $bInfo->objectInfo($_POST);

    }

     

    $bIDif="";

    if(!empty($bID) && $bID != "") {

    $bIDif='&bID='.$bID;

    }

    ?>

    <tr>

    <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>

    </tr>

    <tr><?php echo tep_draw_form('new_page', FILENAME_PAGE_MANAGER, (isset($_GET['page']) ? 'page=' . $_GET['page'] . '&' : '') . 'action=' . $form_action.$bIDif, 'post', 'enctype="multipart/form-data"'); if ($form_action == 'update') echo tep_draw_hidden_field('pages_id', $bID); ?>

    <td><table border="0" cellspacing="0" cellpadding="2">

     

    <tr>

    <td class="main"><?php echo TEXT_PAGES_TYPE; ?></td>

    <td class="main"><?echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' '?><select name="page_type" size=1>

    <option value="1" <?php if($page_type == 1) { echo 'selected="selected"'; } ?>>1 - Index</option>

    <option value="2" <?php if($page_type == 2) { echo 'selected="selected"'; } ?>>2 - Contact Us</option>

    <option value="3" <?php if($page_type == 3) { echo 'selected="selected"'; } ?>>3 - Shipping</option>

    <option value="4" <?php if($page_type == 4) { echo 'selected="selected"'; } ?>>4 - Privacy</option>

    <option value="5" <?php if($page_type == 5) { echo 'selected="selected"'; } ?>>5 - Links</option>

    <option value="6" <?php if($page_type == 6) { echo 'selected="selected"'; } ?>>6 - Content</option>

    <option value="7" <?php if($page_type == 7) { echo 'selected="selected"'; } ?>>7 - Other</option>

    </select></td>

    </tr>

     

     

    <?php

    for ($i=0, $n=sizeof($languages); $i<$n; $i++) {

    ?>

    <tr>

    <td class="main"><?php if ($i == 0) echo TEXT_PAGES_TITLE; ?></td>

    <td class="main">

     

    <?php

    echo tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']). ' '.tep_draw_input_field('pages_title_'.$languages[$i]['id'], $pagetitle[$languages[$i]['id']], '', true);

    }

     

    ?>

    </td>

    </tr>

     

    <tr>

    <td class="main"><?php echo TEXT_PAGES_SORT_ORDER; ?></td>

    <td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_draw_input_field('sort_order', $sortorder, '', false); ?></td>

    </tr>

     

    <tr>

    <td class="main"> </td>

    <td class="main"> </td>

    </tr>

     

    <?php

    for ($i=0, $n=sizeof($languages); $i<$n; $i++) {

    ?>

     

     

    <?php if(empty($intorext[$languages[$i]['id']]) or $intorext[$languages[$i]['id']] == "0") {

    $internalchecked="checked";

    $externalchecked="";

    $disabledlinkbox="disabled";

    }

    else {

    $internalchecked="";

    $externalchecked="checked";

    $disabledlinkbox="";

    }

     

    ?>

     

     

    <tr>

    <td class="main"><?php echo TEXT_PAGES_INTEXT; ?></td>

    <td class="main">

    <?php echo tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) ?><input type="radio" value="0" name="intorext_<?php echo $languages[$i]['id']; ?>" <?php echo $internalchecked; ?> onclick='disableIt("<?php echo 'externallink_'.$languages[$i]['id']; ?>");'><?php echo TEXT_TARGET_INTERNAL; ?>

      

    <?php echo tep_draw_separator('pixel_trans.gif', '24', '15'); ?><input type="radio" value="1" name="intorext_<?php echo $languages[$i]['id']; ?>" <?php echo $externalchecked;?> onclick='enableIt("<?php echo 'externallink_'.$languages[$i]['id']; ?>");'><?php echo TEXT_TARGET_EXTERNAL; ?>

    </td>

    </tr>

     

    <tr>

    <td class="main"><?php echo TEXT_PAGES_EXTERNAL_LINK; ?></td>

    <td class="main"><?php echo tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']).' '.tep_draw_input_field('externallink_'.$languages[$i]['id'], $externallink[$languages[$i]['id']], 'id='.'"externallink_'.$languages[$i]['id'].'"'. $disabledlinkbox, false); ?></td>

    </tr>

    <?php if(empty($link_target[$languages[$i]['id']]) or $link_target[$languages[$i]['id']] == "0") {

    $samewindowchecked="checked";

    $newwindowchecked="";

    }else {

    $samewindowchecked="";

    $newwindowchecked="checked";

    }

    ?>

     

    <tr>

    <td class="main"><?php echo TEXT_TARGET; ?></td>

     

    <td class="main">

     

    <?php echo tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']);?><input type="radio" value="0" name="link_target_<?php echo $languages[$i]['id']; ?>" <?php echo $samewindowchecked; ?>><?php echo TEXT_TARGET_SAMEWINDOW; ?>

     

    <input type="radio" value="1" name="link_target_<?php echo $languages[$i]['id']; ?>" <?php echo $newwindowchecked; ?>><?php echo TEXT_TARGET_NEWWINDOW; ?>

    </td>

    </tr>

    <tr>

    <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>

    </tr>

    <?php

    }

    ?>

     

    <?php

    for ($i=0, $n=sizeof($languages); $i<$n; $i++) {

    ?>

     

    <tr>

    <td valign="top" class="main"><br>

    <td class="main"><?php echo tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']). ' '.tep_draw_textarea_field('pages_html_text_'.$languages[$i]['id'],'soft','50','10', $pages_html_text[$languages[$i]['id']]); ?>

    </td>

    </tr>

     

    <?php

    }

    ?>

    <tr>

    <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>

    </tr>

    </table></td>

    </tr>

    <tr>

    <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>

    </tr>

    <tr>

    <td><table border="0" width="100%" cellspacing="0" cellpadding="2">

    <tr>

    <td class="main" align="center"><?php echo TEXT_PAGES_PAGE_NOTE . '<br>'; ?></td>

    <td class="main" align="right" valign="top" nowrap><?php echo (($form_action == 'insert') ? tep_image_submit('button_insert.gif', IMAGE_INSERT) : tep_image_submit('button_update.gif', IMAGE_UPDATE)). '  <a href="' . tep_href_link(FILENAME_PAGE_MANAGER, (isset($_GET['page']) ? 'page=' . $_GET['page'] . '&' : '') . (!empty($bID) and $bID != "" ? 'bID=' . $bID : '')) . '">' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>'; ?></td>

    </tr>

    </table>

    <input type="hidden" name="bID" value="<?php echo $bID; ?>">

    </td>

    </form></tr>

    <?php

    } else {

    ?>

    <tr>

    <td><table border="0" width="100%" cellspacing="0" cellpadding="0">

    <tr>

    <td valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">

    <tr class="dataTableHeadingRow" width="100%">

    <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_PAGES; ?></td>

    <td class="dataTableHeadingContent"><?php echo TEXT_PAGES_TYPE; ?></td>

    <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_SORT_ORDER; ?></td>

    <td class="dataTableHeadingContent" align="center"><?php echo TABLE_HEADING_STATUS; ?></td>

    <td class="dataTableHeadingContent"></td>

    <td class="dataTableHeadingContent"></td>

    </tr>

    <?php

    $pages_query_raw = "select p.pages_id, p.status, p.page_type, p.sort_order, s.pages_title from " . TABLE_ABOUT_US . " p LEFT JOIN " .TABLE_ABOUT_US_DESCRIPTION . " s on p.pages_id = s.pages_id where s.language_id='" . (int)$languages_id . "' order by p.sort_order, s.pages_title";

     

    $pages_split = new splitPageResults($_GET['page'], MAX_DISPLAY_SEARCH_RESULTS, $pages_query_raw, $pages_query_numrows);

    $pages_query = tep_db_query($pages_query_raw);

    while ($pages = tep_db_fetch_array($pages_query)) {

     

    if ((!isset($_GET['bID']) || (isset($_GET['bID']) && ($_GET['bID'] == $pages['pages_id']))) && !isset($bInfo) && (substr($action, 0, 3) != 'new')) {

    $bInfo_array = array_merge($pages, (array) $info);

    $bInfo = new objectInfo($bInfo_array);

    }

     

    if (isset($bInfo) && is_object($bInfo) && ($pages['pages_id'] == $bInfo->pages_id)) {

    echo ' <tr id="defaultSelected" class="dataTableRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . tep_href_link(FILENAME_PAGE_MANAGER, 'page=' . $_GET['page'] . '&bID=' . $pages['pages_id']) . '\'">' . "\n";

    } else {

    echo ' <tr class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . tep_href_link(FILENAME_PAGE_MANAGER, 'page=' . $_GET['page'] . '&bID=' . $pages['pages_id']) . '\'">' . "\n";

    }

    ?>

    <td class="dataTableContent"><?php echo '<a href="javascript:popupImageWindow(\'' . FILENAME_POPUP_IMAGE . '?page=' . $pages['pages_id'] . '\')">' . tep_image(DIR_WS_IMAGES . 'icon_popup.gif', 'View Page') . '</a> ' . $pages['pages_title']; ?></td>

    <td class="dataTableContent"><?php echo $pages['page_type']; ?></td>

    <td class="dataTableContent"><?php echo $pages['sort_order']; ?></td>

    <td class="dataTableContent" align="center">

    <?php

    if ($pages['status'] == '1') {

    echo tep_image(DIR_WS_IMAGES . 'icon_status_green.gif', 'Active', 10, 10) . '  <a href="' . tep_href_link(FILENAME_PAGE_MANAGER, 'page=' . $_GET['page'] . '&bID=' . $pages['pages_id'] . '&action=setflag&flag=0') . '">' . tep_image(DIR_WS_IMAGES . 'icon_status_red_light.gif', 'Set Inactive', 10, 10) . '</a>';

    } else {

    echo '<a href="' . tep_href_link(FILENAME_PAGE_MANAGER, 'page=' . $_GET['page'] . '&bID=' . $pages['pages_id'] . '&action=setflag&flag=1') . '">' . tep_image(DIR_WS_IMAGES . 'icon_status_green_light.gif', 'Set Active', 10, 10) . '</a>  ' . tep_image(DIR_WS_IMAGES . 'icon_status_red.gif', 'Inactive', 10, 10);

    }

    ?>

    </td>

    <td class="dataTableContent" align="right"></td>

    <td class="dataTableContent" align="right"></td>

    </tr>

    <?php

    }

    ?>

    <tr>

    <td colspan="5"><table border="0" width="100%" cellspacing="0" cellpadding="2">

    <tr>

    <td class="smallText" valign="top"><?php echo $pages_split->display_count($pages_query_numrows, MAX_DISPLAY_SEARCH_RESULTS, $_GET['page'], TEXT_DISPLAY_NUMBER_OF_PAGES); ?></td>

    <td class="smallText" align="right"><?php echo $pages_split->display_links($pages_query_numrows, MAX_DISPLAY_SEARCH_RESULTS, MAX_DISPLAY_PAGE_LINKS, $_GET['page']); ?></td>

    </tr>

    <tr>

    <td align="right" colspan="2"><?php echo '<a href="' . tep_href_link(FILENAME_PAGE_MANAGER, 'action=new') . '">' . tep_image_button('button_new_file.gif', IMAGE_NEW_PAGE) . '</a>'; ?></td>

    </tr>

    </table></td>

    </tr>

    </table></td>

    <?php

    $heading = array();

    $contents = array();

    switch ($action) {

    case 'delete':

    $heading[] = array('text' => '<b>' . $bInfo->pages_title . '</b>');

     

    $contents = array('form' => tep_draw_form('pages', FILENAME_PAGE_MANAGER, 'page=' . $_GET['page'] . '&bID=' . $bInfo->pages_id . '&action=deleteconfirm'));

    $contents[] = array('text' => TEXT_INFO_DELETE_INTRO);

    $contents[] = array('text' => '<br><b>' . $bInfo->pages_title . '</b>');

    if ($bInfo->pages_image) $contents[] = array('text' => '<br>' . tep_draw_checkbox_field('delete_image', 'on', true) . ' ' . TEXT_INFO_DELETE_IMAGE);

    $contents[] = array('align' => 'center', 'text' => '<br>' . tep_image_submit('button_delete.gif', IMAGE_DELETE) . ' <a href="' . tep_href_link(FILENAME_PAGE_MANAGER, 'page=' . $_GET['page'] . '&bID=' . $_GET['bID']) . '">' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>');

    break;

    default:

    if (is_object($bInfo)) {

    $heading[] = array('text' => '<b>' . $bInfo->pages_title . '</b>');

     

    $contents[] = array('align' => 'center', 'text' => '<br><br><a href="' . tep_href_link(FILENAME_PAGE_MANAGER, 'page=' . $_GET['page'] . '&bID=' . $bInfo->pages_id . '&action=new') . '">' . tep_image_button('button_edit.gif', IMAGE_EDIT) . '</a> <a href="' . tep_href_link(FILENAME_PAGE_MANAGER, 'page=' . $_GET['page'] . '&bID=' . $bInfo->pages_id . '&action=delete') . '">' . tep_image_button('button_delete.gif', IMAGE_DELETE) . '</a><br><br><br>');

     

    if ($bInfo->date_scheduled) $contents[] = array('text' => '<br>' . sprintf(TEXT_PAGES_SCHEDULED_AT_DATE, tep_date_short($bInfo->date_scheduled)));

     

    if ($bInfo->expires_date) {

    $contents[] = array('text' => '<br>' . sprintf(TEXT_PAGES_EXPIRES_AT_DATE, tep_date_short($bInfo->expires_date)));

    } elseif ($bInfo->expires_impressions) {

    $contents[] = array('text' => '<br>' . sprintf(TEXT_PAGES_EXPIRES_AT_IMPRESSIONS, $bInfo->expires_impressions));

    }

     

    if ($bInfo->date_status_change) $contents[] = array('text' => '<br>' . sprintf(TEXT_PAGES_STATUS_CHANGE, tep_date_short($bInfo->date_status_change)));

    }

    break;

    }

     

    if ( (tep_not_null($heading)) && (tep_not_null($contents)) ) {

    echo ' <td width="25%" valign="top">' . "\n";

     

    $box = new box;

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

     

    echo ' </td>' . "\n";

    }

    ?>

    </tr>

    </table></td>

    </tr>

    <?php

    }

    ?>

    </table>

    <?php

    require(DIR_WS_INCLUDES . 'template_bottom.php');

    require(DIR_WS_INCLUDES . 'application_bottom.php');

    ?>

     

    I think the issue is somewhere in the call to the DB tables and columns.

  6. I have this working perfectly and I am trying to duplicate it to an "About Us" box module. I have modified all the files from "extrainfopages" and it's variant "extra_info_pages(_manager).php" to "extraaboutus" and "extra_about_us" and modified all appropriate coding within each new file. I have also modified the insertion codes in the filenames.php and databasetables.php in both directories noted.

     

    I also changed the sql to create tables called "about _us" and "about_us_description". The sql set up properly.

     

    My issue seems to be within the call to the sql tables within catalog/admin/extra_about_us_pages.php (formerly extra_info_pages.php) so that I am getting the following error.

     

    1054 - Unknown column 'p.pages_id' in 'on clause'

     

    select count(*) as total from about_us p LEFT JOIN about_us_description s on p.pages_id = s.pages_id where s.language_id='1'

     

    I think this is somewhere within the following code:

     

    // Sets the status of a page

    function tep_set_page_status($pages_id, $status) {

    if ($status == '1') {

    return tep_db_query("update " . TABLE_ABOUT_US . " set status = '1' where pages_id = '" . $pages_id . "'");

    } elseif ($status == '0') {

    return tep_db_query("update " . TABLE_ABOUT_US . " set status = '0' where pages_id = '" . $pages_id . "'");

    } else {

    return -1;

    }

    }

    and other similar code. My question is since I changed the "extra_pages_..." reference and the table names to "about_us" and "about_us_description", is there something within this type of call I also need to change, for example the "$pages_id" to "$about_us_id" or something similar. (I actually tried this and it didnt work.)

     

    My issue is I have little to no experience with sql other than being able to import/export, perform a query (add into the database) and other limited changes. I am hoping someone can point me in the right direction according to the error message or at least tell me what it means. It seems to me it is the p.pages_id in the file.

  7. Agreed. I am in no way a programmer although I do understand HTML and CSS. PHP and MySQL escape me other than being able to recognize opening and closing tags sometimes. It was your fix on my USPS and a comment on this topic that made me try it. I had tried copying the correctly formatted code directly into the server file and it still came up garbled again. It was only by transferring binary that it worked in this specific instance.

     

    I use Filezilla and set my default editor to wordpad instead of notepad. That might have something to do with the code being garbled when opened. I know wordpad allows some formatting that notepad does not. I do know that the simpler the editor you use (pure text editor) the less likely you will have formatting issues come up but I just don't like notepad's wrap function. It makes it difficult to read the code without the indents and line breaks.

     

    I have your box here. Adding products as they cure.

  8. You should never transfer PHP files as binaries*. This will corrupt the file. Transferring PHP files as ASCII should always be safe. There is something very wrong with your software if this does not work.

     

    *You can sometimes get away with this if the server and local computer are running the same operating system. This is rarely the case.

     

    Regards

    Jim

     

    Jim, you were the person who told me that you had to fix my USPS by transferring the usps.php as binary instead of ascii to get my module to work a few months ago. Don't you rememeber?

  9. I am unsure whether anyone monitors this topic or not but I have a simple styling question. I have installed this module, everything I want to add works perfectly but instead of a right alignment on the sub-footer, I want a center alignment. I have tried many different things in the places I thought it would work but can't find the answer.

     

    Any ideas?

  10. I have resolved the error of "unexpected T_CLASS on line 1" with some help of another answer here. I thought I would post a more recent fix to this for anyone else who is having this issue.

     

    The problem comes from the type of ftp transfer you are doing, Typically an all text file would be transferred by ASCII and images, videos and other files by binary however for some reason, and I have seen this before, the coding is written in such a manner that some hosting companies settings interpret this incorrectly.

     

    If you get these parse errors, make note of the file it is saying is creating the error. You will probably see a few as you go through this fix. Instead of copying and pasting from the original file to the server file, try transferring as a binary file first. Check your FTP manager settings to find where you can change from AUTO to BINARY.

  11. @L. Haase

     

    I would always advise before installing any addons to have a quick read of the support thread first to check what others are saying often there are similar addons but you will find some are well supported and some are not at all

     

    Regards

    Joli

     

    John, you make a very good point, something in all my brilliance (yeah, right) I should have thought of myself. All kidding about my intelligence aside, it is a great idea and one that I will follow.

     

    I did get this contribution installed and working perfectly. I have even made some changes, minor that they are, to change the box name to something which is appropriate for my site. As usual, it was my own error, I missed one of the filenames.php file insertions.

  12. @ lisa

     

    You must have copied and pasted incorrectly because this is the checkout_payment.php file which was uploaded.

     

    I copied this code exactly into my catalog/checkout_payment.php file, refreshed the site and still I am getting the error message that I must select a payment method even when I tick the voucher credit field. Still not working.

  13. I too am having the same issue with this contribution that the link in admin/tools to the page is non-functioning. It tries to reference a file called "page_manager.php" which is non-existent. What am I missing? Generally when this error occurs it is because the file was not uploaded however there was no such file in the most current download.

  14. I do apologize. When I tried to send a message from the form, it kept telling me the captcha was incorrect and displaying a new one. I never did get any indication that the form completed.

     

    I understand you are not the original, ORIGINAL writer of the mod however I meant that you were the last, and best, modifier of this mod. Forgive me.

     

    Thanks for the SQL. I will try and and see what happens.

  15. Well, I recheked everything including the typo. I thought I had backed up the proper files but the one I transferred back didn't have the spelling correction above and still no luck getting this re-working.

     

    Here is my checkout_payment.php file. The one pasted above is non-functioning. This one worked but doesn't now. Any ideas?

     

    <?php

    /*

    $Id$

     

    osCommerce, Open Source E-Commerce Solutions

     

    Copyright © 2010 osCommerce

     

    Released under the GNU General Public License

    */

     

    require('includes/application_top.php');

     

    // if the customer is not logged on, redirect them to the login page

    if (!tep_session_is_registered('customer_id')) {

    $navigation->set_snapshot();

    tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL'));

    }

     

    // if there is nothing in the customers cart, redirect them to the shopping

     

    cart page

    if ($cart->count_contents() < 1) {

    tep_redirect(tep_href_link(FILENAME_SHOPPING_CART));

    }

     

    // if no shipping method has been selected, redirect the customer to the

     

    shipping method selection page

    if (!tep_session_is_registered('shipping')) {

    tep_redirect(tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'));

    }

     

    // avoid hack attempts during the checkout procedure by checking the internal

     

    cartID

    if (isset($cart->cartID) && tep_session_is_registered('cartID')) {

    if ($cart->cartID != $cartID) {

    tep_redirect(tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'));

    }

    }

     

    // Stock Check

    if ( (STOCK_CHECK == 'true') && (STOCK_ALLOW_CHECKOUT != 'true') ) {

    $products = $cart->get_products();

    for ($i=0, $n=sizeof($products); $i<$n; $i++) {

    if (tep_check_stock($products[$i]['id'], $products[$i]['quantity'])) {

    tep_redirect(tep_href_link(FILENAME_SHOPPING_CART));

    break;

    }

    }

    }

     

    // if no billing destination address was selected, use the customers own

     

    address as default

    if (!tep_session_is_registered('billto')) {

    tep_session_register('billto');

    $billto = $customer_default_address_id;

    } else {

    // verify the selected billing address

    if ( (is_array($billto) && empty($billto)) || is_numeric($billto) ) {

    $check_address_query = tep_db_query("select count(*) as total from " .

     

    TABLE_ADDRESS_BOOK . " where customers_id = '" . (int)$customer_id . "' and

     

    address_book_id = '" . (int)$billto . "'");

    $check_address = tep_db_fetch_array($check_address_query);

     

    if ($check_address['total'] != '1') {

    $billto = $customer_default_address_id;

    if (tep_session_is_registered('payment')) tep_session_unregister

     

    ('payment');

    }

    }

    }

     

    require(DIR_WS_CLASSES . 'order.php');

    $order = new order;

     

    require(DIR_WS_CLASSES . 'order_total.php'); // CCGV

    $order_total_modules = new order_total; // CCGV

     

    if (!tep_session_is_registered('comments')) tep_session_register

     

    ('comments');

    if (isset($HTTP_POST_VARS['comments']) && tep_not_null($HTTP_POST_VARS

     

    ['comments'])) {

    $comments = tep_db_prepare_input($HTTP_POST_VARS['comments']);

    }

     

    $total_weight = $cart->show_weight();

    $total_count = $cart->count_contents();

    $total_count = $cart->count_contents_virtual(); // CCGV

     

    // load all enabled payment modules

    require(DIR_WS_CLASSES . 'payment.php');

    $payment_modules = new payment;

     

    require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CHECKOUT_PAYMENT);

     

    $breadcrumb->add(NAVBAR_TITLE_1, tep_href_link(FILENAME_CHECKOUT_SHIPPING,

     

    '', 'SSL'));

    $breadcrumb->add(NAVBAR_TITLE_2, tep_href_link(FILENAME_CHECKOUT_PAYMENT,

     

    '', 'SSL'));

     

    require(DIR_WS_INCLUDES . 'template_top.php');

    ?>

     

    <script type="text/javascript"><!--

    var selected;

    <?php /* following jscript function ADDED FOR CCGV */ ?>

    var submitter = null;

    function submitFunction() {

    submitter = 1;

    }

    <?php /* END OF ADDED FOR CCGV */ ?>

     

    function selectRowEffect(object, buttonselect) {

    if (!selected) {

    if (document.getElementById) {

    selected = document.getElementById('defaultSelected');

    } else {

    selected = document.all['defaultSelected'];

    }

    }

     

    if (selected) selected.className = 'moduleRow';

    object.className = 'moduleRowSelected';

    selected = object;

     

    // one button is not an array

    if (document.checkout_payment.payment[0]) {

    document.checkout_payment.payment[buttonselect].checked=true;

    } else {

    document.checkout_payment.payment.checked=true;

    }

    }

     

    function rowOverEffect(object) {

    if (object.className == 'moduleRow') object.className = 'moduleRowOver';

    }

     

    function rowOutEffect(object) {

    if (object.className == 'moduleRowOver') object.className = 'moduleRow';

    }

    //--></script>

    <?php echo $payment_modules->javascript_validation(); ?>

     

    <h1><?php echo HEADING_TITLE; ?></h1>

     

    <?php echo tep_draw_form('checkout_payment', tep_href_link

     

    (FILENAME_CHECKOUT_CONFIRMATION, '', 'SSL'), 'post', 'onsubmit="return

     

    check_form();"', true); ?>

     

    <div class="contentContainer">

     

    <?php

    if (isset($HTTP_GET_VARS['payment_error']) && is_object(${$HTTP_GET_VARS

     

    ['payment_error']}) && ($error = ${$HTTP_GET_VARS['payment_error']}-

     

    >get_error())) {

    ?>

     

    <div class="contentText">

    <?php echo '<strong>' . tep_output_string_protected($error['title']) .

     

    '</strong>'; ?>

     

    <p class="messageStackError"><?php echo tep_output_string_protected

     

    ($error['error']); ?></p>

    </div>

     

    <?php

    }

    ?>

     

    <h2><?php echo TABLE_HEADING_BILLING_ADDRESS; ?></h2>

     

    <div class="contentText">

    <div class="ui-widget infoBoxContainer" style="float: right;">

    <div class="ui-widget-header infoBoxHeading"><?php echo

     

    TITLE_BILLING_ADDRESS; ?></div>

     

    <div class="ui-widget-content infoBoxContents">

    <?php echo tep_address_label($customer_id, $billto, true, ' ', '<br

     

    />'); ?>

    </div>

    </div>

     

    <?php echo TEXT_SELECTED_BILLING_DESTINATION; ?><br /><br /><?php echo

     

    tep_draw_button(IMAGE_BUTTON_CHANGE_ADDRESS, 'home', tep_href_link

     

    (FILENAME_CHECKOUT_PAYMENT_ADDRESS, '', 'SSL')); ?>

    </div>

     

    <div style="clear: both;"></div>

     

    <h2><?php echo TABLE_HEADING_PAYMENT_METHOD; ?></h2>

     

    <?php

    $selection = $payment_modules->selection();

     

    if (sizeof($selection) > 1) {

    ?>

     

    <div class="contentText">

    <div style="float: right;">

    <?php echo '<strong>' . TITLE_PLEASE_SELECT . '</strong>'; ?>

    </div>

     

    <?php echo TEXT_SELECT_PAYMENT_METHOD; ?>

    </div>

     

    <?php

    } elseif ($free_shipping == false) {

    ?>

     

    <div class="contentText">

    <?php echo TEXT_ENTER_PAYMENT_INFORMATION; ?>

    </div>

     

    <?php

    }

    ?>

     

    <div class="contentText">

     

    <?php

    $radio_buttons = 0;

    for ($i=0, $n=sizeof($selection); $i<$n; $i++) {

    ?>

     

    <table border="0" width="100%" cellspacing="0" cellpadding="2">

     

    <?php

    if ( ($selection[$i]['id'] == $payment) || ($n == 1) ) {

    echo ' <tr id="defaultSelected" class="moduleRowSelected"

     

    onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)"

     

    onclick="selectRowEffect(this, ' . $radio_buttons . ')">' . "\n";

    } else {

    echo ' <tr class="moduleRow" onmouseover="rowOverEffect(this)"

     

    onmouseout="rowOutEffect(this)" onclick="selectRowEffect(this, ' .

     

    $radio_buttons . ')">' . "\n";

    }

    ?>

     

    <td><strong><?php echo $selection[$i]['module']; ?></strong></td>

    <td align="right">

     

    <?php

    if (sizeof($selection) > 1) {

    echo tep_draw_radio_field('payment', $selection[$i]['id'], ($selection

     

    [$i]['id'] == $payment));

    } else {

    echo tep_draw_hidden_field('payment', $selection[$i]['id']);

    }

    ?>

     

    </td>

    </tr>

     

    <?php

    if (isset($selection[$i]['error'])) {

    ?>

     

    <tr>

    <td colspan="2"><?php echo $selection[$i]['error']; ?></td>

    </tr>

     

    <?php

    } elseif (isset($selection[$i]['fields']) && is_array($selection[$i]

     

    ['fields'])) {

    ?>

     

    <tr>

    <td colspan="2"><table border="0" cellspacing="0" cellpadding="2">

     

    <?php

    for ($j=0, $n2=sizeof($selection[$i]['fields']); $j<$n2; $j++) {

    ?>

     

    <tr>

    <td><?php echo $selection[$i]['fields'][$j]['title']; ?></td>

    <td><?php echo $selection[$i]['fields'][$j]['field']; ?></td>

    </tr>

     

    <?php

    }

    ?>

     

    </table></td>

    </tr>

     

    <?php

    }

    ?>

     

    </table>

     

    <?php

    $radio_buttons++;

    }

    ?>

     

    <?php

    echo $order_total_modules->credit_selection(); // CCGV

    ?>

    </div>

     

    <h2><?php echo TABLE_HEADING_COMMENTS; ?></h2>

     

    <div class="contentText">

    <?php echo tep_draw_textarea_field('comments', 'soft', '60', '5',

     

    $comments); ?>

    </div>

     

    <div class="contentText">

    <div style="float: left; width: 60%; padding-top: 5px; padding-left:

     

    15%;">

    <div id="coProgressBar" style="height: 5px;"></div>

     

    <table border="0" width="100%" cellspacing="0" cellpadding="2">

    <tr>

    <td align="center" width="33%" class="checkoutBarFrom"><?php echo

     

    '<a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '"

     

    class="checkoutBarFrom">' . CHECKOUT_BAR_DELIVERY . '</a>'; ?></td>

    <td align="center" width="33%" class="checkoutBarCurrent"><?php echo

     

    CHECKOUT_BAR_PAYMENT; ?></td>

    <td align="center" width="33%" class="checkoutBarTo"><?php echo

     

    CHECKOUT_BAR_CONFIRMATION; ?></td>

    </tr>

    </table>

    </div>

     

    <div style="float: right;"><?php echo tep_draw_button

     

    (IMAGE_BUTTON_CONTINUE, 'triangle-1-e', null, 'primary'); ?></div>

    </div>

    </div>

     

    <script type="text/javascript">

    $('#coProgressBar').progressbar({

    value: 66

    });

    </script>

     

    </form>

     

    <?php

    require(DIR_WS_INCLUDES . 'template_bottom.php');

    require(DIR_WS_INCLUDES . 'application_bottom.php');

    ?>ar').progressbar({

    value: 66

    });

    </script>

     

    </form>

     

    <?php

    require(DIR_WS_INCLUDES . 'template_bottom.php');

    require(DIR_WS_INCLUDES . 'application_bottom.php');

    ?>

     

    Lisa.

  16. I am so happy that someone is taking an interest in this. It has many great features that, if it worked properly, would service the needs of many oscommerce users, like us. I had this working with that last fix of the spelling error and backed up my files as I should have.

     

    My problem now is I had to reinstall my files after I broke the styling and now this mod doesn't work anymore even using the backed up files. I didn't change anything in the database at all with the my styling changes.. There is also no place in the configuration/my store area to send the gv to customer in my setup. I hate to have to go back to the simple coupon mod as I like the gift certificate feature in this one.

  17. Ok, to think of this logically, the email gives the url of

    http://aquarian-artisan-bath-body.com/shop/gv_redeem.php?gv_no=eca8d9cfb393

     

    and the catalog/gv_redeem.php shows this (I have redded the code I think is the culprit however I guess it could be anywhere in this or another file.

     

    <?php

    /*

    $Id$

     

    osCommerce, Open Source E-Commerce Solutions

     

    Copyright © 2010 osCommerce

     

    Released under the GNU General Public License

    */

     

    require('includes/application_top.php');

    // if the customer is not logged on, redirect them to the login page

    if (!tep_session_is_registered('customer_id')) {

    $navigation->set_snapshot();

    tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL'));

    }

     

    // check for a voucher number in the url

    if (isset($HTTP_GET_VARS['gv_no'])) {

    $error = true;

    $gv_query = tep_db_query("select c.coupon_id, c.coupon_amount from " . TABLE_COUPONS . " c, " . TABLE_COUPON_EMAIL_TRACK . " et where coupon_code = '" . $HTTP_GET_VARS['gv_no'] . "' and c.coupon_id = et.coupon_id");

    if (tep_db_num_rows($gv_query) >0) {

    $coupon = tep_db_fetch_array($gv_query);

    $redeem_query = tep_db_query("select coupon_id from ". TABLE_COUPON_REDEEM_TRACK . " where coupon_id = '" . $coupon['coupon_id'] . "'");

    if (tep_db_num_rows($redeem_query) == 0 ) {

    // check for required session variables

    if (!tep_session_is_registered('gv_id')) {

    tep_session_register('gv_id');

    }

    $gv_id = $coupon['coupon_id'];

    $error = false;

    } else {

    $error = true;

    }

    }

    } else {

    tep_redirect(FILENAME_DEFAULT);

    }

    if ((!$error) && (tep_session_is_registered('customer_id'))) {

    // Update redeem status

    $gv_query = tep_db_query("insert into " . TABLE_COUPON_REDEEM_TRACK . " (coupon_id, customer_id, redeem_date, redeem_ip) values ('" . $coupon['coupon_id'] . "', '" . $customer_id . "', now(),'" . $REMOTE_ADDR . "')");

    $gv_update = tep_db_query("update " . TABLE_COUPONS . " set coupon_active = 'N' where coupon_id = '" . $coupon['coupon_id'] . "'");

    tep_gv_account_update($customer_id, $gv_id);

    tep_session_unregister('gv_id');

    }

    require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_GV_REDEEM);

     

    $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_GV_REDEEM));

     

    require(DIR_WS_INCLUDES . 'template_top.php');

    ?>

     

    <h1><?php echo HEADING_TITLE; ?></h1>

     

    <div class="contentContainer">

    <div class="contentText">

    <?php echo TEXT_INFORMATION; ?>

    </div>

     

    <?php

    // if we get here then either the url gv_no was not set or it was invalid

    // so output a message.

    $message = sprintf(TEXT_VALID_GV, $currencies->format($coupon['coupon_amount']));

    if ($error) {

    $message = TEXT_INVALID_GV;

    }

    ?>

     

    <div class="contentText">

    <p class="main"><?php echo $message; ?></p>

    </div>

     

     

     

    <div class="buttonSet">

    <span class="buttonAction"><?php echo tep_draw_button(IMAGE_BUTTON_CONTINUE, 'triangle-1-e', tep_href_link(FILENAME_DEFAULT)); ?></span>

    </div>

    </div>

     

    <?php

    require(DIR_WS_INCLUDES . 'template_bottom.php');

    require(DIR_WS_INCLUDES . 'application_bottom.php');

    ?>

    What do you think, Kevin?

  18. Ok, now we can actually get past the payment page which is great! Thanks for that coding fix. The next issue I am seeing is with the email that contains the link to redeem the GV. When you click on the link, it takes you to a page that says the gv# is invalid. Is this simply a text message which I need to change? Also, I do not see anywhere in the admin/configuration area a link to send new customers a GV as a welcome as per the use instructions.

     

    I tried to contact the original writer of this module however the website contact form is not working. I did send a message through the forums here but don't really hold out much hope of a reply. Your's was the first working fix I have found for this issue. Thank you so much! I can live with the other issues for now but do look forward to your contribution to this addon later this year. I would actually be willing to throw a few bucks your way to have a fully functioning module.

  19. Ok, I guess I spoke too soon. Everything SEEMS to be working. The admin side lists and allows me to release and send purchased GV however when I test the redemption area, I keep getting redirected to the payment section to select a payment method, even though the GV I used would have left me with a credit balance. There is nothing I can do to try and get around this. When I select "cash on delivery" as my test payment method, I get the same thing, a notice asking me to select a payment method.

     

    The url is www.aquarian-artisan-bath-body.com/shop for anyone who can help me figure this out. From what I have seen, there are very few people who have gotten this installed properly. Here is my checkout_payment.php page. I think this may have something to do with the code that applies the GV credit through the check box or in the order_totals_module? I am unsure.

     

    I really like the versatility of this module and want it to work for me but I am kinda lost when it comes to PHP. Any assistance would be appreciated

     

    <?php

    /*

    $Id$

     

    osCommerce, Open Source E-Commerce Solutions

     

    Copyright © 2010 osCommerce

     

    Released under the GNU General Public License

    */

     

    require('includes/application_top.php');

     

    // if the customer is not logged on, redirect them to the login page

    if (!tep_session_is_registered('customer_id')) {

    $navigation->set_snapshot();

    tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL'));

    }

     

    // if there is nothing in the customers cart, redirect them to the shopping cart page

    if ($cart->count_contents() < 1) {

    tep_redirect(tep_href_link(FILENAME_SHOPPING_CART));

    }

     

    // if no shipping method has been selected, redirect the customer to the shipping method selection page

    if (!tep_session_is_registered('shipping')) {

    tep_redirect(tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'));

    }

     

    // avoid hack attempts during the checkout procedure by checking the internal cartID

    if (isset($cart->cartID) && tep_session_is_registered('cartID')) {

    if ($cart->cartID != $cartID) {

    tep_redirect(tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'));

    }

    }

     

    // Stock Check

    if ( (STOCK_CHECK == 'true') && (STOCK_ALLOW_CHECKOUT != 'true') ) {

    $products = $cart->get_products();

    for ($i=0, $n=sizeof($products); $i<$n; $i++) {

    if (tep_check_stock($products[$i]['id'], $products[$i]['quantity'])) {

    tep_redirect(tep_href_link(FILENAME_SHOPPING_CART));

    break;

    }

    }

    }

     

    // if no billing destination address was selected, use the customers own address as default

    if (!tep_session_is_registered('billto')) {

    tep_session_register('billto');

    $billto = $customer_default_address_id;

    } else {

    // verify the selected billing address

    if ( (is_array($billto) && empty($billto)) || is_numeric($billto) ) {

    $check_address_query = tep_db_query("select count(*) as total from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . (int)$customer_id . "' and address_book_id = '" . (int)$billto . "'");

    $check_address = tep_db_fetch_array($check_address_query);

     

    if ($check_address['total'] != '1') {

    $billto = $customer_default_address_id;

    if (tep_session_is_registered('payment')) tep_session_unregister('payment');

    }

    }

    }

     

    require(DIR_WS_CLASSES . 'order.php');

    $order = new order;

     

    require(DIR_WS_CLASSES . 'order_total.php'); // CCGV

    $order_total_modules = new order_total; // CCGV

     

    if (!tep_session_is_registered('comments')) tep_session_register('comments');

    if (isset($HTTP_POST_VARS['comments']) && tep_not_null($HTTP_POST_VARS['comments'])) {

    $comments = tep_db_prepare_input($HTTP_POST_VARS['comments']);

    }

     

    $total_weight = $cart->show_weight();

    $total_count = $cart->count_contents();

    $total_count = $cart->count_contents_virtual(); // CCGV

     

    // load all enabled payment modules

    require(DIR_WS_CLASSES . 'payment.php');

    $payment_modules = new payment;

     

    require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CHECKOUT_PAYMENT);

     

    $breadcrumb->add(NAVBAR_TITLE_1, tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'));

    $breadcrumb->add(NAVBAR_TITLE_2, tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'));

     

    require(DIR_WS_INCLUDES . 'template_top.php');

    ?>

     

    <script type="text/javascript"><!--

    var selected;

    <?php /* following jscript function ADDED FOR CCGV */ ?>

    var submitter = null;

    function submitFunction() {

    submitter = 1;

    }

    <?php /* END OF ADDED FOR CCGV */ ?>

     

    function selectRowEffect(object, buttonselect) {

    if (!selected) {

    if (document.getElementById) {

    selected = document.getElementById('defaultSelected');

    } else {

    selected = document.all['defaultSelected'];

    }

    }

     

    if (selected) selected.className = 'moduleRow';

    object.className = 'moduleRowSelected';

    selected = object;

     

    // one button is not an array

    if (document.checkout_payment.payment[0]) {

    document.checkout_payment.payment[buttonselect].checked=true;

    } else {

    document.checkout_payment.payment.checked=true;

    }

    }

     

    function rowOverEffect(object) {

    if (object.className == 'moduleRow') object.className = 'moduleRowOver';

    }

     

    function rowOutEffect(object) {

    if (object.className == 'moduleRowOver') object.className = 'moduleRow';

    }

    //--></script>

    <?php echo $payment_modules->javascript_validation(); ?>

     

    <h1><?php echo HEADING_TITLE; ?></h1>

     

    <?php echo tep_draw_form('checkout_payment', tep_href_link(FILENAME_CHECKOUT_CONFIRMATION, '', 'SSL'), 'post', 'onsubmit="return check_form();"', true); ?>

     

    <div class="contentContainer">

     

    <?php

    if (isset($HTTP_GET_VARS['payment_error']) && is_object(${$HTTP_GET_VARS['payment_error']}) && ($error = ${$HTTP_GET_VARS['payment_error']}->get_error())) {

    ?>

     

    <div class="contentText">

    <?php echo '<strong>' . tep_output_string_protected($error['title']) . '</strong>'; ?>

     

    <p class="messageStackError"><?php echo tep_output_string_protected($error['error']); ?></p>

    </div>

     

    <?php

    }

    ?>

     

    <h2><?php echo TABLE_HEADING_BILLING_ADDRESS; ?></h2>

     

    <div class="contentText">

    <div class="ui-widget infoBoxContainer" style="float: right;">

    <div class="ui-widget-header infoBoxHeading"><?php echo TITLE_BILLING_ADDRESS; ?></div>

     

    <div class="ui-widget-content infoBoxContents">

    <?php echo tep_address_label($customer_id, $billto, true, ' ', '<br />'); ?>

    </div>

    </div>

     

    <?php echo TEXT_SELECTED_BILLING_DESTINATION; ?><br /><br /><?php echo tep_draw_button(IMAGE_BUTTON_CHANGE_ADDRESS, 'home', tep_href_link(FILENAME_CHECKOUT_PAYMENT_ADDRESS, '', 'SSL')); ?>

    </div>

     

    <div style="clear: both;"></div>

     

    <h2><?php echo TABLE_HEADING_PAYMENT_METHOD; ?></h2>

     

    <?php

    $selection = $payment_modules->selection();

     

    if (sizeof($selection) > 1) {

    ?>

     

    <div class="contentText">

    <div style="float: right;">

    <?php echo '<strong>' . TITLE_PLEASE_SELECT . '</strong>'; ?>

    </div>

     

    <?php echo TEXT_SELECT_PAYMENT_METHOD; ?>

    </div>

     

    <?php

    } elseif ($free_shipping == false) {

    ?>

     

    <div class="contentText">

    <?php echo TEXT_ENTER_PAYMENT_INFORMATION; ?>

    </div>

     

    <?php

    }

    ?>

     

    <div class="contentText">

     

    <?php

    $radio_buttons = 0;

    for ($i=0, $n=sizeof($selection); $i<$n; $i++) {

    ?>

     

    <table border="0" width="100%" cellspacing="0" cellpadding="2">

     

    <?php

    if ( ($selection[$i]['id'] == $payment) || ($n == 1) ) {

    echo ' <tr id="defaultSelected" class="moduleRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="selectRowEffect(this, ' . $radio_buttons . ')">' . "\n";

    } else {

    echo ' <tr class="moduleRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="selectRowEffect(this, ' . $radio_buttons . ')">' . "\n";

    }

    ?>

     

    <td><strong><?php echo $selection[$i]['module']; ?></strong></td>

    <td align="right">

     

    <?php

    if (sizeof($selection) > 1) {

    echo tep_draw_radio_field('payment', $selection[$i]['id'], ($selection[$i]['id'] == $payment));

    } else {

    echo tep_draw_hidden_field('payment', $selection[$i]['id']);

    }

    ?>

     

    </td>

    </tr>

     

    <?php

    if (isset($selection[$i]['error'])) {

    ?>

     

    <tr>

    <td colspan="2"><?php echo $selection[$i]['error']; ?></td>

    </tr>

     

    <?php

    } elseif (isset($selection[$i]['fields']) && is_array($selection[$i]['fields'])) {

    ?>

     

    <tr>

    <td colspan="2"><table border="0" cellspacing="0" cellpadding="2">

     

    <?php

    for ($j=0, $n2=sizeof($selection[$i]['fields']); $j<$n2; $j++) {

    ?>

     

    <tr>

    <td><?php echo $selection[$i]['fields'][$j]['title']; ?></td>

    <td><?php echo $selection[$i]['fields'][$j]['field']; ?></td>

    </tr>

     

    <?php

    }

    ?>

     

    </table></td>

    </tr>

     

    <?php

    }

    ?>

     

    </table>

     

    <?php

    $radio_buttons++;

    }

    ?>

     

    <?php

    echo $order_total_modules->credit_selection(); // CCGV

    ?>

    </div>

     

    <h2><?php echo TABLE_HEADING_COMMENTS; ?></h2>

     

    <div class="contentText">

    <?php echo tep_draw_textarea_field('comments', 'soft', '60', '5', $comments); ?>

    </div>

     

    <div class="contentText">

    <div style="float: left; width: 60%; padding-top: 5px; padding-left: 15%;">

    <div id="coProgressBar" style="height: 5px;"></div>

     

    <table border="0" width="100%" cellspacing="0" cellpadding="2">

    <tr>

    <td align="center" width="33%" class="checkoutBarFrom"><?php echo '<a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '" class="checkoutBarFrom">' . CHECKOUT_BAR_DELIVERY . '</a>'; ?></td>

    <td align="center" width="33%" class="checkoutBarCurrent"><?php echo CHECKOUT_BAR_PAYMENT; ?></td>

    <td align="center" width="33%" class="checkoutBarTo"><?php echo CHECKOUT_BAR_CONFIRMATION; ?></td>

    </tr>

    </table>

    </div>

     

    <div style="float: right;"><?php echo tep_draw_button(IMAGE_BUTTON_CONTINUE, 'triangle-1-e', null, 'primary'); ?></div>

    </div>

    </div>

     

    <script type="text/javascript">

    $('#coProgressBar').progressbar({

    value: 66

    });

    </script>

     

    </form>

     

    <?php

    require(DIR_WS_INCLUDES . 'template_bottom.php');

    require(DIR_WS_INCLUDES . 'application_bottom.php');

    ?>
  20. Around your line #209, you wrote: function clearRadios()

    Should be: function clearRadeos()

     

    I removed everything and just now reinstalled. I did check both of these files for that mis-spelling and it must have been an error on my part that transcribed to the post.

     

    After reinstalling, dropping all the files on top of my store since none of my modifications affected these files, I now get this error on compatibility when I try to proceed to the checkout_payment.php. I have started a new URL to test out all these addons before I bring it live.

     

    Fatal error
    : Cannot redeclare do_magic_quotes_gpc() (previously declared in /home/aquarian/public_html/shop/includes/functions/compatibility.php:18) in
    /home/aquarian/public_html/shop/includes/functions/compatibility.php
    on line
    30

     

    I have run the SQL query successfully I think since I can create coupons.

  21. I guess I should paste my "checkout_payment.php" here so I can get help figuring out where the issue is as well as the URL which is http://aquarian-artisan-bath-body.com/clients/essential7. Since I had not made any changes to this page with my previous addons, I just dropped it on top of the original.

     

    <?php

    /*

    $Id$

     

    osCommerce, Open Source E-Commerce Solutions

    $Mod: MVS V1.2.3 2011/04/13 JCK/CWG $

    adapted for CCGV v5.20a 05/1/2011

     

    Copyright © 2010 osCommerce

     

    Released under the GNU General Public License

    */

     

    require('includes/application_top.php');

    // Start - CREDIT CLASS Gift Voucher Contribution

    if (tep_session_is_registered('cot_gv')) tep_session_unregister('cot_gv');

    // End - CREDIT CLASS Gift Voucher Contribution

    // MVS start

    require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CHECKOUT_PAYMENT);

     

    // print 'Vendor Shipping: ' . SELECT_VENDOR_SHIPPING . "<br>\n";

    // print 'Array Vendor Shipping: <pre>';

    // print_r ($shipping);

    // print '</pre>' . "<br>\n";

    // print 'Vendor Count: ' . count ($shipping['vendor']) . "<br>\n";

    // print 'Cart Vendor Count: ' . count ($cart->vendor_shipping) . "<br>\n";

     

    // exit;

     

    // If a shipping method has not been selected for all vendors, redirect the customer to the shipping method selection page

    if (SELECT_VENDOR_SHIPPING == 'true') { // This test only works under MVS

    if (!is_array ($shipping['vendor']) || count ($shipping['vendor']) != count ($cart->vendor_shipping)) { // No shipping selected or not all selected

    tep_redirect (tep_href_link (FILENAME_CHECKOUT_SHIPPING, 'error_message=' . ERROR_NO_SHIPPING_SELECTED, 'SSL'));

    }

    }

    // MVS end

     

    // if the customer is not logged on, redirect them to the login page

    if (!tep_session_is_registered('customer_id')) {

    $navigation->set_snapshot();

    tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL'));

    }

     

    // if there is nothing in the customers cart, redirect them to the shopping cart page

    if ($cart->count_contents() < 1) {

    tep_redirect(tep_href_link(FILENAME_SHOPPING_CART));

    }

     

    // if no shipping method has been selected, redirect the customer to the shipping method selection page

    if (!tep_session_is_registered('shipping')) {

    tep_redirect(tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'));

    }

     

    // avoid hack attempts during the checkout procedure by checking the internal cartID

    if (isset($cart->cartID) && tep_session_is_registered('cartID')) {

    if ($cart->cartID != $cartID) {

    tep_redirect(tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'));

    }

    }

     

    // Start - CREDIT CLASS Gift Voucher Contribution

    if(tep_session_is_registered('credit_covers')) tep_session_unregister('credit_covers');

    if(tep_session_is_registered('cot_gv')) tep_session_unregister('cot_gv');

    // End - CREDIT CLASS Gift Voucher Contribution

     

    // Stock Check

    if ( (STOCK_CHECK == 'true') && (STOCK_ALLOW_CHECKOUT != 'true') ) {

    $products = $cart->get_products();

    for ($i=0, $n=sizeof($products); $i<$n; $i++) {

    if (tep_check_stock($products[$i]['id'], $products[$i]['quantity'])) {

    tep_redirect(tep_href_link(FILENAME_SHOPPING_CART));

    break;

    }

    }

    }

     

    // Start - CREDIT CLASS Gift Voucher Contribution

    // #################### THIS MOD IS OPTIONAL! ######################

    // load the selected shipping module

    require(DIR_WS_CLASSES . 'shipping.php');

    $shipping_modules = new shipping($shipping);

    // #################### THIS MOD WAS OPTIONAL! ######################

    // End - CREDIT CLASS Gift Voucher Contribution

     

    // if no billing destination address was selected, use the customers own address as default

    if (!tep_session_is_registered('billto')) {

    tep_session_register('billto');

    $billto = $customer_default_address_id;

    } else {

    // verify the selected billing address

    if ( (is_array($billto) && empty($billto)) || is_numeric($billto) ) {

    $check_address_query = tep_db_query("select count(*) as total from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . (int)$customer_id . "' and address_book_id = '" . (int)$billto . "'");

    $check_address = tep_db_fetch_array($check_address_query);

     

    if ($check_address['total'] != '1') {

    $billto = $customer_default_address_id;

    if (tep_session_is_registered('payment')) tep_session_unregister('payment');

    }

    }

    }

     

    require(DIR_WS_CLASSES . 'order.php');

    $order = new order;

    // Start - CREDIT CLASS Gift Voucher Contribution

    require(DIR_WS_CLASSES . 'order_total.php');

    $order_total_modules = new order_total;

    $order_total_modules->clear_posts();

    // End - CREDIT CLASS Gift Voucher Contribution

     

    if (!tep_session_is_registered('comments')) tep_session_register('comments');

    if (isset($HTTP_POST_VARS['comments']) && tep_not_null($HTTP_POST_VARS['comments'])) {

    $comments = tep_db_prepare_input($HTTP_POST_VARS['comments']);

    }

     

    $total_weight = $cart->show_weight();

    $total_count = $cart->count_contents();

    // Start - CREDIT CLASS Gift Voucher Contribution

    $total_count = $cart->count_contents_virtual();

    // End - CREDIT CLASS Gift Voucher Contribution

     

    // load all enabled payment modules

    require(DIR_WS_CLASSES . 'payment.php');

    $payment_modules = new payment;

     

    require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CHECKOUT_PAYMENT);

     

    $breadcrumb->add(NAVBAR_TITLE_1, tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'));

    $breadcrumb->add(NAVBAR_TITLE_2, tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'));

     

    require(DIR_WS_INCLUDES . 'template_top.php');

    ?>

     

    <script type="text/javascript"><!--

    var selected;

    <?php // Start - CREDIT CLASS Gift Voucher Contribution ?>

    var submitter = null;

    function submitFunction() {

    submitter = 1;

    }

    <?php // End - CREDIT CLASS Gift Voucher Contribution ?>

    function selectRowEffect(object, buttonselect) {

     

    // Start - CREDIT CLASS Gift Voucher Contribution

    if (!document.checkout_payment.payment[0].disabled){

    // End - CREDIT CLASS Gift Voucher Contribution

    if (!selected) {

    if (document.getElementById) {

    selected = document.getElementById('defaultSelected');

    } else {

    selected = document.all['defaultSelected'];

    }

    }

     

    if (selected) selected.className = 'moduleRow';

    object.className = 'moduleRowSelected';

    selected = object;

     

    // one button is not an array

    if (document.checkout_payment.payment[0]) {

    document.checkout_payment.payment[buttonselect].checked=true;

    } else {

    document.checkout_payment.payment.checked=true;

    }

     

    // Start - CREDIT CLASS Gift Voucher Contribution

    }

    // End - CREDIT CLASS Gift Voucher Contribution

    }

     

    function rowOverEffect(object) {

    if (object.className == 'moduleRow') object.className = 'moduleRowOver';

    }

     

    function rowOutEffect(object) {

    if (object.className == 'moduleRowOver') object.className = 'moduleRow';

    }

     

    <?php

    // Start - CREDIT CLASS Gift Voucher Contribution

    if (MODULE_ORDER_TOTAL_INSTALLED)

    $temp=$order_total_modules->process();

    $temp=$temp[count($temp)-1];

    $temp=$temp['value'];

     

    $gv_query = tep_db_query("select amount from " . TABLE_COUPON_GV_CUSTOMER . " where customer_id = '" . $customer_id . "'");

    $gv_result = tep_db_fetch_array($gv_query);

     

    if ($gv_result['amount']>=$temp){ $coversAll=true;

     

    ?>

    function clearRadeos(){

    document.checkout_payment.cot_gv.checked=!document.checkout_payment.cot_gv.checked;

    for (counter = 0; counter < document.checkout_payment.payment.length; counter++) {

    // If a radio button has been selected it will return true

    // (If not it will return false)

    if (document.checkout_payment.cot_gv.checked){

    document.checkout_payment.payment[counter].checked = false;

    document.checkout_payment.payment[counter].disabled=true;

    } else {

    document.checkout_payment.payment[counter].disabled=false;

    }

    }

    }

    <?php

    } else {

    $coversAll=false;?>

     

    function clearRadios(){

    document.checkout_payment.cot_gv.checked=!document.checkout_payment.cot_gv.checked;

    }<?php } ?>

    //--></script>

    <?php // echo $payment_modules->javascript_validation(); ?>

    <?php echo $payment_modules->javascript_validation($coversAll); ?>

    <?php // End - CREDIT CLASS Gift Voucher Contribution ?>

     

    <h1><?php echo HEADING_TITLE; ?></h1>

     

    <?php /* Start - CREDIT CLASS Gift Voucher Contribution */ ?>

    <?php /* echo tep_draw_form('checkout_payment', tep_href_link(FILENAME_CHECKOUT_CONFIRMATION, '', 'SSL'), 'post', 'onsubmit="return check_form();"', true); */ ?>

    <?php /* End - CREDIT CLASS Gift Voucher Contribution */ ?>

     

    <div class="contentContainer">

     

    <?php

    if (isset($HTTP_GET_VARS['payment_error']) && is_object(${$HTTP_GET_VARS['payment_error']}) && ($error = ${$HTTP_GET_VARS['payment_error']}->get_error())) {

    ?>

     

    <div class="contentText">

    <?php echo '<strong>' . tep_output_string_protected($error['title']) . '</strong>'; ?>

     

    <p class="messageStackError"><?php echo tep_output_string_protected($error['error']); ?></p>

    </div>

     

    <?php // Start - CREDIT CLASS Gift Voucher Contribution ?>

    <?php // #################### THIS MOD IS OPTIONAL! ###################### ?>

    <tr>

    <td><table border="0" width="100%" cellspacing="0" cellpadding="2">

    <tr>

    <td class="main"><b><?php echo HEADING_PRODUCTS; ?></b><? echo ' <a href="' . tep_href_link(FILENAME_SHOPPING_CART) . '"><span class="orderEdit">(' . EDIT . ')</span></a>'; ?></td>

    </tr>

    </table></td>

    </tr>

    <tr>

    <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">

    <tr class="infoBoxContents">

    <td>

    <table border="0" width="100%" cellspacing="0" cellpadding="2">

    <?php

    //}

     

    for ($i=0, $n=sizeof($order->products); $i<$n; $i++) {

    echo ' <tr>' . "\n" .

    ' <td width="10%" class="main" align="right" valign="top" width="30">' . $order->products[$i]['qty'] . ' x</td>' . "\n" .

    ' <td width="60%" class="main" valign="top">' . $order->products[$i]['name'];

     

    if (STOCK_CHECK == 'true') {

    echo tep_check_stock($order->products[$i]['id'], $order->products[$i]['qty']);

    }

     

    if ( (isset($order->products[$i]['attributes'])) && (sizeof($order->products[$i]['attributes']) > 0) ) {

    for ($j=0, $n2=sizeof($order->products[$i]['attributes']); $j<$n2; $j++) {

    echo '<br><nobr><small> <i> - ' . $order->products[$i]['attributes'][$j]['option'] . ': ' . $order->products[$i]['attributes'][$j]['value'] . '</i></small></nobr>';

    }

    }

     

    echo ' </td>' . "\n";

     

    if (sizeof($order->info['tax_groups']) > 1) echo ' <td class="main" valign="top" align="right">' . tep_display_tax_value($order->products[$i]['tax']) . '% </td>' . "\n";

     

    echo ' <td width="30%"class="main" align="right" valign="top">' . $currencies->display_price($order->products[$i]['final_price'], $order->products[$i]['tax'], $order->products[$i]['qty']) . ' </td>' . "\n" .

    ' </tr>' . "\n";

    }

    ?>

    <tr>

    <td COLSPAN="3" valign="top" align="right">

    <table border="0" cellspacing="0" cellpadding="3">

    <?php

    if (MODULE_ORDER_TOTAL_INSTALLED) {

    echo $order_total_modules->output();

    }

    ?>

    </table>

    </td>

    </tr>

    </table>

    </td>

    </tr>

    </table></td>

    </tr>

    <?php // #################### THIS MOD WAS OPTIONAL! ###################### ?>

    <?php // End - CREDIT CLASS Gift Voucher Contribution ?>

     

    <?php

    }

    ?>

     

    <h2><?php echo TABLE_HEADING_BILLING_ADDRESS; ?></h2>

     

    <div class="contentText">

    <div class="ui-widget infoBoxContainer" style="float: right;">

    <div class="ui-widget-header infoBoxHeading"><?php echo TITLE_BILLING_ADDRESS; ?></div>

     

    <div class="ui-widget-content infoBoxContents">

    <?php echo tep_address_label($customer_id, $billto, true, ' ', '<br />'); ?>

    </div>

    </div>

     

    <?php echo TEXT_SELECTED_BILLING_DESTINATION; ?><br /><br /><?php echo tep_draw_button(IMAGE_BUTTON_CHANGE_ADDRESS, 'home', tep_href_link(FILENAME_CHECKOUT_PAYMENT_ADDRESS, '', 'SSL')); ?>

    </div>

     

    <div style="clear: both;"></div>

     

    <h2><?php echo TABLE_HEADING_PAYMENT_METHOD; ?></h2>

     

    <?php

    // Start - CREDIT CLASS Gift Voucher Contribution

    echo $order_total_modules->credit_selection();

    // End - CREDIT CLASS Gift Voucher Contribution ?>

    <?php // Start - CREDIT CLASS Gift Voucher Contribution ?>

    <?php echo tep_draw_form('checkout_payment', tep_href_link(FILENAME_CHECKOUT_CONFIRMATION, '', 'SSL'), 'post', 'onsubmit="return check_form();"'); ?>

    <?php // End - CREDIT CLASS Gift Voucher Contribution ?>

     

     

    <?php

    $selection = $payment_modules->selection();

     

    if (sizeof($selection) > 1) {

    ?>

     

    <div class="contentText">

    <div style="float: right;">

    <?php echo '<strong>' . TITLE_PLEASE_SELECT . '</strong>'; ?>

    </div>

     

    <?php echo TEXT_SELECT_PAYMENT_METHOD; ?>

    </div>

     

    <?php

    } elseif ($free_shipping == false) {

    ?>

     

    <div class="contentText">

    <?php echo TEXT_ENTER_PAYMENT_INFORMATION; ?>

    </div>

     

    <?php

    }

    ?>

     

    <div class="contentText">

     

    <?php

    $radio_buttons = 0;

    for ($i=0, $n=sizeof($selection); $i<$n; $i++) {

    ?>

     

    <table border="0" width="100%" cellspacing="0" cellpadding="2">

     

    <?php

    if ( ($selection[$i]['id'] == $payment) || ($n == 1) ) {

    echo ' <tr id="defaultSelected" class="moduleRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="selectRowEffect(this, ' . $radio_buttons . ')">' . "\n";

    } else {

    echo ' <tr class="moduleRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="selectRowEffect(this, ' . $radio_buttons . ')">' . "\n";

    }

    ?>

     

    <td><strong><?php echo $selection[$i]['module']; ?></strong></td>

    <td align="right">

     

    <?php

    if (sizeof($selection) > 1) {

    echo tep_draw_radio_field('payment', $selection[$i]['id'], ($selection[$i]['id'] == $payment));

    } else {

    echo tep_draw_hidden_field('payment', $selection[$i]['id']);

    }

    ?>

     

    </td>

    </tr>

     

    <?php

    if (isset($selection[$i]['error'])) {

    ?>

     

    <tr>

    <td colspan="2"><?php echo $selection[$i]['error']; ?></td>

    </tr>

     

    <?php

    } elseif (isset($selection[$i]['fields']) && is_array($selection[$i]['fields'])) {

    ?>

     

    <tr>

    <td colspan="2"><table border="0" cellspacing="0" cellpadding="2">

     

    <?php

    for ($j=0, $n2=sizeof($selection[$i]['fields']); $j<$n2; $j++) {

    ?>

     

    <tr>

    <td><?php echo $selection[$i]['fields'][$j]['title']; ?></td>

    <td><?php echo $selection[$i]['fields'][$j]['field']; ?></td>

    </tr>

     

    <?php

    }

    ?>

     

    </table></td>

    </tr>

     

    <?php

    }

    ?>

     

    </table>

     

    <?php

    $radio_buttons++;

    }

     

     

     

    // Start - CREDIT CLASS Gift Voucher Contribution

    if (tep_session_is_registered('customer_id')) {

    if ($gv_result['amount']>0){

    echo ' <tr><td width="10">' . tep_draw_separator('pixel_trans.gif', '10', '1') .'</td><td colspan=2>' . "\n" .

    ' <table border="0" cellpadding="2" cellspacing="0" width="100%"><tr class="moduleRow" onmouseover="rowOverEffect(this)" onclick="clearRadeos()" onmouseout="rowOutEffect(this)" >' . "\n" .

    ' <td width="10">' . tep_draw_separator('pixel_trans.gif', '10', '1') .'</td><td class="main">' . $gv_result['text'];

     

    echo $order_total_modules->sub_credit_selection();

    }

    }

    // End - CREDIT CLASS Gift Voucher Contribution

    ?>

    </div>

     

    <h2><?php echo TABLE_HEADING_COMMENTS; ?></h2>

     

    <div class="contentText">

    <?php echo tep_draw_textarea_field('comments', 'soft', '60', '5', $comments); ?>

    </div>

     

    <div class="contentText">

    <div style="float: left; width: 60%; padding-top: 5px; padding-left: 15%;">

    <div id="coProgressBar" style="height: 5px;"></div>

     

    <table border="0" width="100%" cellspacing="0" cellpadding="2">

    <tr>

    <td align="center" width="33%" class="checkoutBarFrom"><?php echo '<a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '" class="checkoutBarFrom">' . CHECKOUT_BAR_DELIVERY . '</a>'; ?></td>

    <td align="center" width="33%" class="checkoutBarCurrent"><?php echo CHECKOUT_BAR_PAYMENT; ?></td>

    <td align="center" width="33%" class="checkoutBarTo"><?php echo CHECKOUT_BAR_CONFIRMATION; ?></td>

    </tr>

    </table>

    </div>

     

    <div style="float: right;"><?php echo tep_draw_button(IMAGE_BUTTON_CONTINUE, 'triangle-1-e', null, 'primary'); ?></div>

    </div>

    </div>

     

    <script type="text/javascript">

    $('#coProgressBar').progressbar({

    value: 66

    });

    </script>

     

    </form>

     

    <?php

    require(DIR_WS_INCLUDES . 'template_bottom.php');

    require(DIR_WS_INCLUDES . 'application_bottom.php');

    ?>
×
×
  • Create New...