Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Free beer to anyone who can answer this question!

Free beer to anyone who can answer this question!

Locked

Views: 818

Results 1 to 4 of 4
This thread is locked. New replies are disabled.
21 May 2008, 2:30 PM
#1
crashley1784 avatar

crashley1784

New Zenner

Join Date:
May 2008
Location:
Alconbury, UK
Posts:
27
Plugin Contributions:
0

Free beer to anyone who can answer this question!

On the product details page, how to I bring the Add to Cart button out from under the quantity box and have it directly to the right of the box? I've seen so many people ask this question, and haven't seen an answer yet. Surely it can't be that hard...

21 May 2008, 3:21 PM
#2
haredo avatar

haredo

Totally Zenned

Join Date:
Apr 2006
Location:
Texas
Posts:
6,185
Plugin Contributions:
0

Re: Free beer to anyone who can answer this question!

Cr,
Need a url to the page please??

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.

Zen Cart Certified hosting at myZenCartHost.com.

21 May 2008, 6:18 PM
#3
clydejones avatar

clydejones

Deceased

Join Date:
Nov 2005
Location:
Colorado Springs, CO USA
Posts:
7,017
Plugin Contributions:
12

Re: Free beer to anyone who can answer this question!

Open includes/templates/template_default/templates/tpl_product_info_display.php

find the following section of code:

<!--bof Add to Cart Box -->
<?php
if (CUSTOMERS_APPROVAL == 3 and TEXT_LOGIN_FOR_PRICE_BUTTON_REPLACE_SHOWROOM == '') {
  // do nothing
} else {
?>
            <?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-->

You'll need to modify the highlighted portions to get the look you want.

once you're satisfied save the file to includes/templates/YOUR_TEMPLATE.templates and upload to your server.

NOTE: We are sorry that Clyde is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

21 May 2008, 7:08 PM
#4
crashley1784 avatar

crashley1784

New Zenner

Join Date:
May 2008
Location:
Alconbury, UK
Posts:
27
Plugin Contributions:
0

Re: Free beer to anyone who can answer this question!

Yay! Thank you so much! hands you a free beer
You are my #1 ZC Hero!