Change position of the add to cart button

Posts: 4
Joined: 10/21/2008

My add to cart button is on the bottom of the product page, under alot of product information, so it can be hard to find. I would like to move the product information to the bottom. Is this possible?

Right now it looks like this:
1. Product information
2. Price
3. Quantity field
4. Add to cart button

Can it be changed to this?:
1. Price
2. Quantity field
3. Add to cart button
4. Product information

Thanks in advance
/Manne

Posts: 5625
Joined: 08/07/2007
AdministratorHead Code Monkey - I eat bugs.

Check out the product field settings at /admin/store/settings/products/edit/fields.

Posts: 31
Joined: 10/21/2008

Why isn't the quantity field listed there too?

It's strange how there is one place to order any additional CCK fields on the product edit & display pages, there is another place to order additional attributes for each class & product, then there is a third settings page that controls where/what default product fields display. Yet no place to arrange the quantity field, description...

I want the quantity field to show up right after price. This is before all the attributes are listed. I'm assuming my only option is to write code to do this.

Posts: 1377
Joined: 08/14/2007
Bug FinderEarly adopter... addicted to alphas.Getting busy with the Ubercode.

Quantity field is part of the add to cart form, I believe, and the description is part of the $node object. Any modification of the actual $node you should do through a template file. If you don't know how to theme nodes, then you should read up on that first.

--

"Pain don't hurt." - Dalton

Mike Nelson's RiffTrax! www.rifftrax.com

Posts: 31
Joined: 10/21/2008

I do realize that the description & CCK fields are part of the product $node. I guess what I was trying to point out is that where Ryan pointed OP to does not have all the options needed to reorder display on the node the way OP wanted.

That settings pages is quite obviously missing the ability to weight the product description (seemingly randomly outputted in a paragraph) and CCK fields (all of which are wrapped in div id="field-items.")

And since OP wanted to move the qty text input too, no one mentioned that this qty input is part of the add_to_cart form and not positionable by itself. The whole add to cart form is weighted together. So, if you have any attributes, these will always be listed first in the form, then qty input, and finally add to cart button.

How does one move the qty field above all the attributes in the form? I don't think that's a custom $node theme, but a hook_form_alter. I'm still investigating this.

Half my products have a quantity attribute which comes first in the form, directly following the last product field Sell Price and before all other attributes. This worked great till I entered the other half of my products which don't have a quantity attribute but have the quantity field.

Edit: I just now saw that Ryan's suggestion will most likely work for OP cuz they just want the add to cart form to be moved up above the description, but it's not perfect as you still have to guess, trial & error, at what weight the description is outputted.

Posts: 31
Joined: 10/21/2008

Also have noticed that the CCK fields on the product node are not wrapped together in div class="field-items," but they are actually wrapped individually one div higher and are organized on the node by the weights assigned to under manage fields for that content type. So there are two settings areas to change the display of content of the node.

As far as I can tell though, the quantity and add button on the form will alway follow all other attributes in the form and you still have to guess around the description field of the node.

EDIT: changed "product class" to "content type"