我正在做一个噩梦,试图在Word电子商务中扩展管理员电子邮件。 这些报告非常基础,没有支持添加电子邮件的文档。
我希望能够将收货地址详细信息添加到管理报告中,这样我就无需每次进行销售时都登录Wordpress后端查看purchase_log。
我尝试过这里的例子http://getshopped.org/forums/topic/add-shipping-method-to-admin-email/,但没有运气。
我添加了这个:
$report = str_replace( '%shipping_country%', $purchase_log['shipping_country'], $report );
$report = str_replace( '%billing_country%', $purchase_log['billing_country'], $report );
$report = str_replace( '%shipping_country%', $purchase_log['shipping_country'], $report );
$report = str_replace( '%buyer_name%', wpsc_display_purchlog_buyers_name(), $report );
$report = str_replace( '%shipping_address%', wpsc_display_purchlog_shipping_address(), $report );
$report = str_replace( '%shipping_city%', wpsc_display_purchlog_shipping_city(), $report );
$report = str_replace( '%shipping_country%', wpsc_display_purchlog_shipping_country(), $report );
到此(最初在wpsc_transaction_results_functions.php中)
$report = apply_filters( 'wpsc_transaction_result_report', $report );
$report = str_replace( '%purchase_id%', $report_id, $report );
$report = str_replace( '%product_list%', $report_product_list, $report );
$report = str_replace( '%total_tax%', $total_tax, $report );
$report = str_replace( '%total_shipping%', $total_shipping_email, $report );
等...
但在输入信用卡详细信息后出现以下错误 - 是否有人知道添加到报告中的简单方法? 干杯球员
答案 0 :(得分:2)
我知道自打开以来已经有一段时间了,但我找到了解决方法。它有点乱,但它确实有效。
就在上面代码wpsc-transaction_results_functions.php
中的过滤器上方,我创建了一个如下所示的数据库查询:
$cust_info = $wpdb->get_results("SELECT * FROM wp_wpsc_submited_form_data WHERE log_id = '$log_id'", ARRAY_A);
然后我发现数组结果的哪些部分是我需要的信息,我这样做是通过添加:
echo '<pre>';
print_r ($cust_info);
echo '</pre>';
然后,我接通了订单,数组出现在交易结果屏幕上。所以我然后设置变量......
$first_name = $cust_info[0]['value'];
$last_name = $cust_info[1]['value'];
$address_1 = $cust_info[2]['value'];
$city = $cust_info[3]['value'];
然后我创建了短代码,即
$message = str_replace( '%first_name%', $first_name, $message );
不要忘记删除print_r ($cust_info);
等。
答案 1 :(得分:1)
在寻找类似问题时找到这篇文章...
我建议使用wpsc的商店样式插件。
http://haet.at/wp-ecommerce-shop-styling