价格没有显示在前端virtmart上

时间:2015-02-26 07:21:01

标签: php mysql joomla3.0 virtuemart

我升级joomla和virtuemart afer upfrading joomla和virtuemart 3.0.6价格没有显示在前端,我不知道我的代码和我的virtmart配置出了什么问题。 我已将此代码粘贴到此处以显示价格。

if ($this->show_prices == '1') {

            if ($product->prices['salesPrice']<=0 and VmConfig::get ('askprice', 1) and  !$product->images[0]->file_is_downloadable) {

                echo JText::_ ('COM_VIRTUEMART_PRODUCT_ASKPRICE');
            }
            //todo add config settings
            //echo $this->showBasePrice;
            if ($this->showBasePrice) {

                echo $this->currency->createPriceDiv ('basePrice', 'COM_VIRTUEMART_PRODUCT_BASEPRICE', $product->prices);
                echo $this->currency->createPriceDiv ('basePriceVariant', 'COM_VIRTUEMART_PRODUCT_BASEPRICE_VARIANT', $product->prices);

            }
            echo $this->currency->createPriceDiv ('variantModification', 'COM_VIRTUEMART_PRODUCT_VARIANT_MOD', $product->prices);
            if (round($product->prices['basePriceWithTax'],$this->currency->_priceConfig['salesPrice'][1]) != $product->prices['salesPrice']) {

                echo '<div class="price-crossed" >' . $this->currency->createPriceDiv ('basePriceWithTax', 'COM_VIRTUEMART_PRODUCT_BASEPRICE_WITHTAX', $product->prices) . "</div>";
            }
            if (round($product->prices['salesPriceWithDiscount'],$this->currency->_priceConfig['salesPrice'][1]) != $product->prices['salesPrice']) {

                echo $this->currency->createPriceDiv ('salesPriceWithDiscount', 'COM_VIRTUEMART_PRODUCT_SALESPRICE_WITH_DISCOUNT', $product->prices);
            }
            echo $this->currency->createPriceDiv ('salesPrice', 'COM_VIRTUEMART_PRODUCT_SALESPRICE', $product->prices);
            if ($product->prices['discountedPriceWithoutTax'] != $product->prices['priceWithoutTax']) {
                echo $this->currency->createPriceDiv ('discountedPriceWithoutTax', 'COM_VIRTUEMART_PRODUCT_SALESPRICE_WITHOUT_TAX', $product->prices);
            } else {

                echo $this->currency->createPriceDiv ('priceWithoutTax', 'Price :  ', $product->prices);
            }
            echo $this->currency->createPriceDiv ('discountAmount', 'COM_VIRTUEMART_PRODUCT_DISCOUNT_AMOUNT', $product->prices);
            echo $this->currency->createPriceDiv ('taxAmount', 'COM_VIRTUEMART_PRODUCT_TAX_AMOUNT', $product->prices);
            $unitPriceDescription = JText::sprintf ('COM_VIRTUEMART_PRODUCT_UNITPRICE', $product->product_unit);
            echo $this->currency->createPriceDiv ('unitPrice', $unitPriceDescription, $product->prices);
        } ?>

请有人检查这个给我解决方案,我从这个问题完全消失

1 个答案:

答案 0 :(得分:2)

当我更新我的vm和joomla时,我也遇到了同样的问题,但经过大量搜索后我找到了解决方案并且对我有用。

我遵循了3 4个步骤。

1. you have to update your vm tables through control panel
 Go to tools and migration->DB Tools
 under DB Tools there is option for Install/update vm  tables click on it and update vm tables structure.

2. After upgrading just tables called vm shopergroups and check field **custom_price_display** set to all field **0**

我已附加图片以显示正确的字段enter image description here

你可以尝试这个我知道这会帮助你找到你的解决方案