Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options not deleted user 44418

General questions about Magento 2, not specific to a minor version. Use this tag to distinguish from Magento 1. If you have issues with a specific version, please use the appropriate 'Magento-2.x' tag instead. Functionalities between Magento 2 minor versions might differ.

0 votes
2 answers
2k views

Is there any way to add module block inside any other module's phtml file in magento 2?

I have a layered navigation module inside my Magento 2 custom created theme. Now, I have to use this layered nav module's phtml file to another module just like catalog module's phtml file. Can an …
Yudi's user avatar
  • 616
0 votes
0 answers
427 views

How to get all products id with price based on cart rule in magento 2

I have to show configurable product's price associated with my cart price rules in the product listing page. Suppose I have a product who's price is $20 if anyone purchase that product more than 10 …
Yudi's user avatar
  • 616
1 vote
1 answer
1k views

how to get all attributes of products in magento 2?

Is there any way to get all attributes of configurable products in the product listing page. Like as magento 1 <?php $simple_collection = $conf->getUsedProductCollection()->addAttributeToSelect('*')- …
Yudi's user avatar
  • 616
0 votes
2 answers
973 views

how to use model in magento 2

<?php $price_rules = Mage::getModel('startupready_priceRules/quantitybreaks'); $price_rules->load($priceRuleList); $price_rules->getPricingTables(); ?> Is there any way to use model like this …
Yudi's user avatar
  • 616
3 votes
1 answer
2k views

How do i find the discount amount based on product that matches shopping cart price rule in ...

I am trying to find the discount amount which match the shopping cart rule based on product. I want to get discount amount that matches my product price rule based on product details(product id, sku). …
Yudi's user avatar
  • 616
2 votes
2 answers
4k views

How to call a custom created extension model in phtml file of magento 2?

I am finding the way to call my custom extension's model inside my phtml file. and i am using the following code to get the model inside my phtml file. <?php $price_rules=$objectManager->getModel('St …
Yudi's user avatar
  • 616
3 votes
2 answers
5k views

Magento 2 : How to get store contact number and email address

I want to display my magento 2 store contact detail & mail address in the frontend. How to get store contact and email address in magento 2 and display it in header.phtml file?
Yudi's user avatar
  • 616
1 vote
0 answers
473 views

How to display top viewed products and best selling products in magento 2?

I have to display best selling products and top viewed products in my magento 2. Can anyone please help me to achieve this?
Yudi's user avatar
  • 616
2 votes
2 answers
2k views

What is the equivalent of Mage::app() in magento 2, like Magento 1?

I am Migrating a website from Magento 1 to Magento 2. In Magento 1, I was using <?php $isReviewScreen = Mage::app()->getFrontController()->getRequest()->getRouteName() == 'review'; ?> I am trying …
Yudi's user avatar
  • 616
1 vote
0 answers
116 views

Undefined offset: 90 in /opt/lampp/htdocs/magento2_twp/vendor/magento/module-eav/Model/Resou...

I am migrating my website from Magento 1.7 to Magento 2. In my backend , whenever i am trying to edit any product URL redirection , I am getting Undefined offset: 90 in /opt/lampp/htdocs/magento2_twp/ …
Yudi's user avatar
  • 616
1 vote
Accepted

How to call a custom created extension model in phtml file of magento 2?

You can use ObjectManager to call method of any model. just for an example- <?php $objectManager = \Magento\Framework\App\ObjectManager::getInstance(); $price_rules = $objectManager->get('Custom …
Yudi's user avatar
  • 616
0 votes
1 answer
2k views

"Cannot gather stats! Warning!"

stat(): stat failed for /opt/lampp/htdocs/magento2/pub/media/catalog/product/t/a/sample_image.jpg I've seen the discussion here with regard to this problem to attempt to resolve this warning. …
Yudi's user avatar
  • 616
0 votes
1 answer
959 views

How to show price using echo $block->getDisplayValue() in list.phtml file?

I found product price which is showing on the single product page. And it's coming form default.phtml file inside Catalog/product/price/amount/default.phtml. This code is using <?php echo $block->g …
Yudi's user avatar
  • 616
0 votes
1 answer
176 views

I want to remove html file in magento2, but only from home page all other page file should b...

My code is below now i want to remove list.phtml file form only home page. <?xml version="1.0"?> <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="2columns-left" xsi:noNamespaceSch …
Yudi's user avatar
  • 616
0 votes
0 answers
595 views

Product's reviews not displaying in single page in Magento 2?

I am trying to get reviews in single product page. To do that I am using - <?php $_items = $block->getReviewsCollection()->getItems(); ?> But after putting this, I am getting: Fatal error : Call …
Yudi's user avatar
  • 616

15 30 50 per page