Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [magento2]

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.

2
votes
2answers
27 views

File download not working

<?php namespace Modulename\Merchant\Controller\Adminhtml\Document; class Filedownload extends \Modulename\Merchant\Controller\Adminhtml\Document { protected $_downloader; private $logger; ...
1
vote
0answers
10 views

PHPDoc hints for magic methods

I have grown accustomed to the better PHPDoc coverage of Magento 2, so now it bothers me when the magic getters and setters are highlighted in red in my PhpStorm project files. In classes that I ...
1
vote
2answers
38 views

Magento 2 - Get country name from country code

I want to get country name from country code, in Magento 1.9 I use the code like this to get country name: $countryCollection = Mage::getModel('directory/country_api')->items(); foreach($...
1
vote
0answers
13 views

From localhost to portforwarding with Magento 2

I have a question about my local environment. I can acces the shop trough dev.domain.com (but its 127.0.0.1) but then with edit in .hosts file. Is it possible to port forward my 80 port and then ...
1
vote
2answers
26 views

Fresh Magento 2.3.0 installation no CSS

Just installed Magento 2 on a shared server, everything seemed successful, no errors, but the shop looks like this (css files not found, they return 403 Forbidden, but the files are actually missing): ...
1
vote
0answers
10 views

Authorize.net payment method configuration not saving

I am trying to configure authorize.net payment settings in an magento 2 install. When I edit the payment method values, the default values are reset after I save (i.e. I enable Authorize.net, save and ...
1
vote
1answer
10 views

Install Magento2 Sniffer PSR 2

Where I have to upload a file phpcs.xml to install marketplace-eqp from https://github.com/magento/marketplace-eqp/tree/master/MEQP2
0
votes
1answer
12 views

What is a Module?

I'm learning about Magento 2 and am curious about the term "module" and how it relates to Magento. What exactly is a module, both in general terms and specifically? If I understand correctly, a ...
0
votes
0answers
4 views

Magento 2.1.3 Build multiple store views with unique subdomains pull CSS and JS from parent website URL?

I've been googling this all afternoon, suffering from Search Engine blindness, so much so I even tried bing for a moment... I have a multiple language site set up with different URL's assigned to ...
1
vote
0answers
10 views

Magento2 - after installation: Setup starts again

Today is my big Magento2 day and I run from one error into the next. After some hours I was able to install Magento completly. In the last step, it comes to "go to backend" "go to frontend". 1) ...
1
vote
1answer
15 views

What controller files read the checkout page?

I need to override the controller file that is used on the checkout page ?
0
votes
0answers
11 views

One page to select products and fill checkout form

Is there a way to simplify the order process like this: Select the products to display on a special page Once products are selected, the customer can scroll this page and select the desired products,...
0
votes
0answers
19 views

Add custom block to layered navigation - best to Price

Is anyone know how I can add custom block to price filter in layered navigation? I curently moved my block with jQuery, but what if someone add more attributes? Maybe I could add class to price ...
1
vote
2answers
18 views

Identify weather the product is new or getting update on save

I have created an observer on "controller_action_catalog_product_save_entity_after" where I am getting the product which is being saved. what i want is to identify that the product which is being ...
1
vote
0answers
7 views

Magento 2 Main Configurable Products Duplicated in Order Info When Configurations are Ordered

In our Magento 2.2.7 store we have a number of Configurable Items, they are one Main item with a number of individual items as configurations. When a customer orders them, they strangely appear as ...
1
vote
1answer
24 views

Magento 2 - Discount on Price with FPT and VAT not working

We are facing an issue on Magento 2.2.5 regarding discount on product price. Here is the use-case: I have a product with Base Price = 18€, Tier Price (I'm working with Customer groups) = 7.23€, FPT = ...
1
vote
0answers
10 views

How to generate encrypted cartid to access the Rest API guest cart - Magento 2

I get quote id from below code it returns 6 as my quote id $id=$this->_checkoutSession->getQuoteId(); I used the quote_id=6 in REST api like rest/default/V1/guest-carts/6/estimate-shipping-...
0
votes
0answers
4 views

How to show only all store views on default store view

How to show all store views on default store view and on other store views only the current store view shows. my code is <?php namespace PME\Hideprice\Model\Config\Source; /** * @api * @since 100....
0
votes
1answer
24 views

Why do we use bin/magento setup:di:compile

I know why we use bin/magento setup:upgrade and bin/magento setup:static-content:deploy It is recommended on many blogs and forums that we need to execute bin/magento setup:di:compile after upgrade ...
2
votes
0answers
26 views

Optional parameter in Magento 2 REST API

I have a API route like, <route url="/V1/product/:productId" method="GET"> <service class="Vendor\Sample\Api\SampleInterface" method="sample"/> <resources> <...
2
votes
0answers
13 views

Need to update cart total and deduct and display reward points after applying reward points

I have customized for applying the reward points from a third party Capillary. I want to update the cart total and display by deducting from the reward points after the response from the curl. I have ...
1
vote
1answer
26 views

Permissions for production environment in Magento 2.3

These are the permissions that I have applied to my system in the development mode: sudo find var generated vendor pub/static pub/media app/etc -type f -exec chmod g+w {} + sudo find var generated ...
0
votes
0answers
15 views

how can i sort by using option value not option id value in listing page magento 2?

I have created a custom dropdown attribute and set in sort by dropdown listing page, now currently magento 2 sort by using option id like "name="option[value][139][0]" but i want to sort using option ...
1
vote
2answers
27 views

How to make a Category parent link not cliquable and just the subcatgories cliquables M2

I have a category with id =41 and have 2 child i want to see the parent category and her child but just make the parent category link not cliquable any idea please and thanks in advance
0
votes
1answer
14 views

Magento 2: Errors displaying on setting devolper mode

On setting developer mode this error is displaying want to find the files which are causing this error what should I do remove this error. [2019-02-14 12:58:34] main.INFO: Cache file with merged ...
0
votes
0answers
15 views

product name not displaying in admin grid

collection.php /** * @var \Magento\Catalog\Api\ProductAttributeRepositoryInterface */ private $productAttributeRepository; public function __construct( ...
0
votes
1answer
32 views

How to override DatePicker of cart price rule and add time within it in, Magento 2.2.6

I want to save it in date field no another field and not a new item https://i.stack.imgur.com/0icp0.jpg Example of the outcome I am looking for
0
votes
1answer
14 views

How to remove products tab when it has no value in admin in Magento 2?

I am using Magento 2.3 I have set custom product tabs in product detail page Now I want to display a particular product tab only if it contains a value in admin. for ex. if there is no description ...
1
vote
2answers
16 views

Magento2 Installation Error by 0%

since a few days I am trying to install Magento with Docker, Composer on Windows 10. So far, I got to the Web-Installation. A huge step for me... After clicking the last step, Magento stuck by 0%. ...
0
votes
0answers
20 views

Get Tax class name from id in magento2

I have used below code to get tax class name from id. $objectManager = \Magento\Framework\App\ObjectManager::getInstance(); $taxClassObj = $objectManager->create('Magento\Tax\Model\TaxClass\Source ...
1
vote
1answer
26 views

Getting error after adding arguments in constructor

I have added model in my constructor public function __construct( Context $context, PageFactory $resultPageFactory, \Vendor\Module\Model\Productsgrid $model ) { $this->model = $...
1
vote
0answers
30 views

Elasticsearch 6.6 with Magento 2.3 and Nginx, need a proxy?

I am installing Elasticsearch 6.6 on my system (Ubuntu 18.04 with Nginx 1.14) and to configure Elasticsearch and Nginx, I find in the official documentation the following section: Configure nginx and ...
0
votes
0answers
12 views

How move shippingAddress to shipping method - Magento 2

How to transfer the delivery address - add it to each item with delivery in checkout? Better implemented through html template or XML layout?
1
vote
2answers
34 views

Fatal error: Uncaught Error: Call to a member function setProductCollection() on boolean in

( ! ) Fatal error: Uncaught Error: Call to a member function setProductCollection() on boolean in /var/www/html/magento2/ShopQuary/app/code/MagentoCoders/Manufacturer/Controller/Index/Index.php on ...
1
vote
0answers
17 views

English to english translation problem magento2

I am translating the text("You canceled the coupon code.") with "Thank you for canceling the coupon code" (This is just english to english translation) from Magento\Checkout\Controller\Cart\CouponPost ...
0
votes
1answer
28 views

How to convert guest checkout order to My Account Order

I have placed an order from guest account and the end of order I have given an option to create an Account, when I created the account and navigate to order sections i see no others. So i expplored a ...
0
votes
1answer
33 views

How to create zip of folder and download zip in magento 2?

I want to create and download zip of a folder in my custom module. I followed this link, but getting fatal error Uncaught Error: Class 'Vendor\Module\Controller\Custom\ZipArchive' not found. How to ...
1
vote
1answer
14 views

Magento 2: Can I response with a redirect on REST API?

I have an API endpoint that expects a GET request. On some scenarios, I want to be able to perform a redirect instead of responding with a result. e.g., If you'll open the API endpoint URL in a ...
1
vote
1answer
35 views

display product name in admin grid in magento2

I want to display product name in that column
0
votes
0answers
13 views

Magento 2 move page main title into div with product_list_toolbar

I want to move the page main title on the category list page into custom div and also include the product_list_toolbar into that div. The problem I face is that I can not simply move the ...
0
votes
0answers
33 views

Conflict in layer navigation and infinite scroll extension magento2

I have Installed above BSS_layeredNavigation & Lof_Ajaxscroll extensions. Both of them are working fine if used individually. If both extensions are enabled there is a conflict. To avoid ...
3
votes
0answers
46 views

Magento 2.3 V1/Search with sortOrders not working in REST API

Magento 2.3 Search Criteria with REST API, SortOrders not working in V1/Search API. I am trying to fetch Category products using Magento REST API by below request URL. http://127.0.0.1/magento230ee/...
0
votes
1answer
19 views

Magento2 add custom values in collection->setOrder

I need to add some custom values in setOrder() of a collection, but it is not working. $collection->setOrder("((lat - ".$lat.")*(lat - ".$lat.")) + ((lng - ".$lng.")*(lng - ".$lng."))", 'ASC'); ...
1
vote
0answers
10 views

Magento 2 - re-indexing creates multiple catalogrule_product tables

Currently i am facing an issue with re-indexing, It creates a temporary copy of catalogrule_product table. I have shared an image of the tables. And because of this the db size is growing larger. Did ...
0
votes
0answers
29 views

Order grid filter on the basic of custom attribute

This lines of code return the order collection, but I don't known which hierarchy of file. Where I can put this lines of code? What I am should use a plugin, preference or else? and how tom ...
1
vote
2answers
34 views

Magento 2 run custom PHP script

I want to run a custom PHP script in Magento 2 webshop using a custom module. But I want it to run only when installing or during installation of my custom module. To be specific, during ...
1
vote
2answers
71 views
+50

WorldPay Payment Integration using PHP and direct XML method curl API return blank page in Magento 2

I m trying to implement worldpay on a PHP site using XML direct method but whenever I try to connect I get blank pag.. Can you tell me were you testing the payment gateway on live site. Code: $...
2
votes
1answer
25 views

Magento 2 - Need cronjob output

I am developing a new cronjob, since it is in development phase I want to check the output of cronjob after every edits. Right now I am creating a log file at the end of cron, and I am executing cron ...
6
votes
1answer
60 views

Add option for custom select attribute on customer edit page Magento 2

I want to add my own custom option for an attribute.Please see attached image. Just guide me which files i need to create. I have just created one file for now. Please see code below, app/code/...
0
votes
0answers
9 views

The order number's prefix not changing in Magento2

The order number i want from 100003001 I am running Below command in mysql SET FOREIGN_KEY_CHECKS=0; ALTER TABLE sequence_order_1 AUTO_INCREMENT = 100003001; SET FOREIGN_KEY_CHECKS=1; But Auto ...