Questions tagged [php]

This tag is used for questions that 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.

Filter by
Sorted by
Tagged with
0
votes
0answers
10 views

Magento 2 import special with scheduled update dates via CSV

Good afternoon everyone, Apologies if this has been asked before but I have a site that I would like to import special price via CSV import but with scheduled update dates. I am aware that the only ...
0
votes
0answers
12 views

get magento to use Composer 2

I'm actually having this issue but first I want to resolve why it's still looking at Composer 1. me@server:/.../magentoproject$ sudo ./bin/magento sampledata:deploy [sudo] password for me: <warning&...
0
votes
0answers
11 views

Backorder return null qty when place order?

I'm using magento 2.3.5 , and my PJ have 2 site include AU using default source and NZ using nz source , so i have a product like this then i enable backorders per product , so when i place order in ...
0
votes
1answer
15 views

Magento 2 Insert / Move page.main.title inside my custom block

I have create a custom xml for Category Page and I need to move the Category Title inside my Block. This is my custom.xml code: <?xml version="1.0"?> <page xmlns:xsi="http://...
0
votes
1answer
11 views

Magento apptha extension frontend not navigable after installation

I am using the Apptha module for magento2 , I had installed the module as well and it appears in my admin panel , but when I navigate to http://localhost:8080/marketplace , I see this result : Apptha ...
1
vote
1answer
35 views

Magento 2.4 - PayPal Smart Button Style

I want to change the button style of the PayPal Express Checkout, but is not work, I have create a module to rewrite the PayPal but how I can add my changes there? I create di.xml file on following ...
0
votes
0answers
14 views

Magento 2: Month Range In Date Picker

I'm made custom report, I added date-picker, I just want to add Month Range, like User can only able to generate any three months report. but I can't figure out how to do that. Here's my code: HTML &...
0
votes
1answer
24 views

Magento 2 - How I can rewrite this file

I want to change the following file: vendor/magento/module-paypal/Model/SmartButtonConfig.php but if I made the modifications directly in the vendor file when I will upgrade my store this ...
0
votes
1answer
22 views

Magento 2.36 - How to sort printout of Invoice, Shipments and Credit Memos based on custom filter on SKU column/field?

The items in printout of the invoices, shipments and credit memos are sorted by sequences as to when they are added in the order. My question is how do I go about sorting them. For example how do I go ...
0
votes
0answers
12 views

Why update cart for configurable product gives error? Magento 2

Basically I am getting error We can't find the quote item after update cart for configurable product. There are no issues in adding item to cart. Also I am not getting any error's or warnings while ...
0
votes
0answers
9 views

Add multiple carriers (get from API) in the same module

Magento 2: I would like to 'generate' a new section in the admin side > Stores> Configuration> Sales> Delivery Methods. The sections would be generated based on the carriers available I ...
0
votes
0answers
13 views

Magento 2: Custom Product List Not Rendering

I'm using Magento 2.3.4, I have a page to view all sellers product list, but when I hit button to display product list, It shows a page like this: I checked exception.log and found this error: main....
0
votes
0answers
12 views

I can't associate simple products to configurable ones if they have 0 quantity

I use the following code to associate (I call it from a loop) simple products to a configurable one. it works fine except if the id of the product correspont to a product with 0 quantities, in which ...
0
votes
0answers
30 views

Size of product collection using getSize() method and using foreach loop is different-different Magento 2

I am using Magento version 2.4.2 We have total 278 configurable products showing in admin panel. I want to get all configurable product collection in root using below code. When I try to get total ...
0
votes
1answer
10 views

Magento 1.9 update street adress line 2 via PHP

I'm writing some codes to update customer address using php, but the site use 2 street fields, when i set it like $address->setStreet1('test 1'); it's not working $address->setStreet('test 1'); ...
0
votes
1answer
25 views

How can I add PHPExcel_IOFactory in my custom module class in Magento 2?

In this I need to add use PHPExcel; use PHPExcel_IOFactory; This two class in my module model file can any one guide me how can I add this two one in my model class I already added that but got ...
0
votes
1answer
17 views

Magento 1.9 set exisiting address as default billing and shipping address

I'm writing some magenta 1.9 codes for set existing customer address to set as default billing and shipping address <?php $customerId = Mage::getSingleton('customer/session')->getCustomer(); $...
0
votes
1answer
27 views

custom module stop working after Magento 2.4.3 upgrade

I have a module that extend the functionality of other module, in fact it display the product name and product price as a variable, after I upgrade the Magento to 2.4.3 this module stop working and I ...
0
votes
1answer
18 views

1 exception(s): Exception #0 (LogicException): Front controller reached 100 router match iterations

I am getting this error that I couldn't know from where it is generated 1 exception(s): Exception #0 (LogicException): Front controller reached 100 router match iterations I think it is coming from .....
0
votes
0answers
15 views

Magento 2 Invalid state change requested after redirect from third party payment gateway

I am facing this error when webhook hits to place an order in magento 2 after redirecting from the custom gateway page. "Invalid state change requested" Anyone knows how to fix this? I am ...
0
votes
1answer
14 views

Magento 2 get tax class id by product in website scope

I have a product that belongs to All store views and India website and the config for tax class in All store views is different from India website And I'm using $product->getTaxClassId() so it only ...
0
votes
0answers
38 views

Php script for import categories Magento2

Using a php script for my categories CSV and are "Default Category/Clothing/Shirts/Dress/Casual/Designers/Barba/Handmade shirts", but i need "Default Category/Clothing/Shirts/Dress/...
0
votes
2answers
18 views

Change order status for custom module

I want to use one offline payment method module, I install this module is there any way to change the status of the order to be Processing instead of Pending? Right now all my orders have status ...
0
votes
1answer
21 views

customer address attribute's value not visible in customer grid

I Have created some custom address attribute, field is visible in grid and form, but value is not visible in customer grid. (address_email). I have check customer_grid_flat, for customer attribute it'...
0
votes
0answers
18 views

Sign in with Apple - A php library is required to generate a valid client_secret

While working on Sign in with Apple, I get to know that we get following. authorization: code: "caa37f685e3d94d6bacdbb34d415018d5.0.rrrtv.kQYhdbUkWCaBZciXo-K_eg" id_token: "...
0
votes
1answer
40 views

Magento2 EE pagebuilder settings not workiing on custom entity

Hi there we had a problem with page builder on custom entity on magento2. <field name="description"> <argument name="data" xsi:type="array"> ...
0
votes
0answers
42 views

how to solve email not sent error in magento?

I getting this error main.CRITICAL: Unable to send mail: Unknown error {"exception":"[object] (Magento\Framework\Exception\MailException(code: 0): Unable to send mail: Unknown error at ...
0
votes
1answer
17 views

Only Email value is showing in database custom newsletter value showing null value in magento how to solve it?

Subscriber.php <?php namespace Vendor\Module\Plugin\Newsletter; use Magento\Framework\App\Request\Http; class Subscriber { protected $request; public function __construct( Http $request ...
0
votes
1answer
73 views

Magento 2 wrong base url on ajax call on checkout page

I have upgraded the Magento version to 2.3.7. After that, I have a strange issue on the checkout page that when it calls the ajax function the URL is been wrongly generated. Previously it was like <...
0
votes
0answers
12 views

Auto configure custom widget programmatically after enabling it in Magento 2

I'm struggling with some concept of auto-configuration custom widget provided by the module. By default, the widget should be configured by the merchant, which is obvious, but my question is - is ...
0
votes
1answer
15 views

Magento 1.9 - programmatically removing products from the cart

I'm trying to replicate the cart on another page and I'm using 'checkout / cart' to retrieve item info, but I need to replicate the remove cart button and I just don't know how. Here's my code example:...
0
votes
0answers
38 views

All emails stopped in Magento 2.3.4

No emails are being received in our M 2.3.4 For instance, customer welcome, password reset, contact us, etc. Already checked all the settings under admin panel and there's no change in the settings at ...
0
votes
1answer
39 views

magento 2 how to get children product sku or children product id using parent product id or sku

how to get children product SKU or children product id using parent product id or SKU I have these details for particular options, here are 2 arrays and I need particular product id or sku Array (...
0
votes
0answers
41 views

Magento 2 how to get the child product id from configurable product id

how to get the child product id from configurable product id using attributes options. <?php namespace Vendor\Module\Block; class Getprice extends \Magento\Framework\View\Element\Template { ...
0
votes
1answer
23 views

Shipping calculation on the product page

We have a shipping calculation module its name is "FRETE RáPIDO" the documentation says it appears on the product page. For some reason, my theme doesn't work. What code do I put in my theme ...
0
votes
1answer
35 views

How to send an e-mail after adding the product to the cart in magento 2?

Unfortunately, so far I am a complete beginner in creating a module in Magento. I need to send an email after adding the item to the cart. As I understand it, I need to use the ...
0
votes
0answers
13 views

M2.4.2 | Credit Memo not substracted from grand total

Can anyone explain to me why in the world the grand total is messed up!?
0
votes
0answers
53 views

How to override protected method of Abstract class in magento2

I am trying to override protected method _saveValidatedBunches() of abstract class Magento\ImportExport\Model\Import\Entity\AbstractEntity, I have tried creating preference for parent class but its ...
0
votes
1answer
11 views

M2.4.2 | Credit Memo multistore returning with an mysql exception over xdebug

I have been debugging this issue for a while, I am getting this error when I am trying to create a credit memo for any order: "SQLSTATE[42000]: Syntax error or access violation: 1103 Incorrect ...
0
votes
1answer
26 views

Why is parent::__construct($context) used?

I have experience in programming with php and i think i have a good understanding of what a constructor does. But in Magento the constructor is called with the implemented Dependency's but after that ...
0
votes
1answer
25 views

Magento 2 How to add to wishlist on checkout Summary page

I want to add to the wishlist link on the checkout summary page under the product section.
0
votes
0answers
55 views

After upgrading PHP 7.2 to 7.3 php command line not working. bin/magento must be run as a cli application error

After upgrading the hosting plan, php version migrated from 7.2 to 7.3 (server no longer supports 7.2) and I can't run the php commands any more. I have tried all the top 10 solutions on Google to fix ...
1
vote
0answers
18 views

When placing the order in magento2.4 then sequence_order_1 table generating the three increment id

When place the order then three increment id store in the sequence_order_1 table How can i store the one order id in the sequence_order_1 table when place the order Before placing order ...
0
votes
1answer
20 views

Multiple Ecommerce Functionality in Magento 2

I am new to Magento so pardon me if I sound stupid. I want to build an Ecommerce website in magento 2 which have following functionality: Simple Ecommerce Functionality like products, categories and ...
0
votes
3answers
56 views

M2.4.2 | Incompatible argument type: Required type

I keep getting this error after running a composer update, I have tried to isolate the problem in the old fashion manner, where I disabled all third-party modules but still not working, which makes ...
21
votes
7answers
2k views

Errors during compilation: AbstractConfigOption.php

I have just run a composer update on my Magento 2.4.2-p1 installation and now I cant compile it, I am getting the following error Errors during compilation: Magento\Framework\Setup\Option\...
0
votes
0answers
524 views

Fatal error: __autoload() is no longer supported, use spl_autoload_register() instead in D:\XAMPP\htdocs\marimar\includes\functions.php on line 37

I am trying to run some of my code by each time, i am getting this error, i am using the lates version of php. i replaced my caused as per the error; from this function __autoload($class_name) { $...
0
votes
0answers
5 views

Magento 2 | Take a specific tier price based on quantity with PHP

I'm trying to figure out how to take a specific tier price if I enter a quantity in the php function. For example, I want to have the price per 1000 pcs of a product. This is my code but I don't know ...
0
votes
0answers
11 views

Magento Admin display Exception #0 (Magento\Framework\Exception\InputException): Please correct the target currency

After a lot of struggle , I could finally install Magento 2.3.5 p2 but now when I try to login to magento admin , it shows me the error message given below : Exception #0 (Magento\Framework\Exception\...
0
votes
0answers
9 views

Magento 2 | Join a table to getLoadedProductCollection()

I'm trying to join the tier price table to the getLoadedProductCollection () collection located in the list.phtml file. What I would like to do is filter the products in the current category by tier ...

1
2 3 4 5
73