VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: marvays on October 29, 2018, 16:50:56 PM

Title: *** 1064 *** You have an error in your SQL syntax
Post by: marvays on October 29, 2018, 16:50:56 PM
Hi all.
Last days I was migrate old eshop to newest. Now, when I link from menu to virtuemart "front page" have this error. This I se for first time.

*** 1064 *** You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ') WHERE `a`.`virtuemart_media_id` = `b`.`virtuemart_media_id`' at line 3


What is it? What i can do about it?
http://www.lukysipy.cz.hyperion.blueboard.cz/eshop

I have latest joomla and VM.
Title: Re: *** 1064 *** You have an error in your SQL syntax
Post by: GJC Web Design on October 29, 2018, 19:26:49 PM
And I assume fine with the standard template again?  So there's your answer...

I'm afraid we are not here to fix commercial templates....
Title: Re: *** 1064 *** You have an error in your SQL syntax
Post by: marvays on October 30, 2018, 05:35:40 AM
You think?
Here are the problems associated with Virtuemart. It does not matter whether it's a commercial extension or my attempt. I think it's good when I buy a commercial thing and I support the Virtuemart community. You produce and sell too :)

Now to the point.
Probably the problem is from /html/com_virtuemart/sublayouts/manufacturer-logo.php


<?php
// Check to ensure this file is included in Joomla!
defined ('_JEXEC') or die('Restricted access');

$product $viewData['product'];
//$currency = $viewData['currency'];
//$params = $viewData['params'];
$gridLayout = (isset($viewData['gridLayout'])) ? $viewData['gridLayout'] : '';

  $db JFactory::getDbo();
  $query $db->getQuery(true);
  $query
  ->select($db->quoteName('a.file_url'))
  ->from($db->quoteName('#__virtuemart_medias''a'))
  ->join('INNER'$db->quoteName('#__virtuemart_manufacturer_medias''b') . ' ON (' $db->quoteName('b.virtuemart_manufacturer_id') . ' = '$product->virtuemart_manufacturer_id[0].')')
  ->where($db->quoteName('a.virtuemart_media_id') . ' = '.$db->quoteName('b.virtuemart_media_id')); 
  $db->setQuery($query);
  $results $db->loadRow();
  ?>

  <div class="manufacturerLogoContainer">
  <a title="<?php echo $product->mf_name?>" class="hoverable" href="<?php echo JRoute::_('index.php?option=com_virtuemart&view=category&virtuemart_manufacturer_id=' $product->virtuemart_manufacturer_id[0]); ?>"><?php echo (isset($results[0])) ? '<img src="'.JURI::root () . $results [0].'" alt="'.$product->mf_name.'" />':$product->mf_name?>
  </a>
  </div>
Title: Re: *** 1064 *** You have an error in your SQL syntax
Post by: GJC Web Design on October 30, 2018, 12:11:07 PM
QuoteYou think?
Here are the problems associated with Virtuemart. It does not matter whether it's a commercial extension or my attempt. I think it's good when I buy a commercial thing and I support the Virtuemart community. You produce and sell too :)

But it does matter .. Flexible have sold you a product and by any measure if it has bugs or problems they must fix them...  as I do for all my extensions..

My point was this isn't your first post about display issues with this template ...  so it has to be asked, is the template fit for purpose?

It is clearly stated that we don't get involved in fixing 3rd party extensions..
http://forum.virtuemart.net/index.php?topic=108212.0

Flexible have a forum

to this issue .. there is no such file as sublayouts/manufacturer-logo.php in a std. VM install so it is Flexibles own creation

the error shows I assume that $product->virtuemart_manufacturer_id[0] doesn't exist
Title: Re: *** 1064 *** You have an error in your SQL syntax
Post by: marvays on October 30, 2018, 12:13:46 PM
Yes you're right.