
Originally Posted by
k1ra
I am attempting to style the quantity box and add to cart button on tpl_product_info_display but can't seem to separate the two. I have tried modifying the code from
Code:
<?php if ($display_qty == '0' or $display_button != '') { ?>
<?php
echo $display_qty;
echo $display_button;
?>
<?php } // display qty and button ?>
to
Code:
<?php if ($display_qty != '') { ?>
<div id="cartQty">
<?php
echo $display_qty;
?>
</div>
<?php } // display qty ?>
<?php if ($display_button != '') { ?>
<div id="addToCartButton">
<?php
echo $display_button;
?>
</div>
<?php } // display button ?>
to no avail.
The code renders the div 'addToCartButton' around the two objects as a whole, instead of putting that div just around the button. Any ideas?
I changed tpl_product_info_display to this:
Code:
// show the quantity box
/* $the_button = '<div class="minMaxUnits">' . PRODUCTS_ORDER_QTY_TEXT . '<input type="text" name="cart_quantity" value="' . (zen_get_buy_now_qty($_GET['products_id'])) . '" maxlength="8" size="6"/><br />' . zen_get_products_quantity_min_units_display((int)$_GET['products_id']) . zen_draw_hidden_field('products_id', (int)$_GET['products_id']) . '<br />' . zen_image_submit(BUTTON_IMAGE_IN_CART, BUTTON_IN_CART_ALT, 'style="margin:0 auto;"') . '</div>';*/
$the_button = PRODUCTS_ORDER_QTY_TEXT . '<input type="text" name="cart_quantity" value="' . (zen_get_buy_now_qty($_GET['products_id'])) . '" maxlength="8" size="6"/>' . zen_get_products_quantity_min_units_display((int)$_GET['products_id']) . zen_draw_hidden_field('products_id', (int)$_GET['products_id']) . '<br />' . 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><!-- end cartAdd -->
Then in stylesheet.css did this, although certain bits may not apply to your situation
Code:
#cartAdd {
background:#ffd;
border:2px solid #ddd;
border-top:1px solid #ddd;
border-bottom:3px solid #ddd;
clear:left; /* right */
float:none;
width:98%;
margin:0.5em auto; /* 1.0em */
padding:0.5em 0em; /* 1.0em */
text-align:center;
}
#cartAdd input[type="text"] {
clear:left;
float:none;
width:4em;
margin:0.25em auto;
}
#cartAdd input[type="image"] {
clear:left;
float:none;
margin:0.25em auto;
}
.minMaxUnits {
float:none;
margin:0.5em auto;
}
ATM however I am not sure if this is all I did to also change the display of min-max units, as it is tied in with Justin's 150 Edit_Cart mod. This will have to wait until Sunday.
Hope this helps.