Skip to main content

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
1 vote
0 answers
29 views

How to replace upload image field with a Page Builder area in admin?

I need the ability to add two different images as the "category image" in the categories section: one image for desktop and another for mobile. Currently, Magento 2 only allows for one image ...
media.queeries's user avatar
0 votes
1 answer
31 views

TypeError: Cannot read properties of undefined (reading 'isLoggedInBolt')

I have upgraded from Magento 2.4.6 to version 2.4.6-p6. Then I'm having troubles when shopping with my store (at the checkout instance), as it does not return the payment methods enabled in the ...
zer0day's user avatar
0 votes
0 answers
18 views

Magento 2 save admin integration it shows 404 error: Page not found

We are using magento version 2.4.6-p3 when we are trying to save admin integration it shows 404 error: Page not found. We can save Design configuration,product,categories but 404 error only coming ...
sumeet bajaj's user avatar
  • 1,316
0 votes
1 answer
15 views

Magento2 | Get ratings for each review

I am trying to take product reviews programmatically, filter them by product and pull out the rating stars. I can get the text of the reviews (getDetail()) without any problems and in fact I see all ...
Jackom's user avatar
  • 493
0 votes
1 answer
35 views

Magento change Position from delivery with price

Need change position from class="product attribute delivery_time" under class="product-info-price" I'm using the Proto Theme, can anyone help? What do I need to change here, ...
user116249's user avatar
0 votes
1 answer
87 views

Composer showing error during version upgrade from 2.3.6 to 2.4.7-p1

While upgrading Magento, I updated all plugin versions to be compatible with the new version and PHP 8.3. I also removed unnecessary plugins and added some from the 2.4.7-p1 composer as well. While ...
Haider Mohammed's user avatar
0 votes
1 answer
22 views

Should I Include Magento Core Unit, Functional, and Integration Tests in My Custom Project Pipeline?

I’m currently setting up a custom project pipeline for my Magento application and have a question regarding the inclusion of Magento Core tests. Specifically, I am debating whether to include Unit, ...
Tommy J's user avatar
0 votes
2 answers
26 views

current version - none, required version - 1.0.0

1 exception(s): Exception #0 (Magento\Framework\Exception\LocalizedException): Please upgrade your database: Run "bin/magento setup:upgrade" from the Magento root directory. The following ...
Alan Biju's user avatar
0 votes
0 answers
28 views

magento 2.4.6 the requested company is not found

I am trying to edit companies using the "Edit" link at the right of the grid of companies from the admin. some companies when i try to edit it's getting an exception thrown. The requested ...
Shraddha Patel's user avatar
0 votes
0 answers
37 views

How to create a Grid Form with Ui Component Can you give me an example

How to create a Grid Form with Ui Component Can you give me an example
Alan Biju's user avatar
0 votes
0 answers
30 views

Magento 2 main.ERROR: Warning: Array to string conversion in vendor/magento/module-catalog/Model/AbstractModel.php on line 186 [] []

We are using magento 2.4.6-p3 version. When we clear the cloudflare cache then we are getting this issue on error log files - Jun 5 08:26:16 abc-ip-xxx-xx-xx-xxx Magento[12879]: main.ERROR: Warning: ...
sumeet bajaj's user avatar
  • 1,316
1 vote
4 answers
102 views

How to fetch and store external api access token in magento2

I am trying to integrate my external API in my magento 2.4.6 instance. I Used Guzzlehttp to make and fetch the data and handle the request. The problem is, I have to provide Username & password to ...
Haarish Infant Raj's user avatar
0 votes
0 answers
15 views

Images attached to page builder vanish on save but the data is saved on my table (the problem is on arabic_image_one)

<?php namespace magento\test\Controller\Adminhtml\Index; use Magento\Backend\App\Action\Context; use Magento\Framework\Api\DataObjectHelper; use Magento\Framework\App\RequestInterface; use Magento\...
Alan Biju's user avatar
0 votes
1 answer
50 views

Magento2 | Change subject email of new order if condition is true

I created an observer that changes the email subject when I place a new order: This is the ChangeOrderEmailSubject.php file: <?php namespace Sales\OrderCust\Observer; use Magento\Framework\Event\...
Jackom's user avatar
  • 493
0 votes
2 answers
35 views

Magento2 | Recover order increment id from Observer of an Reorder

For the reorder function, I added an Observer in my custom module that allows me to extract the quote_id. Actually my real goal is to get the increment id of the order I am reordering for. Currently ...
Jackom's user avatar
  • 493
0 votes
1 answer
31 views

The "oauth/consumer/enable_integration_as_bearer" path doesn't exist

I am trying to reset API but when I going to the path Stores > Configuration > Services > OAuth > Consumer Settings > Allow OAuth Access Tokens to be used as standalone Bearer tokens I ...
Haider Mohammed's user avatar
0 votes
1 answer
27 views

Magento 2 - Change value Quote item when I add to cart via Reorder button

I am trying to change a custom value each time I add to the cart via the “reorder” button. Right now I am trying to do this in the file “Magento\Sales\Model\Reorder\Reorder.php” but without success. ...
Jackom's user avatar
  • 493
0 votes
0 answers
18 views

Magento 2 : No Such Entity with Cartid when Adding Item to Cart after Upgrade

We have an issue on Magento 2.4.5 where customers get an error saying "No such entity with cartid = xxxx" when they try to add an item to their cart. Most of the time, this happens after we ...
Peter Wood's user avatar
0 votes
3 answers
402 views

after upgrade magnento 2 version 2.3.4 to 2.4.6-p6

recently i was upgrade magento 2.4.3 to 2.4.6-p6 for upgrade i fired below cmd composer require magento/product-community-edition 2.4.6-p5 --no-update composer update --ignore-platform-reqs after ...
Bhagyesh Bhalodiya's user avatar
0 votes
0 answers
31 views

Display Stock on product widget

I am using magento 2.4.6 with martfury theme. I want to display stock level on product that's displayed via widget. Also, I have MSI enabled for the store. I am using the below code to display the ...
Yukti Dogra's user avatar
0 votes
1 answer
28 views

How to get from_date and to_date of cart_rule and catelog_rule in magento 2?

I'm writing a before plugin and i need to get from_date and to_date of cart_rule and catelog_rule in my plugin code namespace Vendor\CouponBeforePlugin\Plugin; use Magento\Quote\Model\Quote\Item\...
Midhun M's user avatar
0 votes
0 answers
8 views

how to customise sorter.phtml in magento2?

i need to customise the magento2 component sorter.phtml so that it displays all available options in a list (instead of a select element) and each element in the list has its own asc and desc arrows. ...
media.queeries's user avatar
0 votes
1 answer
52 views

Call to an undefined method Magento\Quote\Model\Quote\Address\Rate::setCost()

<?php namespace Ravedigital\Custom\Model; use Magento\Shipping\Model\Rate\Result; /** * Class Checker * * @category Ravedigital * @package Ravedigital_Custom */ class Carrier extends \...
Shubham Nigam's user avatar
0 votes
1 answer
34 views

Magetno 2 how to send the request of place order when user checked on the check box of terms and condtion

I have changed the checkout process into 4 steps Adress Shipping Payment methods and agreement Summary and place order button everything is working fine accept the terms and condition. I have put ...
Harris's user avatar
  • 1
0 votes
1 answer
22 views

pre order on the category page

How to change the label of add to cart to pre order on all magento 2.4.5 based on the below conditions: if(qty<0 , product is salable and getBackorders()/true ) to show pre order else add to cart. ...
L.A's user avatar
  • 1
0 votes
1 answer
38 views

Magento2 - How to customization of the invoice pdf deign using php not using phtml

example for this // Add "INVOICE" text above the barcode $font = \Zend_Pdf_Font::fontWithName(\Zend_Pdf_Font::FONT_HELVETICA); $page->setFont($font, 26); $page->setFillColor(new \...
Alan Biju's user avatar
0 votes
3 answers
49 views

Single store vs Multi store in Magento 2?

We already have a website built using magento 2.0. where in we have an existing product category.Now we have a new requirement where we plan to add a new product type , very different from existing ...
user3653787's user avatar
0 votes
1 answer
26 views

How to create a cron job for out of stock

How to create a cron job for out of stock that must daily run and check how many products are out of stock
Alan Biju's user avatar
0 votes
1 answer
23 views

Magento 2 How to create order on user demand

Hi I have one requirement where user visit on the website and upload their product image(Like some tool image, Some kind of machinery part etc.) and select some attribute like size,colour,material etc ...
Ajay Tiwari's user avatar
0 votes
1 answer
38 views

Error: Call to a member function setActive() on bool in /var/www/html/project.local/vendor/magento/module-backend/Model/View/Result/Page.php:26

showing this error while clicking on a menu item created for a grid, the code below is my controller <?php namespace Vendor\Grid\Controller\Adminhtml\Grid; class index extends \Magento\Backend\...
Midhun M's user avatar
0 votes
1 answer
55 views

How to add a PhoneNumber field in Minicart in magento2

I need to save this phonenumber on quote_item table in phoneno coloumn (I add the extra coloumn through upgradeschema.php). I want to update this phonenumber as how the Quantity of a product is ...
Thoubik's user avatar
  • 128
0 votes
0 answers
20 views

Get product attributes values for out of stock products in elastic search without changing 'display out of stock' configuration setting to yes

So I want to get product's attribute value to work on if it is set to yes but product is out of stock so it is not shown on the frontend. One solution is to change 'display out of stock' configuration ...
Raj Pawan Shukla's user avatar
0 votes
1 answer
19 views

Uncaught Error: Call to a member function getEndpointUrl() on null in /home/magento/backend/app/code/Wac/InstagramFeed/Model/Api/AbstractApi.php:124

the above image The getendpointUrl getting null public function getEndpointUrl(): string { return $this->getStoreConfigValue(self::XML_PATH_INSTAGRAM_API_ENDPOINT_URL); } ...
Alan Biju's user avatar
0 votes
1 answer
56 views

Get SKUs of all bundled product items Magento 2.4.6

Get SKUs of all bundled product items Magento 2.4.6 I have a bundled product, let's call the sku BundledProduct. I have 3 products that can be selected to be bundled with BundledProduct. Let's call ...
user115044's user avatar
0 votes
0 answers
40 views

Magento2 How to get Use auto generated coupon by website wise.?

// For all websites $websites = $this->_storeManager->getWebsites(); foreach ($websites as $website) { $websiteUrl = $website->getDefaultStore()->getBaseUrl(); $url = $websiteUrl . ...
Magecomp Product Team's user avatar
0 votes
1 answer
37 views

An error with Magento 2 Admin panel page/Unable to access the admin page

When logging into my admin panel it's throwing the error below, causing me to be unable to access the admin panel. 1 exception(s): Exception #0 (InvalidArgumentException): Item with identifier ...
David Gupta's user avatar
0 votes
0 answers
33 views

create a reslover and graphql query for city and area

my current resolver is my current graphql schema is Iam looking for a graphql schema and resolver that if i select a city then all the area will display can you give me graphql query also and what ...
Alan Biju's user avatar
0 votes
0 answers
43 views

Magento2 how to get two tables data in my custom grid.?

I want to get data as name from salesrule table code from salesrule_coupontable. Here I attached the salesrule and salesrule_coupon table in which I want to get code column data. In the salesrule ...
Ekta's user avatar
  • 101
0 votes
1 answer
42 views

How to get absolute path from category in megamenu?

i'm using the MageDelight Megamenu extension for a website with different stores in different countries, ex: mystore.com/en_uk/ mystore.com/en_us/ While creating the menu in admin i put the ...
media.queeries's user avatar
1 vote
1 answer
48 views

Magento 2.4.6: $_isFixed must not be defined error in custom shipping module

I have coded a custom shipping module for Magento 2.4.6 according to Adobe's documentation here: https://developer.adobe.com/commerce/php/tutorials/frontend/custom-checkout/add-shipping-carrier/ I am ...
user86226's user avatar
0 votes
3 answers
99 views

How to hide admin product form tabs for specific admin user?

I want to have an admin user who would only be able to view the 'Images And Videos' and 'Search Engine Optimiation' in the admin product edit form. I tried the following. Created app/code/Vendor/...
Aniruddha Ray's user avatar
1 vote
1 answer
52 views

Magento2: I'm getting empty data from the product attribute

I am receiving empty data from the product attribute "product_types" & getting a null value when fetching the data from this attribute.
Alan Biju's user avatar
0 votes
0 answers
9 views

In magento, how can we bring the swatch options of a configurable product and it's corresponding image url's in an array?

I need to bring the swatch options of a configurable product and its corresponding image url's stored in an array in PLP page in magento. How can I do that? I got an empty image url array while trying....
Farseen's user avatar
0 votes
1 answer
46 views

How can I sort is not saleable products in the end of category

I need products that are out of stock (!$_product->isSaleable()) to be displayed at the end of the category list in the catalog (frontend part) Magento v 2.4.2
WhoYou's user avatar
  • 55
0 votes
0 answers
56 views

In Store Delivery sources show regardless of product stock status

I have come across an issue in Magento 2.4.6 p3 that appears to be a bug, https://github.com/magento/magento2/issues/37992 When using the In Store Delivery option if a product is out of stock you ...
miller75's user avatar
  • 409
0 votes
1 answer
44 views

Magento\SwatchesGraphQl\Model\Resolver\Product\Options\DataProvider\SwatchDataProvider does not exist

Magento\SwatchesGraphQl\Model\Resolver\Product\Options\DataProvider\SwatchDataProvider does not exist the error while i using php bin/magento s:d:c
Alan Biju's user avatar
0 votes
1 answer
216 views

when creating database showing error The default website isn't defined. Set the website and try again

sudo php bin/magento setup:install --base-url=http://oxygen.local --db-host=localhost --db-name=oxygen –db-user=root --db-password=Root@123 --admin-firstname=admin --admin-lastname=web --admin-email=...
Alan Biju's user avatar
0 votes
1 answer
305 views

Magento 2.4.6 Localhost Install Windows 11

I am having issues installing Magento2 on my local machine. I have been following this tutorial but I run into the same issue where my localhost/magento2/pub/ page doesn't display content. I have been ...
Kage Dev's user avatar
0 votes
1 answer
47 views

unable to update custom attributes to product using rest API

I have created the custom attribute through rest API and it is also reflected in magento admin, after which when I tried to update the product with the attribute code.it won't worked. Below is my ...
manikandan.p's user avatar
0 votes
1 answer
34 views

Update custom attributes to product using rest

$data = [ "product" => [ "sku"=> $productsku, // "attribute_set_id"=> 4, //"attribute_set_id" => $mage_attr_set_id, ...
manikandan.p's user avatar

1
2 3 4 5
78