【发布时间】:2009-10-15 18:34:02
【问题描述】:
我一直试图让这个模块工作,无论我尝试了什么,我似乎都无法让它显示在“添加字段”选择框中,完整的代码在这里:
要点如下,我实现了以下钩子:
function uc_product_content_install() {
}
function uc_product_content_uninstall() {
}
function uc_product_content_enable() {
}
function uc_product_content_disable() {
}
function uc_product_content_field_info() {
}
function uc_product_content_field_settings($op, $field) {
}
function uc_product_content_field($op, &$node, $field, &$items, $teaser, $page) {
}
function uc_product_content_is_empty($item, $field) {
}
function uc_product_content_field_formatter_info() {
}
function uc_product_content_default_value(&$form, &$form_state, $field, $delta) {
}
function uc_product_content_widget(&$form, &$form_state, $field, $items, $delta = 0) {
}
【问题讨论】:
-
命名约定看起来像 ubercart 模块使用的命名约定 - 您是在使用它但它不起作用还是您自己写的?
-
我正在编写自己的模块,该模块提供了比 UC Node Checkout 提供的增强功能。该模块只允许一个产品与一个节点关联,该模块将允许通过 CCK 字段关联和选择多个产品。我正在尽我所能遵守 Ubercart 约定