CRE Loaded Community



Board index » CRE Loaded 6.2 » Bug Issues

All times are UTC - 5 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Attibutes name not showing in ivoice or packing slip.
PostPosted: Tue Mar 17, 2009 4:35 pm 
Offline
CRE Newbie
User avatar

Joined: Tue Mar 17, 2009 4:24 pm
Posts: 1
Location: USA
When I go to print an invoice or packing slip, the attributes of the pruducts purchased are there but the attibutes name is missing. Example:
should display:
Color: red
Size: 6
What I get is:
-: red
-: 6
It shows up under the "edit order status" and "Edit order" screens but not the invoice or packing slip.
Does anyone know of a fix for this. I'm just told it's a bug and it will be fixed in a future patch.
Thanks!

_________________
RV


Top
 Profile  
 
 Post subject: Re: Attibutes name not showing in ivoice or packing slip.
PostPosted: Tue Sep 22, 2009 12:43 pm 
Offline
CRE Newbie

Joined: Sun Sep 20, 2009 8:48 am
Posts: 7
Same problem have been searching like mad to find a solution... someone?


Top
 Profile  
 
 Post subject: Re: Attibutes name not showing in ivoice or packing slip.
PostPosted: Tue Sep 22, 2009 3:16 pm 
Offline
CRE Newbie

Joined: Sun Sep 20, 2009 8:48 am
Posts: 7
Solved in invoice.php ... se next post for packaging slip :)))
However i am NOT a CRE developer. But it works fine.

My version: CRE loaded 6.3.3
Remember to backup your files before doing anything!


Replace all of the code in your catalog/admin/invoice.php to this:

<?php
/*
$Id: invoice.php,v 1.2 2004/03/13 15:09:11 ccwjr Exp $

osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com

Copyright (c) 2002 osCommerce

Released under the GNU General Public License
*/

require('includes/application_top.php');
$order_id = (isset($_GET['order_id']) ? $_GET['order_id'] : '');
//$customer_number_query = tep_db_query("select customers_id from " . TABLE_ORDERS . " where orders_id = '". tep_db_input(tep_db_prepare_input($_GET['order_id'])) . "'");
$customer_number_query = tep_db_query("select customers_id from " . TABLE_ORDERS . " where orders_id = '". tep_db_input(tep_db_prepare_input($order_id)) . "'");
$customer_number = tep_db_fetch_array($customer_number_query);
/*
if ($customer_number['customers_id'] != $customer_id) {
tep_redirect(tep_href_link(FILENAME_ACCOUNT_HISTORY, '', 'SSL'));
}
*/
// $payment_info_query = tep_db_query("select payment_info from " . TABLE_ORDERS . " where orders_id = '". tep_db_input(tep_db_prepare_input($_GET['order_id'])) . "'");
$payment_info_query = tep_db_query("select payment_info from " . TABLE_ORDERS . " where orders_id = '". tep_db_input(tep_db_prepare_input($order_id)) . "'");
$payment_info = tep_db_fetch_array($payment_info_query);
$payment_info = $payment_info['payment_info'];

require(DIR_WS_CLASSES . 'currencies.php');
$currencies = new currencies();

$oID = tep_db_prepare_input($_GET['oID']);
$orders_query = tep_db_query("select orders_id from " . TABLE_ORDERS . " where orders_id = '" . tep_db_input($oID) . "'");

include(DIR_WS_CLASSES . 'order.php');
$order = new order($oID);

?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html <?php echo HTML_PARAMS; ?>>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
<title><?php echo TITLE . ' - ' . TITLE_PRINT_ORDER . $oID; ?></title>
<script type="text/javascript" src="includes/prototype.js"></script>
<link rel="stylesheet" type="text/css" href="includes/print.css">
</head>
<body marginwidth="10" marginheight="10" topmargin="10" bottommargin="10" leftmargin="10" rightmargin="10">


<!-- body_text //-->
<table width="600" border="0" align="center" cellpadding="2" cellspacing="0">
<tr>
<td align="center" class="main"><table align="center" width="100%" border="0" cellspacing="0" cellpadding="5">
<tr>
<td valign="top" align="left" class="main"><script language="JavaScript">
if (window.print) {
document.write('<a href="javascript:;" onClick="javascript:window.print()" onMouseOut=document.imprim.src="<?php echo (DIR_WS_IMAGES . 'printimage.gif'); ?>" onMouseOver=document.imprim.src="<?php echo (DIR_WS_IMAGES . 'printimage_over.gif'); ?>"><img src="<?php echo (DIR_WS_IMAGES . 'printimage.gif'); ?>" width="43" height="28" align="absbottom" border="0" name="imprim">' + '<?php echo IMAGE_BUTTON_PRINT; ?></a></center>');
}
else document.write ('<h2><?php echo IMAGE_BUTTON_PRINT; ?></h2>')
</script></td>
<td align="right" valign="bottom" class="main"><p align="right" class="main"><a href="javascript:window.close();"><img src='images/close_window.jpg' border=0></a></p></td>
</tr>
</table></td>
</tr>
<tr align="left">
<td class="titleHeading"><?php echo tep_draw_separator('pixel_trans.gif', '1', '25'); ?></td>
</tr>
<tr>
<td><table border="0" align="center" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td><table border="0" align="center" width="75%" cellspacing="0" cellpadding="0">
<tr>
<td class="pageHeading"><?php echo nl2br(STORE_NAME_ADDRESS); ?></td>
<td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . STORE_LOGO, STORE_NAME); ?></td>
</tr>
<tr>
<td colspan="2" align="center" class="titleHeading"><b><?php echo TITLE_PRINT_ORDER . $oID; ?></b></td>
</tr>
<tr align="left">
<td colspan="2" class="titleHeading"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<tr>
<td align="left" class="main"><table width="100%" border="0" cellspacing="0" cellpadding="2">
<tr>
<td class="main"><?php echo '<b>' . ENTRY_PAYMENT_METHOD . '</b> ' . $order->info['payment_method']; ?></td>
</tr>
<tr>
<td class="main"><?php echo $payment_info; ?></td>
</tr>
</table></td>
</tr>
<tr>
<td class="main"><?php echo '<b>' . ENTRY_DATE_PURCHASED . '</b> ' . $order->info['date_purchased']; ?></td>
</tr>
<tr>
<td align="center"><table align="center" width="100%" border="0" cellspacing="0" cellpadding="2">
<tr>
<td align="center" valign="top"><table align="center" width="100%" border="0" cellspacing="0" cellpadding="1" bgcolor=#000000>
<tr>
<td align="center" valign="top"><table align="center" width="100%" border="0" cellspacing="0" cellpadding="2">
<tr class="dataTableHeadingRow">
<td class="dataTableHeadingContent"><b><?php echo ENTRY_SOLD_TO; ?></b></td>
</tr>
<tr class="dataTableRow">
<td class="dataTableContent"><?php echo tep_address_format($order->customer['format_id'], $order->customer, 1, '&nbsp;', '<br>'); ?></td>

</tr>
</table></td>
</tr>
</table></td>
<td align="center" valign="top"><table align="center" width="100%" border="0" cellspacing="0" cellpadding="1" bgcolor=#000000>
<tr>
<td align="center" valign="top"><table align="center" width="100%" border="0" cellspacing="0" cellpadding="2">
<tr class="dataTableHeadingRow">
<td class="dataTableHeadingContent"><b><?php echo ENTRY_SHIP_TO; ?></b></td>
</tr>
<tr class="dataTableRow">
<td class="dataTableContent"><?php echo tep_address_format($order->delivery['format_id'], $order->delivery, 1, '&nbsp;', '<br>'); ?></td>
</tr>
</table></td>
</tr>
</table></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="1" bgcolor=#000000>
<tr>
<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
<tr class="dataTableHeadingRow">
<td class="dataTableHeadingContent" colspan="2"><?php echo TABLE_HEADING_PRODUCTS; ?></td>
<td class="dataTableHeadingContent"><?php echo TABLE_HEADING_PRODUCTS_MODEL; ?></td>
<td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_TAX; ?></td>
<td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_PRICE_EXCLUDING_TAX; ?></td>
<td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_PRICE_INCLUDING_TAX; ?></td>
<td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_TOTAL_EXCLUDING_TAX; ?></td>
<td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_TOTAL_INCLUDING_TAX; ?></td>
</tr>

<?php
for ($i=0, $n=sizeof($order->products); $i<$n; $i++) {
echo ' <tr class="dataTableRow">' . "\n" .
' <td class="dataTableContent" valign="top" align="right">' . $order->products[$i]['qty'] . '&nbsp;x</td>' . "\n" .
' <td class="dataTableContent" 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>&nbsp;<i> - ' . ($order->products[$i]['attributes'][$j]['option'] == '' ? $order->products[$i]['attributes'][$j]['option_name'] : $order->products[$i]['attributes'][$j]['option']) . ': ' . $order->products[$i]['attributes'][$j]['value'];
if ($order->products[$i]['attributes'][$j]['price'] != '0') echo ' (' . $order->products[$i]['attributes'][$j]['prefix'] . $currencies->format($order->products[$i]['attributes'][$j]['price'] * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value']) . ')';
echo '</i></small></nobr>';
}
}

echo ' </td>' . "\n" .
' <td class="dataTableContent" valign="top">' . $order->products[$i]['model'] . '</td>' . "\n" .
' <td class="dataTableContent" align="right" valign="top">' . tep_display_tax_value($order->products[$i]['tax']) . '%</td>' . "\n" .
' <td class="dataTableContent" align="right" valign="top"><b>' . $currencies->format($order->products[$i]['final_price'], true, $order->info['currency'], $order->info['currency_value']) . '</b></td>' . "\n" .
' <td class="dataTableContent" align="right" valign="top"><b>' . $currencies->format(tep_add_tax($order->products[$i]['final_price'], $order->products[$i]['tax'], true), true, $order->info['currency'], $order->info['currency_value']) . '</b></td>' . "\n" .
' <td class="dataTableContent" align="right" valign="top"><b>' . $currencies->format($order->products[$i]['final_price'] * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value']) . '</b></td>' . "\n" .
' <td class="dataTableContent" align="right" valign="top"><b>' . $currencies->format(tep_add_tax($order->products[$i]['final_price'], $order->products[$i]['tax'], true) * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value']) . '</b></td>' . "\n";
echo ' </tr>' . "\n";
}
?>
</table></td>
</tr>
</table></td>
</tr>
<tr>
<td align="right" colspan="7"><table border="0" cellspacing="0" cellpadding="2">
<tr>
<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
<?php
for ($i = 0, $n = sizeof($order->totals); $i < $n; $i++) {
echo ' <tr>' . "\n" .
' <td align="right" class="smallText">' . $order->totals[$i]['title'] . '</td>' . "\n" .
' <td align="right" class="smallText">' . $order->totals[$i]['text'] . '</td>' . "\n" .
' </tr>' . "\n";
}
?>
</table></td>
</tr>
</table></td>
</tr>
</table>
<!-- body_text_eof //-->
</body>
</html>
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>


Top
 Profile  
 
 Post subject: Re: Attibutes name not showing in ivoice or packing slip.
PostPosted: Tue Sep 22, 2009 3:18 pm 
Offline
CRE Newbie

Joined: Sun Sep 20, 2009 8:48 am
Posts: 7
Solved in packingslip.php
However i am NOT a CRE developer. But it works fine.

My version: CRE loaded 6.3.3
Remember to backup your files before doing anything!


Replace all of the code in your catalog/admin/packingslip.php to this:


<?php
/*
$Id: packingslip.php,v 1.2 2004/03/13 15:09:11 ccwjr Exp $

osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com

Copyright (c) 2002 osCommerce

Released under the GNU General Public License
*/

require('includes/application_top.php');

require(DIR_WS_CLASSES . 'currencies.php');
$currencies = new currencies();

$oID = tep_db_prepare_input($_GET['oID']);
$orders_query = tep_db_query("select orders_id from " . TABLE_ORDERS . " where orders_id = '" . tep_db_input($oID) . "'");

include(DIR_WS_CLASSES . 'order.php');
$order = new order($oID);
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html <?php echo HTML_PARAMS; ?>>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
<title><?php echo TITLE . ' - ' . TITLE_PRINT_ORDER . ' #' . $_GET['order_id']; ?></title>
<script type="text/javascript" src="includes/prototype.js"></script>
<link rel="stylesheet" type="text/css" href="includes/print.css">
</head>
<body marginwidth="10" marginheight="10" topmargin="10" bottommargin="10" leftmargin="10" rightmargin="10">

<!-- body_text //-->
<table border="0" width="100%" cellspacing="0" cellpadding="2">
<tr>
<td align="center" class="main"><table align="center" width="100%" border="0" cellspacing="0" cellpadding="5">
<tr>
<td valign="top" align="left" class="main"><script language="JavaScript">
if (window.print) {
document.write('<a href="javascript:;" onClick="javascript:window.print()" onMouseOut=document.imprim.src="<?php echo (DIR_WS_IMAGES . 'printimage.gif'); ?>" onMouseOver=document.imprim.src="<?php echo (DIR_WS_IMAGES . 'printimage_over.gif'); ?>"><img src="<?php echo (DIR_WS_IMAGES . 'printimage.gif'); ?>" width="43" height="28" align="absbottom" border="0" name="imprim">' + '<?php echo IMAGE_BUTTON_PRINT; ?></a></center>');
}
else document.write ('<h2><?php echo IMAGE_BUTTON_PRINT; ?></h2>')
</script></td>
<td align="right" valign="bottom" class="main"><p align="right" class="main"><a href="javascript:window.close();"><img src='images/close_window.jpg' border=0></a></p></td>
</tr>
</table></td>
</tr>
<tr align="left">
<td class="titleHeading"><?php echo tep_draw_separator('pixel_trans.gif', '1', '15'); ?></td>
</tr>
<tr>
<td><table border="0" align="center" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td><table border="0" align="center" width="75%" cellspacing="0" cellpadding="0">
<tr>
<td class="pageHeading"><?php echo nl2br(STORE_NAME_ADDRESS); ?></td>
<td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . STORE_LOGO, STORE_NAME); ?></td>
</tr>
<tr>
<td colspan="2" align="center" class="titleHeading"><b><?php echo 'Order#' . $_GET['oID']; ?></b></td>
</tr>
<tr align="left">
<td colspan="2" class="titleHeading"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<tr>
<td class="dataTableContent"><?php echo '<b>' . ENTRY_DATE_PURCHASED . '</b> ' . $order->info['date_purchased']; ?></td>
</tr>
<tr>
<td align="center"><table align="center" width="100%" border="0" cellspacing="0" cellpadding="2">
<tr>
<td align="center" valign="top"><table align="center" width="100%" border="0" cellspacing="0" cellpadding="1" bgcolor=#000000>
<tr>
<td align="center" valign="top"><table align="center" width="100%" border="0" cellspacing="0" cellpadding="2">
<tr class="dataTableHeadingRow">
<td class="dataTableHeadingContent"><b><?php echo ENTRY_SOLD_TO; ?></b></td>
</tr>
<tr class="dataTableRow">
<td class="dataTableContent"><?php echo tep_address_format($order->customer['format_id'], $order->customer, 1, '&nbsp;', '<br>'); ?></td>
</tr>
<tr class="dataTableRow">
<td class="dataTableContent"><?php echo tep_draw_separator('pixel_trans.gif', '1', '5'); ?></td>
</tr>
<tr class="dataTableRow">
<td class="dataTableContent"><?php echo '&nbsp;<b>Telephone#</b>' . '<br>&nbsp;' . $order->customer['telephone']; ?></td>
</tr>
<tr class="dataTableRow">
<td class="dataTableContent"><?php echo '&nbsp;<b>eMail Address:</b>' . '<br>&nbsp;' . $order->customer['email_address']; ?></td>
</tr>
</table></td>
</tr>
</table></td>
<td align="center" valign="top"><table align="center" width="100%" border="0" cellspacing="0" cellpadding="1" bgcolor=#000000>
<tr>
<td align="center" valign="top"><table align="center" width="100%" border="0" cellspacing="0" cellpadding="2">
<tr class="dataTableHeadingRow">
<td class="dataTableHeadingContent"><b><?php echo ENTRY_SHIP_TO; ?></b></td>
</tr>
<tr class="dataTableRow">
<td class="dataTableContent"><?php echo tep_address_format($order->delivery['format_id'], $order->delivery, 1, '&nbsp;', '<br>'); ?></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<tr>
<td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
</tr>
<tr>
<td><table border="0" cellspacing="0" cellpadding="2">
<tr>
<td class="dataTableHeadingContent"><b><?php echo ENTRY_PAYMENT_METHOD; ?></b></td>
<td class="dataTableContent"><?php echo $order->info['payment_method']; ?></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="1" bgcolor=#000000>
<tr>
<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
<tr class="dataTableHeadingRow">
<td class="dataTableHeadingContent" colspan="2"><?php echo TABLE_HEADING_PRODUCTS; ?></td>
<td class="dataTableHeadingContent"><?php echo TABLE_HEADING_PRODUCTS_MODEL; ?></td>
</tr>

<?php
for ($i=0, $n=sizeof($order->products); $i<$n; $i++) {
echo ' <tr class="dataTableRow">' . "\n" .
' <td class="dataTableContent" valign="top" align="right">' . $order->products[$i]['qty'] . '&nbsp;x</td>' . "\n" .
' <td class="dataTableContent" 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>&nbsp;<i> - ' . ($order->products[$i]['attributes'][$j]['option'] == '' ? $order->products[$i]['attributes'][$j]['option_name'] : $order->products[$i]['attributes'][$j]['option']) . ': ' . $order->products[$i]['attributes'][$j]['value'];
if ($order->products[$i]['attributes'][$j]['price'] != '0') echo ' (' . $order->products[$i]['attributes'][$j]['prefix'] . $currencies->format($order->products[$i]['attributes'][$j]['price'] * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value']) . ')';
echo '</i></small></nobr>';
}
}

echo ' </td>' . "\n" .
' <td class="dataTableContent" valign="top">' . $order->products[$i]['model'] . '</td>' . "\n" .
'' . "\n";
}
?>

</table></td>
</tr>
</table></td>
</tr>
</table>
<!-- body_text_eof //-->
<br>
</body>
</html>
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

Board index » CRE Loaded 6.2 » Bug Issues

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
It is currently Fri Jul 30, 2010 12:02 pm
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group

Login

Top Listing

1. Credit Card with CCV
    Category: Payment Modules
    
2. CC7333_ATS
    Category: Templates
    
3. Points & Rewards PLUS!...
    Category: Add-Ons
    
4. One Page Checkout...
    Category: Fixes
    
5. Configuration Server...
    Category: Fixes
    
Show more...

Follow Us on Twitter

@likeOMGitsFEDAY we do offer a wiki and other resources at www.creloaded.org
@smellgoodslady 6.2 is old code, we are at 6.4 now. come and get the latest.
@smellgoodslady what version/release are you running?
CRE Secure in the news: Payment News Article about Hosted Payment Pages reducing PCI friction - http://is.gd/ba0CH
@smellgoodslady yes it should work for 6.2 as well. let me know of you have any issues.

CRE Loaded Community Chat hosted by CRE Loaded.

Join now


Chat about what's on your mind. More about public chats.


© CRE Loaded is a product of Chain Reaction Ecommerce, Inc. Usage & Privacy Policy