cezar99
-
Posts
23 -
Joined
-
Last visited
Posts posted by cezar99
-
-
hi how change the invoice to get a products images too ?
-
Ok i did it like packingslip.php. But how change this code:
require('includes/application_top.php'); require(DIR_WS_CLASSES . 'currencies.php'); $currencies = new currencies(); $oID = tep_db_prepare_input($HTTP_GET_VARS['oID']); $orders_query = tep_db_query("select orders_id from " . TABLE_ORDERS . " where orders_id = '" . (int)$oID . "'"); include(DIR_WS_CLASSES . 'order.php'); $order = new order($oID);
and
<?php
$product_info_query = tep_db_query("select p.products_id, p.products_image from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'");
$product_info = tep_db_fetch_array($product_info_query);
for ($i=0, $n=sizeof($order->products); $i<$n; $i++) {
echo ' <tr class="infoBoxContents">' . "\n" .
' <td class="infoBoxContents" valign="top" align="right">' . $order->products[$i]['qty'] . ' x</td>' . "\n" .
' <td class="infoBoxContents" valign="top">' . $order->products[$i]['name'];
if (isset($order->products[$i]['attributes']) && (sizeof($order->products[$i]['attributes']) > 0)) {
for ($j=0, $k=sizeof($order->products[$i]['attributes']); $j<$k; $j++) {
echo '<br><nobr><small> <i> - ' . $order->products[$i]['attributes'][$j]['option'] . ': ' . $order->products[$i]['attributes'][$j]['value'];
echo '</i></small></nobr>';
}
}
echo ' </td>' . "\n" .
' <td class="infoBoxContents" valign="top">' . $order->products[$i]['model'] . '</td>' . "\n" .
' </tr>' . "\n";
}
?>
to get image too ?
-
Ok i did it like packingslip.php. But how change this code:
require('includes/application_top.php'); require(DIR_WS_CLASSES . 'currencies.php'); $currencies = new currencies(); $oID = tep_db_prepare_input($HTTP_GET_VARS['oID']); $orders_query = tep_db_query("select orders_id from " . TABLE_ORDERS . " where orders_id = '" . (int)$oID . "'"); include(DIR_WS_CLASSES . 'order.php'); $order = new order($oID);
to get image too ?
-
hi, is there any module to doing this:
im opening some order in admin section and i have there a button "print". it should print page with:
info about client like:
Delivery adress, payment adress, kind of payment, order products with images
-
Hi, how should look file : ask_a_question.php with Anit Robot? Anybody can help me? This is my file, please help me add to him code about Anti Robot. Thanks!
<?php /* $Id: ask_a_question.php,v 1.42 2003/06/11 17:35:01 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 (!tep_session_is_registered('customer_id') && (ALLOW_GUEST_TO_TELL_A_FRIEND == 'false')) { $navigation->set_snapshot(); tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL')); } $valid_product = false; if (isset($HTTP_GET_VARS['products_id'])) { $product_info_query = tep_db_query("select pd.products_name, p.products_model, p.products_image from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "'"); if (tep_db_num_rows($product_info_query)) { $valid_product = true; $product_info = tep_db_fetch_array($product_info_query); } } if ($valid_product == false) { tep_redirect(tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $HTTP_GET_VARS['products_id'])); } require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_ASK_QUESTION); if (isset($HTTP_GET_VARS['action']) && ($HTTP_GET_VARS['action'] == 'process')) { $error = false; $to_email_address = tep_db_prepare_input($HTTP_POST_VARS['to_email_address']); $to_name = tep_db_prepare_input($HTTP_POST_VARS['to_name']); $from_email_address = tep_db_prepare_input($HTTP_POST_VARS['from_email_address']); $from_name = tep_db_prepare_input($HTTP_POST_VARS['from_name']); $message = tep_db_prepare_input($HTTP_POST_VARS['message']); if (empty($from_name)) { $error = true; $messageStack->add('friend', ERROR_FROM_NAME); } if (!tep_validate_email($from_email_address)) { $error = true; $messageStack->add('friend', ERROR_FROM_ADDRESS); } if (empty($to_name)) { $error = true; $messageStack->add('friend', ERROR_TO_NAME); } if (!tep_validate_email($to_email_address)) { $error = true; $messageStack->add('friend', ERROR_TO_ADDRESS); } if ($error == false) { $email_subject = sprintf(TEXT_EMAIL_SUBJECT, $from_name, STORE_NAME); $email_body = sprintf(TEXT_EMAIL_INTRO, $to_name, $from_name, $product_info['products_name'], $product_info['products_model'], STORE_NAME) . "\n\n"; if (tep_not_null($message)) { $email_body .= $message . "\n\n"; } $email_body .= sprintf(TEXT_EMAIL_LINK, tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $HTTP_GET_VARS['products_id'])) . "\n\n" . sprintf(TEXT_EMAIL_SIGNATURE, STORE_NAME . "\n" . HTTP_SERVER . DIR_WS_CATALOG . "\n"); tep_mail($to_name, $to_email_address, $email_subject, $email_body, $from_name, $from_email_address); $messageStack->add_session('header', sprintf(TEXT_EMAIL_SUCCESSFUL_SENT, $product_info['products_name'], tep_output_string_protected($to_name)), 'success'); tep_redirect(tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $HTTP_GET_VARS['products_id'])); } } elseif (tep_session_is_registered('customer_id')) { $account_query = tep_db_query("select customers_firstname, customers_lastname, customers_email_address from " . TABLE_CUSTOMERS . " where customers_id = '" . (int)$customer_id . "'"); $account = tep_db_fetch_array($account_query); $from_name = $account['customers_firstname'] . ' ' . $account['customers_lastname']; $from_email_address = $account['customers_email_address']; } $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_ASK_QUESTION, 'products_id=' . $HTTP_GET_VARS['products_id'])); ?> <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"> <html <?php echo HTML_PARAMS; ?>> <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('email_friend', tep_href_link(FILENAME_ASK_QUESTION, 'action=process&products_id=' . $HTTP_GET_VARS['products_id'])); ?> <table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td> <table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="dopasuj_cene"><?php echo sprintf(HEADING_TITLE, $product_info['products_name']); ?> - (<?php echo $product_info['products_model'] ?>)</td> <td class="askQuestion" align="center"><?php echo tep_image(DIR_WS_IMAGES . $product_info['products_image'], $product_info['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT); ?></td> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <?php if ($messageStack->size('friend') > 0) { ?> <tr> <td><?php echo $messageStack->output('friend'); ?></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <?php } ?> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="main"><b><?php echo FORM_TITLE_CUSTOMER_DETAILS; ?></b></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" cellspacing="0" cellpadding="2"> <tr> <td class="main"><?php echo FORM_FIELD_CUSTOMER_NAME; ?></td> <td class="main"><?php echo tep_draw_input_field('from_name',($from_name)?$from_name:''); ?></td> </tr> <tr> <td class="main"><?php echo FORM_FIELD_CUSTOMER_EMAIL; ?></td> <td class="main"><?php echo tep_draw_input_field('from_email_address',($from_email_address)?$from_email_address:''); ?></td> </tr> </table></td> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td><?php echo tep_draw_hidden_field('to_email_address', STORE_OWNER_EMAIL_ADDRESS) . ' <span class="inputRequirement">' . '</span>'; ?><?php echo tep_draw_hidden_field('to_name', STORE_OWNER) . ' <span class="inputRequirement">' . '</span>'; ?></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td class="main"><b><?php echo FORM_TITLE_FRIEND_MESSAGE; ?></b></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox"> <tr class="infoBoxContents"> <td><?php echo tep_draw_textarea_field('message', 'soft', 40, 8); ?></td> </tr> </table></td> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></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"> <tr> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> <td><?php echo '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $HTTP_GET_VARS['products_id']) . '">' . tep_image_button('button_back.gif', IMAGE_BUTTON_BACK) . '</a>'; ?></td> <td align="right"><?php echo tep_image_submit('button_continue.gif', IMAGE_BUTTON_CONTINUE); ?></td> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> </tr> </table></td> </tr> </table></td> </tr> </table></td></form> <!-- 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'); ?>
-
$Config['AllowedExtensions']['File'] = array('7z', 'aiff', 'asf', 'avi', 'bmp', 'csv', 'doc', 'fla', 'flv', 'gif', 'gz', 'gzip', 'jpeg', 'jpg', 'mid', 'mov', 'mp3', 'mp4', 'mpc', 'mpeg', 'mpg', 'ods', 'odt', 'pdf', 'png', 'ppt', 'pxd', 'qt', 'ram', 'rar', 'rm', 'rmi', 'rmvb', 'rtf', 'sdc', 'sitd', 'swf', 'sxc', 'sxw', 'tar', 'tgz', 'tif', 'tiff', 'txt', 'vsd', 'wav', 'wma', 'wmv', 'xls', 'xml', 'zip'); $Config['DeniedExtensions']['File'] = array(); $Config['FileTypesPath']['File'] = $Config['UserFilesPath'] . 'file/'; $Config['FileTypesAbsolutePath']['File']= ($Config['UserFilesAbsolutePath'] == '') ? '' : $Config['UserFilesAbsolutePath'].'file/'; $Config['QuickUploadPath']['File'] = $Config['UserFilesPath']; $Config['QuickUploadAbsolutePath']['File']= $Config['UserFilesAbsolutePath']; $Config['AllowedExtensions']['Image'] = array('bmp','gif','jpeg','jpg','png'); $Config['DeniedExtensions']['Image'] = array(); $Config['FileTypesPath']['Image'] = $Config['UserFilesPath'] . 'images/'; $Config['FileTypesAbsolutePath']['Image']= ($Config['UserFilesAbsolutePath'] == '') ? '' : $Config['UserFilesAbsolutePath'].'images/'; $Config['QuickUploadPath']['Image'] = $Config['UserFilesPath'] . 'images/'; $Config['QuickUploadAbsolutePath']['Image']= $Config['UserFilesAbsolutePath'] . 'images/'; $Config['AllowedExtensions']['Flash'] = array('swf','flv'); $Config['DeniedExtensions']['Flash'] = array(); $Config['FileTypesPath']['Flash'] = $Config['UserFilesPath'] . 'flash/'; $Config['FileTypesAbsolutePath']['Flash']= ($Config['UserFilesAbsolutePath'] == '') ? '' : $Config['UserFilesAbsolutePath'].'flash/'; $Config['QuickUploadPath']['Flash'] = $Config['UserFilesPath']; $Config['QuickUploadAbsolutePath']['Flash']= $Config['UserFilesAbsolutePath']; $Config['AllowedExtensions']['Media'] = array('aiff', 'asf', 'avi', 'bmp', 'fla', 'flv', 'gif', 'jpeg', 'jpg', 'mid', 'mov', 'mp3', 'mp4', 'mpc', 'mpeg', 'mpg', 'png', 'qt', 'ram', 'rm', 'rmi', 'rmvb', 'swf', 'tif', 'tiff', 'wav', 'wma', 'wmv'); $Config['DeniedExtensions']['Media'] = array(); $Config['FileTypesPath']['Media'] = $Config['UserFilesPath'] . 'media/'; $Config['FileTypesAbsolutePath']['Media']= ($Config['UserFilesAbsolutePath'] == '') ? '' : $Config['UserFilesAbsolutePath'].'media/'; $Config['QuickUploadPath']['Media'] = $Config['UserFilesPath']; $Config['QuickUploadAbsolutePath']['Media']= $Config['UserFilesAbsolutePath'];
ok, i have this settings in my config.php. please help me ... i have installed shop in public_html.
-
check permissions
try creating userfiles directory manually.
in catalog/images i get a 777 chmod. could you tell me which and where i should create the directory (read: path). And any changes in config.php in catalog php ?
Best regards
Czarek
-
Everything works fine. The only problem is the already discussed image problem. When I try to access the image folder an error message appears saying that the directory can't be created.
Any ideas ? I have too the same problem when i try add a flash.
-
ok, i did it and everything is ok ;]
p.s my second problem i did by my self yesterday morning :)
-
hi, my English is not well so i'm very sorry for any language mistakes :)
My first problem is about admin/login.php . mys structure of this file is diffrent. could you make me a good one ?
here is my code of login.php
<?php
/*
$Id: login.php,v 1.17 2003/02/14 12:57:29 dgw_ Exp $
osCommerce, Open Source E-Commerce Solutions
Copyright © 2002 osCommerce
Released under the GNU General Public License
*/
require('includes/application_top.php');
if (isset($HTTP_GET_VARS['action']) && ($HTTP_GET_VARS['action'] == 'process')) {
$email_address = tep_db_prepare_input($HTTP_POST_VARS['email_address']);
$password = tep_db_prepare_input($HTTP_POST_VARS['password']);
// Check if email exists
$check_admin_query = tep_db_query("select admin_id as login_id, admin_groups_id as login_groups_id, admin_firstname as login_firstname, admin_email_address as login_email_address, admin_password as login_password, admin_modified as login_modified, admin_logdate as login_logdate, admin_lognum as login_lognum from " . TABLE_ADMIN . " where admin_email_address = '" . tep_db_input($email_address) . "'");
if (!tep_db_num_rows($check_admin_query)) {
$HTTP_GET_VARS['login'] = 'fail';
} else {
$check_admin = tep_db_fetch_array($check_admin_query);
// Check that password is good
if (!tep_validate_password($password, $check_admin['login_password'])) {
$HTTP_GET_VARS['login'] = 'fail';
} else {
if (tep_session_is_registered('password_forgotten')) {
tep_session_unregister('password_forgotten');
}
$login_id = $check_admin['login_id'];
$login_groups_id = $check_admin[login_groups_id];
$login_firstname = $check_admin['login_firstname'];
$login_email_address = $check_admin['login_email_address'];
$login_logdate = $check_admin['login_logdate'];
$login_lognum = $check_admin['login_lognum'];
$login_modified = $check_admin['login_modified'];
tep_session_register('login_id');
tep_session_register('login_groups_id');
tep_session_register('login_first_name');
//$date_now = date('Ymd');
tep_db_query("update " . TABLE_ADMIN . " set admin_logdate = now(), admin_lognum = admin_lognum+1 where admin_id = '" . $login_id . "'");
if (($login_lognum == 0) || !($login_logdate) || ($login_email_address == '[email protected]') || ($login_modified == '0000-00-00 00:00:00')) {
tep_redirect(tep_href_link(FILENAME_ADMIN_ACCOUNT));
} else {
tep_redirect(tep_href_link(FILENAME_DEFAULT));
}
}
}
}
require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_LOGIN);
?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php echo HTML_PARAMS; ?>>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
<title><?php echo TITLE; ?></title>
<style type="text/css"><!--
a { color:#080381; text-decoration:none; }
a:hover { color:#aabbdd; text-decoration:underline; }
a.text:link, a.text:visited { color: #ffffff; text-decoration: none; }
a:text:hover { color: #000000; text-decoration: underline; }
a.sub:link, a.sub:visited { color: #dddddd; text-decoration: none; }
A.sub:hover { color: #dddddd; text-decoration: underline; }
.sub { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; font-weight: bold; line-height: 1.5; color: #dddddd; }
.text { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px; font-weight: bold; color: #000000; }
.smallText { font-family: Verdana, Arial, sans-serif; font-size: 10px; }
.login_heading { font-family: Verdana, Arial, sans-serif; font-size: 12px; color: #ffffff;}
.login { font-family: Verdana, Arial, sans-serif; font-size: 12px; color: #000000;}
//--></style>
</head>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF">
<table border="0" width="600" height="100%" cellspacing="0" cellpadding="0" align="center" valign="middle">
<tr>
<td><table border="0" width="600" height="440" cellspacing="0" cellpadding="1" align="center" valign="middle">
<tr bgcolor="#000000">
<td><table border="0" width="600" height="440" cellspacing="0" cellpadding="0">
<tr bgcolor="#ffffff" height="50">
<td height="50"><?php echo tep_image(DIR_WS_IMAGES . 'oscommerce.gif', 'osCommerce', '204', '50'); ?></td>
<td align="right" class="text" nowrap><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . HEADER_TITLE_ADMINISTRATION . '</a> | <a href="' . tep_catalog_href_link() . '">' . HEADER_TITLE_ONLINE_CATALOG . '</a> | <a href="http://www.oscommerce.pl" target="_blank">' . HEADER_TITLE_SUPPORT_SITE . '</a>'; ?> </td>
</tr>
<tr bgcolor="#874826">
<td colspan="2" align="center" valign="middle">
<?php echo tep_draw_form('login', 'login.php','action=process'); ?>
<table width="280" border="0" cellspacing="0" cellpadding="2">
<tr>
<td class="login_heading" valign="top"> <b><?php echo HEADING_RETURNING_ADMIN; ?></b></td>
</tr>
<tr>
<td height="100%" valign="top" align="center">
<table border="0" height="100%" cellspacing="0" cellpadding="1" bgcolor="#666666">
<tr><td><table border="0" width="100%" height="100%" cellspacing="3" cellpadding="2" bgcolor="#F0F0FF">
<?php
if ($HTTP_GET_VARS['login'] == 'fail') {
$info_message = TEXT_LOGIN_ERROR;
}
if (isset($info_message)) {
?>
<tr>
<td colspan="2" class="smallText" align="center"><?php echo $info_message; ?></td>
</tr>
<?php
} else {
?>
<tr>
<td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
</tr>
<?php
}
?>
<tr>
<td class="login"><?php echo ENTRY_EMAIL_ADDRESS; ?></td>
<td class="login"><?php echo tep_draw_input_field('email_address'); ?></td>
</tr>
<tr>
<td class="login"><?php echo ENTRY_PASSWORD; ?></td>
<td class="login"><?php echo tep_draw_password_field('password'); ?></td>
</tr>
<tr>
<td colspan="2" align="right" valign="top"><?php echo tep_image_submit('button_confirm.gif', IMAGE_BUTTON_LOGIN); ?></td>
</tr>
</table></td></tr>
</table>
</td>
</tr>
<tr>
<td valign="top" align="right"><?php echo '<a class="sub" href="' . tep_href_link(FILENAME_PASSWORD_FORGOTTEN, '', 'SSL') . '">' . TEXT_PASSWORD_FORGOTTEN . '</a><span class="sub"> </span>'; ?></td>
</tr>
</table>
</form>
</td>
</tr>
</table></td>
</tr>
<tr>
<td><?php require(DIR_WS_INCLUDES . 'footer.php'); ?></td>
</tr>
</table></td>
</tr>
</table>
</body>
</html>
after that i have another problem, which is in "Configuration" below is a screenshot:
which contribution
in General Add-Ons Support
Posted
hi, how is called a contribution which shows other prices in shop after all coustomers are logged ? And admin can change discounts in administratoin panel for manufactureres, category and others ?