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
1answer
27 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
19 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
2answers
128 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
49 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
18 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
87 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
15 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
17 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
54 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
108 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
53 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
52 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
124 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
39 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
53 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
147 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
26 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
21 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
71 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
1answer
1k 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
31 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
15 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 ...
0
votes
0answers
19 views

Magento 2 | Add Filters of Layered Navigation to custom collection

I asked this question because I would like to explain myself better. In my CMS page I have recalled my custom collection in this way: $blockProductColl = $block->getLayout()->createBlock(...
0
votes
0answers
32 views

How to get columns header of csv in custom import module

Hi I created custom module for import data by helping module ( https://github.com/Smile-SA/magento2-module-custom-entity-import-export) In this case I need to get csv header names. I tried several ...
0
votes
0answers
13 views

Redirect the Simple products to configurable products including simple products images

I need to redirect the simple products images on the configurable product . I redirect the simple product to configurable but not able to redirect the simple product images when first time simple ...
0
votes
0answers
69 views

Cart Price Rules - Discard Subsequent rules with Exceptions

should sound weird, but is there a way to allow another rule to work though discard subsequent rules is set to Yes. I tried giving Priority 1 to my current rule, and priority 0 to the other rule, they ...
0
votes
0answers
34 views

Magento 2 How to move new shipping address popup below save adddress

I am trying to remove modal popup for new shipping address form in checkout and place it below saved address as a div. Please let me know if you know any solution. Thanks
0
votes
0answers
18 views

Why is the final price of the product not available when I load it via Product Model?

I have a product which is affected by a catalog price rule and nothing else. The regular price is 14.99. The final price is 3.0 I build a Plugin which is supposed to add the final price of the product ...
0
votes
0answers
23 views

Magento EE 2.3.5-P2: Customer Store Credit Remove After Selecting Payment Method On Checkout

I'm using Magento EE 2.3.5-P2, The Main issue I'm getting is when customer use Store Credit for their order, goes to checkout, select shipping method, proceed to payment, when customer select payment ...
0
votes
2answers
169 views

How to calculate dynamic shipping amount based on address in Magento 2.4

In my shopping card build using Magento2.4.2 , I need a dynamic calculation of shipping amount after going to next step after entering the shipping address. What I need is to make a third party api ...
0
votes
1answer
24 views

Magento 1 Redirect Product to the category page if product doesn't exist or found 404

I am working on Magento 1.9.1. I we have few already deleted products. Currently if we open that by URL we are getting 404. But I want to redirect these all in their parent category. Is there any ...
0
votes
2answers
36 views

Magento2: Importing additional images programatically - PHP error

I am trying to set up a script to import additional images for products programatically, from the var/import/images folder. I am running it on the command line, via PuTTY. The following code works and ...
0
votes
0answers
81 views

Composer installation magento requires php ~7.3.0||~7.4.0 -> your php version (8.0.7)

I'm trying to install the community edition by composer 2.1.2 but the logs show that I have the php8 installed and that I must use the php7. I have already installed the php7 but still requiring the ...
0
votes
1answer
32 views

Exception not getting Caught in childHtml

I have a try catch block where inside of try I navigate to different set of childHtml based on a if-else in the parent .phtml file and if there is any error, I need to catch them. Problem is, the ...
0
votes
0answers
25 views

Magento2.4 System Integration not being activated

I want to connect Magento2 with Zoho inventory. So, I have used Cartrover service for this. As per Cartrover docs, I have tried to connect but Magento System Integration not being activated. Cartrover ...
0
votes
0answers
34 views

Magento 2: Override product grid for only one menu

I'm creating a menu tab name "product monitoring" From there I get the product list by call <uiComponent name="product_listing"/> in the layout then I add custom columns name ...
0
votes
1answer
91 views

Composer Installing AWS SDK On Magento 2.3

I'm trying to download composer require aws/aws-sdk-php but getting this error: I don't know the issue, if anyone knows about this please help me out. composer.json { "name": "...
0
votes
1answer
42 views

how to get sku in template

I want get sku <?php echo __('Product code') . ": " . $item->getSku(); ?> This is my code, it not work <?php /** * Copyright © Magento, Inc. All rights reserved. * See COPYING....
0
votes
1answer
20 views

Magento 2.3.6 - Admin session times out to early

I have some issues where my Magento admin session times out way before what it should. I found this GitHub link where they say you need to add this code to php.ini: php_value session.gc_maxlifetime ...
0
votes
0answers
105 views

Magento 2: How To Add Validation In Admin MultiSelect Field

I add a custom admin filed in custom form, it's a multi-select category field. I just want to make this field required. phtml <div class="field required"> <label class="...
0
votes
0answers
16 views

How can I get all widget_instances of a widget type from the database?

I created a new widget type named "lorem_widget" and also a few widgets instances of them, which are persisted in widget_instances. Now I want to get all of these widgets out of the database ...
0
votes
1answer
50 views

How to add inline css to the Transaction Emails

I need to update existing email header. There for I have to modify some styles.but doesn't define in specific style in app/design/frontend/{themename}/{namespace}/Magento_Email/email/header.html app/...
0
votes
1answer
81 views

_initSelect override with Plugin in Magento2.4.1

Need a help in this issue. I am trying to remove a MySQL condition from _initSelect from this Collection "Magento\SalesRule\Model\ResourceModel\Rule\Collection". This Collection has the ...
0
votes
0answers
25 views

I want to add additional Options to addtocart product when reorder in magento 2?

public function aroundAddOrderItem(CheckoutCart $subject, \Closure $proceed, $item, $qtyFlag = null, $data = [] ) { // Get Order Item $orderItem = $proceed($item, $data); ...
0
votes
0answers
23 views

How to setup multiple websites, stores and store views in magneto 2?

Create a root category - Catalog-> Categories-> Add Root Category Create a website, store and store view - Stores-> All Stores 2.1 Create Website -> Create Website (Ex- Berlin Website)...

1 2
3
4 5
74