teksigns Posted March 3, 2003 Posted March 3, 2003 i would like to know if there is a way i can hide a product from the public .... and it still be available to my client ..... example : i sell some custom items that clients feq reorder . these items are only for that certain customer and i would like the product to not show up in the listings at all ..... but i would like them to be able to type the link directly and still access the product and add it to there cart. any ideas? Quote
shady Posted March 3, 2003 Posted March 3, 2003 Create the products at the same level as the top level categories. These products can be accessed directly using product_info.php?products_id=<products_id> but will not show on the site under normal circumstances. Quote
Ajeh Posted March 3, 2003 Posted March 3, 2003 Neat idea ... note: Change the products_date_added in the products table so it does not show up as a New Product. Quote
teksigns Posted March 3, 2003 Author Posted March 3, 2003 adding to same level dont work . if someone clicks the new products link and scrolls to last page then the hidden item still shows up ....... thanks for the try ! Quote
Ajeh Posted March 3, 2003 Posted March 3, 2003 You could adjust the dates being looked at to be > a certain date and set that product to before that date. You'd need to edit the new product listing and the what's new product box for that to work. Quote
teksigns Posted March 3, 2003 Author Posted March 3, 2003 wish i knew how , i can do very limited php ..... as i only know what ive learned from altering scripts ....... thanks Quote
mattice Posted March 3, 2003 Posted March 3, 2003 Depending on the snapshot you use you might be able to de-activate the product, yet still call it directly with the product_info.php page. Mattice Quote "Politics is the art of preventing people from taking part in affairs which properly concern them"
Ajeh Posted March 3, 2003 Posted March 3, 2003 Based on snapshot 02-22-2003 ... I added a new product to the Top Level of Cateogies. I changed its products_date_added to 2000-03-03 09:25:22 I edited /catalog/products_new.php // WebMakers.com Added: Hidden Product // only show products dated January 1, 2002 and newer $startdate="2001-12-31 23:59:59"; $new_products_where=" and products_date_added > '" . $startdate . "' "; $products_new_query_raw = "select p.products_id, pd.products_name, p.products_image, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, p.products_date_added, m.manufacturers_name from " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on p.products_id = pd.products_id and pd.language_id = '" . $languages_id . "' left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where p.products_status = '1'" . $new_products_where . " order by p.products_date_added DESC, pd.products_name"; I edited /includes/boxes/whats_new.php // WebMakers.com Added: Hidden Product // only show products dated January 1, 2002 and newer $startdate="2001-12-31 23:59:59"; $new_products_where=" and products_date_added > '" . $startdate . "' "; if ($random_product = tep_random_select("select products_id, products_image, products_tax_class_id, products_price from " . TABLE_PRODUCTS . " where products_status = '1'" . $new_products_where . " order by products_date_added desc limit " . MAX_RANDOM_SELECT_NEW)) { Now, the product is hidden from the Products New Listing and What's New box. You could also put a test on the product_info.php to ensure only customers with an approval code can see these products, should they use the URL directly via a link or manual editing of the URL. Quote
teksigns Posted March 3, 2003 Author Posted March 3, 2003 thank you that works i have also done this mod so that i can see the product link when editing it ...... in ( admin/categories.php ) bellow this : <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="pageHeading"><?php echo sprintf(TEXT_NEW_PRODUCT, tep_output_generated_category_path($current_category_id)); ?></td> <td class="pageHeading" align="right"><?php echo tep_draw_separator('pixel_trans.gif', HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td> </tr> add this : <!-- teksigns.com display product link in update - start //--> <?php if ($pInfo->products_id){ ?><tr> <td align="center" class="smallText">Product Link : <a href="<?php echo HTTP_CATALOG_SERVER . DIR_WS_CATALOG . 'product_info.php?products_id=' . $pInfo->products_id; ?>" target="_blank"><?php echo HTTP_CATALOG_SERVER . DIR_WS_CATALOG . 'product_info.php?products_id=' . $pInfo->products_id; ?></a></td> </tr><?php } ?> <!-- teksigns.com display product link in update - end //--> just thought id share ...... done this because it was a pain to find out the product id when the product is hidden ...... now i can copy th elink and send it to the customer . Quote
teksigns Posted March 3, 2003 Author Posted March 3, 2003 just run into another thing . how to keep these listings from being included in the froogle export. Quote
teksigns Posted March 3, 2003 Author Posted March 3, 2003 just fixed froogle where it wont export from a certain date back used webmakers code thanks in easypopulate.php about lines 985-1026 changed: $fileheaders = array( 'product_url' => $iii++, 'name' => $iii++, 'description' => $iii++, 'price' => $iii++, 'image_url' => $iii++, 'category' => $iii++, 'offer_id' => $iii++, 'instock' => $iii++, 'shipping' => $iii++, 'brand' => $iii++, 'upc' => $iii++, 'color' => $iii++, 'size' => $iii++, 'quantity' => $iii++, 'product_id' => $iii++, 'manufacturer_id' => $iii++, 'exp_date' => $iii++, 'product_type' => $iii++, 'delete' => $iii++, 'currency' => $iii++, ); $filelayout_sql = "SELECT p.products_id as v_products_id, p.products_model as v_products_model, p.products_image as v_products_image, p.products_price as v_products_price, p.products_weight as v_products_weight, p.products_date_added as v_date_avail, p.products_tax_class_id as v_tax_class_id, p.products_quantity as v_products_quantity, p.manufacturers_id as v_manufacturers_id, subc.categories_id as v_categories_id FROM products as p, categories as subc, products_to_categories as ptoc WHERE p.products_id = ptoc.products_id AND ptoc.categories_id = subc.categories_id "; break; Change to : $fileheaders = array( 'product_url' => $iii++, 'name' => $iii++, 'description' => $iii++, 'price' => $iii++, 'image_url' => $iii++, 'category' => $iii++, 'offer_id' => $iii++, 'instock' => $iii++, 'shipping' => $iii++, 'brand' => $iii++, 'upc' => $iii++, 'color' => $iii++, 'size' => $iii++, 'quantity' => $iii++, 'product_id' => $iii++, 'manufacturer_id' => $iii++, 'exp_date' => $iii++, 'product_type' => $iii++, 'delete' => $iii++, 'currency' => $iii++, ); // WebMakers.com Added: Hidden Product // only show products dated January 1, 2002 and newer $startdate="2001-12-31 23:59:59"; $new_products_where="p.products_date_added > '" . $startdate . "' "; $filelayout_sql = "SELECT p.products_id as v_products_id, p.products_model as v_products_model, p.products_image as v_products_image, p.products_price as v_products_price, p.products_weight as v_products_weight, p.products_date_added as v_date_avail, p.products_tax_class_id as v_tax_class_id, p.products_quantity as v_products_quantity, p.manufacturers_id as v_manufacturers_id, subc.categories_id as v_categories_id FROM products as p, categories as subc, products_to_categories as ptoc WHERE p.products_id = ptoc.products_id AND $new_products_where AND ptoc.categories_id = subc.categories_id "; break; Just here to share have fun Quote
Ajeh Posted March 3, 2003 Posted March 3, 2003 I went through all the code and eventually the little hidden fellow is gonna show up where it shouldn't. So ... I have re-written it so that this works with snapshot 02-22-2003 All changes to the boxes, modules, listings, you name it. There is a full Admin for it as well. As soon as I have some time and can compile this and zip it together, I will add it to the contributions. Quote
teksigns Posted March 6, 2003 Author Posted March 6, 2003 Linda, any word on when you might post ? Quote
Ajeh Posted March 7, 2003 Posted March 7, 2003 Just zipping it now and it should be uploaded in about 5 minutes ... :D Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.