Forums / Setting Up Categories, Products, Attributes / Make products "view only"

Make products "view only"

Started by amackley on 12 Mar 2012, 7:07 PM · Views: 512

Results 1 to 2 of 2
12 Mar 2012, 7:07 PM
#1
amackley avatar

amackley

New Zenner

Join Date:
Nov 2011
Posts:
11
Plugin Contributions:
0

Make products "view only"

I have a whole series of products that I want to list in the categories with a preview and price, but I don't want them be able to order. In other words I want them to see the product, but have them be sent to a one-page order form instead of the regular shopping cart.

Any suggestions?

13 Mar 2012, 4:11 PM
#2
ajeh avatar

ajeh

Oba-san

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

Re: Make products "view only"

If you wanted to prevent Products in master_categories_id 10 from being added to cart, you could customize the function_general.php and add the code in RED:

// Switch buy now button based on call for price sold out etc.
  function zen_get_buy_now_button($product_id, $link, $additional_link = false) {
    global $db;

// show case only superceeds all other settings
    if (STORE_STATUS != '0') {
      return '<a href="' . zen_href_link(FILENAME_CONTACT_US) . '">' .  TEXT_SHOWCASE_ONLY . '</a>';
    }

// bof: no add to cart for Products in master_categories_id 10
  $chk_cat = zen_products_lookup($product_id, 'master_categories_id');
  if ($chk_cat == 10) {
    return 'Product unavailable';
  }
// eof: no add to cart for Products in master_categories_id 10

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!