Re: Credit Class & Gift Voucher
Tonio <[email protected]> 2 Aug 2003 13:35:44 -0000
| Newsgroups | gmane.comp.web.oscommerce.tips |
|---|---|
| Message-ID | <36a76a78f9fe17336065dc8d41dd8a3f@osCommerce-Forums> |
This message was sent from: Tips and Tricks
http://forums.oscommerce.com/viewtopic.php?p=206144#206144
----------------------------------------------------------------
Hello, I also run the "[b]credit_class_gv_dc_v5.05[/b]"
and it looks nice ... but I've a bug and don't know
what is to do (to change)...
The bug is when the customer place a [b]GIFT[/b] product
in the basket ... note: all other pruducts run very well!
The problem is allways only with the GIFTs when the
customer will put them in the basket!
This is the error-Warning when costumer show
the shopping_cart.php after the costumer put the
GIFT product in the basket:
In line 83 und 84
Warning: Variable passed to reset() is not an array or object in catalog/includes/modules/order_details.php on line 83
Warning: Variable passed to each() is not an array or object in catalog/includes/modules/order_details.php on line 84
This is the code of my "order_details.php":
[code]// Product options names
$attributes_exist = ((isset($products[$i]['attributes'])) ? 1 : 0);
if ($attributes_exist == 1) {
reset($products[$i]['attributes']);
while (list($option, $value) = each($products[$i]['attributes'])) {
echo '<br><small><i> - ' . $products[$i][$option]['products_options_name'] . ' ' . $products[$i][$option]['products_options_values_name'] . '</i></small>';
}
}
echo '</td>' . "\n";[/code]
also in line 105 und 106
Warning: Variable passed to reset() is not an array or object in catalog/includes/modules/order_details.php on line 105
Warning: Variable passed to each() is not an array or object in catalog/includes/modules/order_details.php on line 106
[code]// Product options prices
if ($attributes_exist == 1) {
reset($products[$i]['attributes']);
while (list($option, $value) = each($products[$i]['attributes'])) {
if ($products[$i][$option]['options_values_price'] != 0) {
if (!strstr($PHP_SELF, FILENAME_ACCOUNT_HISTORY_INFO)) {
echo '<br><small><i>' . $products[$i][$option]['price_prefix'] . $currencies->display_price($products[$i][$option]['options_values_price'], tep_get_tax_rate($products[$i]['tax_class_id']), $products[$i]['quantity']) . '</i></small>';
} else {
echo '<br><small><i>' . $products[$i][$option]['price_prefix'] . $currencies->display_price($products[$i][$option]['options_values_price'], $products[$i]['tax'], $products[$i]['quantity']) . '</i></small>';
}
} else {[/code]
Have anyone an idea? :?
This would be great :lol:
Regards, Tonio