Jump to content

RobAnderson

Members
  • Content count

    58
  • Joined

  • Last visited

Posts posted by RobAnderson


  1. Hi Dave, in response to:

    also, when i use the tell a friend, the email arrives with:

    TEXT_EMAIL_LINK_ARTICLE instead of the link.

    TEXT_EMAIL_LINK_ARTICLE should have been added as part of the install, i.e.

     

    In includes/languages/english/tell_a_friend.php:
    
    Look for:
    
    define('TEXT_EMAIL_LINK', 'To view the product click on the link below or copy and paste the link into your web browser:' . "\n\n" . '%s');
    
    Add this immediately below:
    
    define('TEXT_EMAIL_LINK_ARTICLE', 'To view the article click on the link below or copy and paste the link into your web browser:' . "\n\n" . '%s');

     

    This should fix the e-mail problem (unless it's something else!).

     

    Regards, Rob


  2. Hi Dave, in response to:

    also just noticed when viewing the New Articles/All Articles/Category page, the Meta Description field is displayed as the Article Abstract.

    This is by design for a couple of reasons.

     

    Firstly, the meta-description should be a succinct description of the article and therefore well suited as an article abstract. Whereas, if I just took the frist few hundred characters or so of the article content (articles_description) as the abstract, it might not mean much as a summary of the entire article.

     

    Secondly, because the article content (articles_description) might contain images added in using the WYSIWYG editor, I didn't want these appearing in the abstract (kinda ruined the look!). Hence the need to use a different field and so I decided to use the meta-description one (articles_head_desc_tag).

     

    Hope this makes sense?

     

    Cheers, Rob


  3. Hi Les, thanks for your favourable comments ;-)

     

    About your problem with the Tell a Friend feature, the link that appears in the e-mail you received appears correct, i.e. article_info.php?articles_id=X would be the correct way to reference Article X.

     

    So I'm not sure why it might be taking you back to the Tell a Friend page (which is tell_a_friend.php).

     

    My suggestion would be to go back through the installation instructions for the Tell a Friend page and check that you got them all. The irony is that this page is the most lengthy to modify in the whole contribution and it's only one small aspect of the Article Manager <grrr>.

     

    Also, when testing your Tell a Friend link, make sure you close all browser windows first (might help?).

     

    Let me know how you get on, someone else may have some ideas too.

     

    Rob ;-)


  4. Hi Khim, regarding question 2:

    2. Is this contribution supposed to show up as a box on my shop page as well as in my admin? I have it working in admin, but I don't see anything about "who's online" on my shop page.

    This contribution is Admin only, so no box will appear in your shop page. However, I've seen a couple of separate contributions that do display who is online.

     

    Try Number of visitors online or Whos Online (maybe a bit old).

     

    I haven't tried any of them so I can't vouch for them.

     

    Regards, Rob


  5. BTW, here's a small modification I made to the catalog/product_info.php page to show only the number of "approved" reviews. Otherwise, it may be a bit confusing if they see there is a review, but can't read it and don't know the reason is that it hasn't been approved yet.

     

    About line 165, find the following code:

     

    $reviews_query = tep_db_query("select count(*) as count from " .  TABLE_REVIEWS . " where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "'");

     

    Replace with

     

        $reviews_query = tep_db_query("select count(*) as count from " . TABLE_REVIEWS . " where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and approved = '1'");

     

    That simple!

     

    Cheers, Rob

     

    P.S. Another thing I intend to add is a note to the reviewer that their review won't be displayed until after it has been vetted. Unless someone beats me to it!


  6. For anybody (including myself!) who experienced the following little bug, please find a fix below:

     

    I think it's all working now apart from the bizarre text insertion problem on the Localization -> Product availability page. I too get the text deleted apart from the 2nd character on the first insert.

     

    jon

     

    In admin/products_availability.php:

     

    Replace (about line 29)

     

            $sql_data_array = array('products_availability_name' => tep_db_prepare_input($products_availability_array[$language_id]),
           'products_availability_id' => $products_availability_id,
                                   'languages_id' => $language_id);
    
           if ($action == 'insert') {
             $insert_sql_data = array('date_added' => 'now()');
    
             $sql_data_array = array_merge($sql_data_array, $insert_sql_data);
    
             tep_db_perform(TABLE_PRODUCTS_AVAILABILITY, $sql_data_array);
             $products_availability_id = tep_db_insert_id();
           } elseif ($action == 'save') {
             $update_sql_data = array('last_modified' => 'now()');

     

    with

     

              $sql_data_array = array('languages_id' => $language_id);
    
           if ($action == 'insert') {
             $insert_sql_data = array('products_availability_name' => tep_db_prepare_input($HTTP_POST_VARS['products_availability_name']),
                                      'date_added' => 'now()');
    
             $sql_data_array = array_merge($sql_data_array, $insert_sql_data);
    
             tep_db_perform(TABLE_PRODUCTS_AVAILABILITY, $sql_data_array);
             $products_availability_id = tep_db_insert_id();
           } elseif ($action == 'save') {
             $update_sql_data = array('products_availability_name' => tep_db_prepare_input($products_availability_array[$language_id]),
                                      'last_modified' => 'now()');

     

    Not sure why this fix is necessary (for some), but it works for me!

     

    Cheers, Rob


  7. Hi Steve, I've installed your mod and it is working for the most part (Milestone 2.2), although seemed to be missing an entry in product_availability.sql script to add products_availability_id to the Products Table ;-) (unless I missed something in your instructions). I added it manually and it now works.

     

    Also, phpmyAdmin which I used to add the SQL script, doesn't seem to like varchar(256) so I changed to varchar(255).

     

    One final thing you might be able to help me on. In the Products Availibility admin page whenever I Insert another entry, it only accepts the second character of whatever I type when I Save. When I go back and edit the entry, it accepts whatever I type and saves succesfully that time. It still works OK once I've gone back and edited it, just weird. Not sure if this is related to the mod or my customised OSC site. Any ideas?

     

    Cheers, Rob

     

    P.S. Thanks for your work on this, a very useful contribution.

     

    P.P.S. Small suggestion for others, I added some code to product_info.php to hide the additional products availability row if there is no entry against the product (saves on space). See below:

     

    <?php
    ? ?if (tep_not_null($products_availability_info['products_availability_name'])) {
    ?>
    ? ? ? ? ?<tr>
    ? ? ? ? ? ?<td class="main" align="right" valign="top"></td>
    ? ? ? ? ? ?<td class="main" align="right" valign="top"><?php echo TEXT_AVAILABILITY; ?>: <?php echo $products_availability_name; ?></td>
    ? ? ? ? ?</tr>
    <?php
    ? ?}
    ?>


  8. This may not affect everyone, but I have noted a few posts about links to recorded hits not working in the User Tracking page, i.e. the links from hits in the left hand-column go nowhere and the right hand column of the table is blank (no URL).

     

    Well, it appears this may be due to IIS servers not recognising the REQUEST_URI environment variable (not sure why, but apparently it works on Apache). Either that, or there is some server configuration tweak I am blithely ignorant of (quite likely).

     

    In any case, if are using IIS and experiencing this problem, try the following:

     

    In includes/functions/user_tracking.php about line 37, replace

     

        $wo_session_id = tep_session_id();

        $wo_ip_address = getenv('REMOTE_ADDR');

        $wo_last_page_url = addslashes(getenv('REQUEST_URI'));

     

    if ($HTTP_GET_VARS['products_id']) {

        $page_desc_query = tep_db_query("select products_name from " . TABLE_PRODUCTS_DESCRIPTION . " where products_id = '" . $HTTP_GET_VARS['products_id'] . "' and language_id = '" . $languages_id . "'");

        $page_desc_values = tep_db_fetch_array($page_desc_query);

    $page_desc = $page_desc_values['products_name'];

    } elseif ($HTTP_GET_VARS['cPath']) {

    $cPath = $HTTP_GET_VARS['cPath'];

        $cPath_array = tep_parse_category_path($cPath);

        $cPath = implode('_', $cPath_array);

        $current_category_id = $cPath_array[(sizeof($cPath_array)-1)];

        $page_desc_query = tep_db_query("select categories_name from " . TABLE_CATEGORIES_DESCRIPTION . " where categories_id = '" . $current_category_id . "' and language_id = '" . $languages_id . "'");

        $page_desc_values = tep_db_fetch_array($page_desc_query);

    $page_desc = $page_desc_values['categories_name'];

    } else {

    $page_desc = addslashes(HEADING_TITLE);

    }

     

    with

     

        $wo_session_id = tep_session_id();

        $wo_ip_address = getenv('REMOTE_ADDR');

        //Original line removed below - works on Apache, not on IIS

        //$wo_last_page_url = addslashes(getenv('REQUEST_URI'));

     

    if ($HTTP_GET_VARS['products_id']) {

        $page_desc_query = tep_db_query("select products_name from " . TABLE_PRODUCTS_DESCRIPTION . " where products_id = '" . $HTTP_GET_VARS['products_id'] . "' and language_id = '" . $languages_id . "'");

        $page_desc_values = tep_db_fetch_array($page_desc_query);

      $page_desc = $page_desc_values['products_name'];

        // Fix for IIS server not supporting REQUEST_URI - if query string

        $wo_last_page_url = addslashes('http://' . getenv('HTTP_HOST') . getenv('PATH_INFO') . '?' . getenv('QUERY_STRING'));

    } elseif ($HTTP_GET_VARS['cPath']) {

    $cPath = $HTTP_GET_VARS['cPath'];

        $cPath_array = tep_parse_category_path($cPath);

        $cPath = implode('_', $cPath_array);

        $current_category_id = $cPath_array[(sizeof($cPath_array)-1)];

        $page_desc_query = tep_db_query("select categories_name from " . TABLE_CATEGORIES_DESCRIPTION . " where categories_id = '" . $current_category_id . "' and language_id = '" . $languages_id . "'");

        $page_desc_values = tep_db_fetch_array($page_desc_query);

      $page_desc = $page_desc_values['categories_name'];

        // Fix for IIS server not supporting REQUEST_URI - if query string

        $wo_last_page_url = addslashes('http://' . getenv('HTTP_HOST') . getenv('PATH_INFO') . '?' . getenv('QUERY_STRING'));

    } else {

    $page_desc = addslashes(HEADING_TITLE);

      // Fix for IIS server not supporting REQUEST_URI - if no query string

      $wo_last_page_url = addslashes('http://' . getenv('HTTP_HOST') . getenv('PATH_INFO'));

    }

     

    Worked for me!

     

    Cheers, Rob

     

    P.S. This fix has nothing to do with Originating URLs/Referer URLs (that one is an entirely different fix - see Alverman 19th Sep 03)

     

    P.P.S. It almost goes without saying, but this is an awesome mod! Many thanks Robert et al ;-)


  9. Not sure if anybody has struck this, but I noticed that my NZ Bank Transfer option was not displaying if a customer chose only downloadable products.

     

    By comparing this module with the Money Order one (which was displaying) I traced the problem to the use of a delivery address as opposed a billing address as the determinant for whther it showed up or not.

     

    By changing all instances of delivery to billing, it now works, e.g. look for

     

    $order->delivery ['country']['id'] or $order->delivery['zone_id']

     

    and change to

     

    $order->billing['country']['id'] or $order->billing['zone_id']

     

    In any case, I think the use of billing over delivery makes more sense because you would normally only want to offer a payment option of Cheque/Money Order or local Bank Transfer if the payor lives in your own country. In contrast, the delivery address could presumably be outside of your country.

     

    Hope this helps ;-)

     

    Cheers, Rob


  10. Now, for other payment methods where money is received instantaneously, e.g. Credit Cards or PayPal, you need to make sure that the Set Order Status is not set to default, i.e. set it to Processing or any other Status that has a value higher than or equal to 2. This way, when someone makes a purchase, downloads are immediately available (and no additional action is required by the store admin).

     

    Addendum...

     

    When I mentioned the "Credit Card" payment type in my previous post, I meant it in the most generic way, i.e. through gateway payment systems like PayPal, Authorize.net, iPayment, 2Checkout, SECPay, WorldPay, etc. These all take credit cards and therefore the funds are "clear", hence downloads would become available immediately (default order status reset to Processing = 2).

     

    The basic Credit Card payment system module in OSC is a manual system whereby you take their details securely and process them manually offline. In this case, you would leave the default order status to "default". i.e. normally Pending, until such time as you had been able to process them manually (and confirm valid card/funds etc).

     

    Sorry for any confusion!

     

    Rob (still v.much a noobie)


  11. Hi Brandon, hmmm...I hope I haven't mislead you about PayPal. As far as I know there are some contributions that extend the default Paymet Module for PayPal to include IPN, e.g. http://www.oscommerce.com/community/contributions,1352

     

    There's also a forum topic about this if that helps: http://forums.oscommerce.com/index.php?showtopic=51005

     

    As I don't use this mod, that's about all I can help with sorry ;-( Perhaps someone else can help here who has some experience using this add-on?

     

    As for helping out, it's the least I can do. I've only been at this a couple of months and am still very much a noob. But when you're helped by others, you naturally want to do the same ;-)

     

    Keep at it! Rob


  12. Hi Brandon, glad to be of help ;-)

     

    Regarding your questions:

     

    I have no clue how to add a new order status. Please advise.

     

    If you go into your Admin console, look for Localization and then Orders Status. This where you can insert a new one. As there are normally three by default, the new Status would automatically have a value of 4 (see further down for an explanation of how this is used, but first...)

     

    How do I control how payment methods set the orders_status value?

     

    If you go into your Admin console, look for Modules and then Payment.

     

    Now for certain payment methods, e.g. Cash on Delivery, Cheque/Money Order or Bank Transfers you do not want to enable downloads until you have received payment. And because the default Set Order Status for each of these is "default", i.e. Order Status value = 1 (normally Pending), then you don't need to do anything. Provided you have installed the Downloads Controller correctly, and left the Downloads Controller Order Status Value in Configuration -> Download set to 2, then you should find that anyone purchasing downloadable products will not able able to download them until the Order Status is set to 2 or higher. This is done manually by the store admin in Customers -> Orders -> Edit once the payment has been received.

     

    Now, for other payment methods where money is received instantaneously, e.g. Credit Cards or PayPal, you need to make sure that the Set Order Status is not set to default, i.e. set it to Processing or any other Status that has a value higher than or equal to 2. This way, when someone makes a purchase, downloads are immediately available (and no additional action is required by the store admin).

     

    Finally, in case you're not sure what the Downloads Controller Update Status Value in Configuration -> Download does, basically it allows you to reset someone's downloads once their download period has expired or perhaps the've gone past the maximum download attempts. Again, this would be made in Customers -> Orders -> Edit and you would have to select a status that corresponds to the value of this setting (the default is 4).

     

    I hope this all makes sense! Once you get your head around it and see it working then you'll be away.

     

    Best of luck, Rob

     

    P.S. Not sure if you've struck this one yet, but... to make a product downloadable, you have to have a filename entry in a Product Attribute corresponding to your product and a corresponding file in the downloads directory. Come back to me if you can't get this working.


  13. Hi there, faced the same problem and managed to nut it out. Basically there was some missing sort fields (atleast from my version).

     

    Please find below the code I used to sort it out. Use at your own risk ;-) I know it looks daunting, but just take your time...

     

    NOTE: I have taken the opportunity to make some other minor modifications, e.g. removed preview image (because you can click on the row instead), added in the Order ID column, changed some of the sort options and basically rearranged how the sort buttons were arranged.

     

    Hope it works for you - IT IS GREAT MOD and worth perservering with! (tx Linda ;-)

     

    In /admin/orders.php
    
    About line 20 Replace
    
     $orders_status_query = tep_db_query("select orders_status_id, orders_status_name from " . TABLE_ORDERS_STATUS . " where language_id = '" . (int)$languages_id . "'");
    
    with
    
     $orders_status_query = tep_db_query("select orders_status_id, orders_status_name from " . TABLE_ORDERS_STATUS . " where language_id = '" . (int)$languages_id . "' order by orders_status_id");
    
    
    About line 387 replace
    
                 <tr class="dataTableHeadingRow">
                   <td class="dataTableHeadingContent"><a href="<?php echo "$PHP_SELF?listing=customers"; ?>"><?php echo tep_image_button('ic_up.gif', ' Sort ' . TABLE_HEADING_CUSTOMERS . ' --> A-B-C From Top '); ?></a> <a href="<?php echo "$PHP_SELF?listing=customers-desc"; ?>"><?php echo tep_image_button('ic_down.gif', ' Sort ' . TABLE_HEADING_CUSTOMERS . ' --> Z-X-Y From Top '); ?></a><br><?php echo TABLE_HEADING_CUSTOMERS; ?></td>
                   <td class="dataTableHeadingContent"><a href="<?php echo "$PHP_SELF?listing=ottotal"; ?>"><?php echo tep_image_button('ic_up.gif', ' Sort ' . TABLE_HEADING_ORDER_TOTAL . ' --> 1-2-3 From Top '); ?></a> <a href="<?php echo "$PHP_SELF?listing=ottotal-desc"; ?>"><?php echo tep_image_button('ic_down.gif', ' Sort ' . TABLE_HEADING_ORDER_TOTAL . ' --> 3-2-1 From Top '); ?></a><br><?php echo TABLE_HEADING_ORDER_TOTAL; ?></td>
                   <td class="dataTableHeadingContent" align="right"><a href="<?php echo "$PHP_SELF?listing=id-asc"; ?>"><?php echo tep_image_button('ic_up.gif', ' Sort ' . TABLE_HEADING_DATE_PURCHASED . ' --> 1-2-3 From Top '); ?></a> <a href="<?php echo "$PHP_SELF?listing=id-desc"; ?>"><?php echo tep_image_button('ic_down.gif', ' Sort ' . TABLE_HEADING_DATE_PURCHASED . ' --> 3-2-1 From Top '); ?></a><br><?php echo TABLE_HEADING_DATE_PURCHASED; ?>
                   <td class="dataTableHeadingContent" align="right"><a href="<?php echo "$PHP_SELF?listing=status-asc"; ?>"><?php echo tep_image_button('ic_up.gif', ' Sort ' . TABLE_HEADING_STATUS . ' --> 1-2-3 From Top '); ?></a> <a href="<?php echo "$PHP_SELF?listing=status-desc"; ?>"><?php echo tep_image_button('ic_down.gif', ' Sort ' . TABLE_HEADING_STATUS . ' --> 3-2-1 From Top '); ?></a><br><?php echo TABLE_HEADING_STATUS; ?>
                   </td><td class="dataTableHeadingContent" align="right"><br><?php echo TABLE_HEADING_ACTION; ?> </td>
                 </tr>
    
    with
    
                 <tr class="dataTableHeadingRow">
             //Missing sort fields
             <?php
             switch ($listing) {
                 case "orders":
                 $order = "o.orders_id";
                 break;
                 case "orders":
                 $order = "o.orders_id DESC";
                 break;
                 case "customers":
                 $order = "o.customers_name, o.orders_id DESC";
                 break;
                 case "customers-desc":
                 $order = "o.customers_name DESC, o.orders_id DESC";
                 break;
                 case "order_total":
                 $order = "ot.value";
                 break;
                 case "order_total-desc":
                 $order = "ot.value DESC";
                 break;
                 case "date_purchased":
                 $order = "o.date_purchased, o.customers_name";
                 break;
                 case "date_purchased-desc":
                 $order = "o.date_purchased DESC, o.customers_name";
                 break;
                 case "order_status":
                 $order = "s.orders_status_id, o.customers_name";
                 break;
                 case "order_status-desc":
                 $order = "s.orders_status_id DESC, o.customers_name";
                 break;
        default:
                 $order = "o.orders_id DESC, o.customers_name";
             }
             ?>              
                   <td class="dataTableHeadingContent" align="center">
                     <table border="0" cellspacing="0" cellpadding="0">
                       <tr>
                         <td rowspan="2" align="center" class="dataTableHeadingContent">
                            <?php echo TABLE_HEADING_ORDERS; ?>
                         </td>
                         <td align="right" valign="bottom">
                            <a href="<?php echo "$PHP_SELF?listing=orders"; ?>"><?php echo tep_image_button('ic_up.gif', 'Sort ' . TABLE_HEADING_ORDERS . ' Ascending', 'hspace="3"'); ?></a><br><a href="<?php echo "$PHP_SELF?listing=orders-desc"; ?>"><?php echo tep_image_button('ic_down.gif', 'Sort ' . TABLE_HEADING_ORDERS . ' Descending', 'hspace="3"'); ?></a>
                            </td>
                       <tr>
                     </table>
                   </td>
                   <td class="dataTableHeadingContent" align="center">
                     <table border="0" cellspacing="0" cellpadding="0">
                       <tr>
                         <td rowspan="2" align="left" class="dataTableHeadingContent">
                            <?php echo TABLE_HEADING_CUSTOMERS; ?>
                         </td>
                         <td align="right" valign="bottom">
                            <a href="<?php echo "$PHP_SELF?listing=customers"; ?>"><?php echo tep_image_button('ic_up.gif', 'Sort ' . TABLE_HEADING_CUSTOMERS . ' Ascending', 'hspace="3"'); ?></a><br><a href="<?php echo "$PHP_SELF?listing=customers-desc"; ?>"><?php echo tep_image_button('ic_down.gif', 'Sort ' . TABLE_HEADING_CUSTOMERS . ' Descending', 'hspace="3"'); ?></a>
                         </td>
                       <tr>
                     </table>
                   </td>
                   <td class="dataTableHeadingContent" align="center">
                     <table border="0" cellspacing="0" cellpadding="0">
                       <tr>
                         <td rowspan="2" align="right" class="dataTableHeadingContent">
                            <?php echo TABLE_HEADING_ORDER_TOTAL; ?>
                         </td>
                         <td align="right" valign="bottom">
                            <a href="<?php echo "$PHP_SELF?listing=order_total"; ?>"><?php echo tep_image_button('ic_up.gif', 'Sort ' . TABLE_HEADING_ORDER_TOTAL . ' Ascending', 'hspace="3"'); ?></a><br><a href="<?php echo "$PHP_SELF?listing=order_total-desc"; ?>"><?php echo tep_image_button('ic_down.gif', 'Sort ' . TABLE_HEADING_ORDER_TOTAL . ' Descending', 'hspace="3"'); ?></a>
                         </td>
                       <tr>
                     </table>
                   </td>
                   <td class="dataTableHeadingContent" align="center">
                     <table border="0" cellspacing="0" cellpadding="0">
                       <tr>
                         <td rowspan="2" align="center" class="dataTableHeadingContent">
                            <?php echo TABLE_HEADING_DATE_PURCHASED; ?>
                         </td>
                         <td align="right" valign="bottom">
                            <a href="<?php echo "$PHP_SELF?listing=date_purchased"; ?>"><?php echo tep_image_button('ic_up.gif', 'Sort ' . TABLE_HEADING_DATE_PURCHASED . ' Ascending', 'hspace="3"'); ?></a><br><a href="<?php echo "$PHP_SELF?listing=date_purchased-desc"; ?>"><?php echo tep_image_button('ic_down.gif', 'Sort ' . TABLE_HEADING_DATE_PURCHASED . ' Descending', 'hspace="3"'); ?></a>
                         </td>
                       <tr>
                     </table>
                   </td>
                   <td class="dataTableHeadingContent" align="center">
                     <table border="0" cellspacing="0" cellpadding="0">
                       <tr>
                         <td rowspan="2" align="left" class="dataTableHeadingContent">
                            <?php echo TABLE_HEADING_STATUS; ?>
                         </td>
                         <td align="right" valign="bottom">
                            <a href="<?php echo "$PHP_SELF?listing=order_status"; ?>"><?php echo tep_image_button('ic_up.gif', 'Sort ' . TABLE_HEADING_STATUS . ' Ascending', 'hspace="3"'); ?></a><br><a href="<?php echo "$PHP_SELF?listing=order_status-desc"; ?>"><?php echo tep_image_button('ic_down.gif', 'Sort ' . TABLE_HEADING_STATUS . ' Descending', 'hspace="3"'); ?></a>
                         </td>
                       <tr>
                     </table>
                   </td>
                   <td class="dataTableHeadingContent" align="right">
                     <?php echo TABLE_HEADING_ACTION; ?>
                   </td>
                 </tr>
    
    About line 394 Replace
    
    <?php
       if (isset($HTTP_GET_VARS['cID'])) {
         $cID = tep_db_prepare_input($HTTP_GET_VARS['cID']);
         $orders_query_raw = "select o.orders_id, o.customers_name, o.customers_id, o.payment_method, o.date_purchased, o.last_modified, o.currency, o.currency_value, s.orders_status_name, ot.text as order_total from " . TABLE_ORDERS . " o left join " . TABLE_ORDERS_TOTAL . " ot on (o.orders_id = ot.orders_id), " . TABLE_ORDERS_STATUS . " s where o.customers_id = '" . (int)$cID . "' and o.orders_status = s.orders_status_id and s.language_id = '" . (int)$languages_id . "' and ot.class = 'ot_total' order by $order";
       } elseif (isset($HTTP_GET_VARS['status'])) {
         $status = tep_db_prepare_input($HTTP_GET_VARS['status']);
         $orders_query_raw = "select o.orders_id, o.customers_name, o.payment_method, o.date_purchased, o.last_modified, o.currency, o.currency_value, s.orders_status_name, ot.text as order_total from " . TABLE_ORDERS . " o left join " . TABLE_ORDERS_TOTAL . " ot on (o.orders_id = ot.orders_id), " . TABLE_ORDERS_STATUS . " s where o.orders_status = s.orders_status_id and s.language_id = '" . (int)$languages_id . "' and s.orders_status_id = '" . (int)$status . "' and ot.class = 'ot_total' order by $order";
       } else {
         $orders_query_raw = "select o.orders_id, o.customers_name, o.payment_method, o.date_purchased, o.last_modified, o.currency, o.currency_value, s.orders_status_name, ot.text as order_total from " . TABLE_ORDERS . " o left join " . TABLE_ORDERS_TOTAL . " ot on (o.orders_id = ot.orders_id), " . TABLE_ORDERS_STATUS . " s where o.orders_status = s.orders_status_id and s.language_id = '" . (int)$languages_id . "' and ot.class = 'ot_total' order by $order";
       }
    
    with
    
    <?php
       if (isset($HTTP_GET_VARS['cID'])) {
         $cID = tep_db_prepare_input($HTTP_GET_VARS['cID']);
         $orders_query_raw = "select o.orders_id, o.customers_name, o.customers_id, o.payment_method, o.date_purchased, o.last_modified, o.currency, o.currency_value, s.orders_status_name, s.orders_status_id, ot.value, ot.text as order_total from " . TABLE_ORDERS . " o left join " . TABLE_ORDERS_TOTAL . " ot on (o.orders_id = ot.orders_id), " . TABLE_ORDERS_STATUS . " s where o.customers_id = '" . (int)$cID . "' and o.orders_status = s.orders_status_id and s.language_id = '" . (int)$languages_id . "' and ot.class = 'ot_total' order by $order";
       } elseif (isset($HTTP_GET_VARS['status'])) {
         $status = tep_db_prepare_input($HTTP_GET_VARS['status']);
         $orders_query_raw = "select o.orders_id, o.customers_name, o.payment_method, o.date_purchased, o.last_modified, o.currency, o.currency_value, s.orders_status_name, s.orders_status_id, ot.value, ot.text as order_total from " . TABLE_ORDERS . " o left join " . TABLE_ORDERS_TOTAL . " ot on (o.orders_id = ot.orders_id), " . TABLE_ORDERS_STATUS . " s where o.orders_status = s.orders_status_id and s.language_id = '" . (int)$languages_id . "' and s.orders_status_id = '" . (int)$status . "' and ot.class = 'ot_total' order by $order";
       } else {
         $orders_query_raw = "select o.orders_id, o.customers_name, o.payment_method, o.date_purchased, o.last_modified, o.currency, o.currency_value, s.orders_status_name, s.orders_status_id, ot.value, ot.text as order_total from " . TABLE_ORDERS . " o left join " . TABLE_ORDERS_TOTAL . " ot on (o.orders_id = ot.orders_id), " . TABLE_ORDERS_STATUS . " s where o.orders_status = s.orders_status_id and s.language_id = '" . (int)$languages_id . "' and ot.class = 'ot_total' order by $order";
       }
    
    About line 417 Replace
    
                   <td class="dataTableContent"><?php echo '<a href="' . tep_href_link(FILENAME_ORDERS, tep_get_all_get_params(array('oID', 'action')) . 'oID=' . $orders['orders_id'] . '&action=edit') . '">' . tep_image(DIR_WS_ICONS . 'preview.gif', ICON_PREVIEW) . '</a> ' . $orders['customers_name']; ?></td>
                   <td class="dataTableContent" align="right"><?php echo strip_tags($orders['order_total']); ?></td>
                   <td class="dataTableContent" align="center"><?php echo tep_datetime_short($orders['date_purchased']); ?></td>
                   <td class="dataTableContent" align="right"><?php echo $orders['orders_status_name']; ?></td>
                   <td class="dataTableContent" align="right"><?php if (isset($oInfo) && is_object($oInfo) && ($orders['orders_id'] == $oInfo->orders_id)) { echo tep_image(DIR_WS_IMAGES . 'icon_arrow_right.gif', ''); } else { echo '<a href="' . tep_href_link(FILENAME_ORDERS, tep_get_all_get_params(array('oID')) . 'oID=' . $orders['orders_id']) . '">' . tep_image(DIR_WS_IMAGES . 'icon_info.gif', IMAGE_ICON_INFO) . '</a>'; } ?> </td>
    
    with
    
                   <td class="dataTableContent" align="center"><?php echo strip_tags($orders['orders_id']); ?></td>
                   <td class="dataTableContent" align="left"><?php echo strip_tags($orders['customers_name']); ?></td>
                   <td class="dataTableContent" align="right"><?php echo strip_tags($orders['order_total']); ?></td>
                   <td class="dataTableContent" align="center"><?php echo tep_datetime_short($orders['date_purchased']); ?></td>
                   <td class="dataTableContent" align="left"><?php echo $orders['orders_status_name']; ?></td>
                   <td class="dataTableContent" align="right"><?php if (isset($oInfo) && is_object($oInfo) && ($orders['orders_id'] == $oInfo->orders_id)) { echo tep_image(DIR_WS_IMAGES . 'icon_arrow_right.gif', ''); } else { echo '<a href="' . tep_href_link(FILENAME_ORDERS, tep_get_all_get_params(array('oID')) . 'oID=' . $orders['orders_id']) . '">' . tep_image(DIR_WS_IMAGES . 'icon_info.gif', IMAGE_ICON_INFO) . '</a>'; } ?> </td>
    
    Also, add to /admin/includes/languages/english/orders.php the following line:
    
    define('TABLE_HEADING_ORDERS', 'Order');

     

    Finally, I couldn't find any ic_up.gif and ic_down.gif images in the Download Controller contribution so made my own (store in /admin/includes/languages/english/images/buttons/)

     

    Regards, Rob


  14. Hi, the iframe solution is nice, but horizontal and vertical scrollbars are a bit of a pain (especially when threads get long).

     

    Any thoughts on the feasibility of wrapping the Invision Board within the OSC Header and Footers (I am not too interested in the side columns).

     

    This way you could display the forums without scrollbars, yet retain the same look & feel with your site's headers and footers (and perhaps breadcrumbs/navigation tabs, etc).

     

    I briefly tried to to this from the Invision Control Panel (Skins & Templates > HTML Templates > Mange HTML > Global HTML Elements > Board Headers), but it doesn't seem to execute php commands in the code, e.g. to include OSC headers.

    Am I missing something???

     

    Any ideas about this approach appreciated ;-)


  15. Hi there,

     

    I have just added my very first contribution: Friendly Pricing v1.0

     

    Description

     

    This contribution allows you to specify a friendly price for a product even though it may not be the default pricing currency. For example, let's say you want to sell some products targeted to a local market in one currency and want your prices to be friendly to your customers, e.g. 9.95 EURO. At the same time, you want to sell other products to a different market with friendly prices in a different currency, e.g. US $9.95.

     

    Now with the way OSC is currently set up, you can only specify friendly prices in the default currency. If a customer chooses another currency, then currency rates are applied and the prices get ugly, e.g. 12.67 EURO (and it will vary from day to day as the exchange rates change).

     

    So, what this contribution does is enable you to specify for each product a friendly currency other than the default. This is administered in the products page (categories.php) in the admin section.

     

    Friendly pricing works in perfectly with existing exchange rates and provided you have installed the currency in the admin section, you can specify a friendly price using that currency. If you subsequently delete the currency, prices will revert back to the default currency.

     

    Support has been built in for specials and all orders, reports and invoices have been modified to keep track of orders that may include a mixture of default and friendly pricing.

     

    Comments

     

    I am new to PHP programming (a pragmatist, not a purist), so I'm sure there may be more elegant ways to achieve the same results. If you can improve on my humble beginnings, then please contribute in this forum!

     

    Thank you,

    Rob Anderson


  16. Well, seeing as I started this whole thread, about time I pitched in again!

    Thanks to Sandy for the suggestion to remove the line below:

     

    $this->enabled = ((MODULE_PAYMENT_AUS_BANK_STATUS == 'True') ? true : false);

     

    I did this and it now works OK. I now see the NZ Bank Transfer option in the payment options and it delivers e-mails fine.

     

    Not sure why...but I aint complaining.

     

    Thanks a heap to all who have given their time and contributed to this thread.

     

    Cheers, Rob


  17. Yay, managed to fix my earlier problem relating to installing the Event Calendar on MS2.2:

    Fatal error: Cannot pass parameter 3 by reference in .../catalog/events_calendar.php on line 323

    Basically, I replaced one of the files modified (/catalog/includes/classes/split_page_results.php) in the Event Calendar contribution with it's unmodifed version from an earlier backup.

    Not sure exactly what part of the code wasn't working, but am happy now that my Calendar works ;-)

    Hope this helps someone else...Rob


  18. Thanks Matt, I tried your fix and it bunny-hopped the problem along a few pages and lines of code. I don't want to waste your time with this, there must be something fundamentally wrong with my setup.

     

    Perhaps other contributions I've installed are conflicting. I guess that 's what you get when you're a noob.

     

    Cheers anyway, Rob

     

    P.S. I'm trying to get the Event Calendar contribution working with MS2.2.

     

    http://www.oscommerce.com/community/contributions,1061


  19. I too am having the following problem, would appreciate any suggestions (running 2.2)

    Fatal error: Cannot pass parameter 3 by reference in /www/htdocs/v080997/shop/catalog/events_calendar.php on line 323

    This error appears whenever I try to view a month's worth of events (the go button) or click on the Events Calendar link at the top of the control. I can, however view the full year page and individually loaded events.

    It appears to relate to this function:

    $events_split = new splitPageResults($events_query_raw, MAX_DISPLAY_NUMBER_EVENTS, 'DAYOFMONTH(start_date)');

    I feel I am so close! Any suggestions greatly appreciated ;-)

    Regards, Rob


  20. Sounds like a useful contribution. I've installed it and configured it in the admin section (2.2MS2) but when I test it in Catalog no extra payment option appears at the Payment Information stage.

     

    The customer I am using has New Zealand as the countryand I have a New Zealand Zone assigned in the NZ Bank Transfer details. (The zone works OK with my NZ GST option).

     

    Any ideas why this payment option does not appear? Any help greatly appreciated :)

     

    Rob

     

    P.S. I am a noobie at oscommerce, so hope I'm not forgetting something really stupid.

×