2

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?

2
  • it uses the shell to execute a php file. you should be able to trigger the execution of the file via a web-request as well. perhaps you need to adapt the parameter handling. Commented Sep 13, 2013 at 13:18
  • When I try from a browser I get an error: "This script cannot be run from Browser. This is the shell script." Apparently it is a security measure in Magento. Commented Sep 14, 2013 at 8:25

2 Answers 2

1

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

Sign up to request clarification or add additional context in comments.

Comments

1

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();
}

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.