Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] osC-PrintOrder with Store Logo v1.0


Guest

Recommended Posts

Thank you, I removed that line and it worked.

 

However, the packaged "catalogprintorder.php has this on line 31

 

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

 

You may want to download it and check.

 

Thanks again.

Link to comment
Share on other sites

  • Replies 165
  • Created
  • Last Reply

Top Posters In This Topic

Ive got this module installed on a new snapshot and the admin side works great however the catalog side has a bit of a problem...

 

when you click on the print invoice button in account history ir pops up ok but redirects you to the login page where you must again login to the store...how can i get around this?

Link to comment
Share on other sites

Hey Steve...

 

If I'm correct, the osC User Account system changed as of the 5/19/2003 snapshot. If you are using a recent snapshot, that might have something to do with it.

 

The only thing I can think of would be this...

 

At the top of catalog/printorder.php, you will see this code...

  if (!tep_session_is_registered('customer_id')) {

   $navigation->set_snapshot();

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

 }

This is the only piece of code that would redirect you to login. I've checked other files from a snapshot later that 5/19, and it looks to be the same. But I'm not sure.

 

Try eliminating that section of code and try it again and let me know. I'm kinda interested to find out if that will fix it.

 

-R

Link to comment
Share on other sites

I simply could not get this contribution to work so I tried going back to all my old files by deleting the newer ones and replacing them with the older ones and now I get an error at the checkout_confirmation.php page no matter what I do.

 

It appears to be a problem with the sessions Here is the error message I get:

 

Fatal error: Cannot redeclare tep_session_start() in /home/ttoomey/ydnt.com/secure/catalog/includes/functions/sessions.php on line 66

 

all that happens at that line in the sessions code is it starts the session. If you have any idea what caused this or how I can fix it please help me I've been struggling with it for a few hours now going back and checking all the lines of code.

Assault

If you want to find it you'll have to google "Assault T-Shirts" because posting my damn url in my signature is against the forum rules.

T-Shirts with an edge

Powered by OSCommerce + about 20 different custom addons and some Wordpress

Link to comment
Share on other sites

figured it out, uploading wrong file....

stupidme.

Assault

If you want to find it you'll have to google "Assault T-Shirts" because posting my damn url in my signature is against the forum rules.

T-Shirts with an edge

Powered by OSCommerce + about 20 different custom addons and some Wordpress

Link to comment
Share on other sites

check to make sure you didn't accidently copy a non-language file into the languages directory.

 

For example...

 

There is a /catalog/checkout_confirmation.php AND a /catalog/includes/languages/english/checkout_confirmation.php. If you happen to copy the one from catalog into the languages folder, that error will occur.

 

Good Luck.

 

-R

Link to comment
Share on other sites

  • 1 month later...

Hello, I've installed this contribution and don't beleive I've missed any steps. I did have to remove line 31 from printorder.php to get it to at least work. However on the popup window, the formatting is all over the place, and most of the header variables are missing.

 

Please view at this demo store http://www.abrighterchild.com/catalog

 

Any feedback would be much appreciated.

Link to comment
Share on other sites

fixed it..

 

i added this to checkout_success.php :

 

  if (!isset($HTTP_GET_VARS['order_id'])) {

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

 }



 $customer_number_query = tep_db_query("select customers_id from " . TABLE_ORDERS . " where orders_id = '". tep_db_input(tep_db_prepare_input($HTTP_GET_VARS['order_id'])) . "'");

 $customer_number = tep_db_fetch_array($customer_number_query);

 if ($customer_number['customers_id'] != $customer_id) {

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

 }

 

right after :

  if (!tep_session_is_registered('customer_id')) {

   $navigation->set_snapshot();

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

 }

Designrfix.com | Graphic Design Inspiration & Web Design Resources - @designrfix
Link to comment
Share on other sites

Hi,

I'm not sure if this is related to this contribution, but i think it is. I seem to be having a problem on checkout_success. After a customer confirms their order, and hits continue on checkout_success, nothing happens, the page just reloads. Normally they would return to default.php. Any ideas? Here is my checkout_success.php

Thanks!!

 

<?php

/*

 $Id: checkout_success.php,v 1.48 2003/02/17 11:51:16 hpdl Exp $



 osCommerce, Open Source E-Commerce Solutions

 http://www.oscommerce.com



 Copyright (c) 2003 osCommerce



 Released under the GNU General Public License

*/



 require('includes/application_top.php');



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

 if (!tep_session_is_registered('customer_id')) {

   tep_redirect(tep_href_link(FILENAME_SHOPPING_CART));

 }



 if (isset($HTTP_GET_VARS['action']) && ($HTTP_GET_VARS['action'] == 'update')) {

   $notify_string = 'action=notify&';

   $notify = $HTTP_POST_VARS['notify'];

   if (!is_array($notify)) $notify = array($notify);

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

     $notify_string .= 'notify[]=' . $notify[$i] . '&';

   }

   if (strlen($notify_string) > 0) $notify_string = substr($notify_string, 0, -1);



   //DGM disable, PWA Mod: tep_redirect(tep_href_link(FILENAME_DEFAULT, $notify_string));

// DGM PWA Mod: Added a check for a Guest checkout and cleared the session - 030411 

     if (tep_session_is_registered('noaccount')) { 

          tep_db_query("delete from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . tep_db_input($customer_id) . "'"); 

          tep_db_query("delete from " . TABLE_CUSTOMERS . " where customers_id = '" . tep_db_input($customer_id) . "'"); 

          tep_db_query("delete from " . TABLE_CUSTOMERS_INFO . " where customers_info_id = '" . tep_db_input($customer_id) . "'"); 

          tep_db_query("delete from " . TABLE_CUSTOMERS_BASKET . " where customers_id = '" . tep_db_input($customer_id) . "'"); 

          tep_db_query("delete from " . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . " where customers_id = '" . tep_db_input($customer_id) . "'"); 

          tep_db_query("delete from " . TABLE_WHOS_ONLINE . " where customer_id = '" . tep_db_input($customer_id) . "'"); 

        tep_session_destroy(); 

          }

    }

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



 $breadcrumb->add(NAVBAR_TITLE_1);

 $breadcrumb->add(NAVBAR_TITLE_2);



 $global_query = tep_db_query("select global_product_notifications from " . TABLE_CUSTOMERS_INFO . " where customers_info_id = '" . $customer_id . "'");

 $global = tep_db_fetch_array($global_query);



 if ($global['global_product_notifications'] != '1') {

   $orders_query = tep_db_query("select orders_id from " . TABLE_ORDERS . " where customers_id = '" . $customer_id . "' order by date_purchased desc limit 1");

   $orders = tep_db_fetch_array($orders_query);



   $products_array = array();

   $products_query = tep_db_query("select products_id, products_name from " . TABLE_ORDERS_PRODUCTS . " where orders_id = '" . $orders['orders_id'] . "' order by products_name");

   while ($products = tep_db_fetch_array($products_query)) {

     $products_array[] = array('id' => $products['products_id'],

                               'text' => $products['products_name']);

   }

 }

?>

<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">

<html <?php echo HTML_PARAMS; ?>>

<!--DGM Add for printorder mod-->

<script language="javascript" src="includes/general.js"></script>

<script language="javascript"><!--

function popupWindow(url) {

 window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizab
le=yes,copyhistory=no,width=650,height=500,screenX=150,screenY=150,top=150,left=1
50')

}

//-->

</script>

<!--DGM End Add for printorder mod-->

<head>

<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">

<title><?php echo TITLE; ?></title>

<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">

<link rel="stylesheet" type="text/css" href="stylesheet.css">

</head>

<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">

<!-- header //-->

<?php require(DIR_WS_INCLUDES . 'header.php'); ?>

<!-- header_eof //-->



<!-- body //-->

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

 <tr>

   <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">

<!-- left_navigation //-->

<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>

<!-- left_navigation_eof //-->

   </table></td>

<!-- body_text //-->

   <td width="100%" valign="top"><?php echo tep_draw_form('order', tep_href_link(FILENAME_CHECKOUT_SUCCESS, 'action=update', 'SSL')); ?><table border="0" width="100%" cellspacing="0" cellpadding="0">

     <tr>

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

         <tr>

           <td valign="top"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_man_on_board.gif', HEADING_TITLE); ?></td>

           <td valign="top" class="main"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?><div align="center" class="pageHeading"><?php echo HEADING_TITLE; ?></div><br><?php echo TEXT_SUCCESS; ?><br><br>

<?php

 if ($global['global_product_notifications'] != '1') {

   echo TEXT_NOTIFY_PRODUCTS . '<br><p class="productsNotifications">';



   $products_displayed = array();

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

     if (!in_array($products_array[$i]['id'], $products_displayed)) {

       echo tep_draw_checkbox_field('notify[]', $products_array[$i]['id']) . ' ' . $products_array[$i]['text'] . '<br>';

       $products_displayed[] = $products_array[$i]['id'];

     }

   }



   echo '</p>';

 } else {

   echo TEXT_SEE_ORDERS . '<br><br>' . TEXT_CONTACT_STORE_OWNER;

 }

?>

           <h3><?php echo TEXT_THANKS_FOR_SHOPPING; ?></h3></td>

         </tr>

       </table></td>

     </tr>

     <tr>

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

     </tr>

     <tr> 

    <!--DGM Add for printorder mod-->

    <td align="left" class="main"><?php echo '<a href="javascript:popupWindow('' .  (HTTP_SERVER . DIR_WS_CATALOG . FILENAME_ORDERS_PRINTABLE) . '?' . (tep_get_all_get_params(array('order_id')) . 'order_id=' . $HTTP_GET_VARS['order_id']) . '')">' . tep_image_button('button_printorder.gif', IMAGE_BUTTON_PRINT_ORDER) . '</a>'; ?></td>

       <td align="right" class="main"><?php echo tep_image_submit('button_continue.gif', IMAGE_BUTTON_CONTINUE); ?></td>

     </td>

     </tr>	

  <tr>

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

     </tr>

     <tr>

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

         <tr>

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

             <tr>

               <td width="50%" align="right"><?php echo tep_draw_separator('pixel_silver.gif', '1', '5'); ?></td>

               <td width="50%"><?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?></td>

             </tr>

           </table></td>

           <td width="25%"><?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?></td>

           <td width="25%"><?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?></td>

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

             <tr>

               <td width="50%"><?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?></td>

               <td width="50%"><?php echo tep_image(DIR_WS_IMAGES . 'checkout_bullet.gif'); ?></td>

             </tr>

           </table></td>

         </tr>

         <tr>

           <td align="center" width="25%" class="checkoutBarFrom"><?php echo CHECKOUT_BAR_DELIVERY; ?></td>

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

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

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

         </tr>

       </table></td>

     </tr>

<?php if (DOWNLOAD_ENABLED == 'true') include(DIR_WS_MODULES . 'downloads.php'); ?>

   </table></form></td>

<!-- body_text_eof //-->

   <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">

<!-- right_navigation //-->

<?php require(DIR_WS_INCLUDES . 'column_right.php'); ?>

<!-- right_navigation_eof //-->

   </table></td>

 </tr>

</table>

<!-- body_eof //-->



<!-- footer //-->

<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>

<!-- footer_eof //-->

<br>

</body>

</html>

<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

Link to comment
Share on other sites

  • 5 weeks later...

I have installed this contribution, but are getting this error message:

 

  • Warning: main(includes/languages/danish/printorder.php): failed to open stream: No such file or directory in /home/brenda/public_html/oscommerce/printorder.php on line 31

 

Fatal error: main(): Failed opening required 'includes/languages/danish/printorder.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/brenda/public_html/oscommerce/printorder.php on line 31

 

I am using MS2, and I have defined printorder.php in FILENAMES.PHP, and also all the other modifications.

 

Anyone who knows where to look ?

 

Brenda

Link to comment
Share on other sites

Having tried this contribution on admin I having a bit of diffulty with the packing note. I am wondering how I can get to see anything below order number on the screen instead of just a couple of black rectangles. It actually prints fine because I have my browser set to not print background colours it is just the screen display that doen't work (using IE 6.0.28)

Any ideas?

Link to comment
Share on other sites

This may be really stupid of me. But I am kinda of new to this stuff.

 

Anyways, I have the whole contribution loaded. Everything seems to work, except for the store logo. It doesn't load in either the admin area or the catalog. Anyone have any ideas why??

 

Thanks in advance :)

Link to comment
Share on other sites

I guess that's probably my problem

 

I uploaded it to that folder, but it still won't show. I am assuming I don't have it named correctly. Is there a specific name that it's supposed to have?? Can you help me a little further? I know these may be dumb questions, but like I said, I'm a noob. :)

Link to comment
Share on other sites

  • 3 weeks later...

Invoices from admin is printed without order No's. Instead of printing eg. "Order # 87" it prints "TITLE_PRINT_ORDER #". The file invoice.php is exactly identical to the one included in the contribution, so I simply don't know where to look.

Can someone please help with this ?

 

Mogens

Link to comment
Share on other sites

Iam not very familiar with this contribution. In fact, I was just browsing through this thread to see what sort of problems people were having with it.

 

Invoices from admin is printed without order No's. Instead of printing eg. "Order # 87" it prints "TITLE_PRINT_ORDER #". The file invoice.php is exactly identical to the one included in the contribution, so I simply don't know where to look.

 

You are missing a "defines" statement. If you review the installation procedure, you will likely find that you needed to add at least one "defines" statement at install. Make sure all of them are present and in the correct file or folder.

That should take care of your problem.

 

 

 

 

Mark

Link to comment
Share on other sites

  • 2 weeks later...

I installed PrintOrder with Store Logo in my OSC 2.2 MS2 release. The Store Logo feature works, but the there is no popup window or print button. Is this mod supposed to work with this version of OSC? I do have the message on the checkout_success page, thanking the customer for shopping online.

Link to comment
Share on other sites

  • 2 weeks later...

I am getting this error when I try to click the print button from account_history_info.php

-----------

 

Fatal error: Cannot redeclare tep_session_start() (previously declared in /home/username/public_html/store/includes/functions/sessions.php:67) in /home/username/public_html/store/includes/functions/sessions.php on line 66

 

------------

 

Any help is GREATLY appreciated. Thanks!!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...