Questions tagged [file]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
0answers
17 views

Connecting SFTP in Magento 2

I am still a newbie in Magento. I am looking for a way to read csv file for automating product upload to Magento. I will be receiving the csv file that contains the product attributes (data and images)...
0
votes
0answers
19 views

How to execute php file from magento admin in Magento 2?

I have created a php file on root folder of magento in Magento 2 and hit a controller on that file. That process is done and i have tested it it running on terminal. How would i run that script from ...
0
votes
0answers
19 views

magento 2 system configuration table feilds(file)

protected function _prepareToRender() { $fileInputRenderer = $this->getLayout()->createBlock(CustomShippingFile::class); $this->addColumn( 'shippingLogo', ...
0
votes
1answer
56 views

How to get PDF file URL uploaded in system.xml. Magento 2

I'm trying to upload PDF file via system.xml my code is <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:...
0
votes
1answer
106 views

FileLock in Magento 2

I want to create a file locker in Magento 2. If i use the default \Magento\Framework\Lock\LockManagerInterface Magento uses the database to save locks by default. https://devdocs.magento.com/guides/...
0
votes
1answer
127 views

Delete a file from directory magento 2

Is there any way to delete files from var directory, if the file name matched with a condition. I need to delete log files based upon given date. Please let me know how to achieve this in magento2?
0
votes
1answer
463 views

Magento2 How To Read Data From Excel File

I want to read data from excel file (Not from .csv file but from excel file) . Does anyone know how can i get data from excel file ?
0
votes
0answers
34 views

Zend_Cache_Backend_File error in magento2

I am getting an error. Please help me...! Class 'Zend_Cache_Backend_File' not found in /home/bighstorechek2/public_html/vendor/colinmollenhour/cache-backend-file/File.php on line 38 in magento2
3
votes
0answers
53 views

Export sessions data from files to REDIS

We are moving from single server to multiple server setup for our store. The problem is that we are using file cache type and we want to preserve those sessions (long expiration, per management ...
1
vote
1answer
138 views

Magento2: create pdf file option in product details page

I need an option to select the chose upload file (pdf) from admin site and that file will visible and have a download option for users On the product details page on frontend. below is sample images. ...
0
votes
1answer
186 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
1answer
157 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
51 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
89 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
100 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
151 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
66 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
514 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
68 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: ...
2
votes
4answers
2k 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
61 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
669 views

File download not working

<?php namespace Modulename\Merchant\Controller\Adminhtml\Document; class Filedownload extends \Modulename\Merchant\Controller\Adminhtml\Document { protected $_downloader; private $logger; ...
1
vote
0answers
24 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
942 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
899 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
23 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
520 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
1k 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
150 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
475 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
4k 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
238 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
89 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
101 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
32 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
1k 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
385 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
3answers
1k 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
449 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
3answers
1k 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
4k 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
237 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 ...
3
votes
1answer
2k 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
781 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
53 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
2k 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
431 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.