Linked Questions

19
votes
6answers
9k views

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 ?
4
votes
3answers
7k views

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\...
0
votes
2answers
2k views

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?
2
votes
1answer
2k views

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 <?...
0
votes
4answers
309 views

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/...
0
votes
1answer
289 views

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 = $...
0
votes
1answer
221 views

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 - ...
1
vote
1answer
215 views

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()-&...
1
vote
1answer
60 views

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 ...
0
votes
2answers
42 views

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 ...
0
votes
0answers
21 views

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="http://www.w3.org/2001/XMLSchema-instance" layout="2columns-left" xsi:...