zen cart订单详细信息增加产品图片显示
2010-09-09 23:23 来源:www.chinab4c.com 作者:admin
zen cart订单详细信息增加产品图片显示,主要是通过zen cart模板中的includes/templates/template_default/templates/tpl_account_history_info_default.php中,以及修改order.php里面订单类function query($order_id) 来达到目的.
$img_info = $db ->Execute("select products_image from ".TABLE_PRODUCTS." where products_id = '{$orders_products->fields[products_id]}' ");
$this->products[$index] = array('qty' => $new_qty,
'id' => $orders_products->fields['products_id'],
'name' => $orders_products->fields['products_name'],
'img' => $img_info->fields['products_image'],
'model' => $orders_products->fields['products_model'],
'tax' => $orders_products->fields['products_tax'],
'price' => $orders_products->fields['products_price'],
'final_price' => $orders_products->fields['final_price'],
'onetime_charges' => $orders_products->fields['onetime_charges'],
'products_priced_by_attribute' => $orders_products->fields['products_priced_by_attribute'],
'product_is_free' => $orders_products->fields['product_is_free'],
'products_discount_type' => $orders_products->fields['products_discount_type'],
'products_discount_type_from' => $orders_products->fields['products_discount_type_from']);
里面的img就是产品图片。
在该模板includes/templates/template_default/templates/tpl_account_history_info_default.php.我们修改成以下.
echo '<a href="' . zen_href_link(zen_get_info_page( $order->products[$i][id]), 'products_id=' . $order->products[$i]['id']) . '" target="_blank">';
echo $order->products[$i]['name'];
echo "</a><br>";
echo zen_image(DIR_WS_IMAGES . $order->products[$i]['img'], $order->products[$i]['name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT);
最近更新
常用插件
- ecshop购物车功能改进[插件
ecshop购物车功能改进[插件套餐]主要是我们最近开发工作和开发项目中。...
- ecshop红包修改成满多少减
我们在长期使用ecshop的时候,我们可以发现。ecshop的红包是一个非常强...
- ecshop通用红包编码
很多时候,为了结合促销,必须扩展一下ecshop的红包功能。ecshop的红包...
- ecshop降价通知登记插件
ecshop降价通知登记插件,主要是为了方便某些客户,对商品价格要求比...
- ecshop分类树中统计商品数
最近忙于开发其他项目,在不少朋友不断要求和催促的情况下,做出了该小...