Linked Questions

20 votes
6 answers

Magento 2 - How to retrieve product informations

I want to use functions like getName(), getPrice(), etc. of product to retrieve product information in Magento 2. Can anyone show me how can I achieve that ?
Huan Dao's user avatar
  • 607
4 votes
3 answers

Magento 2 Get product Review star in phtml

I need to show the rating for the products in my custom slider in my home page. Here im getting just the rating number say: 60 . How to get the rating stars here in template. Featuredproduct\view\...
Sushivam's user avatar
  • 2,629
0 votes
2 answers

How to Get product id and Sku By product name magento 2..?

How to get Product id and Sku By using the product Name in a phtml file?
SUBIN CHANDRAN's user avatar
2 votes
1 answer

Show description of product in wish list phtml file

I want to get description of product in wishlist Page, I tried this code In list.phtml file but no luck . <?php echo $_product->getDescription() ?> EDIT my code now look like this <?...
Learner's user avatar
  • 833
1 vote
2 answers

How to show configurable product options in popup in Magento 2

I have create one popup. In popup get configurable product collection and it working fine. But i have faced one issue. In configurable products collection configurable product options not showing. ...
Mohit Patel's user avatar
  • 3,750
0 votes
4 answers

Magento 2 Custom query to display selected product in Custom block

I have some product ids . Currently I can display products in category using {{block . But now I am developing a custom block in app/design/frontend/Alothemes/bencher6/Magento_Theme/templates/myphp/...
John's user avatar
  • 75
0 votes
1 answer

Set current product for custom block in category list

I have added a custom block in each product item, in category list page: catalog_category_view.xml <page xmlns:xsi="" layout="2columns-left" xsi:...
zekia's user avatar
  • 620
1 vote
1 answer

Specialprice & finalprice returns no decimals

Magento 2 returns regular price differently from special and final price. Expected result: $product->getPrice(); // 89,95 $product->getPriceInfo()->getPrice('regular_price')->getAmount()-&...
Tober's user avatar
  • 23
0 votes
1 answer

Magento 2: Parsing Item information through block

I want to create a phtml file and create a dynamic block with that one to put on CMS pages - Take it as product information blocks where i want to display the product name, the price, the URL - ...
Marcel H.'s user avatar
  • 147
0 votes
1 answer

In Magento 2.2.5 load product by id is not working

In Magento 2.2.5 load product by id is not working. I tried the below solutions: Sol 1: $product_id=20; $objectManager = \Magento\Framework\App\ObjectManager::getInstance(); $product = $...
Saravanan DS's user avatar
  • 1,126
1 vote
1 answer

convert objectmanager in to factory method in magento 2

Here I don't want to use a object manager. Below code give me result as i aspect.but I don't want to use a object manager. I don't known how to convert into factory method.can any one me out. Here is ...
Vishnu Salunke's user avatar
0 votes
2 answers

Phtml block in sales email template from admin

I'm trying to add a phtml block to the sales email using the admin area to edit the template. In Magento 1.x this worked fine, however I'm not sure how to do this the same way in Magento 2.3x? I've ...
Steve's user avatar
  • 3
1 vote
2 answers

exclude some other product in the cart from receiving discount

How to get product value ( product price) if attribute "logitech" is set to yes [attribute is Boolean]. I'm new here, still learning magneto. below code, calculate all items in the cart but ...
Bayzel's user avatar
  • 187