Results 1 to 4 of 4
  1. #1
    Join Date
    Nov 2007
    Posts
    33
    Plugin Contributions
    0

    Default Where is the template to adjust how the Add to Cart button looks?

    Currently the Quantity button is right above the Add to Cart button (vertically). I'd like to have them both on a horizontal line, so.. "Quantity X, Add to Cart". I've looked through the templates and can't seem to find it.

    To note on what I did: In tpl_product_info_display, it seems to be calling the include from somewhere else since as soon as I move some quantity code, both quantity and add to cart are removed.

  2. #2
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Where is the template to adjust how the Add to Cart button looks?

    All you need to do is remove some <br /> tags from the code in tpl_product_info_display.php. You may also need to eliminate some
    . '
    or
    ' .
    to make the PHP code correct.

  3. #3
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Where is the template to adjust how the Add to Cart button looks?

    This is how I did it for my store:
    PHP Code:
    <?php
        $display_qty 
    = (($flag_show_product_info_in_cart_qty == 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 == 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_CARTBUTTON_IN_CART_ALT);
                } else {
                  
    // show the quantity box  gjh42 4/13/06 - chg box layout to horiz. 20070507 - add button id
        
    $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" />' zen_get_products_quantity_min_units_display((int)$_GET['products_id']) . '<span id="cartAddButton">' zen_draw_hidden_field('products_id', (int)$_GET['products_id']) . zen_image_submit(BUTTON_IMAGE_IN_CARTBUTTON_IN_CART_ALT) . '</span>';
                }
        
    $display_button zen_get_buy_now_button($_GET['products_id'], $the_button);
      
    ?>

  4. #4
    Join Date
    Nov 2007
    Posts
    33
    Plugin Contributions
    0

    Default Re: Where is the template to adjust how the Add to Cart button looks?

    Quote Originally Posted by gjh42 View Post
    This is how I did it for my store:
    PHP Code:
    <?php
        $display_qty 
    = (($flag_show_product_info_in_cart_qty == 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 == 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_CARTBUTTON_IN_CART_ALT);
                } else {
                  
    // show the quantity box  gjh42 4/13/06 - chg box layout to horiz. 20070507 - add button id
        
    $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" />' zen_get_products_quantity_min_units_display((int)$_GET['products_id']) . '<span id="cartAddButton">' zen_draw_hidden_field('products_id', (int)$_GET['products_id']) . zen_image_submit(BUTTON_IMAGE_IN_CARTBUTTON_IN_CART_ALT) . '</span>';
                }
        
    $display_button zen_get_buy_now_button($_GET['products_id'], $the_button);
      
    ?>
    Wow thanks, that worked like a charm too!

 

 

Similar Threads

  1. v150 Where do I adjust [help (?)] that is shown in the shopping cart
    By schobook in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 25 Jul 2012, 07:36 PM
  2. how do i change the position of the add to cart button ?
    By what44 in forum Templates, Stylesheets, Page Layout
    Replies: 39
    Last Post: 11 Feb 2011, 05:32 PM
  3. How to move the add to cart button to the left side?
    By sharontan in forum Templates, Stylesheets, Page Layout
    Replies: 16
    Last Post: 10 Dec 2010, 04:58 PM
  4. Changing the looks of the add to cart
    By ben harry in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 1 Nov 2009, 04:18 PM
  5. how to add the add-to-cart-button to the new products box on the home page?
    By ebloger in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 10 Nov 2008, 10:30 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