Results 1 to 8 of 8
  1. #1
    Join Date
    Nov 2005
    Location
    Rochester, New York
    Posts
    165
    Plugin Contributions
    0

    Default Search error in search box

    I am getting this message when typing in a key word:

    Advanced Search
    1064 You have an error in your SQL syntax near ' p.products_quantity , m.manufacturers_id, p.products_id, pd.products_name, p.p' at line 1
    in:
    [SELECT DISTINCT , p.products_quantity , m.manufacturers_id, p.products_id, pd.products_name, p.products_price, p.products_tax_class_id, p.products_price_sorter FROM products p LEFT JOIN manufacturers m USING(manufacturers_id), products_description pd, categories c, products_to_categories p2c LEFT JOIN meta_tags_products_description mtpd ON mtpd.products_id= p2c.products_id AND mtpd.language_id = 1 WHERE p.products_status = 1 AND p.products_id = pd.products_id AND pd.language_id = 1 AND p.products_id = p2c.products_id AND p2c.categories_id = c.categories_id AND ((pd.products_name LIKE '%lawyer%' OR p.products_model LIKE '%lawyer%' OR m.manufacturers_name LIKE '%lawyer%' OR (mtpd.metatags_keywords LIKE '%lawyer%' AND mtpd.metatags_keywords !='') OR (mtpd.metatags_description LIKE '%lawyer%' AND mtpd.metatags_description !='') OR pd.products_description LIKE '%lawyer%') ) order by pd.products_name limit 0, 10]

    The version of zen cart is the most recent and current, it is a Unix server and the URL is http://alltalktease.com/catalog/

  2. #2
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Search error in search box

    What specific version of Zen Cart are you running?
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  3. #3
    Join Date
    Nov 2005
    Location
    Rochester, New York
    Posts
    165
    Plugin Contributions
    0

    Default Re: Search error in search box

    The version is 1.3.0.2

  4. #4
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Search error in search box

    Sounds like you missed a file ...

    What version Zen Cart were you?

    How did you upgrade?

    Do you see around line 170 - 174 in /includes/modules/pages/index/main_template_vars.php on the server ...
    PHP Code:
      // always add quantity regardless of whether or not it is in the listing for add to cart buttons
      
    if (PRODUCT_LIST_QUANTITY 1) {
        
    $select_column_list .= 'p.products_quantity, ';
      } 
    What settings do you have for the Configuration ... Product Listing ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  5. #5
    Join Date
    Feb 2006
    Location
    Chicago
    Posts
    1,162
    Plugin Contributions
    0

    Default Re: Search error in search box

    Quote Originally Posted by sparktronic
    I am getting this message when typing in a key word:

    Advanced Search
    1064 You have an error in your SQL syntax near ' p.products_quantity , m.manufacturers_id, p.products_id, pd.products_name, p.p' at line 1
    in:
    [SELECT DISTINCT , p.products_quantity , m.manufacturers_id, p.products_id, pd.products_name, p.products_price, p.products_tax_class_id, p.products_price_sorter FROM products p LEFT JOIN manufacturers m USING(manufacturers_id), products_description pd, categories c, products_to_categories p2c LEFT JOIN meta_tags_products_description mtpd ON mtpd.products_id= p2c.products_id AND mtpd.language_id = 1 WHERE p.products_status = 1 AND p.products_id = pd.products_id AND pd.language_id = 1 AND p.products_id = p2c.products_id AND p2c.categories_id = c.categories_id AND ((pd.products_name LIKE '%lawyer%' OR p.products_model LIKE '%lawyer%' OR m.manufacturers_name LIKE '%lawyer%' OR (mtpd.metatags_keywords LIKE '%lawyer%' AND mtpd.metatags_keywords !='') OR (mtpd.metatags_description LIKE '%lawyer%' AND mtpd.metatags_description !='') OR pd.products_description LIKE '%lawyer%') ) order by pd.products_name limit 0, 10]

    The version of zen cart is the most recent and current, it is a Unix server and the URL is http://alltalktease.com/catalog/
    Can you paste the corresponding file here?
    Tutorials on Zen Cart
    http://tutorials.zen-cart.com/index.php
    ---------------
    advanced.programmer at gmail dot com
    In love with Zen Cart!!

  6. #6
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Search error in search box

    Also in the /includes/modules/pages/advanced_search_results/header_php.php around line 185 - 192 do you see:
    PHP Code:
    // always add quantity regardless of whether or not it is in the listing for add to cart buttons
    if (PRODUCT_LIST_QUANTITY 1) {
      if (empty(
    $select_column_list)) {
        
    $select_column_list .= ' p.products_quantity ';
      } else  {
        
    $select_column_list .= ', p.products_quantity ';
      }

    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  7. #7
    Join Date
    Nov 2005
    Location
    Rochester, New York
    Posts
    165
    Plugin Contributions
    0

    Default Re: Search error in search box

    I took the two files you suggested off another catalog that the search was working and now the search works fine. Thanks for your help and speed in getting back to me.

  8. #8
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Search error in search box

    Thanks for the update that you just had some files out of date ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

 

 

Similar Threads

  1. Provide a page of search terms linked to search box?
    By Emily1972 in forum General Questions
    Replies: 3
    Last Post: 5 Jun 2012, 09:08 PM
  2. Linking search function to custom CSS search box
    By seeinteriors in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 1 Jun 2012, 10:52 PM
  3. Delete default search text in search box when clicked
    By jaylyns in forum General Questions
    Replies: 7
    Last Post: 15 Apr 2011, 06:03 AM
  4. top search text box and search button not vertically aligned
    By HeyIts007 in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 16 Oct 2010, 05:29 AM
  5. Search Box only searches products - can it search EZpages?
    By uiserloh in forum General Questions
    Replies: 1
    Last Post: 29 Jan 2008, 06:56 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg