News:

Looking for documentation? Take a look on our wiki

Main Menu

Migrated to VirtueMart 3.0.3: Prices not showing

Started by Mojo78, January 28, 2015, 20:49:00 PM

Previous topic - Next topic

Mojo78

Hello,
i migrated today to vm 3.0.3, and now i am getting my template to work.

Following problem:
prices arent shown in category and flypage.

Reason:
i currently use the unmodified standard-vm  sub-layouts for testing
in /sublayout/prices.php price-divs are created like this:
$currency->createPriceDiv ('basePrice', 'COM_VIRTUEMART_PRODUCT_BASEPRICE', $product->prices)

But this function simply doesnt return anything.

Perhaps s.o. has an idea, why this doesn't work?

Bye, Mojo


GJC Web Design

migrated from what?

if you echo out $product->prices what do u see?
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

Mojo78

#2
Quote from: GJC Web Design on January 28, 2015, 22:49:49 PM
migrated from what?

if you echo out $product->prices what do u see?

Thank you for your help.
I migrated from Joomla! 2.5.19; Virtuemart 2.6.0 to Joomla! 3.3.6; Virtuemart 3.0.2
Here the output from var_dump($product->prices);

array(37) {
  ["virtuemart_product_price_id"]=>
  string(4) "6271"
  ["virtuemart_product_id"]=>
  string(4) "1834"
  ["virtuemart_shoppergroup_id"]=>
  string(1) "0"
  ["product_price"]=>
  string(9) "66.261700"
  ["override"]=>
  string(1) "0"
  ["product_override_price"]=>
  string(7) "0.00000"
  ["product_tax_id"]=>
  string(1) "4"
  ["product_discount_id"]=>
  string(1) "0"
  ["product_currency"]=>
  string(2) "47"
  ["product_price_publish_up"]=>
  string(19) "0000-00-00 00:00:00"
  ["product_price_publish_down"]=>
  string(19) "0000-00-00 00:00:00"
  ["price_quantity_start"]=>
  string(1) "0"
  ["price_quantity_end"]=>
  string(1) "0"
  ["created_on"]=>
  string(19) "2013-02-02 20:20:14"
  ["created_by"]=>
  string(3) "386"
  ["modified_on"]=>
  string(19) "2013-02-02 20:20:14"
  ["modified_by"]=>
  string(3) "386"
  ["locked_on"]=>
  string(19) "0000-00-00 00:00:00"
  ["locked_by"]=>
  string(1) "0"
  ["costPrice"]=>
  float(66.2617)
  ["basePrice"]=>
  float(66.2617)
  ["basePriceVariant"]=>
  float(66.2617)
  ["basePriceWithTax"]=>
  float(71)
  ["discountedPriceWithoutTax"]=>
  float(66)
  ["priceBeforeTax"]=>
  float(66.2617)
  ["salesPrice"]=>
  float(71)
  ["taxAmount"]=>
  float(5)
  ["salesPriceWithDiscount"]=>
  float(0)
  ["salesPriceTemp"]=>
  float(71)
  ["unitPrice"]=>
  float(0)
  ["priceWithoutTax"]=>
  float(66)
  ["discountAmount"]=>
  float(0)
  ["variantModification"]=>
  float(0)
  ["DBTax"]=>
  array(0) {
  }
  ["Tax"]=>
  array(0) {
  }
  ["VatTax"]=>
  array(1) {
    [4]=>
    array(8) {
      [0]=>
      string(2) "7%"
      [1]=>
      string(6) "7.0000"
      [2]=>
      string(2) "+%"
      [3]=>
      string(1) "1"
      [4]=>
      string(2) "47"
      [5]=>
      string(0) ""
      [6]=>
      string(1) "1"
      [7]=>
      string(1) "4"
    }
  }
  ["DATax"]=>
  array(0) {
  }
}


Edit:
hmm if i look in /administrator/components/com_virtuemart/helpers/currencydisplay.php and make a var_dump($this->_priceConfig); just before the line
"      if(!empty($this->_priceConfig[$name][0])){"

the output is always empty:

array(11) {
  ["basePrice"]=>
  array(3) {
    [0]=>
    int(0)
    [1]=>
    int(0)
    [2]=>
    int(0)
  }
  ["variantModification"]=>
  array(3) {
    [0]=>
    int(0)
    [1]=>
    int(0)
    [2]=>
    int(0)
  }
  ["basePriceVariant"]=>
  array(3) {
    [0]=>
    int(0)
    [1]=>
    int(0)
    [2]=>
    int(0)
  }
  ["basePriceWithTax"]=>
  array(3) {
    [0]=>
    int(0)
    [1]=>
    int(0)
    [2]=>
    int(0)
  }
  ["discountedPriceWithoutTax"]=>
  array(3) {
    [0]=>
    int(0)
    [1]=>
    int(0)
    [2]=>
    int(0)
  }
  ["salesPrice"]=>
  array(3) {
    [0]=>
    int(0)
    [1]=>
    int(0)
    [2]=>
    int(0)
  }
  ["priceWithoutTax"]=>
  array(3) {
    [0]=>
    int(0)
    [1]=>
    int(0)
    [2]=>
    int(0)
  }
  ["salesPriceWithDiscount"]=>
  array(3) {
    [0]=>
    int(0)
    [1]=>
    int(0)
    [2]=>
    int(0)
  }
  ["discountAmount"]=>
  array(3) {
    [0]=>
    int(0)
    [1]=>
    int(0)
    [2]=>
    int(0)
  }
  ["taxAmount"]=>
  array(3) {
    [0]=>
    int(0)
    [1]=>
    int(0)
    [2]=>
    int(0)
  }
  ["unitPrice"]=>
  array(3) {
    [0]=>
    int(0)
    [1]=>
    int(0)
    [2]=>
    int(0)
  }
}


Edit:
SOLVED this problem:
in Backend -> VM -> shopper group configuration the option "Show Prices" was not checked. In all shopper groups.