Joomla 2.5.7 / Virtuemart 2.0.12f anonymous user price not showing in front-end

Started by enoon, October 22, 2012, 21:26:01 PM

Previous topic - Next topic

patrik60

Prices are shown when I make just an update. But when I either reset all tables and replace them with sample data or when I make a fresh install (after deleting all tables) and install sample data I get the following errors:

Installer::install: /home/******/public_html/virtuemart/administrator/components/com_virtuemart/install/install_sample_data.sql SQL Fehler DB-Funktion mit Fehlercode 1054 fehlgeschlagen!
Unknown column 'product_price_vdate' in 'field list' SQL=-- -- Dumping data for table `v3idw_virtuemart_product_prices` -- INSERT INTO `v3idw_virtuemart_product_prices` (`virtuemart_product_price_id`, `virtuemart_product_id`, `product_price`, `override`, `product_override_price`, `product_tax_id`, `product_discount_id`, `product_currency`, `product_price_vdate`, `product_price_edate`, `virtuemart_shoppergroup_id`, `price_quantity_start`, `price_quantity_end`) VALUES (1, 5, '24.99000', 0, '0.00000', NULL, NULL, '144', 0, 0, NULL, 0, 0), (2, 1, '4.49000', 0, '0.00000', NULL, NULL, '144', 0, 0, NULL, 0, 0), (3, 2, '39.99000', 0, '0.00000', NULL, NULL, '144', 0, 0, NULL, 0, 0), (4, 3, '24.99000', 0, '0.00000', NULL, NULL, '144', 0, 0, NULL, 0, 0), (5, 4, '17.99000', 1, '77.00000', NULL, NULL, '144', 0, 0, NULL, 0, 0), (6, 6, '4.99000', 0, '0.00000', NULL, NULL, '144', 0, 0, NULL, 0, 0), (7, 7, '149.99000', 0, '0.00000', NULL, NULL, '144', 0, 0, NULL, 0, 0), (8, 8, '220.90000', 0, '0.00000', NULL, NULL, '144', 0, 0, NULL, 0, 0), (9, 9, '48.12000', 0, '0.00000', NULL, NULL, '144', 0, 0, NULL, 0, 0), (10, 10, '74.99000', 0, '0.00000', NULL, NULL, '144', 0, 0, NULL, 0, 0), (11, 11, '2.99000', 0, '0.00000', NULL, NULL, '144', 0, 0, NULL, 0, 0), (12, 12, '14.99000', 0, '0.00000', NULL, NULL, '144', 0, 0, NULL, 0, 0), (13, 13, '79.99000', 0, '0.00000', NULL, NULL, '144', 0, 0, NULL, 0, 0), (14, 14, '49.99000', 0, '0.00000', NULL, NULL, '144', 0, 0, NULL, 0, 0), (15, 15, '59.99000', 0, '0.00000', NULL, NULL, '144', 0, 0, NULL, 0, 0), (16, 16, '3.99000', 0, '0.00000', NULL, NULL, '144', 0, 0, NULL, 0, 0);
SQL =

--
-- Dumping data for table `#__virtuemart_product_prices`
--

INSERT INTO `#__virtuemart_product_prices` (`virtuemart_product_price_id`, `virtuemart_product_id`, `product_price`, `override`, `product_override_price`, `product_tax_id`, `product_discount_id`, `product_currency`, `product_price_vdate`, `product_price_edate`, `virtuemart_shoppergroup_id`, `price_quantity_start`, `price_quantity_end`) VALUES
(1, 5, '24.99000', 0, '0.00000', NULL, NULL, '144', 0, 0,  NULL, 0, 0),
(2, 1, '4.49000', 0, '0.00000', NULL, NULL, '144', 0, 0, NULL, 0, 0),
(3, 2, '39.99000', 0, '0.00000', NULL, NULL, '144', 0, 0, NULL, 0, 0),
(4, 3, '24.99000', 0, '0.00000', NULL, NULL, '144', 0, 0, NULL, 0, 0),
(5, 4, '17.99000', 1, '77.00000', NULL, NULL, '144', 0, 0, NULL, 0, 0),
(6, 6, '4.99000', 0, '0.00000', NULL, NULL, '144', 0, 0, NULL, 0, 0),
(7, 7, '149.99000', 0, '0.00000', NULL, NULL, '144', 0, 0, NULL, 0, 0),
(8, 8, '220.90000', 0, '0.00000', NULL, NULL, '144', 0, 0, NULL, 0, 0),
(9, 9, '48.12000', 0, '0.00000', NULL, NULL, '144', 0, 0, NULL, 0, 0),
(10, 10, '74.99000', 0, '0.00000', NULL, NULL, '144', 0, 0, NULL, 0, 0),
(11, 11, '2.99000', 0, '0.00000', NULL, NULL, '144', 0, 0, NULL, 0, 0),
(12, 12, '14.99000', 0, '0.00000', NULL, NULL, '144', 0, 0, NULL, 0, 0),
(13, 13, '79.99000', 0, '0.00000', NULL, NULL, '144', 0, 0, NULL, 0, 0),
(14, 14, '49.99000', 0, '0.00000', NULL, NULL, '144', 0, 0, NULL, 0, 0),
(15, 15, '59.99000', 0, '0.00000', NULL, NULL, '144', 0, 0, NULL, 0, 0),
(16, 16, '3.99000', 0, '0.00000', NULL, NULL, '144', 0, 0, NULL, 0, 0);

vmError: Problems execution of SQL File /home/******/public_html/virtuemart/administrator/components/com_virtuemart/install/install_sample_data.sql


Prices are no longer shown in the FE.

Going back to 2.0.12e and reset and replace again all tables with sample data, prices are shown again. Please check these sql errors.

enoon

A simple SQL script fixes the issue!

Please read the solution in the first post I made!

Cheers!

maspegren

Hey notdan can you run me through how you did this?

Quote from: notdan on October 23, 2012, 13:25:12 PM
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.

enoon


UPDATE `[prefix]_virtuemart_product_prices` SET `virtuemart_shoppergroup_id`=NULL WHERE 1

TeleEnte

Re: Joomla 2.5.7 / Virtuemart 2.0.12f price gets not stored whne adding new products.

I cannot save the price of the products anymore. What happens????

TeleEnte

Re: Joomla 2.5.7 / Virtuemart 2.0.12f cannot save prices in backend!

Please HELP!!!

teucg

What claimed to be
The Solution:
Go to your sql editor and run:

UPDATE `[prefix]_virtuemart_product_prices` SET `virtuemart_shoppergroup_id`=NULL WHERE 1


Is making everything show up that was hidden for the Anonymous user, except for the price...

The actual price is still not showing up

This ISSUE is not solved

enoon

@teucg It worked for my situation. If this did not solve your problem please open another thread describing the versions you are using and your current configuration.

grevaeg

Quote from: notdan on October 23, 2012, 13:25:12 PM
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.

Hey guys, whats the table name? cant happen to find it in sql =(

Can someone post a screenshot of correct table and settings? kinda new to this.

Thanks in advance!

TeleEnte

I even cannot save prices in backend nor store images via upload since the last updates! I really have the feeling each update is a hugh step backwards.

2.0.12d : everything was fine for my understanding
2.0.12e : image upload did not work anymore. Had to upload via ftp
2.0.12f : images upload STILL doesnt work anymore PLUS cannot save prices anymore. WHAT THE HELL is this????

Why you offer an update, if its a step back in really importan function???? Who is testing the updates? Why nobody answers to this treat? Why I CANNOT OPEN A NEW TREAT????

I am getting really nervous. How can I sell if I cannot save prices???

sagepos

I set the shopper_id to null as suggested in the previous post, however, I still have the same problem.  When I login, I have prices.  When I don't login, I only have some prices, not all.
shopper_id is set to null for all my items.  What is still missing?  Is there something besides the shopper_id issue that I missed?

Globacide Solutions

Hello,

After thorough investigation on this issue (which applies to ALL 2.0.12f installations), here are our findings:

In 2.0.12f they have changed two field names, in the #__virtuemart_product_prices table:

product_price_vdate -> to product_price_publish_up
product_price_edate -> to product_price_publish_down

There seem to be two issues arising from this:

1. Installing the sample data fails (this happens on every installation)

The reason behind this issue is that, although they've updated the installation SQL, and all the files using those fields, to use the new names, the VM team forgot to also update the sample data SQL file with the new field names. Thus, executing the SQL fails.

To fix this, you need to do the following:

Extract the com_virtuemart.2.0.12f_extract_first.zip package.
Extract the com_virtuemart.2.0.12f.zip package, found inside.

Edit the following files:
install/install_sample_data.sql
administrator/components/com_virtuemart/install/install_sample_data.sql

Find line 258 that reads:
INSERT INTO `#__virtuemart_product_prices` (`virtuemart_product_price_id`, `virtuemart_product_id`, `product_price`, `override`, `product_override_price`, `product_tax_id`, `product_discount_id`, `product_currency`, `product_price_vdate`, `product_price_edate`, `virtuemart_shoppergroup_id`, `price_quantity_start`, `price_quantity_end`) VALUES

AND change it to:
INSERT INTO `#__virtuemart_product_prices` (`virtuemart_product_price_id`, `virtuemart_product_id`, `product_price`, `override`, `product_override_price`, `product_tax_id`, `product_discount_id`, `product_currency`, `product_price_publish_up`, `product_price_publish_down`, `virtuemart_shoppergroup_id`, `price_quantity_start`, `price_quantity_end`) VALUES

Please note that this needs to be done on both files.

You can then simply re-pack the unpacked folder as zip, and re-install as usual.

You can also get the already fixed package here.

Please also note that if the Install Sample Data button does not appear after installation, you might need to do the following:
VirtueMart -> Configuration -> Enable database update tools -> Save
VirtueMart -> Tools -> Tools & Migration -> Reset all tables and install sample data

2. Product prices are not displaying any more (happens occasionally)

The reason is that, although the installation/update script tries to alter the corresponding table, and update the field name to their new values (product_price_publish_up and product_price_publish_down), sometimes it might fail, due to MySQL permissions, or some other reasons, and VirtueMart's new code can not identify these product price fields correctly.

To fix this, you need to use a database manager, such as phpMyAdmin, and manually rename the fields.

So, you would need to follow these steps:

- go to cPanel -> Databases -> phpMyAdmin
- select the database of your VirtueMart site, from the top-left drop-down list
- from the table list, on the left side, click on the [prefix]_virtuemart_product_prices table (where [prefix] is your specific Joomla! site prefix)
- click on the Structure tab
- check the checkboxes corresponding to the fields product_price_vdate and product_price_edate
- click on the Change link, below the fields list
- on the Column row, change the field values as following: publish_price_vdate to product_price_publish_up, and product_price_edate to product_price_publish_down
- click Save

Hope this helps someone!
Emilian Manolache
Globacide Solutions
VirtueMart Affiliate

simpsoncraig25

Im not sure this fixed the issue either!

my prices dont show, and ive already installed update, wasnt sure i could sdo again.... ive checked out the table fields as you have described and they are already named correctly but do have a field type as date time....

i changed these to decimal and still no luck!!!!


i need prices please...

regards craig

simpsoncraig25

found fix and as "NOTDAN" said

""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.""

login in to ur sql editor and edit vm_shoppergroup_id to null.

cheers!

myopicseer

Having updated on my pci compliant host to vm 2.0.12f from the prior version, I lost all pricing (except when logged in to the frontend as admin, of course, and I can see all prices).

Compared my old (non pci compliant host) database value to my new pci compliant host's database (both sites are vm 2.0.12.f) and there is a difference in the value here:

tableprefix_virtuemart_shoppergroups (table) -> price_display (field):

Original Non PCI Hosting Account Value is "NULL"
New PCI Hosting Account with a different Host (Penguin Hosting) is a hyperlink value that I cannot edit, "[BLOB 1.9 KiB]".  If I click it, it wants to download a filetype .bin

So I dropped all entire table, and exported my shoppergroups table from the other dababase that had "NULL" as their price_display field values.  Still no prices showing in the frontend.  I then clicked the shopper group configuration in the backend of VM, and ticked to customize and to show all prices fro both of my existing shopper groups (anonymous and default) and saved.  Still no prices displaying, BUT, the field value in the respective shopper groups in the database set back to "[BLOB 1.9 KiB]" after saving. 

Have two days to launch this project ecom site, and now the client is wondering why their prices all of sudden won't show, and so am I.  No answers.

SIDE NOTE:

My #_virtuemart_product_prices were renamed correctly in my database when I upgraded, because I do have the fields:
'product_price_publish_up`and `product_price_publish_down`