Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2009
    Posts
    234
    Plugin Contributions
    0

    Default Getting Add to Cart and QTY on the same line..

    Hi, Im trying to get the QTY box and the 'Add to Cart' button on the same line in; tpl_product_info_display.php

    I broken out the code;

    PHP Code:
    <?php echo $display_qty?>
    PHP Code:
    <?php echo $display_button?>
    Into two tags, but I noticed the resulting HTML is putting two breaks (<br>) in the between the two tags?

    Just wondering where the breaks would be coming from? Ive looked in the Dev Tool Kit and cant seem to track down the little suckers.

    Thanks!

    Scott.
    Donation made. Enjoy those donuts! :-)

  2. #2
    Join Date
    Dec 2007
    Location
    Payson, AZ
    Posts
    1,076
    Plugin Contributions
    15

    Default Re: Getting Add to Cart and QTY on the same line..

    Quote Originally Posted by Scott_C View Post
    I broken out the code;

    Into two tags, but I noticed the resulting HTML is putting two breaks (<br>) in the between the two tags?
    You didn't really make two tags, just closed the php statement on them.

    Look above them and find this line;
    Code:
    $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);
    Look for the
    Code:
    <br />
    and remove them... where you have
    Code:
    . '<br />' .
    remove all but one dot.
    Dave
    Always forward thinking... Lost my mind!

  3. #3
    Join Date
    Dec 2009
    Posts
    234
    Plugin Contributions
    0

    Default Re: Getting Add to Cart and QTY on the same line..

    Thanks Dave, you're a champion.

    Its interesting as the browser is writing HTML '<br>' tags, and not XHTML '<br />' tags. (when i view the source)

    I did a search on the older <br> - and didnt find anything in the file.
    Donation made. Enjoy those donuts! :-)

 

 

Similar Threads

  1. Replies: 4
    Last Post: 15 Jan 2014, 04:17 AM
  2. v150 Price and add to cart button to be in the line
    By deltaowen in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 27 Jan 2013, 01:20 AM
  3. how to let the logo and and toplink always in same line
    By gueston in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 10 Jul 2009, 04:03 PM
  4. Products on single line with QTY and ADD button?
    By Peekay in forum Templates, Stylesheets, Page Layout
    Replies: 15
    Last Post: 25 Feb 2009, 05:23 AM
  5. Getting item w/ attributes & add to cart on same page..
    By ricky_101 in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 25 May 2008, 11:15 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