Author Topic: Default Storefront homepage disappears after mod  (Read 11502 times)

Offline intrapac

  • Newbie
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Default Storefront homepage disappears after mod
« on: October 01, 2012, 10:53:47 PM »
Hi,

I added a couple of fields in the product.tpl view and controller and then added a couple of storefront language changes to match. 

After uploading the files to a test web server, they work fine on the product page, but the home page for the store now throws an error that refers to the error logs.

Rolling the files back to the base files produces the same error.  Clearing the cache and turning it off makes no change.  I was just wondering if there is a security integrity problem or if I need to dig deeper into database references within the .tpl files.  In short, is there a best practice process for moving .tpl files into a new installation?

The db error is below:

database error:  Error: 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 ')
                     AND customer_group_id = '8'
                     AND ((date_start = '0000-00-00' OR d' at line 3<br />Error No: 1064<br />SELECT product_id, price
               FROM ac_product_specials
               WHERE product_id IN ()
                     AND customer_group_id = '8'
                     AND ((date_start = '0000-00-00' OR date_start < NOW())
                     AND (date_end = '0000-00-00' OR date_end > NOW()))
               ORDER BY product_id ASC, priority ASC, price ASC in <b>/var/www/market/core/database/mysql.php</b> on line <b>86</b>


Offline abantecart

  • Administrator
  • Hero Member
  • *****
  • Posts: 4359
  • Karma: +298/-10
    • View Profile
    • Ideal Open Source Ecommerce Solution
Re: Default Storefront homepage disappears after mod
« Reply #1 on: October 03, 2012, 08:32:34 AM »
There is a problem in your SQL statement.

 
Code: [Select]
WHERE product_id IN ()
also, count the braces.
Please  rate your experience or leave your review
We need your help to build better free open source ecommerce platform for everyone. See how you can help

Offline Nimitz1061

  • Full Member
  • ***
  • Posts: 190
  • Karma: +22/-0
  • No matter where you go, there you are...
    • View Profile
Re: Default Storefront homepage disappears after mod
« Reply #2 on: October 03, 2012, 10:48:37 AM »
Perhaps more significant is this:

Code: [Select]
AND ((date_start = '0000-00-00' OR d' at line 3<br />Error No: 1064<br />SELECT product_id, price
Note the MySQL error 1064 , which may indicate that a previous query failed..


Offline intrapac

  • Newbie
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Re: Default Storefront homepage disappears after mod
« Reply #3 on: October 03, 2012, 07:18:11 PM »
Thank you!  I should probably add that I have no product specials setup at all within the storefront and that I haven't played with the SQL at all- which leads me to appreciate the second reply more as I too have seen other queries that fail causing unrelated messages.  I was just hoping it was a known problem that occurs and triggers the same error message every time. 

Offline Nimitz1061

  • Full Member
  • ***
  • Posts: 190
  • Karma: +22/-0
  • No matter where you go, there you are...
    • View Profile
Re: Default Storefront homepage disappears after mod
« Reply #4 on: October 04, 2012, 08:38:18 AM »
In your shoes, my next step would be making sure that the entire code set was uploaded.

I don't know for a fact that that query would have occurred in a missing file - but I don't discount the possibility..

David

 

Powered by SMFPacks Social Login Mod