簡體   English   中英

WooCommerce CSS和Checkout按鈕未在單個產品頁面中加載

[英]WooCommerce CSS And Checkout button Is Not Loading In Single Product Page

我已經在一個客戶站點中安裝了woocommerce插件,它與woocommerce不兼容,因此我進行了所有必需的配置,如下所示:

remove_action( 'woocommerce_before_main_content', 'woocommerce_output_content_wrapper', 10);
remove_action( 'woocommerce_after_main_content', 'woocommerce_output_content_wrapper_end', 10);

add_action('woocommerce_before_main_content', 'my_theme_wrapper_start', 10);
add_action('woocommerce_after_main_content', 'my_theme_wrapper_end', 10);

function my_theme_wrapper_start() {
  echo '<td id="content" class="narrowcolumn">';
}

function my_theme_wrapper_end() {
  echo '</td>';
}
add_theme_support( 'woocommerce' );

但是Woocommerce.css仍然不適用於我的產品頁面是元素,並且結帳按鈕也沒有出現。

這是頁面的鏈接:

http://www.doctor-detail.com/product/gift-card-product-2

任何幫助將非常感激!

使用開發工具檢查元素,您將遇到以下錯誤:

無法加載資源:服務器的狀態為500(內部服務器錯誤),響應為http://www.doctor-detail.com/wp-content/themes/mandingo/assets/js/frontend/add-to-cart。 min.js無法加載資源:服務器響應狀態為500(內部服務器錯誤) http://www.doctor-detail.com/wp-content/themes/mandingo/assets/js/frontend/single-product .min.js無法加載資源:服務器的響應狀態為500(內部服務器錯誤) http://www.doctor-detail.com/wp-content/themes/mandingo/assets/js/frontend/add-購物車variation.min.js

您是否忘記了將文件夾復制到您的主題?

謝謝大家的幫助,尤其是@imaginate。

我通過在主題為main文件夾中創建woocommerce.php文件解決了該問題,並將主題為page.php文件的所有內容復制到woocommerce.php中,就像在這里的文檔中提到的那樣:

http://docs.woothemes.com/document/third-party-custom-theme-compatibility/

然后我像他們說的那樣替換了循環

<?php woocommerce_content(); ?>

但是似乎文檔需要更新,因為它也不以這種方式工作,所以我這樣添加它:

<div class="woocommerce">
<?php woocommerce_content(); ?>
</div>

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM