Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Movnig the Add This To My Cart Button

Movnig the Add This To My Cart Button

Views: 698

Results 1 to 3 of 3
9 Jan 2014, 5:41 PM
#1
silverhd avatar

silverhd

Totally Zenned

Join Date:
Mar 2008
Location:
USA
Posts:
563
Plugin Contributions:
0

Movnig the Add This To My Cart Button

Hello:

I am trying to move my "Add this to my cart " button in the Abbington Mega template from the top to below the description. I went to the tutorial that explained this but I have something totally different than that explanation.

I went to /includes/templates/abbington_mega/templates/tpl_product_info_display.php and this is what I have:

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

Do I need to move this entire block of information to do this correctly?

I am building this site as a sub but this is an example of what I am talking about:

http://www.petluxuryboutique.com/shop/bath-body/bath-sets-and-lotions/ginger-therapy-gift-set

Thanks in advance for the help,

Silver

9 Jan 2014, 6:39 PM
#2
picaflor_azul avatar

picaflor_azul

Totally Zenned

Join Date:
Jul 2009
Location:
picaflor-azul.com
Posts:
6,940
Plugin Contributions:
28

Re: Movnig the Add This To My Cart Button

SilverHD:

Hello:

I am trying to move my "Add this to my cart " button in the Abbington Mega template from the top to below the description. I went to the tutorial that explained this but I have something totally different than that explanation.

I went to /includes/templates/abbington_mega/templates/tpl_product_info_display.php and this is what I have:

<!--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-->
> 
> Do I need to move this entire block of information to do this correctly? 
> 
> I am building this site as a sub but this is an example of what I am talking about:  
> 
> <http://www.petluxuryboutique.com/shop/bath-body/bath-sets-and-lotions/ginger-therapy-gift-set>
> 
> Thanks in advance for the help,
> 
> Silver

Yes, you need to move the entire block of code.


Thanks,

Anne
9 Jan 2014, 7:35 PM
#3
silverhd avatar

silverhd

Totally Zenned

Join Date:
Mar 2008
Location:
USA
Posts:
563
Plugin Contributions:
0

Re: Movnig the Add This To My Cart Button

Anne:

Thank you so much. I have made so many mistakes that I am gunshy rather than just going with it. That worked fine. One more question: Referring to that same page, how do I move the (•Model: 34185 and •100 Units in Stock) up along side of the product image with the pricing, and at the same time, make it a larger font? ref: http://www.petluxuryboutique.com/shop/bath-body/bath-sets-and-lotions/ginger-therapy-gift-set

Thanks again,

Silver