Author Topic: Joomla 2.5.7 / Virtuemart 2.0.12f anonymous user price not showing in front-end  (Read 76701 times)

enoon

  • Beginner
  • *
  • Posts: 32
Hi,

I have the latest versions to date:

Joomla 2.5.7
Virtuemart 2.0.12f

Problem is that the prices in the front-end are not showing up.

  • Configuration Price is set to enabled.
  • Products are associated with -anonymous- and -default- shopper groups, they also have the pricing enabled.
  • I'm not customizing the View files for this theme
  • For logged in users the prices are shown.

Is it a bug in the latest version (I just did an update) or are there any other configurations that I'm missing?

SOLUTION:
Go to your sql editor and run:
Code: [Select]
UPDATE `[prefix]_virtuemart_product_prices` SET `virtuemart_shoppergroup_id`=NULL WHERE 1

And product prices will show up for the front-end anonymous user.

gpessoa

  • Jr. Member
  • **
  • Posts: 129
same here! :'(

lipes

  • Full Member
  • ***
  • Posts: 720
Yep is true is not displaying the price in front end.
Can  you enter in the Admin Product area?
I am with problems with that too..
VM V. online: J2.5.14 | VM 2.0.20a | SQL 5.1.70 | PHP 5.3.25

lipes

  • Full Member
  • ***
  • Posts: 720
I see that it's a problem in product.php
but the file it's very different from verison B..
VM V. online: J2.5.14 | VM 2.0.20a | SQL 5.1.70 | PHP 5.3.25

bytelord

  • Nikos
  • Global Moderator
  • Full Member
  • *
  • Posts: 2369
Working for me, Check a little bit more your configuration, maybe something changed on the configuration during the update.

Regards
Production: Joomla 2.5.8 | VM 2.0.14 | PHP 5.3.13
Testing     : Joomla 2.5.8 | VM 2.0.16 | PHP 5.3.8
Testing     : Joomla 2.5.8 |    VM 2.1   | PHP 5.3.8

- Don't Forget to mark thread as solved when it is solved!
- Please do not PM with support questions, use the forum!

enoon

  • Beginner
  • *
  • Posts: 32
@bytelord What else do you think I'm missing? What configurations/options?

jenkinhill

  • UK Web Developer & Consultant
  • Global Moderator
  • Super Hero
  • *
  • Posts: 27595
  • Always on vacation
    • Jenkin Hill Internet
OK for me, too. All pricing options selected for my test installation, no overrides.
Kelvyn

Jenkin Hill Internet,
Lowestoft, Suffolk, UK

Unsolicited PMs/emails will be ignored.

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

Currently using VM 3.6.10.10211 on Joomla 3.9.13 PHP 7.0.33

enoon

  • Beginner
  • *
  • Posts: 32
@jenkinhill For you too is working?

John2400

  • Virtuemart - the Future is ever Changing
  • Global Moderator
  • Full Member
  • *
  • Posts: 1568
  • VirtueMart Version: Use VM3.0.12
Hi for me ,

On one site works OK , the other has no pricing at all. I only have the default user (group Blank)

I'm still working my way through the differences. Both sites had all the same updates. ?

notdan

  • Beginner
  • *
  • Posts: 13
hi, just had the same problem, vm was updated to 2.0.12f, no prices were displayed for anonymous ones anymore. i entered a new product (which was displayed as it should, for anonymous and logged-in users), and there was a difference in sql:

found out that in sql, vm_shoppergroup_id was set to 2 for all the old products instead of null (the new one). changed it and all prices were displayed again.

John2400

  • Virtuemart - the Future is ever Changing
  • Global Moderator
  • Full Member
  • *
  • Posts: 1568
  • VirtueMart Version: Use VM3.0.12
For me ,

I set the shopper group and changed it several times to different groups. For the test product shovel.

No matter what I set - it always displayed this - I have updated 2.0.12f again just to make sure.

notdan: Thanks I added a product a new one and yes that individual product displayed the product price correctly.

[attachment cleanup by admin]

enoon

  • Beginner
  • *
  • Posts: 32
I've deleted all the records from virtuemart_product_shoppergroups and added all the products to both shopper groups -default & -anonymous- also the debug shows mes this, which to me at least lokks right, still the price for guest user is not displaying:

Code: [Select]
(
    [virtuemart_shoppergroup_id] => 2
    [virtuemart_vendor_id] => 1
    [shopper_group_name] => -anonymous-
    [shopper_group_desc] => Shopper group for anonymous shoppers
    [custom_price_display] => 1
    [price_display] => O:10:"JParameter":5:{s:7:"*_raw";s:757:"show_prices=1
basePrice=1
basePriceText=1
basePriceRounding=2
variantModification=1
variantModificationText=1
variantModificationRounding=2
basePriceVariant=1
basePriceVariantText=1
basePriceVariantRounding=2
basePriceWithTax=1
basePriceWithTaxText=1
basePriceWithTaxRounding=2
basePriceWithTax=1
basePriceWithTaxText=1
basePriceWithTaxRounding=2
discountedPriceWithoutTax=1
discountedPriceWithoutTaxText=1
discountedPriceWithoutTaxRounding=2
salesPrice=1
salesPriceText=1
salesPriceRounding=2
priceWithoutTax=1
priceWithoutTaxText=1
priceWithoutTaxRounding=2
salesPriceWithDiscount=1
salesPriceWithDiscountText=1
salesPriceWithDiscountRounding=2
discountAmount=1
discountAmountText=1
discountAmountRounding=2
taxAmount=1
taxAmountText=1
taxAmountRounding=2";s:7:"*_xml";N;s:12:"*_elements";a:0:{}s:15:"*_elementPath";a:1:{i:0;s:65:"/home/ntgshop/public_html/libraries/joomla/html/parameter/element";}s:7:"*data";O:8:"stdClass":31:{s:11:"show_prices";i:1;s:9:"basePrice";i:1;s:13:"basePriceText";i:1;s:17:"basePriceRounding";i:2;s:19:"variantModification";i:1;s:23:"variantModificationText";i:1;s:27:"variantModificationRounding";i:2;s:16:"basePriceVariant";i:1;s:20:"basePriceVariantText";i:1;s:24:"basePriceVariantRounding";i:2;s:16:"basePriceWithTax";i:1;s:20:"basePriceWithTaxText";i:1;s:24:"basePriceWithTaxRounding";i:2;s:25:"discountedPriceWithoutTax";i:1;s:29:"discountedPriceWithoutTaxText";i:1;s:33:"discountedPriceWithoutTaxRounding";i:2;s:10:"salesPrice";i:1;s:14:"salesPriceText";i:1;s:18:"salesPriceRounding";i:2;s:15:"priceWithoutTax";i:1;s:19:"priceWithoutTaxText";i:1;s:23:"priceWithoutTaxRounding";i:2;s:22:"salesPriceWithDiscount";i:1;s:26:"salesPriceWithDiscountText";i:1;s:30:"salesPriceWithDiscountRounding";i:2;s:14:"discountAmount";i:1;s:18:"discountAmountText";i:1;s:22:"discountAmountRounding";i:2;s:9:"taxAmount";i:1;s:13:"taxAmountText";i:1;s:17:"taxAmountRounding";i:2;}}
    [default] => 2
    [ordering] => 0
    [shared] => 1
    [published] => 1
    [created_on] => 0000-00-00 00:00:00
    [created_by] => 0
    [modified_on] => 2012-10-22 19:13:50
    [modified_by] => 42
    [locked_on] => 0000-00-00 00:00:00
    [locked_by] => 0
)


enoon

  • Beginner
  • *
  • Posts: 32
@notdan Thank you! Your solution works!

cezaryk

  • Beginner
  • *
  • Posts: 1
Hi!
There are two fields changed in "f" version:

***** install_org.sql
  `product_currency` smallint(1),
  `product_price_publish_up` datetime,
  `product_price_publish_down` datetime,
  `price_quantity_start` int(11) unsigned,
***** INSTALL.SQL
  `product_currency` smallint(1),
  `product_price_vdate` datetime,
  `product_price_edate` datetime,
  `price_quantity_start` int(11) unsigned,
*****

And they are used in .../models/product
Code: [Select]
if($front){
if(count($virtuemart_shoppergroup_ids)>0){
$q .= ' AND (';
foreach($virtuemart_shoppergroup_ids as $sgrpId){
$q .= ' `virtuemart_shoppergroup_id` ="'.$sgrpId.'" AND ';
}
$q = substr($q,0,-4);
$q .= ' OR `virtuemart_shoppergroup_id` IS NULL OR `virtuemart_shoppergroup_id`="0") ';
}
$q .= ' AND ( (`product_price_publish_up` IS NULL OR `product_price_publish_up` = "' . $db->getEscaped($this->_nullDate) . '" OR `product_price_publish_up` <= "' .$db->getEscaped($this->_now) . '" )
        AND (`product_price_publish_down` IS NULL OR `product_price_publish_down` = "' .$db->getEscaped($this->_nullDate) . '" OR product_price_publish_down >= "' . $db->getEscaped($this->_now) . '" ) )';
}

Hope it helps  ;)
Best Regards
Cezar

lipes

  • Full Member
  • ***
  • Posts: 720
No overrides and configuration is ok..  :-\
it's better wait for a next release this is not "so normal".
VM V. online: J2.5.14 | VM 2.0.20a | SQL 5.1.70 | PHP 5.3.25