Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2005
    Posts
    96
    Plugin Contributions
    0

    Default Product info pages showing "add to cart" only for products with attributes

    I've made a couple changes in the way I'm handling product attributes and now I'm missing the quantity/add to cart box on the Product Info page for products with no attributes assigned.

    We are selling music (performance tracks) and some of them are downloadable. Eventually all of them will be. When I set the download and order CD attributes, I got them to work the way I needed but the quantity/add to cart doesn't show up for products with no attributes assigned. So, to make up for it, I created new READ ONLY attributes for CD ONLY products. This works just fine but it is a lot of work to add those one at a time to our 4000 new products.

    I would like to work out one of the following solutions unless someone can suggest a better one:

    1) Music Format: Order CD (RADIO) attribute for ALL products. This would simplify thing later as we add Music Format: Download to the products as they become available. However, the problem that arises with this solution is that the Product Listing only show "...more info" instead of a quantity box. I would like to have Multiple Add to Cart function for CD ONLY products

    2) Add to Cart box appearing on products with no attributes assigned.

    Example of product with no attributes:
    http://www.omegasound.com/index.php?...oducts_id=5028

    Thanks in advance,
    Heather

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

    Default Re: Product info pages showing "add to cart" only for products with attributes

    Do a compare of the original tpl_product_info_default.php with your override file ...

    Check and see if you deleted the button or have a typo on it or just cut out the code entirely ...

    The Add to Cart button is in the code:
    PHP Code:
    <!--bof Add to Cart Box -->
    <?php
    if (CUSTOMERS_APPROVAL == and TEXT_LOGIN_FOR_PRICE_BUTTON_REPLACE_SHOWROOM == '') {
      
    // do nothing
    } else {
    ?>
                <?php
        $display_qty 
    = (($flag_show_product_info_in_cart_qty == 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 == 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_CARTBUTTON_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_CARTBUTTON_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-->
    Did you place that inside something that may not allow it to display? Or is the code missing?

    Beyond Compare from scootersoftware.com is a handy program for this ...
    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!

 

 

Similar Threads

  1. Both "More info" and "Add to cart" in product list
    By Gunnel in forum Templates, Stylesheets, Page Layout
    Replies: 6
    Last Post: 21 Jan 2011, 09:47 AM
  2. EasyPopulate problem: "Add to Cart" and "price" not showing on product info page
    By pcspot in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 29 Apr 2010, 08:06 AM
  3. Can I make all "add: 0" input boxes on product pages to "more info..."?
    By sfklaas in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 15 Aug 2009, 06:05 PM
  4. remove "add to cart" button for only 1 product
    By DMSerley in forum Setting Up Categories, Products, Attributes
    Replies: 4
    Last Post: 17 Dec 2008, 09:33 PM
  5. Remove "Add: [ ]" and "Add selected products to cart" from product pages? possible?
    By edwardtilbury in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 1 Sep 2008, 03:13 AM

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