Page 2 of 6 FirstFirst 1234 ... LastLast
Results 11 to 20 of 52
  1. #11
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Is it possible to disable buying only in one category?

    Now go into Category 58 (Packaging) and edit the Product ... Does it show:
    Product Master Category: ID# 58 Packaging
    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: v1.5.5]
    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!

  2. #12
    Join Date
    Sep 2012
    Posts
    104
    Plugin Contributions
    0

    Default Re: Is it possible to disable buying only in one category?

    Quote Originally Posted by Ajeh View Post
    Now go into Category 58 (Packaging) and edit the Product ... Does it show:
    yes it does :

    Product Master Category: ID# 58 Packaging

  3. #13
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Is it possible to disable buying only in one category?

    For giggles and grins ... can you change the code to show uncomment the echo:
    Code:
    // bof: show room only for master_categories_id 12
    echo 'Products ID: ' . $product_id . ' Master Cat: ' . zen_get_products_category_id($product_id) . '<br>';
      if (zen_get_products_category_id($product_id) == 12) {
        return '<a href="' . zen_href_link(FILENAME_CONTACT_US) . '">' . TEXT_CALL_FOR_PRICE . '</a>';
      }
    // eof: show room only for master_categories_id 12
    and go to that Category/Product and what do you see?
    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: v1.5.5]
    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!

  4. #14
    Join Date
    Sep 2012
    Posts
    104
    Plugin Contributions
    0

    Default Re: Is it possible to disable buying only in one category?

    Quote Originally Posted by Ajeh View Post
    For giggles and grins ... can you change the code to show uncomment the echo:
    Code:
    // bof: show room only for master_categories_id 12
    echo 'Products ID: ' . $product_id . ' Master Cat: ' . zen_get_products_category_id($product_id) . '<br>';
      if (zen_get_products_category_id($product_id) == 12) {
        return '<a href="' . zen_href_link(FILENAME_CONTACT_US) . '">' . TEXT_CALL_FOR_PRICE . '</a>';
      }
    // eof: show room only for master_categories_id 12
    and go to that Category/Product and what do you see?

    I deleted this before echo : // (hope you meant this by changing the code to show uncomment the echo)

    saw category/product and see the same in admin :
    Product Master Category: ID# 58 Packaging

    and you can see the add this to my cart button.

    Nandor

  5. #15
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Is it possible to disable buying only in one category?

    And the line:
    Code:
      if (zen_get_products_category_id($product_id) == 12) {
    you changed to:
    Code:
      if (zen_get_products_category_id($product_id) == 58) {
    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: v1.5.5]
    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!

  6. #16
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Is it possible to disable buying only in one category?

    If you switch to the Classic Template ... does this work correctly?
    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: v1.5.5]
    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!

  7. #17
    Join Date
    Sep 2012
    Posts
    104
    Plugin Contributions
    0

    Default Re: Is it possible to disable buying only in one category?

    Quote Originally Posted by Ajeh View Post
    If you switch to the Classic Template ... does this work correctly?

    switched to classic template in admin/tools/template selection. It is the same as previously , you can buy from this category.

  8. #18
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Is it possible to disable buying only in one category?

    Could you Zip and post as an attachment your file, from the server, for:
    /includes/functions/functions_general.php
    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: v1.5.5]
    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!

  9. #19
    Join Date
    Sep 2012
    Posts
    104
    Plugin Contributions
    0

    Default Re: Is it possible to disable buying only in one category?

    Quote Originally Posted by Ajeh View Post
    Could you Zip and post as an attachment your file, from the server, for:
    /includes/functions/functions_general.php
    functions general.zip

    thanks

  10. #20
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Is it possible to disable buying only in one category?

    You have the code in the wrong place ...

    Remove the new code that I gave you:
    Code:
    // bof: show room only for master_categories_id 58
    echo 'Products ID: ' . $product_id . ' Master Cat: ' . zen_get_products_category_id($product_id) . '<br>';
      if (zen_get_products_category_id($product_id) == 58) {
        return '<a href="' . zen_href_link(FILENAME_CONTACT_US) . '">' . TEXT_CALL_FOR_PRICE . '</a>';
      }
    // eof: show room only for master_categories_id 58
    and go lower in the code and find the code that starts with:
    Code:
        }
    
        $button_check = $db->Execute("select product_is_call, products_quantity from " . TABLE_PRODUCTS . " where products_id = '" . (int)$product_id . "'");
        switch (true) {
    // cannot be added to the cart
    Put it just below the } and above the line starting with $button_check so it reads:
    Code:
        }
    
    // bof: show room only for master_categories_id 58
    echo 'Products ID: ' . $product_id . ' Master Cat: ' . zen_get_products_category_id($product_id) . '<br>';
      if (zen_get_products_category_id($product_id) == 58) {
        return '<a href="' . zen_href_link(FILENAME_CONTACT_US) . '">' . TEXT_CALL_FOR_PRICE . '</a>';
      }
    // eof: show room only for master_categories_id 58
    
    
        $button_check = $db->Execute("select product_is_call, products_quantity from " . TABLE_PRODUCTS . " where products_id = '" . (int)$product_id . "'");
        switch (true) {
    // cannot be added to the cart
    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: v1.5.5]
    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!

 

 
Page 2 of 6 FirstFirst 1234 ... LastLast

Similar Threads

  1. v150 Buying using both Discount Coupon and Gift Voucher - Disable One?
    By PetleyJ in forum Discounts/Coupons, Gift Certificates, Newsletters, Ads
    Replies: 0
    Last Post: 5 May 2012, 02:48 PM
  2. Replies: 1
    Last Post: 19 Aug 2008, 05:15 AM
  3. Inventory only in one Category is it possible
    By Dashizna in forum Setting Up Categories, Products, Attributes
    Replies: 4
    Last Post: 19 Mar 2007, 01:47 AM
  4. Only one product type in list; only in one category. Why?
    By whitefael in forum Setting Up Categories, Products, Attributes
    Replies: 2
    Last Post: 7 Jan 2007, 06:13 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR