Skip to main content

Magento 2 How To Get Product Description On List Page ?

In eCommerce Description of the product is most important part as customer always judge purchase based on good description. We will check how we can get description on product list page in Magento 2.
Goto Stores > Attributes > Product > Description > Storefront Properties set Visible on Catalog Pages on Storefront and Used in Product Listing to TRUE.

In your code you can edit list.phtml and add code as below.
<?php echo $this->helper('Magento\Catalog\Helper\Output')->productAttribute($_product, $_product->getDescription(), 'description') ?>

or
<?php echo $_product->getDescription() ?>

Thank You.!

Comments

  1. You can download the free House of Fun app on your cell phone and take all the enjoyable of the on line casino with you wherever you go! These kinds of free slots are great for Funsters who're out-and-about, and looking for a enjoyable approach to cross the time. By downloading this game, you agree to future game updates as launched on your app store or social community. In short, the rules allowing 1xbet "stock", "renchan", and tenjō reworked the pachisuro from a low-stakes type of leisure only a few years back to hardcore playing.

    ReplyDelete

Post a Comment

Popular posts from this blog

Magento 2 Set Title And Meta Title In Page Programatically

We can set different Meta Title and Page Heading programatically. I am giving you example. Refer below example - public function __construct ( \Magento\Framework\View\Element\Template\Context $context , \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig , \Magento\Framework\View\Page\Config $pageConfig , $data = array () ) { $this -> _scopeConfig = $scopeConfig ; $this -> _pageConfig = $pageConfig ; parent :: __construct ( $context , $data ); } /** * Prepare global layout * * @return $this */ protected function _prepareLayout () { $this -> _pageConfig -> addBodyClass ( 'advance-sitemap' ); if ( $this -> getSeoTitle ()) $this -> _pageConfig -> getTitle ()-> set ( 'Meta Title' ); if ( $this -> getMetaKeywords ()) $this -> _pageConfig -> setKeywords ( 'Meta Keywords' ); if ( $this -> getMetaDescription ()) $this -&g

Remove SID (session ID) from URL in Magento 2

Before removing SID (session ID) we should have knowledge why Magento uses SID (session ID) . Use SID on Frontend — Set to Yes if you want a user to stay logged in while switching between stores. Go to the Stores > Configuration > General > Web > Session Validation Settings > Use SID on Storefront and set its value to No   Thank You.!

Magento 2 Disable Minicart functionality Completely

The Cart Sidebar is often called the  mini cart  and displays a summary of the items in the cart. It is enabled by default and appears when you click the number of items in the Cart Link.   To Disable Mini cart Sidebar follow below steps - On the Admin sidebar, click  Stores . In the  Settings  section, choose  Configuration . In the  Sales  section on the left panel, choose  Checkout . Expand the  Shopping Cart Sidebar  section. Set  Display Shopping Cart Sidebar to No . Click  Save Config . Thank You.!