The Stack Overflow podcast is back! Listen to an interview with our new CEO.

Questions tagged [file]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
33 views

Magento 2.3 : “the error evolution”_from entity CustomerId= to index file Undefined

I have a problem with Magento 2.3, when I use X-debug on the checkout part, I have the following exception : Exception has occured. Magento\framework\Exception\NosuchEntityException: No such ...
0
votes
0answers
15 views

How to save file in directory using ajax post with php in magento 2

I have a Js code in my phtml like below. var data = new FormData(); data.append("data" , "the_text_you_want_to_save"); var xhr = new XMLHttpRequest(); xhr.open( 'post', 'http://mysite/...
0
votes
1answer
32 views

Magento 2 Dynamically Add file uploader in system config

How to add a file uploader render in a dynamically added rows? something like: But in dynamically added Like: Let say before or after drop down and the input text field? Best!
0
votes
1answer
24 views

How to do a dry run in root folder? [closed]

Is there way to do a dry run within your root folder to make sure the line of code works
0
votes
0answers
46 views

Invalid template file in Magento 2.2.7

1 exception(s): Exception #0 (Magento\Framework\Exception\ValidatorException): Invalid template file: 'MGS_Mmegamenu::active_menu.phtml' in module: '' block's name: 'active.megamenu.script' I'...
0
votes
1answer
42 views

How work with pub/media folder? [closed]

I should get file (image) in magento2/pub/media/vendor_name/.... How can i do this? Thanks
0
votes
1answer
27 views

Magento 2 - Location path of the SQL query file which inserts orders in to database

I want to modify the values of the product items will be inserted to table 'sales_order_item' right before the order is placed. So im trying to locate where the exact query is. Also the order ...
0
votes
1answer
41 views

I want to use php scandir in a phtml

I want to use this in a phtml: <?php $kataloge_dir = '../media/downloads/dlbereich/kataloge/'; $kataloge = array_diff(scandir($kataloge_dir), array('..', '.')); $kataloge_thumb_dir = '../...
2
votes
1answer
174 views

Magento 2.3.1 Download an excel file with PHPSpreadsheet

Trying to create a download button for an Xlsx file. Using PHPSpreadsheet for this however when downloading the file it seems corrupted with a stack trace at the bottom of excel files: Stack trace: #...
1
vote
0answers
40 views

files saved from custom options 'file' delete after x days

I have products where the custom option 'file' is selected' all those files are saved in the folder "pub/media/custom_options/quote/x/x" the names are difficult to track: ...
0
votes
3answers
433 views

How to connect SFTP in magento 2

I want to connect the SFTP in Magento 2 here is my code. use Magento\Framework\App\Bootstrap; require __DIR__ . '/app/bootstrap.php'; $bootstrap = Bootstrap::create(BP, $_SERVER); $objectManager =...
0
votes
0answers
41 views

Magento 2 Image in Rss Feed

I want to customise RSS Feed xml. I am using magento 2.2. I want to show image in rss feed. I am not able to trace the file where I can update my code to show the image in RSS xml. Please help me to ...
2
votes
2answers
152 views

File download not working

<?php namespace Modulename\Merchant\Controller\Adminhtml\Document; class Filedownload extends \Modulename\Merchant\Controller\Adminhtml\Document { protected $_downloader; private $logger; ...
0
votes
0answers
21 views

How can I call JS-file on any page? Magento 2.2.6

I have a custom JS file. But when I try to call it - it doesn't work. I use that code on content -> pages -> my_page: <script src="My_site/file.js"></script> It's just an image-slider. ...
1
vote
0answers
19 views

File permission

Using Linux,centos7,cloud server.having 3 accouts. About file permission, sometime getting warning can't inside the website, need to refresh 2~3 times. How to fix file permission, we don't want every ...
5
votes
1answer
575 views

Cannot read contents from file.. Warning! file_get_contents Magento 2

I have file type custom option.When i browse any image and add to cart the products then it shows me error. Please check attached screenshot. I have already give the permission. Please help.Your help ...
0
votes
2answers
361 views

jQuery multiple input types in one form

I got multiple input types in my form based on positions. <input type="file" name="file" id="file" data-positionid="<?php echo $positionId; ?>" class="inputfile" /> Now i want on change ...
1
vote
0answers
20 views

Virtualmin backups - Strange blank “Files” within backup that cannot be read

I have setup a Virtualmin backup that appears to be working correctly. However, when the backups are attempted to be extracted there is a large amount of errors. WinRAR error below: This appears to ...
3
votes
3answers
271 views

Controller file was loaded but class does not exist in localhost

i am new in magento When i have setup my magento 1.9.0 website in local then after i am facing one error message during check out So can anyone please help me a:5:{i:0;s:51:"Controller file was ...
0
votes
1answer
884 views

Merge JavaScript files is not working correctly

I am having a big problem with Merge Javascript files from Magento under System -> Configuration -> Advanced -> Developer. I need to enable the function to improve the loading of the site, as ...
0
votes
0answers
23 views

Make a module that allows admins to upload file to web dir, from administration area?

I am new to magento2, and I was put on a task to make a new section, or to somehow allow admins to upload a file from administration area, and save it to web folder, always under same name. File is in ...
0
votes
1answer
113 views

what is the equivalent file of opcheckout.js(which is in magento 1) in magento 2

Magento 1 /var/www/html/xxx/skin/frontend/base/default/js/opcheckout.js Magento 2 What is the equivalent file for above one in Magento 2.
0
votes
1answer
112 views

How to programatically find files in a folder

I am creating a cron job for a Magento 2 site. This cron job will search for files in /var/custom_folder/ and will then process them. I already have the cron job setup and can handle processing ...
0
votes
1answer
3k views

How to fix “Cannot send headers; headers already sent” error in magento version 1.9.3.3?

a:5:{i:0;s:147:"Cannot send headers; headers already sent in /home/abc/public_html/app/code/core/Mage/Catalog/Model/Category/Attribute/Backend/Image.php, line 1";i:1;s:1783:"#0 /home/waterc/...
0
votes
1answer
172 views

Magento 1 get file size of upload

I want to display the size of the file in MB's using the php filesize option. But for some reason my code does not seem to work, it does not display the file size. The uploaded file is inside the ...
0
votes
0answers
84 views

try to change all base images to bigger size images by importing the CSV file, but failed

I used the small size image as the base image before. Now I tried to change all the base images from 250x250 to 800x800 by import the product CSV file. After successfully importing, the small base ...
0
votes
1answer
68 views

Magento local file location on virtual machine? (Noob alert)

So after installing XAMPP and running magento on it at the end all was very slow so I decided to install a virtual machine that provides bitnami. https://bitnami.com/stack/magento/virtual-machine And ...
1
vote
2answers
1k views

How to add js file to module and insert it to module layout

I have a module which add layout to admin create order like this: app/design/adminhtml/default/default/layout/mymodule.xml <?xml version="1.0"?> <layout> <...
0
votes
1answer
25 views

Upgraded after loss many file

PHP7.1 Magento 2.2.0 upgraded to 2.2.1 After my vendor , pub/static/* and theme loss many file and no css How can I do? Please help thank you!
0
votes
1answer
31 views

*/?> string appearing in text

The string */?> (asterisk slash question-mark greater-than) is appearing in my texts after moving a magento installation over to my own ubuntu server (It previously was on an OVH shared server). ...
0
votes
1answer
967 views

Session files going over 17GB [duplicate]

Got warning from server regarding Disk space getting full. After checking into file manager I found 17.2 GB of file size in session folder. When looked into var/session folder, I can see unusual ...
1
vote
1answer
300 views

Why magento automatically generate different file size images in cache folder?

I have a website builder with Magento 1.9.3.4, and I used a paid template package on the site, the package has 5 themes, my site only used the default theme and I found my server disk space was ...
1
vote
2answers
984 views

How to create json file in magento 2

I need to create a json file with data and store that file in specific directory of magento 2. Can any one please tell me how we can achieve this in magento2 in standard way like file system. Please ...
1
vote
1answer
326 views

Fail to import large file on Magento 2 from admin

I succeeded importing a csv file size 319KB with 357 products. But failed to import a csv file size 571KB with only 349 products. Please help me to fix the problem.
2
votes
2answers
682 views

The use of function pathinfo() is discouraged Magento 2

I am checking uploaded file extension by pathinfo() function of php but in coding standard check it's shows The use of function pathinfo() is discouraged My code: $fileExt = pathinfo($file, ...
8
votes
2answers
2k views

Generate xml file programmatically

I need to generate an .xml file from my extension. Inside Namespace/Module/view/adminhtml/ui_component/ folder, I need to do this pro-grammatically because the .xml file will be generated based on ...
0
votes
0answers
200 views

Magento Custom option file download 404 page in order

After upgrade 1.9.2.4 to 1.9.3.3. I have some issue regarding to order. When I clicked custom option type file for download I got 404 page. When I tried to print log related to file following code ...
2
votes
1answer
1k views

Magento 2:i18n folder to custom theme

I want to edit .csv file in module-wishlist to my custom theme. I have copied the the file from module-wishlist and copied to app/design/frontend/vendor/theme/Magento_Wishlist/i18n/en_US.csv. ...
8
votes
1answer
560 views

Please specify the product's required option(s) Custom Option type file

I got only one custom option, which is file type, I tried to add product to cart programmatically like this: $logoSku = 'lg-brnd01'; $productLogo = Mage::getModel('catalog/product')->...
2
votes
1answer
50 views

Add Javascript globally in Magento 2 backend

I have a custom extension that has a javascript file which need to run on every page in magento 2 backend to use jquery and ajax function, is there a way to do this action with custom extension?
0
votes
2answers
1k views

magento2 : How to copy a file programmatically in Controller

I have a controller execute() function in which I would like to make a file copy from a directory to another. In Magento 1.9 I was using : Mage::helper('core/file_storage_database')->copyFile($...
5
votes
1answer
357 views

Magento 2 : Which File & Line app/etc/di.xml Config Will Load by App

I need to know, area wise config will load by application entry point files like /Magento/Framework/App/Http launch method. But I'm not able to figure it out app/etc/di.xml config load.
0
votes
1answer
39 views

Can't upload any files to the admin dashboard?

for some reason I can't seem to save extension configuration with files attached. I'm attempting to update the logo for our PDF extension, when I browse for the file and save it confirms it was saved ...
1
vote
2answers
28 views

Magento:Template File

I want to add a custom button in checkout page through my module without affecting any core functionalities of checkout module. http://i.prntscr.com/b2500547a0a747e5883be2a84fa43545.png
1
vote
1answer
156 views

Sort CSS files in Head [duplicate]

I am developing a Magento 2.1.2 shop based on the Bootstrap library. But the Bootstrap library should only get included in cms pages. So I added the following code in the file Magento_Cms/layout/...
0
votes
1answer
57 views

Search for specific load of file

Somewhere on my website the following file is loaded: data:application/font-woff;base64.... I want to remove this file, but I can not find out in what specific file it is loaded. Is there an easy ...
2
votes
0answers
103 views

Magento 2.1 and symlinks

My server structure is as follows: /var/www/htdocs_webroot/shop -> symlink to: /var/www/shop/deploy_xxxx-xx-xx/htdocs So I can redeploy magento easily and switch back and forth with one simple ...
0
votes
1answer
341 views

Magento can't open a file outside its base dir with fopen

For some reason to me unknown, Magento doesn't want to open file for writing with: $fp = fopen("/Users/vlado/Desktop/f.txt", 'a+'); , apparently because it is outside of the Magento base directory. ...
1
vote
0answers
319 views

Magento 2 Can Magento\Framework\Filesystem\File\Write be “preference” or “plugin”?

Tried to use preference to override it, but errors appear when running "magento setup:static-content:deploy". Then I tried to use plugin, but I found that the system did not go to my customized ...
2
votes
3answers
1k views

Mage::log clear log files

I want to programmatically clear manual log-files in order to always only see the new Logging Code for the last iteration. Is it possible (e.g. via a parameter) to only log the last iteration with ...