Post by mark280566 » Wed Mar 17, 2010 2:35 am

After installing Export/Import for OpenCart 1.4.x as per the instructions I am still receiving the following error message.

Fatal error: Call to a member function https() on a non-object in C:\xampp\htdocs\pevexenterprises.co.uk\admin\controller\common\header.php on line 80

Can anyone help as the spreadsheet function will assist in uploading products etc.

Regards

New member

Posts

Joined
Fri Mar 12, 2010 12:36 am
Location - East Anglia, England

Post by airetechit » Wed Mar 17, 2010 3:37 am


Best Regards,
David Catherall,
AireTech IT.


New member

Posts

Joined
Fri Feb 05, 2010 1:46 am
Location - Goole, United Kingdom

Post by mark280566 » Wed Mar 17, 2010 5:03 pm

airetechit

Thanks for this, worked a treat.

New member

Posts

Joined
Fri Mar 12, 2010 12:36 am
Location - East Anglia, England

Post by mark280566 » Wed Mar 17, 2010 6:49 pm

Next issue

Fatal error: Call to a member function query() on a non-object in C:\xampp\htdocs\pevexenterprises.co.uk\admin\model\tool\export.php on line 72

Trying to export current database using Import / Export

Has anyone experienced this?

Mark

New member

Posts

Joined
Fri Mar 12, 2010 12:36 am
Location - East Anglia, England

Post by airetechit » Wed Mar 17, 2010 8:27 pm


Best Regards,
David Catherall,
AireTech IT.


New member

Posts

Joined
Fri Feb 05, 2010 1:46 am
Location - Goole, United Kingdom

Post by peteVA » Sat Mar 20, 2010 11:25 pm

Done everything suggested and can't get into the admin with a fresh install of 1.4.4.

Not another thing has been done. Installed it, then installed the imp/exp and get messages.

Latest - Fatal error: Call to a member function https() on a non-object in /home/lingcust/public_html/admin/controller/common/header.php on line 80

This is with the 1.4.x import export installed, then the "fix" installed.

Using the further URL edited index.php files only results in different messages about line 129.

A Trusted Wholesale Dropshipper
Web Hosting Under $ 5.00 Month! FREE Shopping Carts!
25,000+ Real Wholesale & Dropship Sources!


User avatar
Active Member

Posts

Joined
Mon Jul 20, 2009 8:25 am

Post by airetechit » Sun Mar 21, 2010 1:41 am

Shall I use my crytstal ball to figure out the error or can you be kind enough to post it?

Best Regards,
David Catherall,
AireTech IT.


New member

Posts

Joined
Fri Feb 05, 2010 1:46 am
Location - Goole, United Kingdom

Post by peteVA » Sun Mar 21, 2010 2:15 am

Sorry, had a company truck broken down and had to go do patching to get it to the yard.

Was hoping maybe some could work from the one error.

Here is the message going into admin with the "fix" and the URL edit in the index.php files -

Warning: require_once(/home/lingcust/public_html/system/engine/url.php) [function.require-once]: failed to open stream: No such file or directory in /home/lingcust/public_html/admin/index.php on line 92

Fatal error: require_once() [function.require]: Failed opening required '/home/lingcust/public_html/system/engine/url.php' (include_path='.:/usr/lib/php') in /home/lingcust/public_html/admin/index.php on line 92

And get these trying to go to the front end home page -

Warning: require_once(/home/lingcust/public_html/system/engine/url.php) [function.require-once]: failed to open stream: No such file or directory in /home/lingcust/public_html/index.php on line 119

Fatal error: require_once() [function.require]: Failed opening required '/home/lingcust/public_html/system/engine/url.php' (include_path='.:/usr/lib/php') in /home/lingcust/public_html/index.php on line 119

Actually, line 92 is empty, it is between

$registry->set('response', $response);
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<92 is blank. My <<<<<<<
// Store

And line 119 is the middle of the code Q said to add -


// Q: Restore the Url class
require_once(DIR_SYSTEM . 'engine/url.php'); <<<<<<<<<<<<< 119
$registry->set('url', new Url());

Here's the whole file

<?php
// Configuration
require_once('config.php');

// Install
if (!defined('DIR_APPLICATION')) {
header('Location: install/index.php');
exit;
}

// Startup
require_once(DIR_SYSTEM . 'startup.php');

// Application Classes
require_once(DIR_SYSTEM . 'library/customer.php');
require_once(DIR_SYSTEM . 'library/currency.php');
require_once(DIR_SYSTEM . 'library/tax.php');
require_once(DIR_SYSTEM . 'library/weight.php');
require_once(DIR_SYSTEM . 'library/length.php');
require_once(DIR_SYSTEM . 'library/cart.php');

// Registry
$registry = new Registry();

// Loader
$loader = new Loader($registry);
$registry->set('load', $loader);

// Config
$config = new Config();
$registry->set('config', $config);

// Database
$db = new DB(DB_DRIVER, DB_HOSTNAME, DB_USERNAME, DB_PASSWORD, DB_DATABASE);
$registry->set('db', $db);

// Settings
$query = $db->query("SELECT * FROM " . DB_PREFIX . "setting");

foreach ($query->rows as $setting) {
$config->set($setting['key'], $setting['value']);
}

// Log
$log = new Log($config->get('config_error_filename'));
$registry->set('log', $log);

// Error Handler
function error_handler($errno, $errstr, $errfile, $errline) {
global $config, $log;

switch ($errno) {
case E_NOTICE:
case E_USER_NOTICE:
$error = 'Notice';
break;
case E_WARNING:
case E_USER_WARNING:
$error = 'Warning';
break;
case E_ERROR:
case E_USER_ERROR:
$error = 'Fatal Error';
break;
default:
$error = 'Unknown';
break;
}

if ($config->get('config_error_display')) {
echo '<b>' . $error . '</b>: ' . $errstr . ' in <b>' . $errfile . '</b> on line <b>' . $errline . '</b>';
}

if ($config->get('config_error_log')) {
$log->write('PHP ' . $error . ': ' . $errstr . ' in ' . $errfile . ' on line ' . $errline);
}

return TRUE;
}

// Error Handler
set_error_handler('error_handler');

// Request
$request = new Request();
$registry->set('request', $request);

// Response
$response = new Response();
$response->addHeader('Content-Type: text/html; charset=utf-8');
$registry->set('response', $response);

// Store
$query = $db->query("SELECT * FROM " . DB_PREFIX . "store WHERE url = '" . $db->escape('http://' . $request->server['HTTP_HOST'] . rtrim(dirname($request->server['PHP_SELF']), '/.\\') . '/') . "' OR url = '" . $db->escape('http://' . str_replace('www.', '', $request->server['HTTP_HOST']) . rtrim(dirname($request->server['PHP_SELF']), '/.\\') . '/') . "'");

if (!$query->num_rows) {
$query = $db->query("SELECT * FROM " . DB_PREFIX . "store WHERE store_id = '" . (int)$config->get('config_store_id') . "'");
}

foreach ($query->row as $key => $value) {
$config->set('config_' . $key, $value);
}

define('HTTP_SERVER', $config->get('config_url'));
define('HTTP_IMAGE', HTTP_SERVER . 'image/');

if ($config->get('config_ssl')) {
define('HTTPS_SERVER', 'https://' . substr($config->get('config_url'), 0, 7));
define('HTTPS_IMAGE', HTTPS_SERVER . 'image/');
} else {
define('HTTPS_SERVER', HTTP_SERVER);
define('HTTPS_IMAGE', HTTP_IMAGE);
}

// Cache
$registry->set('cache', new Cache());

// Q: Restore the Url class
require_once(DIR_SYSTEM . 'engine/url.php');
$registry->set('url', new Url());

// Session
$session = new Session();
$registry->set('session', $session);

// Document
$registry->set('document', new Document());

// Language Detection
$languages = array();

$query = $db->query("SELECT * FROM " . DB_PREFIX . "language");

foreach ($query->rows as $result) {
$languages[$result['code']] = array(
'language_id' => $result['language_id'],
'name' => $result['name'],
'code' => $result['code'],
'locale' => $result['locale'],
'directory' => $result['directory'],
'filename' => $result['filename']
);
}

$detect = '';

if (isset($request->server['HTTP_ACCEPT_LANGUAGE']) && ($request->server['HTTP_ACCEPT_LANGUAGE'])) {
$browser_languages = explode(',', $request->server['HTTP_ACCEPT_LANGUAGE']);

foreach ($browser_languages as $browser_language) {
foreach ($languages as $key => $value) {
$locale = explode(',', $value['locale']);

if (in_array($browser_language, $locale)) {
$detect = $key;
}
}
}
}

if (isset($session->data['language']) && array_key_exists($session->data['language'], $languages)) {
$code = $session->data['language'];
} elseif (isset($request->cookie['language']) && array_key_exists($request->cookie['language'], $languages)) {
$code = $request->cookie['language'];
} elseif ($detect) {
$code = $detect;
} else {
$code = $config->get('config_language');
}

if (!isset($session->data['language']) || $session->data['language'] != $code) {
$session->data['language'] = $code;
}

if (!isset($request->cookie['language']) || $request->cookie['language'] != $code) {
setcookie('language', $code, time() + 60 * 60 * 24 * 30, '/', $request->server['HTTP_HOST']);
}

$config->set('config_language_id', $languages[$code]['language_id']);

// Language
$language = new Language($languages[$code]['directory']);
$language->load($languages[$code]['filename']);
$registry->set('language', $language);

// Customer
$registry->set('customer', new Customer($registry));

// Currency
$registry->set('currency', new Currency($registry));

// Tax
$registry->set('tax', new Tax($registry));

// Weight
$registry->set('weight', new Weight($registry));

// Length
$registry->set('length', new Length($registry));

// Cart
$registry->set('cart', new Cart($registry));

// Front Controller
$controller = new Front($registry);

// SEO URL's
$controller->addPreAction(new Action('common/seo_url'));

// Router
if (isset($request->get['route'])) {
$action = new Action($request->get['route']);
} else {
$action = new Action('common/home');
}

// Dispatch
$controller->dispatch($action, new Action('error/not_found'));

// Output
$response->output();
?>

A Trusted Wholesale Dropshipper
Web Hosting Under $ 5.00 Month! FREE Shopping Carts!
25,000+ Real Wholesale & Dropship Sources!


User avatar
Active Member

Posts

Joined
Mon Jul 20, 2009 8:25 am

Post by airetechit » Sun Mar 21, 2010 2:34 am

It looks like you didn't upload the url.php file...

Best Regards,
David Catherall,
AireTech IT.


New member

Posts

Joined
Fri Feb 05, 2010 1:46 am
Location - Goole, United Kingdom

Post by peteVA » Sun Mar 21, 2010 3:46 am

Looks like you hit the nail on the head.

Missed that #1 entirely.

A Trusted Wholesale Dropshipper
Web Hosting Under $ 5.00 Month! FREE Shopping Carts!
25,000+ Real Wholesale & Dropship Sources!


User avatar
Active Member

Posts

Joined
Mon Jul 20, 2009 8:25 am

Post by peteVA » Sun Mar 21, 2010 4:18 am

OK, moving on -

In order to get an idea of the structure of the data, I did an export. There was no questions about categories or products, it reads like you will get both in 1 file called backup_categories_products.xls

But, there is only categories in the file. Not a product one shown, but all of the demo products are there. What has to be done to get them? The file name suggests you will get them all.

Also, when entering new categories, how do you know what the ID numbers are? Can these be auto-assigned, or do you have to work up some sort of numbering scheme on your own?

If there is a method to numbering the parents and the children, how is it organized? I've got 100 or more cats and subcats, so I'd like to import them and be done with it. Then get the numbers for the product import, I imagine.

How to export the products?

A Trusted Wholesale Dropshipper
Web Hosting Under $ 5.00 Month! FREE Shopping Carts!
25,000+ Real Wholesale & Dropship Sources!


User avatar
Active Member

Posts

Joined
Mon Jul 20, 2009 8:25 am

Post by airetechit » Sun Mar 21, 2010 9:00 pm

peteVA wrote:OK, moving on -

In order to get an idea of the structure of the data, I did an export. There was no questions about categories or products, it reads like you will get both in 1 file called backup_categories_products.xls

But, there is only categories in the file. Not a product one shown, but all of the demo products are there. What has to be done to get them? The file name suggests you will get them all.

Also, when entering new categories, how do you know what the ID numbers are? Can these be auto-assigned, or do you have to work up some sort of numbering scheme on your own?

If there is a method to numbering the parents and the children, how is it organized? I've got 100 or more cats and subcats, so I'd like to import them and be done with it. Then get the numbers for the product import, I imagine.

How to export the products?
What exactly is the problem regarding products as you have contradicted yourself at least twice in your message, and no offence intended but you have just totally blagged my head with the way you have worded the above LOL... As you say the demo products are there, I can't actually see an issue here.

Regarding categories ID, I just increase the numbers myself, I tried leaving the field in the excel file blank and mine wouldn't insert so I assume it does not do this automatically.

To be honest the method for numbering is a bit of a pain, how I did it with our 100+ categories is import them first, get the numbers and then use them to set the products up...

Best Regards,
David Catherall,
AireTech IT.


New member

Posts

Joined
Fri Feb 05, 2010 1:46 am
Location - Goole, United Kingdom

Post by peteVA » Sun Mar 21, 2010 10:05 pm

Sorry, did not mean to confuse.

The demo products are in the cart / database.

The demo products do not export.

I added an additional category through the normal admin process - that new cat showed in the export.

I added an additional product in the new category, entering something in every field, but just as with the pre-installed demo products, that new product also did not export.

So, categories export - products do not.

A Trusted Wholesale Dropshipper
Web Hosting Under $ 5.00 Month! FREE Shopping Carts!
25,000+ Real Wholesale & Dropship Sources!


User avatar
Active Member

Posts

Joined
Mon Jul 20, 2009 8:25 am

Post by airetechit » Mon Mar 22, 2010 10:18 pm

Strange... does anything appear in System > Error Logs?

Best Regards,
David Catherall,
AireTech IT.


New member

Posts

Joined
Fri Feb 05, 2010 1:46 am
Location - Goole, United Kingdom

Post by peteVA » Mon Mar 22, 2010 10:59 pm

clean, no errors.

Just tried again on the export - same results, Get the cats, no product.

If I could get the correct string of fields, I'd try an import, just to see if it works, but without knowing exactly how to set up the csv I can't do much of anything.

That's the only reason I want to export, so I can see the exact format of the file. If I had that, I could at least try an import, but it would have to be for the multistore version.

A Trusted Wholesale Dropshipper
Web Hosting Under $ 5.00 Month! FREE Shopping Carts!
25,000+ Real Wholesale & Dropship Sources!


User avatar
Active Member

Posts

Joined
Mon Jul 20, 2009 8:25 am

Post by cmebd » Tue Mar 23, 2010 9:06 am

peteVA wrote:clean, no errors.

Just tried again on the export - same results, Get the cats, no product.
Yes - I reported this problem with the version for OC 1.3.4 a looooooong time ago (now moving to 1.4.4. I was able to get Categories, but not even a heading for "product" showed in the export file.

Look forward to seeing what the solution is for this.....

A stupid question is the one you -don't- ask.........(Anon)

)C1.5.0.1 (IN devel)
OC V1.4.9.5
OC V1.4.9.2
OC V1.4.7
OC V1.3.4


User avatar
Active Member

Posts

Joined
Fri Nov 13, 2009 11:17 am
Location - Tasmania, Australia
Who is online

Users browsing this forum: No registered users and 138 guests