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
Make your voice heard. Take the 2019 Developer Survey now

Questions tagged [php]

This tag is used for questions which involve PHP code in any way. So as soon there is a PHP Exception returned or error report generated, this question qualifies to be tagged with PHP.

5
votes
0answers
456 views

How to apply custom validation in Magento 2 checkout Shipping Address form?

I want to apply some custom validation on shipping address form of Magento 2 Checkout. Normally i do it with JQuery but don't know how to apply it in Magento 2. The validation i want to implement are ...
5
votes
0answers
530 views

How to add custom customer attribute in custom tab in customer edit page of admin in magento2

I have created custom customer attribute successfully. Which are showing under account information tab of customer edit in admin. I want to show them in my custom tab.
4
votes
0answers
115 views

\Magento\Framework\Registry deprecated in magento 2.3, How to create instance with Registry?

/** * Registry model. Used to manage values in registry * * Registry usage as a shared service introduces temporal, hard to detect coupling into system. * It's usage should be avoid. Use service ...
4
votes
0answers
86 views

Knockout.js in magento2

How to change the jquery into ko? define([ 'jquery' ], function ($) { "use strict"; $.widget('xxx.homePage', { options: { bindSubmit: true, ...
4
votes
0answers
577 views

Magento 2 Admin- Invalid data provided for linked products

Getting an error " Invalid data provided for linked products " when adding related products to a product from the admin panel and saving Indexer crons, already setup Magento CLI version is : 2.1....
3
votes
0answers
342 views

Could not install B2B extension for magento 2.2.0-EE

I have installed Magento-EE-2.2.0 with sample data. After installation, i tried to install B2B extension using composer composer require magento/extension-b2b Used the following reference site ...
3
votes
0answers
327 views

Magento 2 Optimize memory leak perfomance

I have a problem with the import data process. First: I have used the factory creator to create a Model set data and save but the problem when I have 400k Item to save. --- Constructor \Magento\...
3
votes
0answers
164 views

Magento1.9 Connect to External Mssql Database using Pdo_dblib

I am trying to connect an external database to get few data into Magento. I am using pdo_dblib to connect to the database. try { $hostname = "hostname"; $port = port; $dbname = "dbname"; $username = "...
3
votes
0answers
141 views

Magento 2.1.2 problem with instantiating TotalsItemExtensionInterface

I have a problem with instantiating \Magento\Quote\Api\Data\TotalsItemExtensionInterface Below is my code <?php namespace Vendor\Module\Model\Checkout; class ShippingInformationManagement ...
3
votes
0answers
338 views

Fedex API. Shipping rates request for Multiple-Package Shipment rates

I am looking for fedex shipping rates (shipping estimate quotes), how to add multiple package(box) shipping rates after certain weight limit. I know there is option in magento admin panel weight ...
3
votes
0answers
233 views

Is it possible to hide the shipping method step on magento checkout process

Is it possible to hide the shipping method step on the Magento checkout process? I want to remove the shipping method step only on the checkout page, not permanently. What I am trying to achieve is ...
3
votes
0answers
561 views

How to display shipping estimate and auto add this to grand total on cart page?

I am currently working on a magento website and trying to get the estimated shipping charge auto added to the grand total on the cart page. By doing this on the cart page I am trying to remove one of ...
3
votes
0answers
232 views

Magento only shows 9 search results per page

I am developing in magento When I perform a search, I 'm getting 9 search results per page. But in the top bar it shows "12" http://overpic.net/viewer.php?file=x12x90jyind7m6rjvabsx.png I need to ...
2
votes
0answers
28 views

How to add a Block Grid with Mass Action in an UI form in Magento 2?

I have UI form with a Block grid. <fieldset name="profile_products"> <argument name="data" xsi:type="array"> <item name="config" xsi:type="array"> <item ...
2
votes
0answers
39 views

Magento 2 is only displaying some products on catalog page

I have 17 products added to my magento store all of which are enabled to display on Catalog and Search, but on the catalog page, only 10 products are being displayed and there isn't any pagination ...
2
votes
0answers
27 views

Magento 1.9.2 - Encrypt the password from the php file

I created a file for sending the email from my site in php via SMTP. To do this I followed a guide where he said that you had to write as text in the sending file (MailSMTP.php) both the email address ...
2
votes
0answers
59 views

Remove file of downloadable product in directory

in my magento web site i have many Sample of downloadable product. I would like that when i click the red "X" to remove the sample and i save it also the file in the magento directory is deleted Do ...
2
votes
0answers
96 views

Magento2.2 PHP Fatar Error in config:show

I casually run php bin/magento config:show and it showed me the following PHP Fatal Error, but I don't have a clue, because the site works ok. ........ analytics/subscription/enabled - 1 PHP Fatal ...
2
votes
0answers
144 views

Magento 2 REST API - Error with custom plugin when adding bundle product to cart

My requirement is that certain kind of bundle products are not allowed to be added more than once in an order. I am trying to do so by intercepting the Add To Cart API method using a Plugin. Here's ...
2
votes
0answers
306 views

Headers already send Magento 2 multistore addon domain

Multiple websites are working on Magento 2.2 with the addon domain method and symlinks. The theme is visible, etc. Only thing is that at the bottom I see the following message. Looking for advice. ...
2
votes
0answers
169 views

Magento 2 Cart Memory Exhaustion issue, with customer

Running Magento 2.1.10 CE, with multiple stores. Client requires login to access the site Running into an issue where one of the client is having a problem with cart. They have added 53 products in ...
2
votes
0answers
349 views

Magento 2 : Sort By block is missing after override the toolbar for search page?

I want to add custom sort by options , I have override the toolbar block as follows My di.xml file as <preference for="\Magento\Catalog\Block\Product\ProductList\Toolbar" type="Custom\Product\...
2
votes
0answers
92 views

Can't get customerId when magento tried to retrieve

I found this error in var/log exception main.CRITICAL:Magento\Framework\Exception\NoSuchEntityException: No such entity with customerId = in /var/www/html/test.com/public_html/vendor/magento/...
2
votes
0answers
88 views

change lastname as optional in Magento-2?

I want to change last name as optional. so Vendor\magento\module-customer\view\frontend\templates\widget\name.phtml override into mycompany\custommodule\view\frontend\templates\widget\name....
2
votes
0answers
286 views

Programmatically create category in magento2

I am not able to create category using below code, Also I can't get website id, Anyone knows explain me use \Magento\Framework\App\Bootstrap; include('../app/bootstrap.php'); $bootstrap = Bootstrap:...
2
votes
0answers
74 views

Check if magento cart is empty using javascript?

So I need to check if the cart on my magento site is empty or not. I can do this using php like this: <?php $count = $this->helper('checkout/cart')->getSummaryCount(); ...
2
votes
0answers
392 views

magento 2 Error: cannot call methods on modal prior to initialization; attempted to call method 'openModal'

Getting error magento 2 Error: cannot call methods on modal prior to initialization; attempted to call method 'openModal' First time it work fine but when I click on button to change area then it ...
2
votes
0answers
193 views

Magento2 add order ID in custom UI Component button link

I want to add a view order button in form UI component of my custom module. I've created a custom template for UI component link button but can't get the order id within URL. The simple field for ...
2
votes
0answers
328 views

Magento 2: Include header and footer in external php

I want to include header and footer layout of Magento 2 to external PHP file, I am using my own code(external PHP) to make a frontend page. how to add header and footer layout theme in Magento 2 to my ...
2
votes
0answers
451 views

Magento 2 name attribute shows empty when creating custom fields on product page

When i try to add new fields to product creationg form in Magento 2 the html name attribute shows up empty, I tried more or less everything and by everything i mean: 1) Adding the custom field i ...
2
votes
0answers
56 views

Magento ver. 1.9.3.2 not logging anything at all

I have noticed magento all of a sudden has stopped logging things, nothing gets logged anymore. Why could this be happening ? I would like to debug log paypal standard orders but nothing gets logged. ...
2
votes
0answers
758 views

Magento : How to Add Quantity Box in Custom Option for Simple Product

I have a attribute "size" which have drop down option in custom option admin panel, and i want to show quantity box for this option, our all products are simple products. I have tried below link it ...
2
votes
0answers
56 views

Create Attributes and Attributesets using AVS-FastSimpleImport

Is there a way to create Attributes and AttributeSets for products using the Avs FastSimpleImport module? I want to use an empty shop and need to import (and update) products which almost all of them ...
2
votes
0answers
334 views

Magento 2 customer dashboard, custom block, sub-navigation

I understand how to remove or add a navigation link in customer dashboard on magento2 Need to know how can i create submenus, or add a static text in the sidebar navigations eg. Following is the ...
2
votes
0answers
172 views

PHP Fatal error: Class 'Magento\Update\Status' not found

My cron job is running but i am still getting these errors in error_log file. PHP Fatal error: Class 'Magento\Update\Status' not found in /update/cron.php on line 15 and when i am installing any ...
2
votes
0answers
472 views

Magento 2, display gift options in checkout page

In magento 2, when you switch on the gift option from the backend. It gets displayed on the Cart page. I need to display this on cart page and checkout page as well, under cart items. How can i ...
2
votes
0answers
126 views

Error while creating shipment with FedEx

I've configured FedEx in magento and when I'm going to create shipment with create shipment label it's giving error like this RequestedShipment shippingChargesPayment - Payor is required How can I ...
2
votes
0answers
760 views

Programmatically Create configurable product in Magento 2.1 Issue

I facing issue while creating configurable product in Magento 2.1 programmatically. I'm reading products from xml and save. The issue is when i associate simple product with configurable product. ...
2
votes
0answers
273 views

Magento Check out Problem

During the check out process after filling the billing section, and trying to go to the Shipping section with the option "Ship to this address" I can not proceed, as I am able to go to the shipping ...
2
votes
0answers
44 views

Error when three fields are hidden on checkout page

<?xml version="1.0"?> <!-- /** * Copyright © 2016 Magento. All rights reserved. * See COPYING.txt for license details. */ --> <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-...
2
votes
0answers
406 views

Magento related products get category

I want to edit my /catalog/product/list/related.phtml file. I want to define all related products based on their main category. So for example that all mices are displayed in their category "Mices" ...
2
votes
0answers
4k views

Sending custom email for custom module - Magento2

I have used the below code for a custom module to send mail. Its working fine. I want to send email for another custom module. So I duplicated the same controller file and changed the required ...
2
votes
0answers
37 views

Magento error in search with attributes

This is the sample search attributes parameter in url: zip_code=123456&tire_cities=1&tire_state=1 If any one of attributes matches then search result is displayed. If first attributes are ...
2
votes
0answers
496 views

Magento REST API Payment Method Aditional Information

I'm creating orders via REST. When placing the order, I'm invoking this: $base_url/index.php/rest/V1/guest-carts//order When using the 'checkmo' payment method it goes without issues, but when using ...
2
votes
0answers
1k views

Magento 2: How to debug on Checkout Pages when having KnockOut JS & Web Template

http://localhost/magento2/checkout/ vendor\magento\module-paypal\Model\Hostedpro\Request.php public function setPaymentMethod($paymentMethod) { $this->paymentMethod = $paymentMethod; ...
2
votes
0answers
65 views

How can I hide 0.00 rate estimate if free shipping

I am creating custom shipping module in Magento 2. How can I hide $0.00 if there is no shipping price. Can I pass alternative text or hide this value?
2
votes
0answers
40 views

Set aliase for index using php client library in elasticsearch?

I am creating search application using elasticsearch. I want to make indexing with zero downtime. I found one solution using aliases with client library in php. But I don't know how to implement it ...
2
votes
0answers
42 views

Adminhtml - How to hide orders with specific status?

I am using Magento 1.9.2 and i am using custom extension. Here is it's config file: <?xml version="1.0"?> <config> <modules> <MageWorx_OrdersGrid> <...
2
votes
0answers
38 views

index.php executes directly by PHP from the user created for the website

I have a strange issue on CE 1.9.2.4. It happens in some random or undefined conditions and when happens it takes about a minute for the website to become unresponsive (because all CPUs are maxed out)....
2
votes
0answers
328 views

MYSQL ERROR [1045] Acces denied for user 'username'@'localhost' (using password: YES)

I tried to put my Magento webshop to the godaddy server, but i get this error: a:4:{i:0;s:97:"SQLSTATE[HY000] [1045] Access denied for user 'username'@'localhost' (using password: YES)";i:1;s:2793:"#...