Questions tagged [shell]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
1 answer
226 views

usage of ShellInterface in Magento 2

I used exec() function to run the magento commands. As exec() is not recommended used the below code . class Test{ protected $_shell; public function __construct( \Magento\Framework\...
Manjunath's user avatar
  • 177
0 votes
1 answer
693 views

How to execute a controller file using shell_exec in Magento 2?

I want to create product using controller so how would i hit the controller using shell_exec. How would i do that ? My controller file is <?php namespace Mageplaza\HelloWorld\Controller\Index; ...
Prits's user avatar
  • 626
1 vote
0 answers
10 views

Magento 1 fetch Order items which has blank/zero product id/price/sku from last one day

Any idea how to create shell script which fetch order items which has blank/zero product id/price/sku from last one day in Magento 1 ?
Hamendra Sunthwal's user avatar
0 votes
1 answer
80 views

Difference between \Magento\Framework\App\Shell vs \Magento\Framework\Shell

I was trying to execute shell commands from the Magento application and came across the following class class in the framework \Magento\Framework\App\Shell and \Magento\Framework\Shell Not sure ...
Atish Goswami's user avatar
5 votes
3 answers
2k views

Facing issue when running the command php bin/magento setup:upgrade

Facing issue when running the command php bin/magento setup:upgrade The XML in file "D:/wamp64/www/porto/vendor/magento/module-inventory-catalog/etc/communication.xml" is invalid: Element 'topic', ...
Ali Sultan Khan's user avatar
2 votes
1 answer
395 views

How to Clear cache files for .less

I'm in Production mode. I like to change some styles in my website, so i edited .less for example: app/design/frontend/Templatemonster/theme/web/css/styles-l.less I used "flush Magento cache" from ...
Priya's user avatar
  • 589
-1 votes
2 answers
3k views

Set production mode magento 2.3

I want to switch to production mode but I can not find information about the exact commands that I have to use. I know that I must use this command: php bin/magento deploy:mode:set production But, ...
Despotars's user avatar
  • 475
7 votes
3 answers
7k views

bin/magento error after update

Hello i have updated from 2.2.8 to 2.3.1 now php bin/magento is not working: php bin/magento list Fatal error: Uncaught Error: Class 'Zend\Mvc\Controller\LazyControllerAbstractFactory' not found ...
user715449's user avatar
0 votes
1 answer
1k views

Run external bash script using Magento 2

I'd like to create a file (e.g. script.sh) that will reside on the same server as my Magento 2 instance. I'd like to be able to call a URL (e.g RunScript.php) that would in turn execute this script ...
EoinD's user avatar
  • 1
1 vote
1 answer
1k views

Can't run composer command programmatically in magento 2

I am using php shell_exec method to run the magento commands in my controller. Below is my controller code. <?php namespace Vendor\Module\Controller\Adminhtml\Migrate; use Psr\Log\...
Jafar Pinjar's user avatar
  • 1,929
3 votes
1 answer
1k views

Error on config:set : path does not exists

I run bin/magento config:show | grep theme that returns design/theme/theme_id - 5 Then i write bin/magento config:set design/theme/theme_id 0 that returns The "design/theme/theme_id" path does ...
Alfredo Lanzetta's user avatar
0 votes
1 answer
56 views

Magento resave all products that are in in price table

We face an issue that not all products with prices are saved in the catalog_product_index_price table. So we want to resave all products that are not in the catalog_product_index_price. How can we ...
JGeer's user avatar
  • 1,395
0 votes
2 answers
121 views

Run magento extension model inside php script

I have a custom extension model like this: app/code/Namespace/Module/Model/Core.php <?php namespace Namespace\Module\Model; class Core { public function save($data){ .... } } I want to ...
Tiny Dancer's user avatar
0 votes
1 answer
465 views

core_config_data settings not loading on shell script

I have a shell script that should send an API request to a certain endpoint, using username and password in a simple HTTP auth. Everything works fine using hard-coded values, but of course we want to ...
Victor Schröder's user avatar
18 votes
4 answers
26k views

How to setup Magento 2 with Docker

I want to setup Magento 2 with docker and system of containers are ubuntu. Can anyone help me, how to setup docker file?
MrTo-Kane's user avatar
  • 3,656
1 vote
1 answer
2k views

Magento 2 : How to create our own bin script [duplicate]

I am trying to create my own script to be placed in my extension /bin folder so that once I finished it, it should work in this way bin/mycommandname my-customcommand instead of running the ...
Zeeshan Khuwaja's user avatar
0 votes
1 answer
481 views

How can I set created_at date for dynamically created order? [duplicate]

I'am developing order generating shell script for my developing needs, which allow to generate orders for any period. I've used this comment as template. Unfortunatelly, all orders has today ...
Andrew Sh's user avatar
  • 193
1 vote
1 answer
664 views

Is there any way to run one file and fire multiple magento2 command in Ubuntu?

Is there any way to run one file and fire multiple magento2 command like Index, static content, deploy, cache clear etc. And for all files permissions set Automatically.
Jaimin's user avatar
  • 2,136
1 vote
1 answer
36 views

i must write command lines but can not find cmd

I have searched for the language packs and extensions and there is a way that we must write command lines, where i must write them? I'm working on cpanel to customize my website
user59289's user avatar
0 votes
4 answers
6k views

Magento 2 Permissions Problem

Can someone please advise me on the following problem Here is a link to a video showing what is happening https://vimeo.com/228143296 I strongly believe this is a permissions problem In video clip ...
Ray's user avatar
  • 11
1 vote
1 answer
275 views

shell script magento cant load product model

in shell directory is file myscript.php with code <?php require_once 'abstract.php'; class MyModule_Shell_Myscript extends Mage_Shell_Abstract { protected $_argname = array(); public ...
omelandr's user avatar
  • 1,267
1 vote
1 answer
428 views

Magento2 - is there any class such as Mage_Shell_Abstract to extend?

I mean, what's the right / best approach to write shell scripts, as the ones in Magento1 /shell folder?
Raul Sanchez's user avatar
  • 3,217
0 votes
1 answer
1k views

How to setup cron job for a /shell script?

As it says in the title: I have a script in shell that runs a report by using this command in CLI: php /shell/myscript.php --profile 1 Now, i want to add it to crontab so it will be something like ...
Abude's user avatar
  • 322
1 vote
1 answer
278 views

Magento1.9 : My block is not calling in shell script

My block is not calling in shell script. <?php ini_set('display_errors', 1); require_once 'abstract.php'; class Mage_Shell_ReportMail extends Mage_Shell_Abstract{ public function run(){ ...
Murtuza Zabuawala's user avatar
6 votes
1 answer
4k views

What's the "DS" and its detailed explanation in Magento?

In our site shell directory file, I found one line of code like below: fopen(Mage::getBaseDir().DS.'sitemap'.DS.'sitemap_new.xml','w+'); I guess the 'DS" is meaning a 'slash', but I can't search its ...
Key Shang's user avatar
  • 3,385
2 votes
2 answers
2k views

Save all products through php/shell script

I'm in the process of cleaning up my existing magento install by moving the DB and using a new install so I can do away with all the unnecessary extensions taking up space. Everything seems to have ...
user2240778's user avatar
1 vote
1 answer
594 views

Execute function from the shell directory in cron file present in model dir of a module

I have created a custom code in shell directory in magento 1.9.2.3 and executed this file from the ssh using php filename.php from the shell dir. now i want this code to be executed in the cron file ...
Pradeep Sanku's user avatar
0 votes
1 answer
726 views

run php shell commands

I put my Magento website in a not dedicated server. So, everytime I want to run some php shell commands I have to write an email to my WebHosting tutor and tell him wich commands he has to execute. ...
Martina's user avatar
  • 131
0 votes
3 answers
689 views

How to fix invalid indexer on magento 2.1

I am new with Magento, is my first time with this software and I need a little support. I have installed Magento in AMPPS of my mac, but in dashboard appears a warning with the ne One or more ...
cfranco's user avatar
  • 103
0 votes
2 answers
28 views

See in the shell wehen user registers [closed]

i would like to run a command window which monitors the user registration. But i do not find the correct command to display that. So how can i see in command window each time a user registers, logs in ...
user5783213's user avatar
2 votes
2 answers
2k views

Set attribute value from other attribute

I have custom attribute 'brand'. I should set its value in attribute 'manufacturer'. How can i do this? For now, all that i cat do -> shell file require_once dirname(__FILE__) . '/../app/Mage.php'; ...
Vebenh's user avatar
  • 53
2 votes
0 answers
26 views

Shell script slows down to crawl until caches are cleared

I have written a small shell script, run via the command line. The script uses a naming schema for our product images to set the images to the corresponding products. However, sometimes the script ...
0xCAFEBABE's user avatar
2 votes
0 answers
35 views

Move all native magento reviews from my default store 0 to my new store

My script currently works for all stores except the store it's pulling from. I want to pull all reviews from my default store / main store and only push the reviews to my new store with a websiteId = ...
thismethod's user avatar
2 votes
1 answer
251 views

Does Magento 1.9.x cron script, scans whole `shell` directory and executes all files inside of that folder?

This is kind of confusion instead of Question that I have. If I have added a new php script called new.php inside shell directory, then if I have already setup cron.php to run at specific intervals, ...
Vicky Dev's user avatar
  • 1,982
0 votes
1 answer
41 views

Magento script duration [duplicate]

i have written a magento script to get skus of products from a csv file and update them in stock and assign a category. It works fine just it takes a very long time, more then 2 hours for just 14 000 ...
mockingbid's user avatar
0 votes
4 answers
10k views

SSH "Could not open input file: bin/magento"

I'm working through the Hello World tutorial and it's time for me to enter the "$ php bin/magento setup:upgrade" command for the reason mentioned in the tutorial but I get the error: "Could not open ...
mitchellsk's user avatar
1 vote
1 answer
115 views

Update cms/pages for multistore

I need to update one cms page, but I have the same identifier 'home' for three pages in different stores. How can I update one page with need store. My script has error: 'A page URL key for specified ...
O.Petrov's user avatar
  • 175
0 votes
2 answers
2k views

There was a problem with reindexing process after Magento update

I have read several topics about this, but none if these topics seem to help me. I'm a beginner when it comes to Magento, so most of these topics don't really say much to me. I recently updated from ...
user3478148's user avatar
3 votes
1 answer
259 views

Update All Child Product Descriptions from Parent Product with Shell Script

Currently our store's configurable products have the short & long descriptions contained within the parent product. The child product description fields are blank. We're setting up a Google ...
blockletter's user avatar
2 votes
1 answer
146 views

How to verify if a Patch has been applied to Magento CE? [duplicate]

Simple question. How to check if a patch, in my case it's SUPEE-6285, has been applied correctly by ssh. Thanks!
Supersonic's user avatar
4 votes
2 answers
525 views

Indexer mode Unknown

I am running Magento EE 1.13.1.0 I set all the index options in System=>Configuration=>Advanced=>Index Management to "Update when scheduled". When I run $ php -f indexer.php mode Product Flat Data: ...
Haim's user avatar
  • 2,114
0 votes
2 answers
2k views

ERROR: “/app/etc/” must exist for proper tool work in magento 1.8.1 [duplicate]

I am trying to install the newly release security patch for magento 1.8 in my distant server when I get this error I tried to edit CURRENT_DIR in the sh file with pwd value and I always get the same ...
Fares Omrani's user avatar
9 votes
1 answer
4k views

ERROR: “/app/etc/” must exist for proper tool work magento 1.9

I am trying to install the newly release security patch for magento 1.9. I am working on window system. and I am getting the following error. D:\xampp\htdocs\magento>sh PATCH_SUPEE-1533_EE_1.13....
urfusion's user avatar
  • 346
1 vote
2 answers
4k views

5344 security patch installation error in Magento

Showing given below error, While I am installing the patch file in my Magento version 1.4.2.0. Please help me to find out the reason for the error! Checking if patch can be applied/reverted ...
MPchan's user avatar
  • 147
2 votes
2 answers
3k views

Using SSH command on website [duplicate]

For executing magento patches, we need to use SSH command lines e.g. sh patch_file_name.sh But I wonder where to put this command lines? on Hosting site? on FTP client? Please advise. Thanks for ...
pakicle's user avatar
  • 158
2 votes
2 answers
796 views

indexer from shell not working

i'm working on a magento CE 1.7.0.2 and I have to update indexes from shell. However I'm trying the commands: php -f indexer.php info and also php -f indexer.php -- -reindex catalog_url but they ...
apedic's user avatar
  • 923
0 votes
1 answer
414 views

Get data directly from block in a shell script

Is there anything wrong with getting data directly from Block, and not from Model or resource? If yes, what are the threats? I mean, like this: $block = Mage::app()->getLayout() ->...
Supersonic's user avatar
1 vote
2 answers
2k views

Import csv file through a shell script

Is Importing a csv file through a shell script a good idea? Why yes and why not? What are the principal issues? Thanks!
Supersonic's user avatar
2 votes
1 answer
1k views

Custom helper in shell script?

I can execute a shell script from a custom php script. I have no trouble including the abstract.php, log a string or calling let's say the product model. Playing around with including parameters from ...
Thomas Coucke's user avatar
1 vote
2 answers
173 views

CLI: set website

I'm trying CLI coding. I just tried to get all Users, want to load them and list data or do some actions. <?php require_once 'abstract.php'; class Shell_List extends Mage_Shell_Abstract { ...
Artisan72's user avatar
  • 293