Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

How to make product.tpl as the real first page ?

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #11  
Old 01-29-2006, 10:04 PM
  Jon's Avatar 
Jon Jon is offline
 

X-Guru
  
Join Date: Oct 2002
Location: Vancouver, Canada
Posts: 4,200
 

Default

I'm sorry, it's late at night. This one will work, I promise

Code:
$productid = func_query_first("SELECT productid from $sql_tbl[products] WHERE 1 ORDER BY productid DESC LIMIT 1"); $productid = $productid[productid];
Reply With Quote
  #12  
Old 01-29-2006, 10:11 PM
 
Chuchen Chuchen is offline
 

Advanced Member
  
Join Date: Dec 2005
Posts: 37
 

Default

This time I've got this message :

"If the page is not updated in a 5 seconds, please follow this link: continue >> INVALID SQL: 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 'WHERE 1 ORDER BY productid DESC LIMIT 1' at line 1
SQL QUERY FAILURE: SELECT productid from WHERE 1 ORDER BY productid DESC LIMIT 1


If the page is not updated in a 5 seconds, please follow this link: continue >>"

(sorry to bother you Jon )

This is the code :

Code:
define('OFFERS_DONT_SHOW_NEW',1); require "./auth.php"; $productid = func_query_first("SELECT productid from $sql_tbl[xc_products] WHERE 1 ORDER BY productid DESC LIMIT 1"); $productid = $productid[productid]; # # Put all product info into $product array #
__________________
xcart v4.1.1 [MacOS] / x-aom-4.1.1 / x-offers-4.1.1 / x-rma-4.1.1 / X-Magnifier-4.1.1 (and... happy with x-Cart !)
Reply With Quote
  #13  
Old 01-29-2006, 10:16 PM
  Jon's Avatar 
Jon Jon is offline
 

X-Guru
  
Join Date: Oct 2002
Location: Vancouver, Canada
Posts: 4,200
 

Default

Don't change this code:

Code:
$sql_tbl[products]
Reply With Quote
  #14  
Old 01-29-2006, 10:19 PM
 
Chuchen Chuchen is offline
 

Advanced Member
  
Join Date: Dec 2005
Posts: 37
 

Default

Everything works great now ! Thank you Jon !

Ah damned, there is a mistake on the top of the home.php page. I can read "If the page is not updated in a 5 seconds, please follow this link: continue >>"
__________________
xcart v4.1.1 [MacOS] / x-aom-4.1.1 / x-offers-4.1.1 / x-rma-4.1.1 / X-Magnifier-4.1.1 (and... happy with x-Cart !)
Reply With Quote
  #15  
Old 01-30-2006, 07:05 AM
  Jon's Avatar 
Jon Jon is offline
 

X-Guru
  
Join Date: Oct 2002
Location: Vancouver, Canada
Posts: 4,200
 

Default

I've tested my exact code on 4.0.x and it should not cause the problem, there must be something else going on, sorry you're on your own from here.
Reply With Quote
  #16  
Old 01-30-2006, 08:18 AM
 
Chuchen Chuchen is offline
 

Advanced Member
  
Join Date: Dec 2005
Posts: 37
 

Default

No problem Jon, I will try to see if I can do something about that. Thank you again for help
__________________
xcart v4.1.1 [MacOS] / x-aom-4.1.1 / x-offers-4.1.1 / x-rma-4.1.1 / X-Magnifier-4.1.1 (and... happy with x-Cart !)
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 01:46 PM.

   

 
X-Cart forums © 2001-2020