Zen Cart Logo
Forums / Setting Up Categories, Products, Attributes / Sold product still showing as new

Sold product still showing as new

Views: 692

Results 1 to 5 of 5
19 Mar 2011, 12:08 PM
#1
fonzie avatar

fonzie

New Zenner

Join Date:
Feb 2008
Location:
Antwerpen
Posts:
51
Plugin Contributions:
0

Sold product still showing as new

We're selling postage stamps, and sometimes we sell rare stamps of which we have only 1 item in stock, when we add such an item to our shop, it shows up as a new product, but when we sell this item very quickly, say after 2 or 3 days, it still shows up in the 'new products' although it's already sold, (new products are set to 30 days)

is there a way of avoiding this ?

regards,
Fons

19 Mar 2011, 1:28 PM
#2
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Sold product still showing as new

You would need to customize the SELECT statements where ever you do not want to see the Sold Out Products to have on them:
and products_quantity > 0

19 Mar 2011, 1:49 PM
#3
fonzie avatar

fonzie

New Zenner

Join Date:
Feb 2008
Location:
Antwerpen
Posts:
51
Plugin Contributions:
0

Re: Sold product still showing as new

thanks for your quick reply,

how do I go about it ? I'm afraid I'm not a programmer

thanks

19 Mar 2011, 3:04 PM
#4
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Sold product still showing as new

Let's say you want to customize the New Products centerbox ...

The code:

  $new_products_query = "select distinct p.products_id, p.products_image, p.products_tax_class_id, pd.products_name,
                                p.products_date_added, p.products_price, p.products_type, p.master_categories_id
                           from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd
                           where p.products_id = pd.products_id
                           and pd.language_id = '" . (int)$_SESSION['languages_id'] . "'
                           and   p.products_status = 1 " . $display_limit;

would change to read:

  $new_products_query = "select distinct p.products_id, p.products_image, p.products_tax_class_id, pd.products_name,
                                p.products_date_added, p.products_price, p.products_type, p.master_categories_id
                           from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd
                           where p.products_id = pd.products_id
                           and pd.language_id = '" . (int)$_SESSION['languages_id'] . "'
                           and p.products_quantity > 0
                           and   p.products_status = 1 " . $display_limit;

and change the code:

    $new_products_query = "select distinct p.products_id, p.products_image, p.products_tax_class_id, pd.products_name,
                                  p.products_date_added, p.products_price, p.products_type, p.master_categories_id
                           from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd
                           where p.products_id = pd.products_id
                           and pd.language_id = '" . (int)$_SESSION['languages_id'] . "'
                           and p.products_status = 1
                           and p.products_id in (" . $list_of_products . ")";

to read:

    $new_products_query = "select distinct p.products_id, p.products_image, p.products_tax_class_id, pd.products_name,
                                  p.products_date_added, p.products_price, p.products_type, p.master_categories_id
                           from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd
                           where p.products_id = pd.products_id
                           and pd.language_id = '" . (int)$_SESSION['languages_id'] . "'
                           and p.products_status = 1
                           and p.products_quantity > 0
                           and p.products_id in (" . $list_of_products . ")";
19 Mar 2011, 4:24 PM
#5
fonzie avatar

fonzie

New Zenner

Join Date:
Feb 2008
Location:
Antwerpen
Posts:
51
Plugin Contributions:
0

Re: Sold product still showing as new

thanks a lot, it works perfect,

regards,
Fons