【发布时间】:2013-12-16 18:31:19
【问题描述】:
我通过创建 woocommerce.php 并在我的 functions.php 文件中添加一个自定义函数来使我的主题与 woocommerce 兼容
add_theme_support( 'woocommerce' );
这就是我的 woocommerce.php 文件的样子:
<?php
global $mandigo_options, $dirs;
get_header();
// heading level for page title (h1, h2, div, ...)
$tag_post_title_single = $mandigo_options['heading_level_post_title_single'];
?>
<td id="content" class="<?php echo ($mandigo_options['sidebar_always_show'] ? 'narrow' : 'wide'); ?>column"<?php if (mandigo_sidebox_conditions($single = true)) { ?> rowspan="2"<?php } ?>>
<div class="woocommerce">
<?php woocommerce_content(); ?>
</div>
</td>
<?php
// if we have at least one sidebar to display
if ($mandigo_options['sidebar_always_show'] && $mandigo_options['sidebar_count']) {
if (mandigo_sidebox_conditions($single = true))
include (TEMPLATEPATH . '/sidebox.php');
include (TEMPLATEPATH . '/sidebar.php');
// if this is a 3-column layout
if ($mandigo_options['layout_width'] == 1024 && $mandigo_options['sidebar_count'] == 2)
include (TEMPLATEPATH . '/sidebar2.php');
}
get_footer();
?>
现在一切正常,但我找不到添加到购物车按钮,并且所有使用 javascript 或 jquery 的元素都没有加载。
我试过了:
使用 wordpress JQuery 更新器
将jquery库引用放到header.php中
停用所有插件
我有 woocommerce 字段中必要元素的所有字段,例如价格,但很明显这是 JS 或 JQuery 错误。
这是一个链接到该网站的产品页面:
http://www.doctor-detail.com/product/gift-card-product-2
任何帮助将不胜感激!
【问题讨论】:
标签: javascript php jquery wordpress woocommerce