Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / move add to cart button

move add to cart button

Locked

Views: 3,202

Results 1 to 11 of 11
This thread is locked. New replies are disabled.
11 Jul 2006, 2:27 AM
#1
mole69 avatar

mole69

New Zenner

Join Date:
Jun 2005
Posts:
49
Plugin Contributions:
0

move add to cart button

I want to move the add to cart button to below the picture instead of at the bottom.

11 Jul 2006, 9:01 AM
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: move add to cart button

Start in the admin > config > one of the display or layout settings

13 Jul 2006, 3:34 PM
#3
mole69 avatar

mole69

New Zenner

Join Date:
Jun 2005
Posts:
49
Plugin Contributions:
0

Re: move add to cart button

Thank you that worked.

28 Jul 2006, 12:23 PM
#4
monkeymadness avatar

monkeymadness

Zen Follower

Join Date:
Feb 2006
Posts:
270
Plugin Contributions:
0

Re: move add to cart button

hello,

i'd like to do the same ..move the add to cart button under the image on the product info page...with the description going down the left hand side

but i cant find any setting which will move it in admin>config

am I just being a blind dingbat or were you referring to the product listing page rather than info page? if so anoyone know what I need to do?

thanks

28 Jul 2006, 12:57 PM
#5
IDEASLady avatar

IDEASLady

Totally Zenned

Join Date:
Aug 2005
Location:
Trujillo Alto, Puerto Rico
Posts:
1,440
Plugin Contributions:
3

Re: move add to cart button

Yes, you will have to edit the tpl_product_display.php

Find it on includes/templates/template_default/templates
make a copy to your includes/templates/yourtemplate/templates

On that file you can move things around like you want them and you are using the override system to avoing braking the code. If something goes wrong, just delete and start over.

Have fun!

13 Aug 2006, 12:32 AM
#6
inksale avatar

inksale

Zen Follower

Join Date:
Jan 2005
Location:
Gold Country CA
Posts:
265
Plugin Contributions:
0

Re: move add to cart button

kobra:

Start in the admin > config > one of the display or layout settings

Can you be more specific, I'm going nuts looking for it....... Again......
Thanks,

13 Aug 2006, 12:39 AM
#7
Kim avatar

Kim

Obaa-san

Join Date:
Jun 2003
Location:
West Coast, North America
Posts:
26,627
Plugin Contributions:
0

Re: move add to cart button

In the tpl_product_info_display.php find this section:

<!--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="' . ($productGetInfo->getProductBuyNowQuantity()) . '" maxlength="6" size="4" /><br />' . $productGetInfo->getProductQuantityMinUnitsDisplay() . '<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 that section where you want it.

13 Aug 2006, 2:47 AM
#8
inksale avatar

inksale

Zen Follower

Join Date:
Jan 2005
Location:
Gold Country CA
Posts:
265
Plugin Contributions:
0

Re: move add to cart button

Its a conspericy!
I was looking for an easter egg that wasn't there. No wonder I couldn't find a place in admin to do this.

Thanks for the info on where to find the code. Now you truly think I would know what to do with it? I get it now. Its call job security! LOL
I wove you!!!

Works like a charm.
http://www.teamfasteddy.com/index.php?main_page=product_info&products_id=2

13 Aug 2006, 3:02 AM
#9
Kim avatar

Kim

Obaa-san

Join Date:
Jun 2003
Location:
West Coast, North America
Posts:
26,627
Plugin Contributions:
0

Re: move add to cart button

LOLOL - Ed, I promise it really is easy. Each section of the page is clearly marked with:

<!--BOF some section-->

stuff

<!--EOF some section-->

Figure out which section you want the cart button above or below and move the section of code I showed you. :D

13 Aug 2006, 3:09 AM
#10
inksale avatar

inksale

Zen Follower

Join Date:
Jan 2005
Location:
Gold Country CA
Posts:
265
Plugin Contributions:
0

Re: move add to cart button

I did it!
I did! I did! I did!!!, even posted a link above to show that im not lying.

Can i get bonus points towards being Zened, or a special name tag:

"I did it , So can you..."

Seriously,
Thanks!

13 Aug 2006, 3:15 AM
#11
Kim avatar

Kim

Obaa-san

Join Date:
Jun 2003
Location:
West Coast, North America
Posts:
26,627
Plugin Contributions:
0

Re: move add to cart button

:thumbsup: :thumbsup:

Good job!!

<hands Ed a cookie>