News:

Looking for documentation? Take a look on our wiki

Main Menu

Shoppers list is missing

Started by CindyW, February 29, 2020, 23:23:41 PM

Previous topic - Next topic

CindyW

When I click on "Orders and Shoppers" v 3.6.10, there are no shoppers listed and this is the error message I get:

1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '==0 ) GROUP BY ju.id ORDER BY ju.id DESC LIMIT 0, 30' at line 10

How can I fix this?

jjk

I happened to get the same error message yesterday after deleting a user (vendor) and added a new one.
You can try to change line 1634 in ...\administrator\components\com_virtuemart\models\user.php from
$whereAnd[] = ' vmu.user_is_vendor==0  ';
to
$whereAnd[] = ' vmu.user_is_vendor=0  ';

Make a backup first in case something goes wrong in your case.

The change should be included in the next VM release.
Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations

CindyW

Where is ...\administrator\components\com_virtuemart\models\user.php ?

Jörgen

This is the URL for the file from Your Joomla root directory on Your website. If You do not understand this You are better of getting help from someone who is familiar with Your website or is used to managing a PHP based website.

If You have for example CPANEL on your website You can edit the file, but if You haven´t done such things before, You should hire someone to help You out with this.

Jörgen @ Kreativ Fotografi
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

CindyW

This is lines 1630 through 1642      

1630                $whereAnd = array();
1631               if(VmConfig::get('multixcart',0)!='none' and $vendorId>1){
1632           $joinedTables .= ' LEFT JOIN #__virtuemart_vendor_users AS vu ON ju.id = vu.virtuemart_user_id';
1633                  $whereAnd[] = ' vu.virtuemart_vendor_user_id = '.$vendorId.' ';
1634            }
1635
1636              if(VmConfig::get('multixcart',0)!='none' and vmAccess::manager('managevendors')){
1637
1638            if ($this->searchTable=='vendors') {
1639            $whereAnd[] = ' vmu.virtuemart_vendor_id > 1 or (vmu.user_is_vendor>0 and vmu.virtuemart_vendor_id != "1")  ';
1640      } else if ($this->searchTable=='shoppers') {
1641            $whereAnd[] = ' vmu.user_is_vendor==0  ';
1642      }

Are you talking about line 1641?


Jörgen

I would guess so, search for the pattern and see if it exists in more places. Otherwise this should be it.

Jörgen @ Kreativ Fotografi
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

GJC Web Design

Yes -- its just a typo

should be

$whereAnd[] = ' vmu.user_is_vendor=0  ';
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