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 / putting attributes in the add to cart box on product info page

putting attributes in the add to cart box on product info page

Locked

Started by angela183 on 19 May 2006, 3:55 AM · Views: 21,211

Results 41 to 55 of 55
This thread is locked. New replies are disabled.
12 Aug 2006, 6:08 PM
#41
dlaitila avatar

dlaitila

New Zenner

Join Date:
Sep 2005
Posts:
57
Plugin Contributions:
0

Post #41 by dlaitila

Which box in the Attribute manager do I put the price? I tried removing the + in the first field and entering 17.99 in the price field. That looks ok on the website, but if you order it, it really just doubles the price of the tshirt.

I don't know if I need to put something in these fields or not
Price Factor: Offset: One Time Factor: Offset

12 Aug 2006, 6:34 PM
#42
clydejones avatar

clydejones

Deceased

Join Date:
Nov 2005
Location:
Colorado Springs, CO USA
Posts:
7,017
Plugin Contributions:
12

Post #42 by clydejones

In your categories/products I've set priced by attribute to true and the price to 0.

This way you can set the price(s) in the attribute manager without doubling.

NOTE: We are sorry that Clyde is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

13 Aug 2006, 2:47 AM
#43
dlaitila avatar

dlaitila

New Zenner

Join Date:
Sep 2005
Posts:
57
Plugin Contributions:
0

Post #43 by dlaitila

Thanks, it worked. It's had me stumped for 6 months. Now I can apply it to 10 other zen-cart sites I do.

14 Aug 2006, 11:15 PM
#44
nubai avatar

nubai

New Zenner

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

Post #44 by nubai

Hi there!

First post i've needed to make thanks to that lovely search feature!! :D

Quick question for you clydejones, I've gone through the processes you described for adding the attributes and add cart to the same box but i can only get the box to appear under the attributes box. Prolly something real simple but a webdev i aint so any help would be greatly appreciated.

Here's a link so you can see what i mean.

http://www.silentdesire.co.uk/index.php?main_page=product_info&cPath=12&products_id=78

Just in case anyones in the office - THIS IN A LINGERIE SITE SO MAY CONTAIN NUDITY

Thanks for all your help so far...

15 Aug 2006, 2:15 AM
#45
clydejones avatar

clydejones

Deceased

Join Date:
Nov 2005
Location:
Colorado Springs, CO USA
Posts:
7,017
Plugin Contributions:
12

Post #45 by clydejones

in your tpl_product_info_default

Move everything between

<!--bof Add to Cart Box --> and <!--eof Add to Cart Box-->

to just above <!--eof Attributes Module -->

NOTE: We are sorry that Clyde is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

15 Aug 2006, 6:03 PM
#46
nubai avatar

nubai

New Zenner

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

Post #46 by nubai

Hmmm. Didn't work but you what? I just looked at it how it is with fresh eyes and I actually like it the way it is. :blush:

Thanks anyway!

7 Dec 2006, 10:04 PM
#47
miken avatar

miken

New Zenner

Join Date:
Aug 2005
Posts:
5
Plugin Contributions:
0

Post #47 by miken

** BUMP **

This worked GREAT! It makes the product info page much more intuitive.

This thread should definitely be a sticky or in the FAQs or something. Thanks for your brilliance.

MikeN

5 Mar 2007, 12:47 AM
#49
grandmaj avatar

grandmaj

Zen Follower

Join Date:
Feb 2007
Posts:
104
Plugin Contributions:
0

Post #49 by grandmaj

Hello,

I realize that this is an older post, but I try to learn all that I can from the forum (even the old archives!) before asking a question.

I followed the directions in this thread and, for the most part, it's working great. However, I suspect that I may have messed something up in the tpl_product_info_display.php when I did so. In the Firefox browser, the box looks fairly good with the exception of having too much space between the attributes dropdown boxes. However, in IE6 the dropdown boxes are spaced nicely, BUT the entire top title bar (the dark pink one with "Please Choose" in it)refuses to display at all.

Have you any idea why this may be happening?
I can live with the funny spacing (I figure that's just 'browser quirks'), but the top title bar missing is something I would really like to remedy. Thank you in advance for any help you can lend.

8 Mar 2007, 1:00 PM
#50
clydejones avatar

clydejones

Deceased

Join Date:
Nov 2005
Location:
Colorado Springs, CO USA
Posts:
7,017
Plugin Contributions:
12

Post #50 by clydejones

GrandmaJ:

Hello,

I realize that this is an older post, but I try to learn all that I can from the forum (even the old archives!) before asking a question.

I followed the directions in this thread and, for the most part, it's working great. However, I suspect that I may have messed something up in the tpl_product_info_display.php when I did so. In the Firefox browser, the box looks fairly good with the exception of having too much space between the attributes dropdown boxes. However, in IE6 the dropdown boxes are spaced nicely, BUT the entire top title bar (the dark pink one with "Please Choose" in it)refuses to display at all.

Have you any idea why this may be happening?
I can live with the funny spacing (I figure that's just 'browser quirks'), but the top title bar missing is something I would really like to remedy. Thank you in advance for any help you can lend.

Do you have a URL for you site so I can take a look.

NOTE: We are sorry that Clyde is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

18 Mar 2007, 5:39 PM
#51
richx avatar

richx

New Zenner

Join Date:
Jan 2005
Posts:
29
Plugin Contributions:
0

Post #51 by richx

I have tried this a number of times - in my custom folder - and when it did not work - I tried in the main file - If I delete the code - no boc - but if I cut and paste to below the product description - It ALWAYS appears on the right - above the breadcrumb line...

Any other suggestions???

23 Apr 2008, 12:56 AM
#52
amopro avatar

amopro

New Zenner

Join Date:
Jan 2007
Posts:
35
Plugin Contributions:
0

Post #52 by amopro

It is good one you should write down a mod

4 May 2008, 12:00 PM
#53
shk avatar

shk

New Zenner

Join Date:
Oct 2006
Posts:
62
Plugin Contributions:
0

Post #53 by shk

Wouldn't this work, saving you the hassle of additional defines?

<!--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">
<!--bof Attributes Module -->
<?php
  if ($pr_attr->fields['total'] > 0) {
?>
<?php
/**
 * display the product atributes
 */
  require($template->get_template_dir('/tpl_modules_attributes.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_attributes.php'); ?>
<?php
  }
?>
<!--eof Attributes Module -->
    <?php
      echo $display_qty;
      echo $display_button;
            ?>
          </div>
  <?php } // display qty and button ?>
<?php } // CUSTOMERS_APPROVAL == 3 ?>
<!--eof Add to Cart Box-->
4 Sep 2008, 6:46 AM
#54
mb1 avatar

mb1

Totally Zenned

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

Post #54 by mb1

how do we do this now for 1.3.8 has anything changed?

https://www.gorillagear.ca = zencart v1.3.9h with 40+ mods

14 Nov 2009, 8:34 AM
#55
michellepchy avatar

michellepchy

New Zenner

Join Date:
Jan 2009
Posts:
29
Plugin Contributions:
0

Post #55 by michellepchy

Just wanted to say thank you for this post I have been building my first site and search the forum for my answers when I am stuck and found this post helped to me to create just what I was looking for thank you so much.