这里有没有oscommerce的高手啊!有一个问题想问一下你们! 在oscommerce中有一些页面的form中的连到本页面后面加左个参数如:action=update_product这样,但是在本页面中找不到这个参数。例子:我想知道它连到那里去了。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 例子的图片看不到,我现在给原程序你们看。如下<?php/* $Id: shopping_cart.php,v 1.73 2003/06/09 23:03:56 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"); require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_SHOPPING_CART); $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_SHOPPING_CART));?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><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 //--><table border="0" width="710" cellspacing="0" cellpadding="0" bgcolor="#FFFFFF" style="padding-bottom:3px; "> <tr> <td align="center"><!-- body //--><table border="0" width="710" cellspacing="0" cellpadding="0"> <tr> <!-- body_text //--> <td width="100%" valign="top" style="padding:0px 4px; "><?php echo tep_draw_form('cart_quantity', tep_href_link(FILENAME_SHOPPING_CART, 'action=update_product')); ?>就是找不到红色字的那个 includes/application_top.switch($action){ case 'update_product'} 这个我倒是知道,但是现在我的老板让我把quantity(回车后同时改变price的值)的功能在NEW_PRODUCTS里面实现,不知道怎么样编写和嫁接了,现在我把两部分的代码放上来,请高手指教,SHOPPING_CART.PHP关于quantity的功能的代码如下:<?php echo tep_draw_form('cart_quantity', tep_href_link(FILENAME_SHOPPING_CART, 'action=update_product')); ?> <?php $any_out_of_stock = 0; $products = $cart->get_products(); for ($i=0, $n=sizeof($products); $i<$n; $i++) { if (isset($products[$i]['attributes']) && is_array($products[$i]['attributes'])) { while (list($option, $value) = each($products[$i]['attributes'])) { echo tep_draw_hidden_field('id[' . $products[$i]['id'] . '][' . $option . ']', $value); $attributes = tep_db_query("select popt.products_options_name, poval.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_OPTIONS_VALUES . " poval, " . TABLE_PRODUCTS_ATTRIBUTES . " pa where pa.products_id = '" . (int)$products[$i]['id'] . "' and pa.options_values_id = poval.products_options_values_id"); } } } for ($i=0, $n=sizeof($products); $i<$n; $i++) { if (($i/2) == floor($i/2)) { $info_box_contents[] = array('params' => 'class="productListing-even"'); } else { $info_box_contents[] = array('params' => 'class="productListing-odd"'); } $cur_row = sizeof($info_box_contents) - 1; if (STOCK_CHECK == 'true') { $stock_check = tep_check_stock($products[$i]['id'], $products[$i]['quantity']); if (tep_not_null($stock_check)) { $any_out_of_stock = 1; $products_name .= $stock_check; } } if (isset($products[$i]['attributes']) && is_array($products[$i]['attributes'])) { reset($products[$i]['attributes']); while (list($option, $value) = each($products[$i]['attributes'])) { $products_name .= '<br><small><i> - ' . $products[$i][$option]['products_options_name'] . ' ' . $products[$i][$option]['products_options_values_name'] . '</i></small>'; } } $info_box_contents[$cur_row][] = array('align' => 'center', 'params' => 'class="productListing-data" valign="top"', 'text' => tep_draw_input_field('cart_quantity[]', $products[$i]['quantity'], 'size="4"') . tep_draw_hidden_field('products_id[]', $products[$i]['id'])); $info_box_contents[$cur_row][] = array('align' => 'right', 'params' => 'class="productListing-data" valign="top"','text' => '<b>' . $currencies->display_price($products[$i]['final_price'], tep_get_tax_rate($products[$i]['tax_class_id']), $products[$i]['quantity']) . '</b>'); } new productListingBox($info_box_contents); ?> APACHE代理IIS,不含WWW的会自动解析到第一个虚拟主机站 艰难的Linux之路 PHP中使用pdflib如何支持中文呢? 各位请看看这是用什么加密的!! php新手做的 登录验证,大家来评评是否安全~ 急!!!谁来帮忙调调js省市二级联动代码?以下代码可以分别在火狐和IE里运行,但是在IE中兼容性不好,谁来帮忙改改啊? 那位好心大哥帮帮忙啊。。。在线等啊?? PHPExcel如何将单元格格式设置为邮政编码格式 oci_fetch_all执行速度很慢的问题,有没有人遇到过 dede后台的系统基本参数出错 网站上的搜索系统 智能分词系统,如google.cn效果? 关于域名注册
<?php
/*
$Id: shopping_cart.php,v 1.73 2003/06/09 23:03:56 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"); require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_SHOPPING_CART); $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_SHOPPING_CART));
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<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 //-->
<table border="0" width="710" cellspacing="0" cellpadding="0" bgcolor="#FFFFFF" style="padding-bottom:3px; ">
<tr>
<td align="center">
<!-- body //-->
<table border="0" width="710" cellspacing="0" cellpadding="0">
<tr>
<!-- body_text //-->
<td width="100%" valign="top" style="padding:0px 4px; "><?php echo tep_draw_form('cart_quantity', tep_href_link(FILENAME_SHOPPING_CART, 'action=update_product')); ?>
就是找不到红色字的那个
{
case 'update_product'
}
<?php echo tep_draw_form('cart_quantity', tep_href_link(FILENAME_SHOPPING_CART, 'action=update_product')); ?>
<?php
$any_out_of_stock = 0;
$products = $cart->get_products();
for ($i=0, $n=sizeof($products); $i<$n; $i++) {
if (isset($products[$i]['attributes']) && is_array($products[$i]['attributes'])) {
while (list($option, $value) = each($products[$i]['attributes'])) {
echo tep_draw_hidden_field('id[' . $products[$i]['id'] . '][' . $option . ']', $value);
$attributes = tep_db_query("select popt.products_options_name, poval.products_options_values_name, pa.options_values_price, pa.price_prefix
from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_OPTIONS_VALUES . " poval, " . TABLE_PRODUCTS_ATTRIBUTES . " pa
where pa.products_id = '" . (int)$products[$i]['id'] . "'
and pa.options_values_id = poval.products_options_values_id");
}
}
} for ($i=0, $n=sizeof($products); $i<$n; $i++) {
if (($i/2) == floor($i/2)) {
$info_box_contents[] = array('params' => 'class="productListing-even"');
} else {
$info_box_contents[] = array('params' => 'class="productListing-odd"');
} $cur_row = sizeof($info_box_contents) - 1; if (STOCK_CHECK == 'true') {
$stock_check = tep_check_stock($products[$i]['id'], $products[$i]['quantity']);
if (tep_not_null($stock_check)) {
$any_out_of_stock = 1; $products_name .= $stock_check;
}
} if (isset($products[$i]['attributes']) && is_array($products[$i]['attributes'])) {
reset($products[$i]['attributes']);
while (list($option, $value) = each($products[$i]['attributes'])) {
$products_name .= '<br><small><i> - ' . $products[$i][$option]['products_options_name'] . ' '
. $products[$i][$option]['products_options_values_name'] . '</i></small>';
}
}
$info_box_contents[$cur_row][] = array('align' => 'center',
'params' => 'class="productListing-data" valign="top"',
'text' => tep_draw_input_field('cart_quantity[]', $products[$i]['quantity'], 'size="4"')
. tep_draw_hidden_field('products_id[]', $products[$i]['id']));
$info_box_contents[$cur_row][] = array('align' => 'right',
'params' => 'class="productListing-data" valign="top"',
'text' => '<b>' . $currencies->display_price($products[$i]['final_price'],
tep_get_tax_rate($products[$i]['tax_class_id']), $products[$i]['quantity']) . '</b>');
}
new productListingBox($info_box_contents);
?>