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

need to display recent added products

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 10-02-2011, 05:28 PM
 
plnewton plnewton is offline
 

Advanced Member
  
Join Date: Sep 2011
Posts: 65
 

Default need to display recent added products

How do I go about listing ALL recent products that were added? I want to create them in a list like <a href="url to product">PRODUCT</a></br>

I am doing this on my welcome.tpl, and need to include another file to produce this, right? Someone, please help me!
__________________
Version 4.4.3
Reply With Quote
  #2  
Old 10-03-2011, 06:47 AM
  JWait's Avatar 
JWait JWait is offline
 

X-Man
  
Join Date: Nov 2005
Location: California
Posts: 2,440
 

Default Re: need to display recent added products

A lot depends on what is "recent", products added in the last month, last week, last day, last 10 minutes,

Anyway, this question has been asked a million times (well, almost). There are several threads and mods that allow you to have a page that looks like a category page but only has "recent" products. Unfortunately, I haven't found one that works properly for 4.4.x versions of x-cart. X-cart really needs to make this a module.

There is a thread at http://forum.x-cart.com/showthread.php?t=57790 that discusses the latest incarnation of this, and there are probably 3rd party mods that do the same thing as well.

That said, what you are specifically asking about should be pretty simple. You need to search the database for all products with a "add_date" that is newer than "whatever is least recent" (called for in seconds) and output a list of urls to those products. The thread mentioned above should give you some clues on this.
__________________
Two Separate X-Cart Stores
Version 4.4.4 Gold - X-AOM - Vivid Dreams Aquamarine (modified) - Linux
Mods - Newest Products - View All -, and a few others. Numerous upgrades from 4.0.x series.
Integrated with Stone Edge Order Manager + POS

Version 4.1.12 Gold (fresh install) - X-AOM - Linux
Mods - XCSEO free
Reply With Quote
  #3  
Old 10-04-2011, 09:50 PM
 
plnewton plnewton is offline
 

Advanced Member
  
Join Date: Sep 2011
Posts: 65
 

Angry Re: need to display recent added products

So, do I just need to make a custom SQL query inside index.php to allow for displaying newly added items? What would be the exact SQL code for this? Say, date added 1 year ago, and anything since then?


Is there a way to only show the last most recent 100 products, or so?


When will xcart add this feature to the software? Do you know of any specific 3rd party mods?
__________________
Version 4.4.3
Reply With Quote
  #4  
Old 10-05-2011, 04:08 AM
  JWait's Avatar 
JWait JWait is offline
 

X-Man
  
Join Date: Nov 2005
Location: California
Posts: 2,440
 

Default Re: need to display recent added products

Download the zip file in the thread at http://forum.x-cart.com/showthread.php?t=57790

It should get you started. Since all you want is a link to the new product just set up a list and include just the link to the product (probably linked to the name of the product). This should be in the products_tn.tpl file.
__________________
Two Separate X-Cart Stores
Version 4.4.4 Gold - X-AOM - Vivid Dreams Aquamarine (modified) - Linux
Mods - Newest Products - View All -, and a few others. Numerous upgrades from 4.0.x series.
Integrated with Stone Edge Order Manager + POS

Version 4.1.12 Gold (fresh install) - X-AOM - Linux
Mods - XCSEO free
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:56 PM.

   

 
X-Cart forums © 2001-2020