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.

0
votes
0answers
7 views

Compare date of productstock not working in Magento 1.9

I currently use the following code, to check if the $productEta is in the future, based on the date of today. But that is not working well. Its a dynamic code, so I will provide the entire code: $...
0
votes
1answer
6 views

CollectRates check all radio buttons

im making a shipping extension. All the things works great but one thing no. My collectRates function who is responsible to show all shipping methods on the frontend is checking all. Code: /** * @...
0
votes
1answer
22 views

Installing Google recaptcha:2.0.0 on Magento Open Source 2.2.6

Included in Magento documentation the following steps to install Google recaptcha:2.0.0 on Magento Open Source 2.2.6: Install Module: composer require msp/recaptcha:2.0.0 Enable Module: php bin/...
0
votes
0answers
37 views

Need to remove Currency name(ie \gdp or \usd) from url in magento

I am new to Magento 1.9 I m trying to remove currency name from url and at the same time setting canonical url
0
votes
0answers
33 views

Php script for import configurable products from csv

I need to import a lot of products. So i want to use a script. So if you have any script to do that can you share the whole php file?
1
vote
1answer
21 views

Calculating average price of specific products over time

I'm trying to create a graph that will show the average price of specific products on my site over a period of time. What I'm struggling with is coming up with the most efficient query to use, in ...
0
votes
1answer
87 views

Magento-CE 2.3.0 installation error on Xampp

Error in Installation: [php7:error] [pid 10084:tid 1952] [client ::1:53679] PHP Fatal error: Uncaught RuntimeException: The path "C:/xampp/htdocs/magento/lavoska/generated/code/Magento/...
1
vote
0answers
18 views

How to modify part of the design of the details of the article magento 2?

I want to be able to modify a part of the page of the details of the products of magento 2 The marked part is the one that I want to be able to edit, add or remove content is that section. So far I ...
1
vote
2answers
35 views

How to modify the description of products in magento 2?

I have a simple plugin in magento 2 that modifies the name of the products, but I can not find the function that modifies the description public function afterGetName(\Magento\Catalog\Model\Product $...
0
votes
1answer
34 views

Changing size of font in top navigation

On my site www.uitverkoop.tips you see a top navigation and side bar navigation. I want to have more categories, but then the top navigation uses to lines. So I want to reduce the size so that more ...
1
vote
2answers
43 views

Template doesn't load on custom theme

I have a problem with loading a new template on payment methods section on checkout, but only on my custom theme. I have created a custom module that adds a new block with template in the above ...
1
vote
1answer
40 views

Magento 2 move reviews form inside list.phtml file

By default magento 2 review structure is like this - /templates/review.phtml and inside it you have - /product/view/list.phtml and Magento_Review/templates/form.phtml files. form.phtml file is ...
1
vote
1answer
71 views

phpinfo() in magento2

I created a phpinfo.php page in my Magento2 project but when I try to access it via URL it shows a 404 page. It's set up here in the magento root: |-Magento2 |-----<other folders etc.> |-----...
1
vote
0answers
14 views

Why 2 classes Magento\Framework\HTTP\Client\Curl and Magento\Framework\HTTP\Adapter\Curl for same purpose?

Magento Framework has 2 classes for Curl operations: \Magento\Framework\HTTP\Adapter\Curl and \Magento\Framework\HTTP\Client\Curl What is specific use-case for each as both are capable of doing ...
1
vote
2answers
92 views

Magento 2: Custom Customer Attributes Showing in Customer Grid but Not Admin Account

I'm currently on Magento 2.2.6 and I created a multiple select attribute as well as a yes/no attribute for customers in the admin page, however I'm not seeing them show up and not sure where I went ...
0
votes
2answers
34 views

Get product image in Reviews

I would like to get product image in reviews, can anyone help with some advice on how to do it? Currently I have magento reviews - And what I would like to get is like this - Thank you a lot!
0
votes
0answers
19 views

Access Magento Admin on Subdomain

I have a running store on Magento 2 which has multiple websites that I can access in the front end without any problems, for example: https://siteone.mymagestore.com https://sitetwo.mymagestore.com ...
1
vote
0answers
16 views

“mcrypt_module_open is deprecated” exception in cron in Magento 2.2.6 on PHP7.1 ?

The method is silenced in core still cron throws exception if debbug mode is enabled. mcrypt_module_open is deprecated // @codingStandardsIgnoreStart $this->_handle = @mcrypt_module_open($...
0
votes
1answer
74 views

1 exception(s): Exception #0 (Magento\Framework\Config\Dom\ValidationException): Element 'referenceContainer': This element is not expected

I am getting this error no product category page 1 exception(s): Exception #0 (Magento\Framework\Config\Dom\ValidationException): Element 'referenceContainer': This element is not expected. ...
2
votes
2answers
19 views

In CRUD, Why delete item operation is preferred via POST request rather than GET request?

Is there is any special security advantages of using a POST request over GET request for delete operation? As Magento 2 has preferred POST for delete operation.
0
votes
1answer
13 views

Magento 2 - what event should I observe to change/intercept the calculation of subtotals on Cart

I am using Magento 2. I made an observer that observes anytime a new item is added to the cart. The observer works properly, I also managed to create a single product discount with this observer, ...
0
votes
0answers
54 views

magento 2.3 does not work in windows [duplicate]

I just installed magento 2.3 in windows/wamp but it is not working. The admin page is blank and the login/registration page also fails to load. this is the home page The solution provided here ...
0
votes
1answer
23 views

Add/Remove class from div if minicart hasitem/noitem

I want to add a class in parent div if minicart/cart is empty and remove same class if minicart/cart has an item(s).I made changes in minicart.phtml. below is my code for that. <div class="block ...
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 ...
1
vote
0answers
121 views

PHP Startup: Unable to load dynamic library - The specified module could not be found

I am using WampServer 3.1.0 and PHP version 5.6.31 in windows, i am getting an error like, php_error : [06-Dec-2018 10:13:17 UTC] PHP Warning: PHP Startup: Unable to load dynamic library 'c:/...
1
vote
1answer
22 views

Difference between class constant and class static variable with array as a value in php7?

Example: class Test { const URLS = [ 'http://example.com/', 'http://example1.com/' ]; public static $urls = [ 'http://example.com/', ...
2
votes
1answer
37 views

How to get value in function that is retrieved and stored in a variable of another function in same class | Magento 2

I want to use $orderId value in other functions. Here is class <?php namespace vendor\module\Observer; use Magento\Framework\Event\ObserverInterface; class Observer implements ObserverInterface ...
0
votes
0answers
23 views

Product name in Magento order confirmation email subject

(Magento 1) I'd like to add the name of the product in the order confirmation email subject. How do I do that?
0
votes
1answer
45 views

Why PHP Settings Check and Checking Component Dependency showing error during Magento 2.3 upgrade?

I was Upgrade Magento from 2.1.12 to 2.3 using Web Setup Wizard. During this process, It show two error PHP Settings Check and Checking Component Dependency. We already set memory_limit=2GB in php/...
3
votes
1answer
38 views

Get all 3rd level categories

is there any chance how to get ALL third level categories available? I have searched whole internet and found only getting categories based on parent category but it doesnt return whole store 3rd ...
0
votes
0answers
5 views

M2 | If click on eidt button, update button should become visible and edit hides

I have to update a record. I have gone through this but it is in M1. I have my code in custom phtml file and my function that changes value is: $changeEmail = $block->changeGuestCustomerEmail(); ...
0
votes
2answers
97 views

How to mass update custom dropdown customer attribute to all customers? PHP or SQL

I created a new customer attribute (Drop Down) and added it to the registration form. Attribute details found in eav_attribute table: Everything work as expected, attribute is added to the customer ...
0
votes
0answers
11 views

Magento 2 setData vs setTierPrice()

Was just wondering if there was any benefit / disadvantage to using the more specific setTierPrice() over setData() when working with Magento attributes. From what i'm aware they are practically the ...
1
vote
0answers
26 views

Magento2 : How to get value of checkbox in observer?

I will refer to previous post: Magento : How to get value of checkbox in observer? Anyone have example of how to do the exact same for Magento 2?
0
votes
0answers
24 views

Magento 2 How do Product ID's work?

My question is simply asking how is a unique product ID created? I want to be able to create a new product but I don't really know how a unique ID is created to attach to it. I need a unique ID to ...
-1
votes
0answers
19 views

Magento 2 Get Tier Price Auto-Increment ID

So setup currently I have an array that contains custom values to then insert into the Tier Prices as I want to assign custom Tier Prices to products. This array can be found below: $newTier = [ "...
0
votes
1answer
17 views

Magento 2 Tier Price Attributes

As it stand I have managed to pull the Customer Group ID, Price Quantity and the Price itself. However there are other attributes: Price ID Website ID All Groups Percentage Value Website Price None ...
0
votes
1answer
34 views

Magento 1.9 Randomly Allowed memory size of 2GB exhausted PHP 7.1.1

I got a php error randomly, Allowed memory size of 2147483648 bytes exhauste and customers see the 500 Internal Server Error. It happens most often after importing products with Dataflow, when ...
0
votes
1answer
22 views

Magento 2 Get Special Price of Product with a specific Customer Group

I am trying to get access to the special product prices using PHP. These have already been set to the products themselves under the Advanced Pricing section. My end goal is to access these products' ...
0
votes
0answers
22 views

Magento 2 Create Group Specific Prices

Short Version: I want to replicate the functionality of the Advanced Pricing under Catalog -> Products, more specifically I want to replicate the Customer Group Price section of the Advanced Pricing. ...
0
votes
0answers
25 views

magento blocking sql table

I tried to truncate catalogsearch_fulltext_scope1 from my Magento 2.1.7 installation. But phpMyAdmin always stopped working. So I deleted its entries and remained with only one product (with 4 ...
0
votes
0answers
32 views

Magento 2 Saving Product Price Changes

Is there a way of saving changes made to the individual products? I have the following below code: $product = $this->_productRepository->get($productID); $product->setCustomerGroupId($...
0
votes
3answers
78 views

RuntimeException: Can't create directory

my website https://roofmegastore.co.uk/ is coming up with this error. 1 exception(s): Exception #0 (Magento\Framework\Exception\FileSystemException): Directory "/var/www/html/magento/pub/static/...
0
votes
2answers
40 views

How to solve “One or more indexers are invalid. Make sure your Magento cron job is running” [duplicate]

My magento 2.2.1 website backend prompts "One or more indexers are invalid. Make sure your Magento cron job is running." How to solve this kind of error? Does it have a big impact?
2
votes
1answer
46 views

Maximum execution time of 300 seconds exceeded error

When I delete many products, I got this error Fatal error: Maximum execution time of 300 seconds exceeded in /magento_1.8.1/www/lib/Zend/Cache/Backend/File.php on line 655 Server php and ....
1
vote
0answers
20 views

Source Key should be specified

We are in the process of moving our Magento site to a new hosting platform. After moving all of the files and making some changes to the template XML, the frontend of the site is now working as ...
0
votes
0answers
36 views

Magento 1.9 Integrity constraint violation on duplicated product

When I duplicate a configurable I get this exception, but the product is created as excepted: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '1-0-0-1-4-23456-0' for key '...
1
vote
0answers
33 views

Source class for generation not found

I am using a composer library in my custom module. The link for the library is here. This library in turn uses https://github.com/tightenco/collect The {Vendor}/{Module}/composer.json is { "name":...
1
vote
1answer
46 views

Magento 2: AJAX POST to AdminHTML

I have an AJAX POST setup within my template file currently that has 3 values, which I want to POST to my Index.php within my Block. However, my module is an AdminHTML module and this cannot be ...
0
votes
1answer
38 views

Magento 2: Missing required argument $mainTable from Model\ResourceModel\Deal\Grid\Collection

Missing required argument $mainTable from Model\ResourceModel\Deal\Grid\Collection But I check my all file and all code working fine but this error show on dashboard.