Post by unhing3d » Fri Jan 05, 2018 6:50 pm

EDIT: Token removed...

When I try to install import/export tool ( https://www.opencart.com/index.php?rout ... _license=0)
I get the following message:

SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data

OK

<b>Warning</b>: Invalid argument supplied for foreach() in <b>/var/www/vhosts/domain.com/httpdocs/admin/controller/marketplace/installer.php</b> on line <b>80</b><b>Warning</b>: Invalid argument supplied for foreach() in <b>/var/www/vhosts/domain.com/httpdocs/admin/controller/marketplace/installer.php</b> on line <b>95</b>{"text":"Installing","next":"https:\/\/www.domain.com\/admin\/index.php?route=marketplace\/install\/install&user_token=&extension_install_id=7"}

Newbie

Posts

Joined
Mon Oct 02, 2017 6:41 pm

Post by IP_CAM » Sat Jan 06, 2018 10:22 am

Export/Import Tool
https://www.opencart.com/index.php?rout ... sion_id=17
Well, the XML File contains an error, as I look at it, since it is not possible,
to add anything AFTER only the first part of a language Variable OcMod Anchor line, like this:
$_['text_backup']
This Language Definition OcMod Anchor line would have to look like this,
for the DEFAULT OC english Language Section at least, in the install.xml file:
$_['text_backup'] = 'Backup / Restore';
to place the OcMod Content correctly, to make it work.
---
So, better, MAKE the additional Language Variable to be inserted by OcMod
BEFORE

Code: Select all

$_['text_backup']
in the install.xml file, like this:

Code: Select all

<search><![CDATA[$_['text_backup']]]></search>
<add position="before"><![CDATA[
$_['text_export_import']             = 'Export / Import';
]]></add> 
and try to install it again, after FIRST clearing out your Modification
Section, to make sure, nothing from the old install attempt still exists.
---
But if you plan to keep this Extensions anyway, I would try to upload the OcMod ADMIN and
SYSTEM Directory with it's Content to the Shop Sub, by use of an FTP Client, and take the
OcMod Code out of the install.xml file, and place it directly into the Source Files, like in the File:
admin/controller/common/column_left.php
BEFORE THIS LINE:

Code: Select all

if ($this->user->hasPermission('access', 'tool/upload')) {
ADD THIS:

Code: Select all

if ($this->user->hasPermission('access', 'extension/export_import')) {
	$maintenance[] = array(
	'name'	   => $this->language->get('text_export_import'),
	'href'     => $this->url->link('extension/export_import', 'user_token=' . $this->session->data['user_token'], true),
	'children' => array()		
	);
} 
----------------------------------------------
and in the File:
admin/language/en-gb/common/column_left.php (english Language!)
BEFORE or AFTER THIS LINE :

Code: Select all

$_['text_backup'] = 'Backup / Restore';
ADD THIS:

Code: Select all

$_['text_export_import']             = 'Export / Import';
---
Just an idea, good Luck! ;)
Ernie

PS: And since the next Version OC will use different Code again, it really does not matter,
if existing OC Source Code is changed, it will be replaced by new Version Files anyway, just to have it said...

Ernie's OpenCart v.1.5.6.5 LIGHT + OpenShop Admin v.1.75 Test Sites
http://www.bigmax.ch - http://www.evelo.li - http://www.openshop.li
Image


User avatar
Guru Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by JNeuhoff » Sat Jan 06, 2018 7:01 pm

The install.xml file is fine, the OCMOD after attribute means to insert something after the line which has a match of the search expression. The search expression does not have to specify a whole line.

MHC Web Design
Override Engine * Integrated VQMod * Multilingual SEO * Instant Option Price Calculator * TrustPilot Reviews * Download Options * Free Download Buttons * Export/Import Tool * Template Switcher PHP/Twig


User avatar
Expert Member

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by IP_CAM » Sun Jan 07, 2018 5:21 am

Well, this may be correct for OcMods, but my VqModded v.1.5.6.5 turns wild, if
I try such in a language File. It even produces some missing Variable Errors.
And I am working with VqMod 2.6.1...
Ernie

Ernie's OpenCart v.1.5.6.5 LIGHT + OpenShop Admin v.1.75 Test Sites
http://www.bigmax.ch - http://www.evelo.li - http://www.openshop.li
Image


User avatar
Guru Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by JNeuhoff » Sun Jan 07, 2018 7:36 pm

The same is true for VQmod: the after attribute means to insert after the line which has a match of the search expression. the search expression doesn't have to match the whole line.

MHC Web Design
Override Engine * Integrated VQMod * Multilingual SEO * Instant Option Price Calculator * TrustPilot Reviews * Download Options * Free Download Buttons * Export/Import Tool * Template Switcher PHP/Twig


User avatar
Expert Member

Posts

Joined
Wed Dec 05, 2007 3:38 am

Who is online

Users browsing this forum: ahetaton and 6 guests