Author Topic: Cart Error: 1064 You have an error in your SQL syntax;  (Read 754 times)

snstfd

  • Beginner
  • *
  • Posts: 10
Cart Error: 1064 You have an error in your SQL syntax;
« on: August 31, 2016, 17:37:45 pm »
In the checkout at the top of the page is a save button. I'm not even sure why it is there but when I hit it, it produces the following error:

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 '' at line 3 SQL=SELECT mf_name FROM #__virtuemart_manufacturers_en_gb WHERE virtuemart_manufacturer_id =

I have included the screenshot of the button.

I'm not sure if this is relevant but we have store locations set up as manufacturers so they can pick which store they are ordering from. Those locations do not appear in the pull down menu shown under "cart" in the attachment. The main name of the store which is also our company name does appear. 


Joomla version, 3.6.2.
VirtueMart 3.0.16




GJC Web Design

  • 3rd party VirtueMart Developer
  • Hero Member
  • *
  • Posts: 7441
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 2.6.22 & 3.2.2
Re: Cart Error: 1064 You have an error in your SQL syntax;
« Reply #1 on: August 31, 2016, 17:58:43 pm »
rule 1!!!

don't test ANYTHING front end as an administrator!
GJC Web Design
VirtueMart and Joomla Developers - php developers http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 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
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

snstfd

  • Beginner
  • *
  • Posts: 10
Re: Cart Error: 1064 You have an error in your SQL syntax;
« Reply #2 on: August 31, 2016, 18:05:22 pm »
I am not sure that applies. I tested in several browsers which I do not use to log in to the CMS so I don't think that would apply but it's a good rule I will keep in mind.

You should be able to reproduce the error here:

dev.sunsetfoods.com/cart

or www.sunsetfoods.com/cart

GJC Web Design

  • 3rd party VirtueMart Developer
  • Hero Member
  • *
  • Posts: 7441
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 2.6.22 & 3.2.2
Re: Cart Error: 1064 You have an error in your SQL syntax;
« Reply #3 on: August 31, 2016, 18:14:23 pm »
is this multi vendor????

afaik this is

// This displays the form to change the current shopper
   if ($this->allowChangeShopper){
      echo $this->loadTemplate ('shopperform');
   }

and set in admin by

Allow Administrators to change the current Shopper   

so should only show for admins


GJC Web Design
VirtueMart and Joomla Developers - php developers http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 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
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

snstfd

  • Beginner
  • *
  • Posts: 10
Re: Cart Error: 1064 You have an error in your SQL syntax;
« Reply #4 on: August 31, 2016, 18:21:23 pm »
Thank you for your follow up. I have attached a screenshot of what is selected in the back-end.

Enable Multi-vendor: administrated multi-vendor
Multi-vendor cart handling: Selectable by user

Are those the correct settings?


GJC Web Design

  • 3rd party VirtueMart Developer
  • Hero Member
  • *
  • Posts: 7441
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 2.6.22 & 3.2.2
Re: Cart Error: 1064 You have an error in your SQL syntax;
« Reply #5 on: August 31, 2016, 19:19:19 pm »
GJC Web Design
VirtueMart and Joomla Developers - php developers http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 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
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

snstfd

  • Beginner
  • *
  • Posts: 10
Re: Cart Error: 1064 You have an error in your SQL syntax;
« Reply #6 on: August 31, 2016, 23:16:35 pm »
This is a SQL Syntax error - not VM

GJC Web Design

  • 3rd party VirtueMart Developer
  • Hero Member
  • *
  • Posts: 7441
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 2.6.22 & 3.2.2
Re: Cart Error: 1064 You have an error in your SQL syntax;
« Reply #7 on: September 01, 2016, 00:29:10 am »
I agree.. but my question is why is this form shown to non admins?

I have never seen it on my installs
GJC Web Design
VirtueMart and Joomla Developers - php developers http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 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
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 8986
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: Cart Error: 1064 You have an error in your SQL syntax;
« Reply #8 on: September 01, 2016, 19:13:16 pm »
rule 1!!!

don't test ANYTHING front end as an administrator!

Of course, you should test as guest, registered and also administrator.

snstfd, the multivendor setup looks correct. Can you copy paste the sql error?
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

GJC Web Design

  • 3rd party VirtueMart Developer
  • Hero Member
  • *
  • Posts: 7441
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 2.6.22 & 3.2.2
Re: Cart Error: 1064 You have an error in your SQL syntax;
« Reply #9 on: September 01, 2016, 19:16:40 pm »
Quote
don't test ANYTHING front end as an administrator!

I meant when testing your shop as a user..  have seen this so many times by clients asking why they see different elements and options from std. and the reason is they are using their super admin login as a normal shopper on the FE
Of course use admin IF u want to test as an admin
GJC Web Design
VirtueMart and Joomla Developers - php developers http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 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
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

sgrunch

  • Beginner
  • *
  • Posts: 6
  • A beginner
Re: Cart Error: 1064 You have an error in your SQL syntax;
« Reply #10 on: May 17, 2017, 17:22:32 pm »
same problem after update to 3.22 with J 3.71 product detail page:
'ASC FROM `#__virtuemart_products` as p INNER JOIN `#__virtuemart_products_it



Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 8986
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: Cart Error: 1064 You have an error in your SQL syntax;
« Reply #11 on: May 17, 2017, 17:46:10 pm »
That is the neighboured product function, please read here http://forum.virtuemart.net/index.php?topic=137501.msg481450#msg481450
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/