Forums / Templates, Stylesheets, Page Layout / Changing color and position of Add to Cart buttons?

Changing color and position of Add to Cart buttons?

Locked

Views: 4,078

Results 1 to 7 of 7
This thread is locked. New replies are disabled.
24 May 2008, 11:59 PM
#1
kevinmc3 avatar

kevinmc3

Totally Zenned

Join Date:
Jun 2006
Posts:
786
Plugin Contributions:
0

Changing color and position of Add to Cart buttons?

Where & How do I change the color and position of the Add to Cart button? Want to move to the top to the right of content, instead of at the bottom.

Also, where can I change the same for the Check out and Shopping Cart buttons?

Thanks,
Kevin

https://www.cvtreasures.com

25 May 2008, 12:43 AM
#2
lucasnlaura avatar

lucasnlaura

New Zenner

Join Date:
May 2008
Posts:
14
Plugin Contributions:
0

Re: Changing color and position of Add to Cart buttons?

im extremely new and probably have no right making comments, but from my little experience, i have no idea how to move the button and i dont think you can change the color because the button is a image. but if you go here: /public_html/includes/templates/your template/buttons/english you can upload your own button image and then when it gets there you just change the name of it to the one that is there now. does that make sense? google to find some buttons or copy them from another site. remember big and bright buttons"SELL"

25 May 2008, 5:34 AM
#4
kevinmc3 avatar

kevinmc3

Totally Zenned

Join Date:
Jun 2006
Posts:
786
Plugin Contributions:
0

Re: Changing color and position of Add to Cart buttons?

Thanks but to a non-programmer, that thread and very brief without any detail...

25 May 2008, 5:40 AM
#5
misty avatar

misty

Inactive

Join Date:
Apr 2004
Location:
UK
Posts:
5,752
Plugin Contributions:
1

Re: Changing color and position of Add to Cart buttons?

Programmer qualifications not really required to move
block of code from one position to another.
i.e.

<!--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-->
```via
tpl_product_info_display.php

Dezina ZenCart Templates
Please do not PM for support queries..Post in forums..help others

25 May 2008, 5:46 AM
#6
kevinmc3 avatar

kevinmc3

Totally Zenned

Join Date:
Jun 2006
Posts:
786
Plugin Contributions:
0

Re: Changing color and position of Add to Cart buttons?

misty:

Programmer qualifications not really required to move
block of code from one position to another.
i.e.

<!--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-->
> tpl_product_info_display.php

So, what exactly am I suppose to do with this code to move the Add to Cart button from the button to the right of the product title/heading?

Kevin
<https://www.cvtreasures.com>
25 May 2008, 5:51 AM
#7
kevinmc3 avatar

kevinmc3

Totally Zenned

Join Date:
Jun 2006
Posts:
786
Plugin Contributions:
0

Re: Changing color and position of Add to Cart buttons?

lucasnlaura:

im extremely new and probably have no right making comments, but from my little experience, i have no idea how to move the button and i dont think you can change the color because the button is a image. but if you go here: /public_html/includes/templates/your template/buttons/english you can upload your own button image and then when it gets there you just change the name of it to the one that is there now. does that make sense? google to find some buttons or copy them from another site. remember big and bright buttons"SELL"

Thanks, this did the trick. Now, I just need to figure out the code to move it.

Kevin