Page 1 of 2 12 LastLast
Results 1 to 10 of 16
  1. #1
    Join Date
    Sep 2007
    Posts
    26
    Plugin Contributions
    0

    Default How to remove Add to Cart quantity from product info page?

    Currently the "Add to Cart" button on my product info page is preceded by a quantity text input that defaults to 1. Since 99.9% of my clients will only be purchasing one item of a certain type, I would like to remove this input field and have it always default to 1. Unfortunately, I am unable to find the option to make this change in the zencart admin. Can anyone help me?

    Thanks in advance!

  2. #2
    Join Date
    Dec 2005
    Location
    SWFL
    Posts
    469
    Plugin Contributions
    0

    Default Re: How to remove Add to Cart quantity from product info page?

    Open the product's page in Catalog --> Categories/Products. (Find the product you want to edit.)

    Scroll down and find:
    Products Quantity Box Shows: Yes, Show Quantity Box No, Do not show Quantity Box

    Set to NO for do not show.

    Below that you can set the min/max/units if need be.

    And in Configuration --> Product listing there are other settings too.

    HTH,
    Last edited by madmumbler; 29 Sep 2007 at 02:06 AM.
    Lesli in SW Florida ~ writer, teacher, and dodging hurricanes!

  3. #3
    Join Date
    Nov 2009
    Posts
    3
    Plugin Contributions
    0

    Default Re: How to remove Add to Cart quantity from product info page?

    this thread was really useful for me . thanks alot guys ^^

  4. #4
    Join Date
    Dec 2010
    Location
    san francisco, i think?
    Posts
    19
    Plugin Contributions
    0

    Default Re: How to remove Add to Cart quantity from product info page?

    bringing this thread back from the dead!
    is there a way to do this to every product at once? we have close to 1000 products and really don't want to have to go into each and every product page to turn off the "Add to: [form box]".
    i'm even willing to pull it from the appropriate tpl_ page (tpl_product_info_display.php, i think) in my template to save the trouble. problem is, i'm not sure what part of the php it is.

    actually, i'll just paste in the bit of php here in hopes that one of you who know better than me can show me what to take out.
    i'm wanting to remove the "Add to: [form box]", but keep the "Add to Cart" button.

    Code:
    <!--bof Add to Cart Box -->
    <?php
    if (CUSTOMERS_APPROVAL == 3 and TEXT_LOGIN_FOR_PRICE_BUTTON_REPLACE_SHOWROOM == '') {
      // do nothing
    } else {
    ?>
                <?php
        $display_qty = (($flag_show_product_info_in_cart_qty == 1 and $_SESSION['cart']->in_cart($_GET['products_id'])) ? '<p>' . PRODUCTS_ORDER_QTY_TEXT_IN_CART . $_SESSION['cart']->get_quantity($_GET['products_id']) . '</p>' : '');
                if ($products_qty_box_status == 0 or $products_quantity_order_max== 1) {
                  // hide the quantity box and default to 1
                  $the_button = '<input type="hidden" name="cart_quantity" value="1" />' . zen_draw_hidden_field('products_id', (int)$_GET['products_id']) . zen_image_submit(BUTTON_IMAGE_IN_CART, BUTTON_IN_CART_ALT);
                } else {
                  // show the quantity box
        $the_button = PRODUCTS_ORDER_QTY_TEXT . '<input type="text" name="cart_quantity" value="' . (zen_get_buy_now_qty($_GET['products_id'])) . '" maxlength="6" size="4" /><br />' . zen_get_products_quantity_min_units_display((int)$_GET['products_id']) . '<br />' . zen_draw_hidden_field('products_id', (int)$_GET['products_id']) . zen_image_submit(BUTTON_IMAGE_IN_CART, BUTTON_IN_CART_ALT);
                }
        $display_button = zen_get_buy_now_button($_GET['products_id'], $the_button);
      ?>
      <?php if ($display_qty != '' or $display_button != '') { ?>
        <div id="cartAdd">
        <?php
          echo $display_qty;
          echo $display_button;
                ?>
              </div>
      <?php } // display qty and button ?>
    <?php } // CUSTOMERS_APPROVAL == 3 ?>
    <!--eof Add to Cart Box-->

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

    Default Re: How to remove Add to Cart quantity from product info page?

    If you just want to change the setting on ALL Products in the database to NOT show the quantity box on ALL Product ...

    1 Backup your database

    2 See first step

    3 Run the following SQL statement in the Tools ... Install SQL Patches:
    Code:
    UPDATE products SET products_qty_box_status = 0;
    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. #6
    Join Date
    Dec 2010
    Location
    san francisco, i think?
    Posts
    19
    Plugin Contributions
    0

    Default Re: How to remove Add to Cart quantity from product info page?

    awesome, that did it! thank you!

    if i were to ever want to undo this patch and bring that box back, what would i have to do?
    i don't plan on ever needing to, but it would be good to know, just in case.

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

    Default Re: How to remove Add to Cart quantity from product info page?

    Set them to 1 instead of 0 ...
    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!

  8. #8
    Join Date
    Dec 2010
    Location
    san francisco, i think?
    Posts
    19
    Plugin Contributions
    0

    Default Re: How to remove Add to Cart quantity from product info page?

    it is worth noting to any other new people who come along that the patch provided by Ajeh works great, but you will have to re-apply it after adding new products. it only updates what you've already got on your site and the "Add to cart" box will show up on anything you add after the patch.

    thanks again Ajeh!

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

    Default Re: How to remove Add to Cart quantity from product info page?

    When you add a new Product, can't you just set the box status while adding the product?
    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!

  10. #10
    Join Date
    Dec 2010
    Location
    san francisco, i think?
    Posts
    19
    Plugin Contributions
    0

    Default Re: How to remove Add to Cart quantity from product info page?

    yeaah, but we have a data entry guy just flying through and adding products super quick. apparently it's too much hassle to have him click the extra button as he goes.
    not a big deal, i backup the data files at the end of the day anyway, i'll just apply the patch every night after until we get everything up.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v154 How can I move my add cart button in the product info page?
    By wmorris in forum General Questions
    Replies: 4
    Last Post: 5 Feb 2016, 10:46 PM
  2. Replies: 1
    Last Post: 14 Jan 2013, 03:43 AM
  3. Remove Quantity from product but keep in cart
    By chelgeson in forum Setting Up Categories, Products, Attributes
    Replies: 15
    Last Post: 19 Oct 2010, 07:56 PM
  4. How to remove Quantity box next to Add to Cart Button?
    By beyre in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 29 Jun 2009, 04:04 PM
  5. Remove quantity add field from product info page
    By coolglobal in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 19 Feb 2008, 01:48 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