Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configurable Products - Website Category Page - Product Thumbnail - How to Show View Details Instead Add to Cart? #10617

Closed
hardik18882 opened this issue Aug 22, 2017 · 4 comments

Comments

@hardik18882
Copy link

Magento ver. 2.1.8
PHP 7

We have all products as "Configurable Products". Now on Front Website when we browse Category, It shows "Add to Cart" button on ALL products.. When we click on "Add to Cart" it takes to Detail page with this error message "You need to choose options for your item." since all product has some selection required. If we click "Add to Cart" from Product detail page after doing all required selection of Attributes it works fine.

Shouldn't it show "View Detail" Button on Category View page under each product? Am I missing any configuration for the same?

Please help.

Thanks,

@orlangur
Copy link
Contributor

Not sure about the "View Detail" functionality, here you can see some demo with swatches configured: http://magento2-demo.nexcess.net/men/tops-men/hoodies-and-sweatshirts-men.html

@hardik18882
Copy link
Author

hardik18882 commented Aug 22, 2017

Hello @orlangur
Our website has all products as Configurable products still it shows "Add to Cart" button instead "View Detail". Now If you see theme demo on http://ultimo.infortis-themes.com/demo/fifth/fashion.html it shows "View Detail" button if product is Configurable. This doesnt show into our website.
Thanks,

@hardik18882
Copy link
Author

Hello, I believe it's NOT possible with Magento 2.. Since this was showing to "View Detail" in Magento 1.X by default when Product type is configurable product. While with magento 2 it shows "Add to Cart" only.. Am I thinking it correct?

@orlangur
Copy link
Contributor

It's up to the theme how to display product listing. There does not seem to be "View Details" in core templates in catalog.

However, here is something similar to logic you need: https://github.com/magento/magento2/blob/develop/app/code/Magento/Catalog/view/frontend/templates/product/list/items.phtml#L219

In your case, when product does not have required options, just display in else something like

<a title="View Details" class="button btn-cart" href="http://ultimo.infortis-themes.com/demo/fifth/top1.html">View Details</a>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants