VirtueMart Forum

VirtueMart 2 + 3 + 4 => Administration & Configuration => Topic started by: Midhat on June 06, 2016, 19:01:27 PM

Title: Edit Shop problem
Post by: Midhat on June 06, 2016, 19:01:27 PM
Hi,
When I try to open a link Shop in backend I get the following error:
An error has occurred.
1054 Unknown column 'u.company' in 'field list' SQL=SELECT o.*, CONCAT_WS(' ',u.first_name,u.last_name) AS order_name ,u.email as order_email, pm.payment_name AS payment_method, u.company AS company, u.city AS city, u.zip AS zip, u.phone_1 AS phone, st.address_type AS st_type, st.company AS st_company, st.city AS st_city, st.zip AS st_zip, u.customer_note AS customer_note FROM #__virtuemart_orders as o LEFT JOIN #__virtuemart_order_userinfos as u ON u.virtuemart_order_id = o.virtuemart_order_id AND u.address_type="BT" LEFT JOIN #__virtuemart_order_userinfos as st ON st.virtuemart_order_id = o.virtuemart_order_id AND st.address_type="ST" LEFT JOIN #__virtuemart_paymentmethods_en_gb as pm ON o.virtuemart_paymentmethod_id = pm.virtuemart_paymentmethod_id WHERE ( u.virtuemart_user_id = 42 AND u.virtuemart_user_id = 42 ) order by o.modified_on DESC
Return to Control Panel


I also have this Warning:
You are using single vendor mode, but it seems more than one user is set as vendor

Joomla 3.5.1
Virtuemart 3.0.16
Custom template: No
OS Linux o
PHP 5.4.45
MySQLi 10.0.20-MariaDB-cll-lve
Caching Disabled
GZip Disabled
http://stefijano.com/

Title: Re: Edit Shop problem
Post by: GJC Web Design on June 06, 2016, 20:07:04 PM
just started happening?
upgrade?
migration?
what have u changed?
tried the table updater in tools?
Title: Re: Edit Shop problem
Post by: Midhat on June 06, 2016, 20:21:09 PM
I just filled out the fields in one of the shop tabs and after save I got this error.

Are you referring to this: "Install or if necessary update tables"
Will I lose my data I entered?

Thanks,
Midhat
Title: Re: Edit Shop problem
Post by: GJC Web Design on June 06, 2016, 21:03:01 PM
this is a new install?

did u delete the company shopper field? Where are u accessing orders from then?

QuoteAre you referring to this: "Install or if necessary update tables"
Will I lose my data I entered?

this will have no effect on a new install  -- no data is lost
Title: Re: Edit Shop problem
Post by: Rasputina on November 28, 2016, 22:59:33 PM
i'm having the same problem here, could u solve it? needing help :(
Title: Re: Edit Shop problem
Post by: Studio 42 on December 01, 2016, 11:20:21 AM
Quote from: Rasputina on November 28, 2016, 22:59:33 PM
i'm having the same problem here, could u solve it? needing help :(
Go to the userfields and check if company field exist else add it.
This is the direct link to userfields  YOURSITE/administrator/index.php?option=com_virtuemart&view=userfields
Title: Re: Edit Shop problem
Post by: stawebnice on December 01, 2016, 13:53:52 PM
I saw this in some templates by templatemonster.

You need to go to database via PhpMyAdmin, and in table virtuemart_vmusers see in the column "user_is_vendor", how many users have 1: http://imtp.me/c6s402lj3 
then change 1 to 0 for user that is not vendor.

The ID will fit with the user in table _virtuemart_userinfos so you can see which seller you want to pick as vendor....

this will fix the problem with more vendors
Title: Re: Edit Shop problem
Post by: Studio 42 on December 01, 2016, 14:29:18 PM
The problem is
Quote1054 Unknown column 'u.company' in 'field list'
SO i think that my answer is right.
Title: Re: Edit Shop problem
Post by: Milbo on December 01, 2016, 22:24:42 PM
Quote from: stawebnice on December 01, 2016, 13:53:52 PM
I saw this in some templates by templatemonster.

You need to go to database via PhpMyAdmin, and in table virtuemart_vmusers see in the column "user_is_vendor", how many users have 1: http://imtp.me/c6s402lj3 
then change 1 to 0 for user that is not vendor.

The ID will fit with the user in table _virtuemart_userinfos so you can see which seller you want to pick as vendor....

this will fix the problem with more vendors

This is another problem and can most time solved automatically (in single vendor shops) by using the command for it in "update/migration", second tab. Use there "set store owner", you just need to find out the id of the shopowner (see user list).

The answer of Patrick is correct. They deleted the company from the userfields, so also from the "userinfo" and "order_userinfo". I think I should forbidd deletion of them. Maybe they should be just trashed. On the other hand, vm3.0.18.x has this fix.