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
5 views

How can I create a custom widget with custom form types and restrictive layout update?

I want to add a new kind of widget. It is supposed to be a message bar (like an alert) which should be displayed on the top of selected page types for a certain period of time. But to do so I have to ...
0
votes
0answers
12 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
14 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)...
0
votes
0answers
8 views

Disable cache in widget home page magento1

I have a widgets that show products to sell in home page but it takes time to show product added so i want to disable cache in that widget {{widget type="cms/widget_block" template="cms/...
0
votes
0answers
7 views

Magento 2 add request header to Graphql programmatically

I'm trying to run this Graphql url https://****.***.com/in/graphql by Postman I saw in Magento document that the URL above can contain Store header https://devdocs.magento.com/guides/v2.4/graphql/send-...
0
votes
2answers
15 views

Magento install error -> In Installer.php line 545: Missing following extensions: 'intl'

How to fix this error that I get when installing Magento? In Installer.php line 545: Missing following extensions: 'intl' Php Version 7.4.20 Magento 2.4.1
0
votes
1answer
30 views

PHP ^7.1 meaning

Just to make something clear, when my Magento 2 module state: "require": { "php": "^7.1.0" }, Does that mean that the module support PHP version 7.1 and higher or ...
0
votes
0answers
10 views

Magento 2 adding Fixed Product Tax to product before calculate other tax

Currently, I see the tax calculation in Magento is that $final_price = ($origin_price * $tax_percent / 100) + $product_FPT How I can change or override this logic to $final_price = ($origin_price + $...
0
votes
1answer
26 views

How to translate magento 2 customer login/registration url

How I can translate customer login url? "customer/account/login/" but example if I translate it to Estonian then it should look like this "klient/kasutaja/sisselogimine". So if ...
0
votes
0answers
15 views

Php information on custom module for checkout page

I have created a working custom module that shows a message on checkout page following this solution https://stackoverflow.com/questions/56974955/need-to-write-a-custom-message-on-checkout-page-in-...
0
votes
0answers
14 views

Magento 2 - How to insert manufacturer link inside the product title

I have product titles all with this structure: NAPAPIJRI Men's organic cotton crewneck T-shirt Live example: https://www.push96.com/en/napapijri---mens-organic-cotton-crewneck-t-shirt-np0a4eob041.html ...
0
votes
1answer
25 views

Magento2 How to filter Product collection by Stock (Get only In stock products)

I want to filter product collection by stock and get only In stock products. I have tried multiple ways and followed multiple stack solutions but nothing works as expected. I am using the Smartwave ...
1
vote
0answers
39 views

Magento 2 POST Request Return 302 Redirect [closed]

I have Image Manager from Ves Base Widget, the issue is when the user tried to upload the image from his computer to the image manager, so that means the request called from Javascript and returned ...
0
votes
1answer
28 views

Can't access Magento 2.2.1 admin,

Can't access Magento 2.2.1 admin, Stores > Configuration, anyone have this error before? How I can fix this. Thank you 1 exception(s): Exception #0 (Exception): Notice: Undefined offset: 2 in /home/...
0
votes
0answers
25 views

Technical review failed on module submission

I am new in Magento and have a project for building a custom shipping carrier module with PHP and Magento, in which I have. Now when going for submission in the Technical Review section, I always get ...
0
votes
1answer
13 views

Failed address validation With Automatic Customer Group Assigment enabled

So again i am badly hit by Magento today. I have enabled the "Automatic Assignment To Customer Group" for my VAT validation process to assign special customer group to those who has ...
0
votes
1answer
5 views

Magento 2: I Want To Make Custom Products Tab On Home Page

I trying to make custom dynamic tab on home page but when do that I get an error Uncaught ReferenceError: tab is not defined at HTMLButtonElement.onclick ((index):1200) Here is my code I don't know ...
1
vote
1answer
37 views

Uncaught Error: Call to undefined method Magento\Quote\Api\Data\AddressExtension in magento 2

I have try to add custom field(textbox) in shipping and billing section on checkout page. I have create extension attribute like this : <?xml version="1.0" ?> <config xmlns:xsi=&...
0
votes
1answer
24 views

Magento 2 | Exclude duplicate Item ID from a collection before foreach

When I foreach my collection filtered by tier price, qty and customer group I get the error: "Item (Magento \ Catalog \ Model \ Product \ Interceptor) with the same ID already exists". This ...
0
votes
1answer
24 views

Magento 2 | Item with the same ID already exists when join tables

In my class I have filtered my collection by tier price and quantity. If I put the display of only 3 products the code works, while if I set the display for all products I get this problem: Item (...
0
votes
0answers
16 views

Magento2 : How to send a request for a page and get the page status?

I want to check if the status of the page is not 200, then add it to the array along with the status and send it to the mail at the end of the script I can't finish the code, tell me how to implement ...
0
votes
0answers
6 views

How can I integrate Magento website with wordpress website and create a SSO(single sign on) between both websites?

I am trying to integrate a new website(Wordpress website) with a Magento website, I've made the API integration using php curl, I've also add the Magento website url to the new website. I can create ...
0
votes
0answers
10 views

How to hide all stock statuses in the store?

I don't need the admin option. I want to hide statuses for special custom groups and for specific websites. I want to add to the product page and category view_model which has a method in it that I ...
0
votes
1answer
18 views

gmail receiving html tags - magento 2

Guys I have a module for sending e-mail, which when sending the e-mail is arriving with the html tags, example: br span, that is, it is not being interpreted. I think the code is read by php as a ...
3
votes
2answers
38 views

email is coming with tags without interpretation

Guys I have a module for sending e-mail, that when sending the e-mail it is arriving with the html tags, example: br span, that is, it is not being interpreted. I think the code is read by php as a ...
0
votes
0answers
22 views

Magento 2 | Use input text as a filter in layered navigation

I try to explain what I would like to do: I created a new attribute called stockqty in Stores> Attributes> Products. I assigned this attribute to the Default section and re-indexed everything ...
1
vote
1answer
35 views

Address Attribute not set to Address template in Magento 2

I need to update default address layout which used in order, invoice and emails. So that I change the layout in store->configuration->customer->customer configuration->address template. I ...
0
votes
0answers
9 views

Magento 2 | Hreflang return wrong category link for store

In my Magento2 website i have installed an extension for generate links for hreflang. This is the class that generates links for hreflang: use Magento\Framework\View\Element\Template; use Magento\...
0
votes
2answers
25 views

Magento 1 Sql query for product name, sku and quantity

I am using Magento 1. I want to fetch product names, SKUs, and stock quantity with SQL queries. If anyone knows please let me know. Thanks in advance.
0
votes
1answer
21 views

Converting this date format 2021-04-26 05:31:38 to 26 Apr, 2021 in magento 2

How can we Convert this date format 2021-04-26 05:31:38 to 26 Apr, 2021 in Magento 2. Please let me know how can I do this.
0
votes
0answers
14 views

Magento 2, programmatically create configurable products

Hello I have the necessity of creating both simpe and configurable products. This is what (following online guidelines) I have right now: $bootstrap = Bootstrap::create(BP, $params); $objectManager = $...
1
vote
1answer
67 views

Magento 2 | Reindex very slow in local server

On my server with: MariaDB 10.4 PHP 7.4 Elasticsearch 7.9.1 Elasticsuite 2.10.0 I am trying to relaunch the full reindex for Magento2 but I have seen that catalog_category_product is very slow, its ...
0
votes
3answers
43 views

Magento 2 - All CMS pages are with content blank

In my server with: elasticsearch7, apache 2.4.29, mariaDB 10.4 and php 7.4 I imported my Magento 2.4.2 site. Everything works correctly except for the CMS pages that have empty content and in fact the ...
0
votes
0answers
14 views

Show list of simple products by modifying item renderer magento 2

Modify the way configurable products are rendered in the shopping cart by modifying their item renderer. Show in the line item a list of all simple product names that are assigned to the configurable ...
0
votes
1answer
14 views

Two files upload is not working in same form in Magento product page

I have a default Magento 2.4.2.installed on my server. I have a page where there are 2 input types of file upload which is not working together. When I remove one input file type then it is working ...
0
votes
2answers
28 views

Change qty script

I use a script to change the qty in the product view page and in the shopping cart page but I have a problem. when I decrease the qty instead the latest value to be 0 is -1. How I can stop the ...
0
votes
0answers
36 views

Magento Category page not showing product list

I am new on magento. Please help me with this issue. I moved my magento site from one system to another system. And after that this URL localhost/magento/men/tops-men/hoodies-and-sweatshirts-men.html ...
1
vote
1answer
42 views

Warning: Illegal offset type in isset or empty Magento 2.4

I'm creating basic Module call CustomApplication also I've create a table call vendor_application. When I try to submit my form I get this error Warning. Illegal offset type in isset or empty in C:\...
0
votes
0answers
16 views

Expected to start loader but did not find one in the dom : loader.js:210 in magento 2 product page

i have see issue in my browser console : Expected to start loader but did not find one in the dom : loader.js:210 in product page. if (window.console && !ctx.parents('[data-role="loader&...
1
vote
1answer
16 views

Magetno 2: Theme Configuration Goes To 404 After Save

I'm using Magento 2.3.5, I'm scratching my head for a couple of days, the issue is when I go to Theme Configuration, do any changes and hit Save Configuration, the page goes to 404 error: Page not ...
0
votes
0answers
27 views

Magento 2: Review Form Star Rating Field Validation Not Working

I'm using Magento 2.4.0, In my product review form, all fields validation works as I expected except the Star Rating field. The client is using a custom theme with no parent theme, Once I change the ...
0
votes
0answers
15 views

Expected Shipping Date - Is it possible to get from magento 2 ? If yes then which table?

Is it possible to get the expected shipping date to get it from some magento table. I need to show this information in my invoice. Which table shows this information. Shipped by: FedEx Expected by: 2-...
0
votes
1answer
76 views

PHPSESSID set SameSite=NONE

PHPSESSID cookie is set to default sameSite= lax, how to change it to sameSite=none?
0
votes
2answers
32 views

Magento 2.4 : Frontend/Backend Not working

I am using below configuration : Magento 2.4.x PHP 7.4 Composer 2.0 Frontend and Backend is not working. All .htaccess files are there in required folder. But still,I am getting below log in apache ...
0
votes
0answers
16 views

Magento 2 Checkout show Order Summary in popup div window

Good Afternoon All, I am currently working on a small module that requires a copy of the Order summary is shown in a pop-up window after the checkout has loaded. I have been working with the data-bind=...
1
vote
0answers
25 views

How to get Image id by image path?

Beginner at magento 2 and i want to know how can i get the image id using the image path "/3/4/341467-1_1.jpg", how can i do this programmatically? any help is apreciated.
0
votes
1answer
16 views

Breadcrum issue after embeding advance search on home page:magento2

I have moved the advance search form on home page with the custom template as: <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../....
0
votes
2answers
39 views

Magento 2 How to change attribute filter position in layered navigation

I want to move the climate product attribute position from the bottom to the third position. Can you please help me out?
0
votes
1answer
126 views

problem in facebook pixel module for magento2.4

we installed the facebook pixel module for magento2.4. so far everything perfect. But when I enter the product registration and saved, the error below occurs Error: Call to undefined method Facebook\...
0
votes
0answers
16 views

Magento 2 - Change load order of custom page layout

I created a new page layout, but I noticed that it does not get loaded last and it gets overridden from other layouts. Is there a way to change the load order so that my custom page layout gets loaded ...

1
2 3 4 5
72