- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-04-2017
01:00 AM
12-04-2017
01:00 AM
AbstractProduct substitution
Hello,
\Magento\Catalog\Block\Product\AbstractProduct is deprecated since 101.1.0.
Could anyone tell what is the good/substitute solution?
Labels:
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-04-2017
01:51 AM
12-04-2017
01:51 AM
Re: AbstractProduct substitution
Which API functions within it are you looking to use. https://github.com/magento/magento2/blob/2.2-develop/app/code/Magento/Catalog/Block/Product/View.php might be useful if you need getAddToCartURL
----
If you've found one of my answers useful, please give "Kudos" or "Accept as Solution" as appropriate. Thanks!
If you've found one of my answers useful, please give "Kudos" or "Accept as Solution" as appropriate. Thanks!
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-09-2018
02:01 PM
03-09-2018
02:01 PM
Re: AbstractProduct substitution
Yeah the view.php class seems like a good workaround until AbstractProduct gets a replacement. View.php extends AbstractProduct so it has everything you need, and ideally when abstract product gets replaced the view class will get updated to extend that and your underlying class will just continue to happily keep working without realizing what happened.