Stack Exchange Network

Stack Exchange network consists of 174 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 [shell]

The tag has no usage guidance.

1
vote
0answers
13 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 ...
0
votes
1answer
29 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 ...
0
votes
2answers
50 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 ...
0
votes
1answer
152 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 ...
1
vote
1answer
58 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 ...
0
votes
1answer
115 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 ...
1
vote
1answer
31 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
1
vote
1answer
135 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 ...
1
vote
1answer
169 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?
0
votes
1answer
600 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 ...
1
vote
1answer
128 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(){ ...
7
votes
1answer
2k 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 ...
2
votes
1answer
1k 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 ...
1
vote
1answer
388 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 ...
0
votes
1answer
509 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. ...
0
votes
3answers
548 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 ...
0
votes
2answers
25 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 ...
2
votes
2answers
923 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'; ...
2
votes
0answers
20 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 ...
2
votes
0answers
31 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 = ...
2
votes
1answer
138 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, ...
0
votes
1answer
39 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 ...
0
votes
4answers
8k 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 ...
0
votes
1answer
60 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 ...
0
votes
2answers
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 ...
3
votes
1answer
180 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 ...
2
votes
1answer
130 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!
4
votes
2answers
356 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: ...
0
votes
2answers
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 ...
9
votes
1answer
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....
1
vote
2answers
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 ...
2
votes
2answers
2k 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 ...
2
votes
2answers
669 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 ...
0
votes
1answer
319 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() ->...
1
vote
2answers
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!
2
votes
1answer
841 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 ...
1
vote
2answers
133 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 { ...
1
vote
1answer
1k views

Reindex from bash: The encoded file … is not permissioned for this server

From a bash script I run reindex: php -f shell/indexer.php reindexall; and get this error The encoded file ... is not permissioned for this server. Reindexing from web interface works fine. Looks ...
2
votes
1answer
795 views

Class Mage not found in Shell Script on some servers

We have a custom script in shell with require_once 'abstract.php'; and our class extends Mage_Shell_Abstract. On our dev environments this is working fine, but on staging we get the error PHP Fatal ...
15
votes
2answers
4k views

Applying Magento CE Patches

Per the Magento download page, under the patches section Please upload the patch into your Magento root directory and run the appropriate SSH command: For patch files with the file extension `....