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
2answers
82 views

Magento 2 - get final prices include tax and round

I've custom block phtml in my old store and I need to be converted to Magento 2. Magento 1.9.x code: $_finalPriceInclTax = $this->helper('tax')->getPrice($_product, $_product->getFinalPrice(...
1
vote
2answers
4k views

Magento 2.2.3 - main.CRITICAL Notice: Undefined index: websites

I've a strange problem with a project that appeared all of a sudden. When I try to enter the site I get this error: An error has happened during application run. See exception log for details. enter ...
1
vote
1answer
20 views

Magento 2.3: How to Create Order Using Braintree Vaulted Card

I'm trying to create an order programmatically using braintree payment method and the customer's saved credit card. // prepare adresses, products in quote, shipping method - skipped $quote->...
1
vote
1answer
20 views

Magento2.3 display images of a category in .phtml

I have a block that returns a category by its ID. I loop on the category's children and I would like to be able to display their respective images and names. for the moment I can display their names ...
2
votes
1answer
18 views

Increase number of shown related products in the administration (Magento 2)

When you edit a product in the magento administration the number of items listed in the related products, up-sells and cross-sells list is limited to 20. Also there is no possibility to change this ...
0
votes
1answer
552 views

Media browser field in magento2

I'm currently trying to create (or find how to) a field to display the Media browser (or media storage manager) in admin Edit on a custom module. Type file / image work fine, but it could be much ...
1
vote
0answers
9 views

Magento2 error while extension installation in create backup step

In my magento2 store I want to install the extension. I have tried this via composer as well as admin extension manager. Every time the process failed in Backup stage after generating the 4Gb of data ...
1
vote
4answers
1k views

magento 2 Error: cannot call methods on priceBox prior to initialization; attempted to call method 'option'

I am having an issue on my website the issue Error: cannot call methods on priceBox prior to initialization; attempted to call method 'option' My website https://www.cartaroo.com.cy/?...
4
votes
1answer
571 views

Magento 2 Update product additional option added in add to cart

I have configurable product in my website and I added the product additional option in add to cart to hold the custom value, Now on cart page I want to allow the user to update those additional option ...
1
vote
1answer
562 views

segmentation fault while reindexing catalogsearch_fulltext in magento2

I am trying to reindex all indexes using CLI which results segmetation fault. I am using magento2 version 2.0.8 and previously using 2.0.7 but later updated to 2.0.8. I am getting error in both ...
1
vote
1answer
21 views

How to load all products with certain type - e.g. all configurable products?

How can I get a collection of all products from a specific type example given: "configurable" ? I want to show the name of all products of type configurable for example.
1
vote
0answers
17 views

Magento2 : Undefined Index amount in Order/Totals/Tax.phtml file

I installed one GST module on my local instance. after installing that module i am unable to create invoice for sales order. Getting the attached error message.I disabled all my third party extensions ...
0
votes
0answers
18 views

Save Button Not Working in Admin Form Custum Module Magento 2

I am Working on A magento 2 custom Module i have a Form as well a Product Grid in my form so i created tabs using block but Whenever i click on save button gives me Javascript Error TypeError: $....
2
votes
1answer
30 views

Getting a CLI error when trying to compile

I am getting this error on terminal: PHP Fatal error: Class 'Cli' not found in /opt/bitnami/apache2/htdocs/bin/magento on line 31 when trying to run these commands: sudo php bin/magento setup:...
1
vote
1answer
18 views

Magento2 Shipping City For Shipping Amount Caluculations

I need to apply table rate shipping based on following conditions City to City Metro to City Metro to Metro City to Other City to Special Locations I written my own module but ...
0
votes
2answers
2k views

Cron.php not working using cronjob setting from Cpanel and no confirmation mail send to customer in magento 1.9.2.4

I just set cron job using cpanel of my site, according to that cron.php runs in every 5 mins. But it's not. It is working whenever I execute cron.php directly from browser. Here is the code of my ...
6
votes
5answers
9k views

The each() function is deprecated. Magento 2 , php 7.2

I have been getting this error since I changed to PHP-7.2 Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /var/www/html/vedic/vendor/...
0
votes
0answers
6 views

How can I return custom products to catalog search result in Magento 2?

I am developing a custom search engine for my Magento 2 store. How can override the products returned in catalog search result with a custom plugin ?, and Can I override the result without changing ...
0
votes
2answers
558 views

how to solve magento errors as below,

Warning: include_once(/home/archtraders/stationerypoint/includes/src/Mage_Core_functions.php): failed to open stream: No such file or directory in /home/archtraders/stationerypoint/app/Mage.php ...
0
votes
0answers
9 views

Getting error after adding config in Magento 1.9.3.6

I did not work with Magento before. For the purpose of a new task(migrate data from Magento to some other system), I created a new fresh installation of Magento. Following docs, I installed sample ...
0
votes
1answer
2k views

Magento 1.6.1.0 compatible with PHP 5.6?

I have two Magento installations running versions 1.6.1.0 and 1.7.0.0. I am looking to upgrade my server to PHP 5.6 and Google wasn't particularly convincing that this is possible. Can someone please ...
2
votes
1answer
830 views

Set all child products to not visible individually

How to set all associated products in the entire store to 'not visible individually' I've been scrolling through other answers but I can't seem to find a solution.
1
vote
1answer
26 views

Magento 2 in default newsletter subscribe not working?

I will attached the phtml and php block code but client side mail does not send? subscribe.phtml <div class="block newsletter"> <div class="title"><strong>Newsletter</...
1
vote
1answer
1k views

Magento2 - Custom Product Type Pricing

I am working on a custom product type for a Magento2 build that I am working on. I have followed the guide linked below and it has served as a brilliant base for me to work from. How to add a new ...
6
votes
1answer
559 views

How to add custom customer attribute in custom tab in customer edit page of admin in magento2

I have created custom customer attribute successfully. Which are showing under account information tab of customer edit in admin. I want to show them in my custom tab.
2
votes
0answers
49 views

Magento EE: session_start(): Unable to clear session lock record

Magento Enterprise Edition 1.14.0.1 PHP 7.2.15 PECL memcached extension 3.1.3 We encountered this problem upgrading Magento EE from PHP 5.6 to PHP 7.2. We do not see the problem using the memcached ...
0
votes
1answer
234 views

Cannot add new products or they get mixed up with updated ones, no error

I have written a simple script that downloads an XML with product info from a wholesale parse it and save new products or updates exiting ones. It has been working for a few months, but now it's ...
1
vote
0answers
85 views

How to have all of the command with customer_id and entity_id? [closed]

I am work on the creation of a module to do Cross-Selling. I already take all of the command who have more than 1 product to make relation with that. But now, to complete my code and module i wanted ...
1
vote
1answer
568 views

Change magento transactional emails logo_url to external link

I need to change logo_url for transactional emails with external link, for example https://exampledomainname.com/image.png but I can't hardcode all or even one file in app/locale Is ...
0
votes
1answer
339 views

CSV product Import stuck on Please wait…" hang

I have a problem with Magento 2 import section. I am trying to import a product from CSV, the page stop loading but the loading icon is always present and Magento don't check data. what is the ...
1
vote
1answer
576 views

Magento 2.2.3 Internal Server Error: Read timed out after 10 seconds

I have a magento 2.2.3 shop that is throwing me an internal server error every time I try to edit or create a new product. When I click save, it loads for about 10 seconds this shows internal server ...
9
votes
13answers
50k views

Magento 2: 500 Internal Server Error

I followed the Magento dev docs per below: If you add a new .html template, and then edit it, the changes will not apply until you do the following: delete all files in the pub/static/frontend ...
0
votes
1answer
581 views

billing.save(); shipping.save(); functions override in Magento

I need to override billing.save(); & shipping.save(); functions but I don't know in which files they have their declarations in Magento. I am new in Magento directory. Can you please help me?
0
votes
2answers
3k views

Magento2 Installation: Composer PHP version errors on Windows

I tried to install Magento2 on Windows which runs PHP 5.5.19 and MySQL 5.6.X versions (from xampp package) through Composer, but I received the following errors after running composer install (please ...
1
vote
1answer
581 views

How to Get email template in dynamically choose format(For example Html Or Text) using Magento 2?

I need to get email template in dynamically choose format(For example Html Or Text) while customer orders anything in Magento 2. For Example: Customer account has one option, which Email ...
0
votes
0answers
11 views

Magento 2: Wrong product thumbnail image on search results page

I've noticed in both the backend catalog search and frontend search that incorrect product thumbnail images are being displayed for certain products if they do not have an image associated with them. ...
0
votes
1answer
578 views

Class 'Memcached' not found when trying to configure sessions in Memcached

I'm getting the below error when I run the following PHP: $mem = new Memcached(); $mem->addServer("127.0.0.1", 11211); $result = $mem->get("blah"); if ($result) { echo $result; } else { ...
3
votes
1answer
609 views

Magento 2 - After adding to cart, cart page showing empty

I have a magento 2 website and I am facing an issue where After you add to cart, cart page is showing empty. It's not happening all the time but most of the customers are facing this issue. Thanks
0
votes
1answer
145 views

Bank Details On Success Page of Magento 2

If the payment method is bank transfer, I need to show a custom message on success page of Magento 2. I'm going to say "don't forget: we will ship to you after your payment received to our ...
0
votes
1answer
578 views

Ajax Cart Does NOT work with Full Page HTTPS (SSL)

I turned on Full Page https, so all pages load only in HTTPS. Now I realized that AJAX cart throws error window when I try to add somethign to the cart. Any ideas where to look for the cause? I can ...
0
votes
0answers
17 views

M2 Admin>Content>Blocks & Pages Showing No Result

I just updated my Magento 2.2.3 to 2.2.4; but there is an interesting problem. I have lots of blocks and pages on my site; all of them are working and, I can see them in mysql > cms.. But if i ...
0
votes
2answers
589 views

Fatal error: Uncaught Error: Call to undefined method getDirectoryRead()

I have a controller that works and does what i need it to do if i manually add a path like: $mediaImages = '/magento/pub/media/images/'; But i cant get the DirectoryList injection to work, it returns ...
0
votes
1answer
23 views

Layered Navigation accordion not working

I have created a custom theme. Which is extended from blank theme. In the catalog page, there is no accordion. All filter fields expanded automatically. I am using Magento 2.3
1
vote
1answer
218 views

How to remove Zip/postal code from customer registration form in Magento 2?

I want to know how to remove Zip/postal code from customer registration form in Magento 2?
0
votes
1answer
24 views

PhpCookieManager [closed]

What's a good average to have? It looks like my website is set to 50. I have 4 stores and lately I've been throwing some weird system. Log errors which I'm not 100% sure, if they pertain to this same ...
1
vote
1answer
19 views

magento 1.9 soap api error

When I try to connect to magenento api through soap with this code: //soap call test $client = new SoapClient('https://magentohost/api/soap/?wsdl'); // If somestuff requires API authentication, /...
0
votes
1answer
620 views

Error: Strict Notice: Only variables should be passed by reference

My log file show error: 2016-02-19T04:20:31+00:00 ERR (3): Strict Notice: Only variables should be passed by reference in /home/..../controllers/IndexController.php on line 17 2016-02-19T04:20:31+...
2
votes
0answers
18 views

File Upload Error in Magento 2

I written custom module to upload bulk import of products with error report. Here is the code I am using to move CSV file to particular location. I am getting error always saying that "Uploaded ...
0
votes
1answer
21 views

How to pad string before other string in php?

I am using magento 2.2.6. I am showing the amount in particular column. of my custom page. E.g CASE - A I have amount say, $100.50, I want to display amount in the following format: 00010050 (here ...
3
votes
2answers
8k views

How to make Payment Gateway in Magento 2?

Please provide any official documents or any demo/tutorials mode for this (How to make Payment Gateway in Magento 2). I was referring to http://inchoo.net/magento-2/implementing-payment-gateway-...