a1anm
a1anm

Reputation: 1629

Magento - Run Shell Script From Browser?

Point 6 on the below page describes how data can be imported using a script: http://innoexts.com/currency-pricing/#.UjI1uPlgaHo

The problem is the example provides a shell script so I get an error when trying to run this from a browser. Is there any way that these types of scripts can be run from as a browser as I don't have access to Shell?

Upvotes: 2

Views: 3352

Answers (2)

user4508996
user4508996

Reputation: 21

In shell/abstract.php add a line below

protected $_factory; // Line 76

as

protected $_passvalidation = false;

Then change in function __construct()

$this->_validate();

to

if(!$this->_passvalidation) $this->_validate();

In your shell script add

function __construct() {
    $this->_passvalidation = true;
    parent::__construct();
}

Upvotes: 1

a1anm
a1anm

Reputation: 1629

I figured out the solution to this. Just needed to comment out the contents of protected function _validate() in /shell/abstract.php

Upvotes: 1

Related Questions