Discussions

Add to cart button on product display node

Hello forum and thankyou Ryan and the commerce guys team for making this brilliant piece of serious commerce software for Drupal 7 and beyond.

I have been trying to get the hang of setting up Drupal commerce.

The problem:

I do not know how to use command line at this stage as I have not been able to dedicate time yet to learn it, so can not use commerce quickstart.

I would like a product display node I made, to have an add to cart button as is shown on the commerce quickstart, but for the life of me I do not know how to make this happen, on the node I have the Product reference reference field as I am supposed too.

Trouble reordering the stacking order and showing stuff.
Under product types I managed to get the image to display in the display node by ajax dragging the image out of 'hidden' under all the manage displays sub menu items and into the list of fields but reordering them under each of the manage display sub headings
default, Node: Teaser Node: Full content and Line item, but I could not see anything for add to cart button here anywhere. As I was hoping to get the add to cart button to show in display product node that people are going to see. Also re-stacking via ajax the manage display order in any of the sub headings default, Node: Teaser Node: Full content and Line item did not cause them to be visually reordered when looking at the product details on my practice development site, visually re-stacking via ajax usually works fine when making a product type under products types, but does not work for me under product displays.

Thanks from Josh

Posted: Jun 8, 2011

Comments

commercestudy on June 8, 2011

Sorry the below:
visually re-stacking via ajax usually works fine when making a product type under products types, but does not work for me under product displays.

Was meant to say:
visually re-stacking via ajax usually works fine when making a CONTENT type under CONTENT types, but does not work for me under product displays.

maxchock on June 8, 2011

Hi,

I don't quite understand the rest of your question BUT if you want to add a "ADD TO CART" button on your Views I think I know the way (IF this is what you request http://www.ok2u.com.my/new-products).

Since you already successfully added the Product Image so I assumed you got the "Relationship" right. The field for "ADD TO CART" is actually "Content: Details". Add this field to your view and you will see the button.

Hope it helps.
Max.

commercestudy on June 8, 2011

Hello Max, thankyou

Your comment made me re-watch a video by Randy Fay from Commerce Guys on using views to list products on commerce and I got it this time, it worked, I get an add to cart button in views. Last time I just dragged the whole node into views without using views fileds to separate them as Randy did. Last time I failed as I did not choose show 'content' of 'type' product display in the select boxes at the very begging stage of setting up the view. Now I have the view set up perfectly for the product.

Randy's video and also anyone interested should check out his other vimeo videos under his username for more step by step set ups for commerce.
http://vimeo.com/22746978

As for my other problem. When you click on the product title in the view you are in and go through to the product information page, I can not find how to re order the image, price etc once you are out of the view and into the product information. Under views I can re order the images, price, sku add to cart button just fine, but once I click on the product heading and go into the product information page, I can not find a place to reorder that information?

maxchock on June 8, 2011

No problem, I'm a newbie for Drupal + Commerce also. So let's help each other.. haha~~

About your other problem. You can re-order those thing under Views because Views is for you to generate a list of result. To re-order/arrange the product information page, you need to do it at "Administration » Store » Products » Product types » Manage Display". There, you can arrange your information vertically.

commercestudy on June 8, 2011

Hi Max,

You mentioned:
Administration » Store » Products » Product types » Manage Display

This was where I was thinking I could re-arrange the visual layout of description image, add to cart etc for display once someone clicks into the product description, for me this did not work.

I did find the answer however to this dilemma:
For me I found in the end that going to the product display node I made and going to manage display I could successfully re-order the image, add to cart button, description, sku etc visually and it worked as it looks as though the product reference filed brings these into the product reference node to be able to be manipulated.

These issues are now all ironed out. Yes us commerce newbies can help each other out.

thanks from Josh

Brian on September 26, 2011

Thank you guys for your postings. I'm the next newbie and I have been searching for hours and hours how to re-arrange the display. First it didn't work the way you discribed it but then I found out to choose the right variant of the display, e.g. teaser, full etc. For instance if there is an additional custom setting for the "full" display, the default display arrangements don't have any effects.

content types » Product Display (or the type you've defined) » Defauls (or Teaser, Full, etc...)