Greymist Posted February 16, 2004 Posted February 16, 2004 I hope this will help other people. I was stuck getting the 'osC-PrintOrder with Store Logo v1.0' to work with Oscommerce. I had the following problem, the problem is following and I will put in my answer at the end. The main problems I am having is that the popup window displays the login screen for the accounts when I select the 'Print Order Detail' Button in the Account History Page. The link for the button is to my normal web site, not using SSL, the account page is using SSL. On the admin side, both my HTTP and HTTPS defines are the same of the admin side, so I am not worried about security. The invoice and packingslip button read that it is trying to access my secure site but all I get is the admin login box. I am running osCommerce 2.2 Milestone 2 Release with the following addons. Administration Access Level Accounts 2.0 Big Images Australian Zones osC-PrintOrder with Store Logo v1.0 The following worked for me, I had to change the following code to see if the account section was in SSL mode, if it was to go to the popup with the secure site. You need to add two new rows to the admin_file table, using phpMyAdmin, to allow the admin side to run the invoice.php and packingslip.php files. The following code will add two rows, you may need to change the last number to your administrator group, by default the top administrator group will be 1. You can also select the file permissions from the administrator menu option in admin. INSERT INTO `admin_files` VALUES (46, 'invoice.php', 0, 5, '1'); INSERT INTO `admin_files` VALUES (47, 'packingslip.php', 0, 5, '1'); Now you will need to change some of the code that you entered from PrintOrder into the files. Replace the text in the following file. Pasted Code: File catalog/account_history_info.php <td align="right" class="main"><?php echo '<a href="java script: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> New Code: <td align="right" class="main"><?php echo '<a href="java script:popupWindow(\'' . tep_href_link(FILENAME_ORDERS_PRINTABLE, tep_get_all_get_params(), 'SSL') . '\')">' . tep_image_button('button_printorder.gif', IMAGE_BUTTON_PRINT_ORDER) . '</a>'; ?></td> NOTE: Don't add the code to the admin/orders.php as the session won't allow you to use javascript popups but will work okay with the standard popups. If someone has an improvement to this please let me know. Regards. Tom. Tomtech. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.