Stack Exchange Network

Stack Exchange network consists of 175 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

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

magento 2 getting error on update product action in admin panel

I am getting the below error in the magento admin panel while editing the product options from the action dropdown. Catalog - products. Select a product or 2. Then actions menu select change attribute ...
-1
votes
1answer
26 views

Array Get Value in magento2

i want to get profile id from this array [2019-05-21 07:30:24] main.DEBUG: array ( 'url' => 'https://api-3t.sandbox.paypal.com/nvp', 'CreateRecurringPaymentsProfile' => array ( '...
0
votes
0answers
5 views

Need to get unique values in array [migrated]

Array ( ) Array ( ) Array ( [0] => 14 ) Array ( [0] => 14 ) Array ( [0] => 14 ) Array ( [0] => 14 ) Array ( [0] => 14 ) Array ( [0] => 14 [1] => 12 ) ...
0
votes
1answer
16 views

Assign related products from categories (Magento 1)

We have a magento store and we have over 1000 products listed. We want to assign random related products, but they should be within the category. For example, if a product is listed under Men >> T-...
1
vote
0answers
37 views

Magento2.3 : How do I programmatically submit a form generated via a UIComponent?

I created a UI Component form, but I am unable to find the element in the source. I would like to click a button and then inspect a field in the form and dependent on what value is selected submit ...
0
votes
0answers
11 views

Get delivery time for UPS on Magento 2 shipping methods

we have our custom UPS prices configured through the UPS api on our Magento 2 website. It is working well, but we would like to add the delivery time (in days?) for our clients. What are the files ...
1
vote
2answers
19 views

Magento 2.3 How to override the custom theme's etc/layouts.xml file in recommended way?

There is, in a theme that I bought a layout.xml file that is used in the backoffice to hydrat a select element (that allows you to switch between 5 layouts). app/code/CompanyTheme/LayoutSwitcher/etc/...
0
votes
1answer
29 views

Need to change the `signin` name in header links in Magento 2

I am building a custom theme and I need to change the signin link name which is not contained in the layout file nor in the phtml file but only in the block class file. So should I build a module in ...
1
vote
0answers
13 views

UI Components - pass ids selection to listing selection

How do i pass a selection of ids to an insert-listing component to preselect certain rows. I have a dynamic rows component with entries related to the current product I'm editing. When click on a ...
1
vote
1answer
24 views

Find the block class instantiated into a phtml file

I need to modify a block class called in a phtml file, this is the customer.phtml file: <?php // @codingStandardsIgnoreFile ?> <?php if($block->customerLoggedIn()): ?> <li ...
2
votes
1answer
41 views

OR condition in magento 2

I am using Magento 2.1.5, and I created 4 customer attribute. I need to set the condition like if any one of the fields is filled, customer session will start. for one field I am getting the result, ...
2
votes
1answer
24 views

Magento 2.1 EE upgrade issues

I am trying to upgrade my magento 2.1 EE to latest version 2.3.1 EE. But I am getting two issues- 1. PHP memory limit issues. It shows current limit is 512 M and needs to be 756 M or more. But ...
0
votes
1answer
18 views

Multiple For each loop value to Json string

$data= array(); foreach($itfdatas as $key=>$itfdata){ $checkemps = explode(',',$itfdata['employee_id']); $data[] = array( 'id'=>mysql_real_escape_string($itfdata['P_id']), ...
0
votes
0answers
16 views

Set custom Record Count to Collection pagination in Report Grid

How we can set count of collection size before setting for the grid. Main Sales collection: $collection=Mage::getModel('sales/order')->getCollection() ->addAttributeToFilter('created_at', ...
0
votes
0answers
7 views

How to send custom form total value to CCAvenue Payment Page?

I have form which is get details form customer and also calculate amount of the product, how can i pass total value which is get form and pass to CCAvenue payment page. My form : <html> &...
0
votes
0answers
10 views

Incrementing cart total price with ajax but total price is not displaying at correct place

When trying to update cart......total price is not showing at right place. I am using below mentioned code : <script> function postStuff(){ // Create our XMLHttpRequest object var hr = new ...
1
vote
0answers
23 views

How to make new column through foreach loop in html table

I want to make one column with three rows after that second and third column should be made. With this code, only one column is being created. $i = 1; foreach($array as $a => $v) { if(empty($...
0
votes
1answer
19 views

Hiding products with £0.00

Magento 2.3, how can I hide products automatically via cron for products that have a £0.00 price? I use a 3rd party to calculate prices across my store and when some products cannot be matched in ...
0
votes
1answer
13 views

Magento 2 - Hide Products with no Images via PHP SQL Query

I have an SQL query that i run on the database manually which checks the catalogue for products that do not have an image and hides them, i want to run this via cron so have created a php with the ...
1
vote
0answers
7 views

Magento 1.9 Colour Swatch handling code -

Please can someone help me with some PHP code: Our magento server hosts have identified this section of code as being very resource hungry, is there an alternative route we can take? a module that ...
1
vote
0answers
22 views

magento2 - windows php-cgi process not killed

Being new to magento2, I've installed it upon my windows machine ( along with limited resources, please don't ask me to have a docker setup then .. ). There's a weird thing happening for each static ...
0
votes
1answer
16 views

Apply Date Filter With “not qual to” Condition in Magento 2

i need to filter with a date column with not current month records i tried : $start = date('Y-m-d'.' 23:59:59',strtotime('-45 days')); $end = date('Y-m-d'.' 00:00:00'); $collection =...
0
votes
0answers
25 views

How can submit my form through mail?

I have automated mail sending function in Magento 1.9 code. I have used mail template for sending mail (using default magento functionality) but now i want to add one form in that mail which ...
1
vote
1answer
30 views

Swatch Thumbnail in Minibag

When selecting a swatch and adding an item to the bag the master product image is shown in the minibag. We would like the image of the selected swatch to be the thumbnail. Is there a script to do this?...
2
votes
2answers
23 views

find the ul tag inside header

I need to find the template or layout file that contains this ul tag: <ul class="header links"> <li class="greet welcome" data-bind="scope: 'customer'"> <!-- ko if: ...
1
vote
1answer
25 views

How to Fix Parameter must be an array or an object that implements Countable

After upgrading to PHP 7.2 I get a lot of Warnings Parameter must be an array or an object that implements Countable I've tried many ways to fix it but none have worked so far. The commented ...
1
vote
1answer
34 views

Cannot find the register link phtml file

I enabled the path template suggestion and It doesn't show the path for the 'Create an account' link. Reading the html home page source I've saw these tags: <ul class="header links"> <li ...
1
vote
1answer
32 views

Magento 2 Block Does not show

I am new with Magento, I found that it's realy hard to do even for doing trivial thing. I just try to follow this article https://www.mageplaza.com/magento-2-module-development/view-block-layout-...
0
votes
1answer
34 views

Next 24 hour Time

I am working on magento2 i want date of next day from current date.
0
votes
0answers
9 views

Magento throw new Mage_Payment_Exception 503 error

I'm working on a custom payment extension, when save payment method it validate some inputs added from payment method selection step. if those not valid it returns throw new Mage_Payment_Exception($...
0
votes
0answers
21 views

No Order Summary on Checkout Page (Magento 2.3)

After upgrading to Magento 2.3.1, the order summary on the checkout page is not showing at all. No error in the console and I have also checked the logs, nothing seems to be helping. Current PHP ...
0
votes
1answer
33 views

Magento1: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails

getting the error while uploading the media files to the products, I have tried repairing the tables and also tried increasing the INT value in table structure still giving the following error: ...
2
votes
0answers
35 views

why deployVeniaSampleData.sh runs out of memory

Trying to run the Venia sample data deploy script bash deployVeniaSampleData.sh --yes but keeps getting mmap() failed: [12] Cannot allocate memory PHP Fatal error: Out of memory (allocated ...
0
votes
0answers
11 views

Paypal Api With PHP Code

I want this in php format ? curl -v -X POST https://api.sandbox.paypal.com/v1/catalogs/products \ -H "Content-Type: application/json" \ -H "Authorization: Bearer Access-Token" \ -H "PayPal-...
1
vote
0answers
14 views

Magento 1.7 - Blank page on login and checkout

I'm having some trouble with the login page and the checkout page. Here is the debug message whenever i try to login (just show a blank page): Notice: Undefined variable: message in /home/235880....
0
votes
0answers
63 views

Magento 2.3.1 get HTTP error 500 after theme install

[CentOS 7.6.1810 / Apache 2.4.6 / PHP 7.1.28 / Magento 2.3.1] I have installed porto theme.But can't access product page. Contents of error_log [Thu Apr 25 18:10:10.335721 2019] [php7:error] [pid ...
1
vote
1answer
38 views

How to change product zero prices to text in magento 2?

I need to change all product zero prices to custom text - free and enable/disable this function from admin?
1
vote
1answer
31 views

Fastest way to update product information in magento 2

Which approach is better and fast to update bulk product update in magento 2.3+ ? e.g i want to update 1000+ products at a time using cron job or command line please suggest
1
vote
0answers
19 views

how to use Magento2 token

How can i use authentication token in magento2 API? because the dynamic generated token not working and giving a permission error and if i use the same token as static then it works. But there is one ...
0
votes
1answer
37 views

Magento 2 : Function's nesting level (8) exceeds 5 consider refactoring the function

I have check Coding standard of Module and i have get this is my code public function execute() { $mediaDirectory = $this->filesystem->getDirectoryRead($this->directoryList::MEDIA); ...
2
votes
1answer
36 views

Magento 2 : Coding standerd Provide me Some Warnings How to solve it?

I have checking my Module`s Code using --standard=MEQP2 that provide me some warnings How can i use the core function of php in Magento 2.3.1
1
vote
0answers
27 views

Magento 2.2.7 - PHP Fatal error: Uncaught Error: Class 'DOMDocument' NGINX

Hello as you can see in the title: I have nginx installed PHP 7.1 Installed PHP-XML Installed PHP-DOM But still getting this problem when i for example want to clear cache. pelase Help PHP Fatal ...
0
votes
0answers
14 views

How to update multilingual static blocks content programmatically in Magento 1

I've created 2 static blocks for 2 different languages. Both of them have the same identifier: identifier: privacy-policy (name: Privacy Policy EN) identifier: privacy-policy (name: Privacy Policy DE)...
0
votes
0answers
15 views

Integrating magento 1 with Webdam

We have integrating Magento 1 with Webdam for getting product images from external URL. So how to get and set product images(category page, Product details page) from external URL. So please help ...
1
vote
3answers
86 views

How to make a Field only accept Numbers in Magento 2

I am new to Magento 2. I am trying to make a field that can only accept numbers for Sort Order field on UI Component Form I need help
0
votes
1answer
38 views

Change Email Template On Specific Order Status:Magento2

I am trying to use different e-mail template for one of my custom order status when the status is changed from the admin. I have used the event sales_order_save_after <observer name="...
0
votes
0answers
22 views

Fatal error: Class 'GT_Speed_Helper_Data' not found

I am trying to install the GT speed extension in magento 1.9.3. It is working fine on staging server but on live it is giving : Fatal error: Class 'GT_Speed_Helper_Data' not found in I have ...
0
votes
1answer
29 views

How do I send the data from a form to my company mail?

I want to make a form for users and in that form i want to be name, tel and email. And i want to make a script that should take the name, tel and email and sent to my emai. But i don t know how and ...
1
vote
1answer
29 views

magento 1.10 unable to upload image

I have tried to save the image in product page in Magento 1.10, but give me this type of error: jquery this.images.toJson() not a function. Please See this screenshot Please help me find the ...
1
vote
0answers
24 views

AJAX call returns the same page html

I have a module that I need to do a php GET action and get some informations from php file. The problem is that the returned value is the Dashboard html. Faturamento/Controller/Adminhtml/Ac/Index....