X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (https://forum.x-cart.com/forumdisplay.php?f=20)
-   -   Newest Products (https://forum.x-cart.com/showthread.php?t=1084)

yages 07-25-2007 12:04 PM

Re: Newest Products
 
Deleted second mod from my site

The first mod (zip file) works Ok but does not show product short description and standard sale price / actual sale price

vulcan-works 07-31-2007 10:00 AM

Re: Newest Products
 
PHP Code:

#
# $Id: newest.php 2007/07/22 $
#
// set variables
$daterange 7776000// 60 * 60 * 24 * 90 days in unix time
$nowtime time();
$oldtime $nowtime $daterange ;
 
# Get new products data and store it into $newproducts array
#
if ( !defined('XCART_START') ) { header("Location: home.php"); die("Access denied"); }
#
# Select from products table
#
$user_account['membershipid'] = !empty($user_account['membershipid'])?$user_account['membershipid']:0;
$old_search_data $search_data["products"];
$old_mode $mode;
$old_page $page;
$search_data["products"] = array();
$search_data["products"]["forsale"] = "Y";
$search_data["products"]["avail"] = "> 0";
$search_data["products"]["add_date"] = "> " $oldtime "";
$search_data["products"]["add_date"] = "< " $nowtime "";
$search_data["products"]["sort_condition"] = "$sql_tbl[products].add_date DESC";
$REQUEST_METHOD "GET";
$mode "search";
include 
$xcart_dir."/include/search.php";
$search_data["products"] = $old_search_data;
x_session_save("search_data");
$mode $old_mode;
$page $old_page;
unset(
$old_search_data$old_mode$old_page);
$smarty->clear_assign("newproducts");
$smarty->assign("newproducts",$products);
$search_data '';
$products = array();
unset(
$search_data$products); 



You must add:
Code:

<?php
at the very top of the file
and
Code:

?>
to the end of it for it to work
but other than that great job!

Amy 08-13-2007 08:40 PM

Re: Newest Products
 
how would you change the image size on the home page of the previews?

Amy 08-14-2007 04:08 PM

Re: Newest Products
 
we found where to change the thumbnail size but when we alter that something else seems to be overriding our settings and reverting it back to 100 px.

Vacman 08-27-2007 08:39 PM

Re: Newest Products
 
Nice little add-on. Have something like this for 4.0.16, so it is nice to see it again!

Is there a way to limit the number of products shown? Currently, mine shows 15 newest products.

jimbobsquarepants 08-30-2007 02:54 AM

Re: Newest Products
 
Hi Guys,

Does anyone know how to limit it so it will only look in one cat?

Cheers

digiemp 11-10-2007 09:52 AM

Re: Newest Products
 
Nice mod, few questions though.

Is there a way to add a link in the category box that says 'Latest Products' or something similar that would take the customer to a category type page that would list all of the recently added products?

I don't want to clutter my homepage but would still like to capture and display all of the newest products in an easy to find place.

Thanks

Lingerieblowout 11-12-2007 07:28 AM

Re: Newest Products
 
Digiemp ... Do you mean something like on my cart...

www.lingerieblowout.com

digiemp 11-12-2007 02:22 PM

Re: Newest Products
 
Lingerieblowout, YES! That is exactly what I am looking for. Is that an add on or can you give the code for that?

You have a nice looking site by the way.

Thanks

digiemp 11-12-2007 02:32 PM

Re: Newest Products
 
You also have a shop by price function that I haven't been able to set up properly on my site. Actually, there are quite a few things on your site that I'd like to implement but we'll leave it at those two for now.

Thanks.


All times are GMT -8. The time now is 04:29 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.