Results 1 to 4 of 4
  1. #1
    Join Date
    Jul 2011
    Location
    New Jersey
    Posts
    98
    Plugin Contributions
    0

    Default 2nd "Add To Cart" button

    Hello All,

    Is there possible to add second "Add To Cart" button at the bottom of the last images in my product info page? I tried the way provided by "haredo" http://www.zen-cart.com/forum/showthread.php?t=94000 it doesn't work.....

    Here is one of my product info page: http://www.oleklejbzon.com/campbells...products_id=39

    Thanks

  2. #2
    Join Date
    Nov 2009
    Location
    UK
    Posts
    1,090
    Plugin Contributions
    0

    Default Re: 2nd "Add To Cart" button

    Go into your template folder and find the file tpl_product_info_display.php

    Find this...


    <!--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-->


    Copy and paste it before <!--bof Prev/Next bottom position -->

  3. #3
    Join Date
    Jul 2011
    Location
    New Jersey
    Posts
    98
    Plugin Contributions
    0

    Default Re: 2nd "Add To Cart" button

    Quote Originally Posted by dgent View Post
    Go into your template folder and find the file tpl_product_info_display.php

    Find this...


    <!--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-->


    Copy and paste it before <!--bof Prev/Next bottom position -->
    Thanks dgent, it works!

    btw, is there possible to put the product title, product description and product price below the first image inside the product info page?

    Here is the link:
    http://www.oleklejbzon.com/campbells...&products_id=4

    Please take a look at the attachment
    Attached Images Attached Images  

  4. #4
    Join Date
    Nov 2009
    Location
    UK
    Posts
    1,090
    Plugin Contributions
    0

    Default Re: 2nd "Add To Cart" button

    Sure, just do the same thing - find the section in the code, and just copy and paste it around whereever you like.

 

 

Similar Threads

  1. v151 Getting rid of "add to cart" and just have a "buy" button
    By BryanKollar in forum General Questions
    Replies: 5
    Last Post: 22 Feb 2014, 06:41 PM
  2. Replies: 0
    Last Post: 2 Jan 2011, 01:14 PM
  3. Replies: 26
    Last Post: 19 Feb 2010, 02:56 AM
  4. Change "Add to cart" button to "Download" button instead?
    By m_mbarakota in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 21 Jan 2009, 12:56 PM
  5. How to add "Download" button instead of "Add to cart" one
    By m_mbarakota in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 21 Jan 2009, 04:49 AM

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