Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Getting Add to Cart and QTY on the same line..

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

Locked

Views: 643

Results 1 to 3 of 3
This thread is locked. New replies are disabled.
13 Feb 2010, 1:42 AM
#1
scott_c avatar

scott_c

Zen Follower

Join Date:
Dec 2009
Posts:
236
Plugin Contributions:
0

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 echo $display_qty; ?>
<?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.

13 Feb 2010, 3:16 AM
#2
davewest avatar

davewest

Totally Zenned

Join Date:
Dec 2007
Location:
Payson, AZ
Posts:
1,075
Plugin Contributions:
7

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

Scott_C:

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;

$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 ```
<br />
```and remove them... where you have ```
. '<br />' .
``` remove all but one dot.
13 Feb 2010, 4:55 AM
#3
scott_c avatar

scott_c

Zen Follower

Join Date:
Dec 2009
Posts:
236
Plugin Contributions:
0

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.