价格未显示在前端virtuemart

price not showing on front end virtuemart

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

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);
        } ?>

请任何人检查这个给我解决方案我完全摆脱了这个问题

我在更新虚拟机和 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**

我附上了显示正确字段的图片

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