Results 1 to 5 of 5
  1. #1
    Join Date
    Feb 2006
    Posts
    230
    Plugin Contributions
    0

    Default Need to align "Quantity Discount" table w/ "add to cart" button

    This is on my Product Info pages.

    Need to align "Quantity Discount" table w/ "add to cart" button. I have them near each other but not aligned opposite each other. I've tried all the coding I can think of in the includes/templates/my_templates/templates/ Products_info_display.php file but no luck.

    Here is a link to one of my product pages: http://www.sourceforherbs.com/Classi...Ding-Chuan-Wan

    Please help.

    Thanks in advance.

  2. #2
    Join Date
    Sep 2012
    Posts
    254
    Plugin Contributions
    0

    Default Re: Need to align "Quantity Discount" table w/ "add to cart" button

    Just a quick look. May have to tweak the code a little as I haven't tested it. but…
    Code:
    <!--bof Add to Cart Box -->
    <?php
    if (CUSTOMERS_APPROVAL == 3 and TEXT_LOGIN_FOR_PRICE_BUTTON_REPLACE_SHOWROOM == '') {
      // do nothing
    } else {
    ?>
    <!--bof Quantity Discounts table -->
    <?php
      if ($products_discount_type != 0) { ?>
    <?php
    /**
     * display the products quantity discount
     */
     require($template->get_template_dir('/tpl_modules_products_quantity_discounts.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_products_quantity_discounts.php'); ?>
    <?php
      }
    ?>
    <!--eof Quantity Discounts table -->
                <?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-->
    should put it inside the box just above the add to cart quantity then it would always be aligned.

  3. #3
    Join Date
    Feb 2006
    Posts
    230
    Plugin Contributions
    0

    Default Re: Need to align "Quantity Discount" table w/ "add to cart" button

    thanks for your reply.
    I see what you did. I removed original and moved this into the file but nothing is different.

  4. #4
    Join Date
    Feb 2006
    Posts
    230
    Plugin Contributions
    0

    Default Re: Need to align "Quantity Discount" table w/ "add to cart" button

    Solved it myself.
    Just added <table><td> before the Quantity Discount coding and </table></td> after the Add to Cart button coding.

    Thanks.

  5. #5
    Join Date
    Sep 2012
    Posts
    254
    Plugin Contributions
    0

    Default Re: Need to align "Quantity Discount" table w/ "add to cart" button

    Here is the actual fix. No tables to fix it in zen-cart 1.5.4
    Code:
     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
     //bof Quantity Discounts table
    
      if ($products_discount_type != 0) { 
    
    /**
     * display the products quantity discount
     */
     require($template->get_template_dir('/tpl_modules_products_quantity_discounts.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_products_quantity_discounts.php'); 
     }
    
    //eof Quantity Discounts table
    
          echo $display_qty;
          echo $display_button;
                ?>
              </div>
      <?php } // display qty and button ?>
    <?php } // CUSTOMERS_APPROVAL == 3 ?>

 

 

Similar Threads

  1. v151 Getting rid of "add to cart" and just have a "buy" button
    By BryanKollar in forum General Questions
    Replies: 5
    Last Post: 22 Feb 2014, 06:41 PM
  2. Quantity Discount box and "add to cart" button does not show up in "Category" view
    By petro in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 10 Nov 2013, 09:48 PM
  3. Replies: 26
    Last Post: 19 Feb 2010, 02:56 AM
  4. Align "Add to Cart" & "Tell A Friend" on tpl_product_info_display
    By CompuWeb in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 23 Oct 2009, 11:14 PM
  5. "Quantity in Cart" text above "Add to Cart" button
    By empirenine in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 5 Jul 2006, 07:43 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