Discussions

Add to Cart button and SKU on the Product Display

Is it possible to display both the Add to Cart button and the SKU on the product display page?

In "Manage Display" on the Product Display content type, I can change the "Product" field to display the Add to Cart button or the SKU. I cannot change it to display both.

Can somebody tell me how to do this?

Thanks,

Posted: Oct 3, 2011

Comments

rfay Randy Fay on October 3, 2011

You can certainly do it by presenting the products using views (even a single-product view). In that case you can have a views field that is an add-to-cart and another that is a sku.

I'm surprised this is hard to do, but I couldn't figure it out either.

rfay Randy Fay on October 4, 2011

You don't have to do any custom display with views. Just set the formatter as shown here. If you want multiple "product" fields on your view of product display nodes, just add the "Content: Product" more than once.

emmit95123 on October 4, 2011

I wanted to used the SKU to display the model number. But, I could not figure out an easy way to do it and still display the Add to Cart button.

I ended up adding a "Model" field to the store Product type. This gave me the ability to display the model number on the product display page and still display the Add to Cart button. I am thinking about installing the Commerce AutoSKU module since I do not care what value is stored in the SKU. For now I am copying the same value in the SKU and the Model field.

rfay Randy Fay on October 11, 2011

Of course, if you're a programmer you could easily make a new field formatter that would provide the SKU along with the add-to-cart field.