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

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.

0
votes
0answers
13 views

CollectionFactory does not see all my product

I'm working on a script to update the stock and I currently have an issue where CollectionFactory does not fetch all of the product I ask for $collection = $this->productCollectionFactory->...
0
votes
1answer
18 views

AED-SAR and SAR-AED currency Switching magento 2.1.7

I have 4 currency (AED, USD, GBP, SAR) in my store AED is my base and i have 2 store (English and Arabic). All the currencies working properly but when i change AED to SAR or SAR to AED it's not ...
0
votes
0answers
9 views

Magento 1.9.2. - Join eav customer attributes table with all its values

I have joined the eav / config table to pick up a specific attribute (created with Attribute Manager) connected to the customer id. But now I would like to be able to get all the attributes from that ...
0
votes
0answers
26 views

Prevent order save if any error occurred

When a client selects place order button at the end of checkout, in my model i have code if any errors occured with posting if an error occurs how do i prevent the order from being saved. currently ...
0
votes
1answer
9 views

Magento 1.9 Google site map generation 404 error

I'm using magento 1.9.x version, recently i tried to generate google site map via Catalogue - > Google Site Map But it gave 404 error Then i checked the code and identify the location of error ...
1
vote
2answers
23 views

Turn developer mode off in Magento 2

I need some help, my websites are showing the key after the url. So i thought it is still in developer mode and need to be turned into production mode. I checked the magento file in folder bin, but ...
0
votes
1answer
21 views

Magento 2 Tooltip not working in phtml file

<?php $_content = '<img src=\"' . $block->escapeUrl($block->getViewFileUrl('Magento_Checkout::cvv.png')) . '\" alt=\"' . $block->escapeQuote(__('Card Verification Number Visual ...
1
vote
2answers
40 views

How can we pass table to an html variable in php code? Magento2 TCPDF

I am using TCPDF Library to get PDF Downloadable. I have to pass retrieved data through loops to single vaiable as: $tcpdf->writeHTML($html, true, false, true, false, ''); I have to pass these ...
1
vote
1answer
29 views

How to use GrumPHP with Magento2?

I would like to use GrumPHP with my Magento 2, to be able to run simple verifications during my development, how can I do that?
0
votes
0answers
18 views

Magento 2 Admin section Newsletter Subscribers not visible

Magento 2 Admin section Newsletter Subscribers grid not visible. I see this http://prntscr.com/l57dma, though I have subscribers (I see in database). I disabled all (not magento core) modules, and ...
0
votes
0answers
15 views

Add a block (PHP) to pass data in custom home page

I need to pass data from a block PHP into my new custom home page. But I have created the page_layout/custom_home.xml into Magento_Theme inside app/design/My/Theme folder. Where should I create a ...
1
vote
2answers
33 views

Magento 2: How to Override File in Vendor Folder

I installed a 3rd party PHP sdk via composer and need to override a couple files in my own module. However, I'm not quite sure what the best practice is to override these files from the vendor folder. ...
0
votes
1answer
20 views

magento 1.9 observer on quantity product change

I can't find the event for quantity product change for magento 1.9. I need to do something after a quantity product is updated from backend and frontend, when a user buy a product and decrease ...
0
votes
1answer
16 views

Does initializing a helper variable before using it multiple times benefits performance?

I wonder if it is better to write: $lesser2000 = Mage::helper('wr_epo')->getFensterbankTill2000mm($quote); $higher2000 = Mage::helper('wr_epo')->getFensterbankHigherThen2000mm($quote); ...
0
votes
0answers
13 views

Magento 2: customer sign up data validation by reading csv

I have customized Magento 2 customer signup form for a card ID. Is there a way that I can read CSV that includes millions of customer_id and privilge_crd_nu and validate by the time of user signs up.
0
votes
2answers
46 views

Parse error: syntax error, unexpected '$servername' (T_VARIABLE), expecting function (T_FUNCTION) or const (T_CONST) php

I am trying to connect to a MySQL database usign PHP but am currently facing this error : Parse error: syntax error, unexpected '$servername' (T_VARIABLE), expecting function (T_FUNCTION) or const (...
0
votes
0answers
19 views

How To Create New HTML Page in magneto 2? [closed]

I would like to understand which of the following solutions below would be the easiest to implement, most user friendly, and if either solution could be developed on my app platform and linked from ...
0
votes
2answers
31 views

Magento 2 Installation stop at 2%

Magento 2 Installation step 6 still Stops at 2% !
0
votes
1answer
33 views

magento 1.9 problem custom module programming example problem

I have these files: app/code/community/Foggyline/HappyHour/Block/Hello.php class Foggyline_HappyHour_Block_Hello extends Mage_Core_Block_Template { public function __construct() { parent::...
2
votes
2answers
26 views

Hide block of text if there are no items to compare

I'd like to display/hide a block of text by wrapping in a PHP IF Statement. Value will be based on whether Comparable Products is not equal to "0" (or NULL?). I imagine I'd be looking at something ...
0
votes
1answer
30 views

Onepage checkout order successful page is blank no errors Magento 2.2.6

I have problem with one page checkout ordering page after placing an order and prossesing to checkout Success Page is blank... I tryed to change magento mode from production to developer but then ...
0
votes
0answers
23 views

Loads of system error logs in Magento 1

For instance when i'm clearing cache i get some errors and they are pointing to a core module here: 2018-10-04T15:20:26+00:00 ERR (3): Warning: SimpleXMLElement::__construct(): Entity: line 1: parser ...
1
vote
1answer
43 views

Free Shipping using PHP Script

I have to give free shipping order over 1000 and zipcode range between 600001 to 600010, i am using webshop matrix rate for shipping method, in this case, shopping cart pricing rule not working free ...
0
votes
2answers
26 views

Get product in stock proucts when manage stock enabled

I'm doing some customization on magento 1.9.x website. I need to get all products with in stock and manage stock enabled I'm using this code $stockCollection = Mage::getModel('cataloginventory/...
0
votes
0answers
12 views

Delay in loading top navigation

If you load https://www.uitverkoopgigant.nl/wonen-slapen.html there is an delay of 3 seconds before the top navigation loads. And the categorie slider loads first vertical and then it goes horizontal ...
0
votes
2answers
24 views

Magento 2 - Categories not display when Page Cache is on

I have a very strange issue on Magento 2.2.2, if I enable the Page Cache (Full page caching - FPC) the top navigation is not display anymore. What I can do? Thank you
1
vote
0answers
15 views

php for tax calculate

i try to calculate tax for export.Every price in magento admin had already inserted with tax include. So the only sollution i can think is to calculate it at success page. With tax 24% i try to ...
2
votes
1answer
26 views

How to apply “if” condition to XML generation file

I have a Magento 1.7 Community plataform, connected to an ERP (Bling). We have a file that take all those php information and send as an invoice to Bling. In our products, we have a field named "...
0
votes
4answers
112 views

when i run magento using xampp it shows Fatal error: Uncaught Exception: Deprecated Functionality:

Fatal error: Uncaught Exception: Deprecated Functionality: The each() function is deprecated. This message will be suppressed on further calls in C:\xampp\htdocs\magento\vendor\colinmollenhour\...
1
vote
0answers
32 views

Magento 2: Configure just only for one country

We have a magento 2 store, with more than 20 stores location and they are being separately maintained in the same web site, we do sell only in the country. is there anyway that I could completely get ...
0
votes
0answers
24 views

How to enable LOAD DATA LOCAL INFILE in Magento 1.9

So far I found this closed question and solutions for Magento 2, but I'm hoping there's a solution for Magento 1 as well. This question should not be closed like the other one because it IS specific ...
0
votes
1answer
32 views

Product import through EXCEL file

I am working on magento v2.2.5, and need to upload excel .xlsx file. How to work with excel file like how will magento read excel file, then upload?
0
votes
1answer
50 views

Magento 2 - Change top navigation submenu position

I create a new theme for Magento 2 based on Luma theme. I change the submenu of the top navigation to be 100% width. .navigation .level0 .submenu { max-width: 1280px; width: 1280px; ...
0
votes
0answers
14 views

Magento 1.9 drag n drop functionality on module's grid list in admin

I would like to add drag and drop functionality to my custom module list in the admin panel. Has someone re-use the drag and drop functionality from the categories or would this have to be a separate/...
0
votes
0answers
25 views

Magento 2 install nginx php mysql dnsmasq xdebug php codesniffer on mac high sierra

Is there any complete guide where I can see how to install 1. nginx 2. php (multiple version) 3. mysql 4. dnsmasq 5. xdebug 6. php codesniffer on mac high sierra? Please don't suggest Valet+ ;). ...
3
votes
1answer
15 views

magento 1.9 custom module fronted error 404

I have problem to acces the custom module frontend controller. I am following a basic tutorial to build a custom module. These are the files I've edited: /var/www/html/magento/app/etc/modules/...
0
votes
2answers
51 views

Notice : Undefined variable:

In the backend of my Magento 2 i get today this error: Notice : Undefined variable: _ENV in /home/uitverko/public_html/deal-finder.nl/vendor/zendframework/zend-http/src/PhpEnvironment/Request.php ...
0
votes
0answers
7 views

Nesting level too deep - recursive dependency?

While uploading the products from Linnworks to Magento I get the error “Status Update error. Error : Product update was not successful. SKU: #1234. Product ID 1234. Nesting level too deep - recursive ...
1
vote
0answers
24 views

Send email using SMTP in PHP with PHPMailer [closed]

I tryed this code: <?php // Import PHPMailer classes into the global namespace // These must be at the top of your script, not inside a function use PHPMailer\PHPMailer\PHPMailer; use PHPMailer\...
1
vote
0answers
9 views

PHP set db value according to server datetime

Need to send notification to user by cron. For that there is a datetime picker from which admin can select datetime. IF datetime selected by datepicker is as below: $selecteddate = '26-9-2018 10:00';...
0
votes
0answers
26 views

magento 2 General system exception happened product.php on line 1299

When i am trying to import add/update product Magento2. This error is showing General system exception happened Additional data: Notice: Undefined index in /public_html/vendor/magento/module-...
3
votes
1answer
33 views

Where to place Mobile detect code?

I saw this method as efective to detect if the user is using a mobile device: $isMobile = Zend_Http_UserAgent_Mobile::match( Mage::helper('core/http')->getHttpUserAgent(), $_SERVER ); But ...
1
vote
1answer
50 views

Magento2 - Override Template order summary in sales email order

I have the template that is using the following to render order summary {{layout handle="sales_email_order_items" order=$order area="frontend"}} it is taking the code from the following template ...
3
votes
0answers
83 views

Knockout.js in magento2

How to change the jquery into ko? define([ 'jquery' ], function ($) { "use strict"; $.widget('xxx.homePage', { options: { bindSubmit: true, ...
1
vote
1answer
42 views

Removing link from root category on topmenu

I am trying to make the topmenu root category not clickable using this method https://community.magento.com/t5/Magento-2-x-Programming/Remove-links-to-top-categories-in-menu/td-p/77072 but it ...
4
votes
2answers
980 views

Magento 2.2.6 | Unable to upgrade

Since Magento 2.2.6 was released not long ago we wanted to update our installation via CLI. Unfortunatly i stepped accross a few problems. Steps I've done so far composer require magento/product-...
0
votes
0answers
9 views

After protected-directories got error

Hello i have problem with my store when im in protected-directories mode one my stores Working 100% Loading all images and my color options from backend when i turn off protected-directories for ...
1
vote
1answer
36 views

Magento Core doesnt work after transfer

Hello i just put my store to other new server but i have very big problems... I set right permissions ( owner and group too ) to magento dir but i get this error Magento\Framework\Exception\...
5
votes
1answer
37 views

Problem with CLI

Hello i have an error of every command i press in CLI. Following this Error Deprecated Functionality: The each() function is deprecated. This message will be suppressed on further calls in /var/...
1
vote
1answer
51 views

Magento 1 - Convert Object into an array value

I was trying to get the information of tracking in the UPS. I got on of the method from the core (app/code/core/Mage/Usa/Model/Shipping/Carrier/Ups.php => method name getTracking($trackings)) that ...