Magento Bundle Product 於 JavaScript 控制台顯示錯誤

You are here:
< All Topics

使用 Ultimo,在 JavaScript 控制台中 Bundle Product 會出現兩個錯誤訊息

media/js/opti-frontend-base-default-js-bundle.js:10 Uncaught ReferenceError: taxCalcMethod is not defined

dainichi-fw-5616l-set.html:15 Uncaught TypeError: Cannot read property ‘reloadPrice’ of undefined

如果組合產品內容有多種選項,會無法正常顯示價格(也就是價格會顯示為 0 )


vim /usr/share/nginx/html/app/design/frontend/ultimo/default/template/bundle/catalog/product/view/type/bundle.phtml

<script type="text/javascript">
 var skipTierPricePercentUpdate = true;
 var bundle = new Product.Bundle(<?php echo $this->getJsonConfig() ?>);


 var taxCalcMethod = "<?php echo Mage::helper('tax')->getConfig()->getAlgorithm($_product->getStore()) ?>";
 var CACL_UNIT_BASE = "<?php echo Mage_Tax_Model_Calculation::CALC_UNIT_BASE ?>";
 var CACL_ROW_BASE = "<?php echo Mage_Tax_Model_Calculation::CALC_ROW_BASE ?>";
 var CACL_TOTAL_BASE = "<?php echo Mage_Tax_Model_Calculation::CALC_TOTAL_BASE ?>";

重新清除 OPCache 後就可以解決了


Previous Magento API Integration Calling Parameter Do Not Match Signature
Next Magento system log 中出現: Warning: simplexml_load_string(): Entity: line 151: parser error
Table of Contents