16
votes
Accepted
Magento 2 display configurable Price Range in product listing
You need to pluginize getProductPrice method.
SR/Stackexchange/etc/frontend/di.xml
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:...
11
votes
Magento 2: Top Nav Menu is not appearing in Home Page
Take a look to this issue:
https://github.com/magento/magento2/issues/3421
Summary:
In some cases when Varnish Cache is activated, due to a Magento 2 and Varnish issue, the navigation menu can ...
9
votes
Accepted
Magento 2: Top Nav Menu is not appearing in Home Page
After following major tutorials and troubleshooting web pages it turned out the issue lies with my hosting configuration.
Varnish Cache seems to be the cause of the menu disappearing. Disabling ...
7
votes
Unexpected end of JSON input after cache cleaned
I had this problem, and I identified that
I had left some cms block with the field
data-mage-init = {
that is,
without closing the tag } json
6
votes
Accepted
Magento 2 How to get first level parent category of current Category?
you can use to getParentCategories() to collect all parent categories, then loop check with level.
protected $_registry;
public function __construct(
\Magento\Framework\Registry $...
4
votes
Magento 2 Error occured after upgrade : Warning: ltrim() expects parameter 1 to be string, array given
I came across this and turned out to be an issue when you run integration tests at some point before running bin/magento setup:di:compile.
Integration tests generate some test modules in app/code/...
4
votes
magento2 admin dashboard not loading css and js
Please check it out if static contain .htaccess file or not if not then paste it from this link https://github.com/magento/magento2/blob/2.2-develop/pub/static/.htaccess and do this command
sudo php ...
4
votes
Accepted
Update quantity in minicart
In minicart.phtml file at last insert below script,
<script>
jQuery('body').on("click",".more, .less",function(){
var obj = jQuery(this);
var currentQty = obj.siblings('.cart-item-qty')....
4
votes
Accepted
Retrieve Entity Id from REST API using Order ID
Try this:
rest/V1/orders?searchCriteria[filter_groups][2][filters][0][field]=increment_id&searchCriteria[filter_groups][2][filters][0][value]=**INCREMENT_ID_HERE**&searchCriteria[filter_groups]...
4
votes
Accepted
Getting following erroes in system.log magento 2.2.1 after upgrade to 2.1.9
All of these are debug information of Magento which taken into log while processing of layout files to render html.
It's very useful while you are struggling with any block is not rendering or ...
4
votes
reporting_system_updates table is getting large
(TLDR) Simple/Short Answer:
Here's a screenshot of the "Official" response I received - from the New Relic Support team:
In other words, you can safely delete data in the reporting_system_updates ...
3
votes
magento 2 adding tab in custom module edit section
I was having the same issue like the content was showing just below the tab name.
Creating Form.php inside Vendor/Module/Block/Adminhtml/Faq/Edit/Form.php helped me solved my issue. after creating ...
3
votes
Magento 2 Get Product Price excluding tax in phtml
Get your prices as folllows,
$priceWithoutTax = $product->getPriceInfo()->getPrice('final_price')->getAmount()->getBaseAmount();
$priceWithTax = $product->getPriceInfo()->getPrice('...
3
votes
Accepted
UiComponent export button issue, error: getRowData() must be an instance of Magento\Framework\Api\Search\DocumentInterface (Solved by myself)
I have resolved the issue by adding below code
$this->_init(
'Magento\Framework\View\Element\UiComponent\DataProvider\Document', 'Package\Module\Model\ResourceModel\Test'
);
to ...
3
votes
Accepted
Magento 2 get Subcategories of a category
You can get subcategories structure up to infinite level as below.
<?php
function categoryLoop($id){
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$categories = $...
3
votes
Magento 2 How to add new method in override block
1 : Copy that block to your Module in Block Folder and override Using di.xml file in your custom module like :
A. find or add di.xml file at below location :
/app/code/Vendor/Module/etc/frontend/...
3
votes
Accepted
SQLSTATE[HY000] [2002] Permission denied
The issue turned out to be the SELinux security policies.
By default, the policy httpd_can_network_connect_db is disabled (meaning that your web server cannot contact a remote DB.)
You can check ...
3
votes
Quantity Increment and Decrement Button not work in Magento 2
=> Go to your theme Folder and create file called addtocart.phtml and
past below code.
Quantity Increment and Decrement Button working fine by using below code
E.g :
app/design/frontend/...
3
votes
Error After install Custom Module in Magento 2
I know that this is old, but in my case i had the same problem and reach this issue here .
It was an error in my system.xml payment method file, where i put the tag on a wrong place. So this problem ...
3
votes
Accepted
Adding CMS Blocks to a Products, not programatically - Magento 2
Below extension might help you if you don't want to do it programmatically.
https://ecommerce.aheadworks.com/magento-2-extensions/custom-static-blocks/
However just in case if you want to do it ...
2
votes
Accepted
Translating custom strings into theme knockout templates
You need to extend a language package, creating a translation file in the theme is not enough.
This extension module needs to contain:
composer.json
{
"name": "snowdog/project-language-...
2
votes
Add additional information to payment method
I've ended up adding a plugin to pass the additional_information to the quote payment.
In my di.xml:
<type name="Magento\Quote\Model\Quote\Payment">
<plugin name="...
2
votes
Add additional information to payment method
You need to send from frontend to backend all custom information in the additional_data node. On the backend side, you need to get data from additional_data and store it in the payment ...
2
votes
Update quantity in minicart
In following file Magento_Checkout\web\template\minicart\item to change in template default.html.
Write below code
Setp1:-
<div class="details-qty qty">
<label class="...
2
votes
Magento2 : Update translation using API response
I think in API request, system will not load any theme related stuffs(style, locale, etc).
So you can create a new language pack and extend the vendor language.
Refer this link
language.xml
<...
2
votes
Accepted
Invalid method when extending template
escapeHtmlAttr() is escaping methods added in magento from 2.2 version.
I checked in magento 2.1.9 magento version newsletter subscribe.phtml file, this function was not used there.
If you check ...
2
votes
How to list handles of each pages in Magento 2.1
You can use it directly in Magento2 block like below
var_dump($this->getLayout()->getUpdate()->getHandles());
2
votes
Accepted
Can not acces Magento API log file. Details are available in Magento log file. Report ID: webapi-5b7e549729324
Your call is misformatted. It should look like this:
<web>/rest/V1/orders?searchCriteria[filter_groups][0][filters][0][field]=increment_id&searchCriteria[filter_groups][0][filters][0][value]...
2
votes
Accepted
Magento 2 - Error in line 196 Dictionary.php - Undefined offset
We modified the function in order to show us the text with the error. You can then search for it with a ctrl + f:
vendor\magento\framework\App\Language\Dictionary.php
private function readPackCsv($...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
magento-2.1.9 × 119magento2 × 50
magento2.2 × 8
javascript × 8
admin-panel × 6
composer × 5
category × 4
error × 4
upgrade × 4
products × 4
phtml × 4
magento-2.1 × 3
module × 3
orders × 3
api × 3
css × 3
overrides × 3
frontend × 3
rest-api × 3
csv × 3
http-error-500 × 3
product × 2
checkout × 2
attributes × 2
cart × 2