Zen Cart Logo
If this is your first visit, check our documentation. To post, register or login.
Forums / Customizing the Look of Your Shop / Templates, Stylesheets, Page Layout / Swap over the 'add to cart' text/box and the 'add to cart' image

Swap over the 'add to cart' text/box and the 'add to cart' image

Locked
This thread is locked. New replies are disabled.
4 Apr 2007, 2:56 PM
#1
budfox avatar

budfox

Zen Follower

Join Date:
Aug 2006
Posts:
88
Plugin Contributions:
0

Post #1 by budfox

I'd like the button to be above the quantity box, so that it's level with 'tell a friend'

Here's where it is by default, which isn't as pretty as I'd like:

http://www.towertothepeople.co.uk/shop/index.php?main_page=product_info&cPath=7&products_id=8

You'd think this would be easy, but I can't work it out.

I've played with tpl_product_info_display.php with no success. I can't seem to split the two items without breaking the store. :huh:

Thanks all.

4 Apr 2007, 8:13 PM
#2
tmc_sherpa avatar

tmc_sherpa

Zen Follower

Join Date:
Mar 2007
Posts:
158
Plugin Contributions:
0

Post #2 by tmc_sherpa

copy
templates/template_default/templates/tpl_product_info_display.php
to
/includes/templates/your template/templates/tpl_product_info_display.php

and find the section with

<div id="cartAdd"> <?php echo $display_qty; echo $display_button; ?> </div>

swapping the echoes should to the trick...I think

Lazy and willing to work very hard to stay that way

4 Apr 2007, 9:08 PM
#3
budfox avatar

budfox

Zen Follower

Join Date:
Aug 2006
Posts:
88
Plugin Contributions:
0

Post #3 by budfox

Exactly what I thought, but it doesn't work.......

4 Apr 2007, 9:10 PM
#4
budfox avatar

budfox

Zen Follower

Join Date:
Aug 2006
Posts:
88
Plugin Contributions:
0

Post #4 by budfox

Tried it again. No joy :-(

4 Apr 2007, 9:49 PM
#5
tmc_sherpa avatar

tmc_sherpa

Zen Follower

Join Date:
Mar 2007
Posts:
158
Plugin Contributions:
0

Post #5 by tmc_sherpa

well, so much for the obvious :P

change $the_button code to

$the_button = zen_image_submit(BUTTON_IMAGE_IN_CART, BUTTON_IN_CART_ALT) . '<br />' . 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']);

Lazy and willing to work very hard to stay that way

4 Apr 2007, 10:24 PM
#6
budfox avatar

budfox

Zen Follower

Join Date:
Aug 2006
Posts:
88
Plugin Contributions:
0

Post #6 by budfox

Well that ought to work........but.......

I'll have to check out why that is throwing up errors.

Probably one '}' in a million lines of code.