Post by cwswebdesign » Thu Oct 30, 2014 5:59 am

I just tried to upload a .tif file which wasn't allowed. Uplaoded a jpg right after and this is the message on the product page along with a blank image.

Warning: imagecopyresampled() expects parameter 2 to be resource, null given in /home/ooo/public_html/ooo/system/library/image.php on line 99Warning: imagedestroy() expects parameter 1 to be resource, null given in /home/ooo/public_html/ooo/system/library/image.php on line 100

This account is inactive. Look for us under the name 'EvolveWebHosting' and contact us under that username.

Thanks!


User avatar
Active Member

Posts

Joined
Sun Dec 11, 2011 12:26 am
Location - USA

Post by fido-x » Thu Oct 30, 2014 12:41 pm

Google Product Feeds
The "$text_edit" variable is not defined in the language file for either of the Google feeds.
Should add something like:

Code: Select all

$_['text_edit']        = 'Edit Google Base Feed';
to "admin/language/english/feed/google_base.php".

And:

Code: Select all

$_['text_edit']        = 'Edit Google Sitemap Feed';
to "admin/language/english/feed/google_sitemap.php".

And remove:

Code: Select all

$_['text_list']        = 'Layout List';
from both, since that line doesn't need to be in either of them.

Breadcrumbs on Payment
Breadcrumbs on the Payment list page lead to Product Feed at line 74 in "admin/controller/extension/payment.php":

Code: Select all

'href' => $this->url->link('extension/feed', 'token=' . $this->session->data['token'], 'SSL')
Should be:

Code: Select all

'href' => $this->url->link('extension/payment', 'token=' . $this->session->data['token'], 'SSL')
Breadcrumbs on Shipping
Breadcrumbs on the Shipping list page lead to Product Feed at line 76 in "admin/controller/extension/shipping.php":

Code: Select all

'href' => $this->url->link('extension/feed', 'token=' . $this->session->data['token'], 'SSL')
Should be:

Code: Select all

'href' => $this->url->link('extension/shipping', 'token=' . $this->session->data['token'], 'SSL')
Breadcrumbs on Totals
Breadcrumbs on the Order Totals list page lead to Product Feed at line 76 in "admin/controller/extension/total.php":

Code: Select all

'href' => $this->url->link('extension/feed', 'token=' . $this->session->data['token'], 'SSL')
Should be:

Code: Select all

'href' => $this->url->link('extension/total', 'token=' . $this->session->data['token'], 'SSL')

Image
Modules for OpenCart 2.3.0.2
Homepage Module [Free - since OpenCart 0.7.7]
Multistore Extensions
Store Manager Multi-Vendor/Multi-Store management tool

If you're not living on the edge ... you're taking up too much space!


User avatar
Expert Member

Posts

Joined
Sat Jun 28, 2008 1:09 am
Location - Tasmania, Australia

Post by hermis » Thu Oct 30, 2014 2:58 pm

I'm getting error when trying to upload extension via extension installer on fresh OC 2.0 install:
Clipboard02.jpg

Clipboard02.jpg (17.41 KiB) Viewed 5730 times


Newbie

Posts

Joined
Thu Oct 02, 2014 12:25 am

Post by tinybibiya » Fri Oct 31, 2014 12:12 am

Bug found (if have not sorry if duplicate)

OC2's cart cannot have a product with options.

An error happens when click update quantity, it goes to /index.php?route=checkout/cart/edit (page not found)
instead of /index.php?route=checkout/cart with a success statement.
If cart has only a product with an option value, then this problem will not surface. Please reply me if found a solution.

Newbie

Posts

Joined
Thu Sep 19, 2013 6:14 pm

Post by cwswebdesign » Fri Oct 31, 2014 12:16 am

tinybibiya wrote:Bug found (if have not sorry if duplicate)

OC2's cart cannot have a product with options.

An error happens when click update quantity, it goes to /index.php?route=checkout/cart/edit (page not found)
instead of /index.php?route=checkout/cart with a success statement.
If cart has only a product with an option value, then this problem will not surface. Please reply me if found a solution.
I just tried to duplicate this and I can't. Are you sure all of the files are uploaded properly?

DL

This account is inactive. Look for us under the name 'EvolveWebHosting' and contact us under that username.

Thanks!


User avatar
Active Member

Posts

Joined
Sun Dec 11, 2011 12:26 am
Location - USA

Post by cwswebdesign » Fri Oct 31, 2014 12:19 am

Screen Shot 2014-10-30 at 10.18.33 AM.png

Screen Shot 2014-10-30 at 10.18.33 AM.png (7.57 KiB) Viewed 5689 times

Screen Shot 2014-10-30 at 10.18.26 AM.png

Screen Shot 2014-10-30 at 10.18.26 AM.png (12.96 KiB) Viewed 5689 times

The formatting doesn't carry over from the product page to the category page.

This account is inactive. Look for us under the name 'EvolveWebHosting' and contact us under that username.

Thanks!


User avatar
Active Member

Posts

Joined
Sun Dec 11, 2011 12:26 am
Location - USA

Post by SubatWest » Fri Oct 31, 2014 1:45 am

Sorry if this is not posted correctly. Apparently I posted to the wrong topic and site before. Just a newbie trying to find his way in the Opencart world.
I have the following

I am completely new to opencart and not technically experienced. I have searched for an answer everywhere I know. I have installed Opencart2 on my local machine and want to use the Extension installer. The system uses FTP, so I created a Local FTP using Filezilla Server. No problems. I then set the Opencart system FTP setting with the FTP credentials. The FTP root is set as localhost/public_html On running the extension installer I get the following error: "SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data OK <Warning: ftp_chdir(): CWD failed. "/:/localhost/public_html": directory not found. in C:\xampp\htdocs\mydomain\admin\controller\extension\installer.php on line 228{"error":"Could not set root directory as "}
I have used the latest installer.php from Github. I want to add some OC2 zips and am not sure how to do it manually as the zip contains both xml and sql files.
I have tried various combinations of the FTP root folder i.e. Localhost, public_html, but nothing seems to get rid of the error. I would be very grateful if anyone could guide me as to whether this is a bug or something I am doing wrong
Really appreciate any help
Thank you

Active Member

Posts

Joined
Fri Oct 31, 2014 1:29 am

Post by cwswebdesign » Fri Oct 31, 2014 3:16 am

Screen Shot 2014-10-30 at 12.32.54 PM.png

Screen Shot 2014-10-30 at 12.32.54 PM.png (20.93 KiB) Viewed 5676 times

Screen Shot 2014-10-30 at 1.02.54 PM.png

Screen Shot 2014-10-30 at 1.02.54 PM.png (25.29 KiB) Viewed 5676 times

One more on the product and options pages in the admin area.

This account is inactive. Look for us under the name 'EvolveWebHosting' and contact us under that username.

Thanks!


User avatar
Active Member

Posts

Joined
Sun Dec 11, 2011 12:26 am
Location - USA

Post by tinybibiya » Fri Oct 31, 2014 3:09 pm

cwswebdesign wrote:
tinybibiya wrote:Bug found (if have not sorry if duplicate)

OC2's cart cannot have a product with options.

An error happens when click update quantity, it goes to /index.php?route=checkout/cart/edit (page not found)
instead of /index.php?route=checkout/cart with a success statement.
If cart has only a product with an option value, then this problem will not surface. Please reply me if found a solution.
I just tried to duplicate this and I can't. Are you sure all of the files are uploaded properly?

DL
Hi,
What option do you use? I use the Selective option.
PrintScreen-004.jpg

PrintScreen-004.jpg (46.23 KiB) Viewed 5644 times


Newbie

Posts

Joined
Thu Sep 19, 2013 6:14 pm

Post by jurpro » Sun Nov 02, 2014 11:50 am

Hello. I don't know if this error was posted or not. I look every thread there is no error like this was posted.

Admin or moderator could you edit the 1st page to update what error was solved. It only my wish if you don't mind. ;)

My error is like the picture I attached. It appears in all Category page, product page, and Information page like term and conditions, etc.

Hope there is an answer. Thank you.

Attachments

bug-produk-oc2.jpg

bug-produk-oc2.jpg (53.32 KiB) Viewed 5597 times


Cari album edisi luar negeri? Atau dalam negeri juga bisa. Kunjungi saja http://www.sawios.com Semoga bisa membantu. :)


User avatar
Active Member

Posts

Joined
Wed Jun 06, 2012 6:17 pm

Post by jurpro » Sun Nov 02, 2014 12:09 pm

I don't know this is bug or not. But it seems "success.php" file for language beetwen Account and Affiliate for Catalog are swapped.

The swapped is on the translation of text message.

the success.php for Account in English Language :

Code: Select all

<?php
// Heading
$_['heading_title'] = 'Your Account Has Been Created!';

// Text
$_['text_message']  = '<p>Congratulations! Your new account has been successfully created!</p> <p>You can now a member of %s affiliates.</p> <p>If you have ANY questions about the operation of this affiliate system, please e-mail the store owner.</p> <p>A confirmation has been sent to the provided e-mail address. If you have not received it within the hour, please <a href="%s">contact us</a>.</p>';
$_['text_approval'] = '<p>Thank you for registering with %s!</p><p>You will be notified by e-mail once your account has been activated by the store owner.</p><p>If you have ANY questions about the operation of this online shop, please <a href="%s">contact the store owner</a>.</p>';
$_['text_account']  = 'Account';
$_['text_success']  = 'Success';
the Success.php for Affiliate in English Language :

Code: Select all

<?php
// Heading
$_['heading_title'] = 'Your Affiliate Account Has Been Created!';

// Text
$_['text_message']  = '<p>Congratulations! Your new account has been successfully created!</p> <p>You can now take advantage of member privileges to enhance your online shopping experience with us.</p> <p>If you have ANY questions about the operation of this online shop, please e-mail the store owner.</p> <p>A confirmation has been sent to the provided e-mail address. If you have not received it within the hour, please <a href="%s">contact us</a>.</p>';
$_['text_approval'] = '<p>Thank you for registering for an affiliate account with %s!</p><p>You will be notified by e-mail once your account has been activated by the store owner.</p><p>If you have ANY questions about the operation of this affiliate system, please <a href="%s">contact the store owner</a>.</p>';
$_['text_account']  = 'Account';
$_['text_success']  = 'Success';

Cari album edisi luar negeri? Atau dalam negeri juga bisa. Kunjungi saja http://www.sawios.com Semoga bisa membantu. :)


User avatar
Active Member

Posts

Joined
Wed Jun 06, 2012 6:17 pm

Post by jurpro » Sun Nov 02, 2014 3:56 pm

jurpro wrote:Hello. I don't know if this error was posted or not. I look every thread there is no error like this was posted.

Admin or moderator could you edit the 1st page to update what error was solved. It only my wish if you don't mind. ;)

My error is like the picture I attached. It appears in all Category page, product page, and Information page like term and conditions, etc.

Hope there is an answer. Thank you.
[Solved] The error because Sample product was from 1.5.x version. On OC 2.0 all product and article should input "Meta Tag" that used in all page tittle. So we have to input manually to all products.

Cari album edisi luar negeri? Atau dalam negeri juga bisa. Kunjungi saja http://www.sawios.com Semoga bisa membantu. :)


User avatar
Active Member

Posts

Joined
Wed Jun 06, 2012 6:17 pm

Post by fido-x » Sun Nov 02, 2014 5:56 pm

Breadcrumbs in OpenBay Extensions
The breadcrumbs link to the admin home page (dashboard) in "admin/controller/extension/openbay.php" at lines 81, 166, 576, 865 and 1231 all lead to "common/home", as follows:

Code: Select all

$data['breadcrumbs'][] = array(
	'text' => $this->language->get('text_home'),
	'href' => $this->url->link('common/home', 'token=' . $this->session->data['token'], 'SSL'),
);
This returns a "Permission Denied" page, since "common/home" has been replaced with "common/dashboard". Should be changed to:

Code: Select all

$data['breadcrumbs'][] = array(
	'text' => $this->language->get('text_home'),
	'href' => $this->url->link('common/dashboard', 'token=' . $this->session->data['token'], 'SSL'),
);
The same is true for all files in the "admin/controller/openbay/" directory, with the exception of "etsy_shipping.php" and "etsy_shop.php" (which don't use breadcrumbs).

OpenBay Order List
2014-11-01 6:55:03 - PHP Notice: Undefined variable: cancel in website/admin/view/template/openbay/openbay_orderlist.tpl on line 5

The variable "cancel" needs to be defined in "admin/controller/extension/openbay.php" in the "orderList()" function. Also, the "button_cancel" variable is not defined in this function, although this is not throwing an error. The following should be inserted at around line 790:

Code: Select all

$data['cancel'] = $this->url->link('extension/openbay', 'token=' . $this->session->data['token'] . $url, 'SSL');
$data['button_cancel'] = $this->language->get('button_cancel');
Then the "Cancel" button will return to the OpenBay dashboard page.

Language value for variable "text_view" and "text_edit" not defined in the language file (admin/language/english/openbay/openbay_order.php).

Code: Select all

$_['text_view'] = 'View';
$_['text_edit'] = 'Edit';
Another issue with the OpenBay Order List is in the styling, which still uses the "old" method of displaying a text link for viewing and editing the orders. This is a minor "visual" issue only, but can be addressed by including the style as a class in the $action array defined in the controller (admin/controller/extension/openbay.php).
Starting at line 611, we have:

Code: Select all

$action[] = array(
	'text'  => $this->language->get('button_view'),
	'href'  => $this->url->link('sale/order/info', 'token=' . $this->session->data['token'] . '&order_id=' . $result['order_id'] . $url, 'SSL')
);

if (strtotime($result['date_added']) > strtotime('-' . (int)$this->config->get('config_order_edit') . ' day')) {
	$action[] = array(
		'text'  => $this->language->get('button_edit'),
		'href'  => $this->url->link('sale/order/update', 'token=' . $this->session->data['token'] . '&order_id=' . $result['order_id'] . $url, 'SSL')
	);
}
This could be replaced with:

Code: Select all

$action[] = array(
	'text'  => $this->language->get('button_view'),
	'class' => 'fa-eye',
	'href'  => $this->url->link('sale/order/info', 'token=' . $this->session->data['token'] . '&order_id=' . $result['order_id'] . $url, 'SSL')
);

if (strtotime($result['date_added']) > strtotime('-' . (int)$this->config->get('config_order_edit') . ' day')) {
	$action[] = array(
		'text'  => $this->language->get('button_edit'),
		'class' => 'fa-pencil',
		'href'  => $this->url->link('sale/order/update', 'token=' . $this->session->data['token'] . '&order_id=' . $result['order_id'] . $url, 'SSL')
	);
}
Then, in the template file (admin/view/template/openbay/openbay_orderlist.tpl), line 118:

Code: Select all

[ <a href="<?php echo $action['href']; ?>"><?php echo $action['text']; ?></a> ]
could be replaced with:

Code: Select all

<a href="<?php echo $action['href']; ?>" data-toggle="tooltip" title="<?php echo $action['text']; ?>" class="btn btn-info"><i class="fa <?php echo $action['class']; ?>"></i></a>

Image
Modules for OpenCart 2.3.0.2
Homepage Module [Free - since OpenCart 0.7.7]
Multistore Extensions
Store Manager Multi-Vendor/Multi-Store management tool

If you're not living on the edge ... you're taking up too much space!


User avatar
Expert Member

Posts

Joined
Sat Jun 28, 2008 1:09 am
Location - Tasmania, Australia

Post by MrBangs » Sun Nov 02, 2014 10:52 pm

I've searched for the answer and if it's been covered I can't find it. In settings when I'm putting in the info for my store, under options it has a dropdown for order status. It's empty. Without being able to choose a process order status and a completed order status it gives me an error and it won't complete my settings.

Newbie

Posts

Joined
Thu Oct 23, 2014 12:03 am

Post by vishubhau » Mon Nov 03, 2014 2:49 am

Whenever I update history in order .. whatever status I select, It update as canceled... any clue ?

Newbie

Posts

Joined
Mon Nov 03, 2014 2:46 am

Post by skylimit » Mon Nov 03, 2014 3:08 am

Did you upgrade or installed a new one? Do you have any statuses defined in settings->localisation->order statuses ? It works for fresh installation in my case, so it's probably configuration issue or upgrade issue.
MrBangs wrote:I've searched for the answer and if it's been covered I can't find it. In settings when I'm putting in the info for my store, under options it has a dropdown for order status. It's empty. Without being able to choose a process order status and a completed order status it gives me an error and it won't complete my settings.

Newbie

Posts

Joined
Sun Oct 26, 2014 10:04 am

Post by vishubhau » Mon Nov 03, 2014 8:31 pm

It's fresh installation.... in localization there is option to add order status...
Issue what I am facing is whatever order status I select to update order history, it get updated as 'canceled'.

Newbie

Posts

Joined
Mon Nov 03, 2014 2:46 am

Post by fido-x » Mon Nov 03, 2014 8:38 pm

USPS Shipping
In "admin/controller/shipping/usps.php", the following block of code appears twice. Once at line 431 and again at line 449:

Code: Select all

if (isset($this->request->post['usps_length'])) {
	$data['usps_length'] = $this->request->post['usps_length'];
} else {
	$data['usps_length'] = $this->config->get('usps_length');
}
It only needs to be there once.

Amazon Checkout
The "cancel" define in the controller (admin/controller/payment/amazon_checkout.php) at line 139 reads:

Code: Select all

$data['cancel'] = $this->url->link('extension/payment', 'token=' . $this->session->data['token']);
This is in the admin, SSL needs to be stated. Like so:

Code: Select all

$data['cancel'] = $this->url->link('extension/payment', 'token=' . $this->session->data['token'], 'SSL');
AuthorizeNet Sim
The following, at line 17, in "admin/controller/payment/authorizenet_sim.php":

Code: Select all

$this->redirect($this->url->link('extension/payment', 'token=' . $this->session->data['token'], 'SSL'));
should be updated to include a "response", as follows:

Code: Select all

$this->response->redirect($this->url->link('extension/payment', 'token=' . $this->session->data['token'], 'SSL'));
Secure Trading
The "cancel" define in the controller (admin/controller/payment/securetrading_pp.php) at line 280 reads:

Code: Select all

$data['cancel'] = $this->url->link('extension/payment', 'token=' . $this->session->data['token']);
This is in the admin, SSL needs to be stated. Like so:

Code: Select all

$data['cancel'] = $this->url->link('extension/payment', 'token=' . $this->session->data['token'], 'SSL');
The same in "admin/controller/payment/securetrading_ws.php" at line 284.

Web Payment Software
The "action" and "cancel" defines at lines 81 and 83 need to be updated to standard code. Instead of:

Code: Select all

$data['action'] = HTTPS_SERVER . 'index.php?route=payment/web_payment_software&token=' . $this->session->data['token'];
and

Code: Select all

$data['cancel'] = HTTPS_SERVER . 'index.php?route=extension/payment&token=' . $this->session->data['token'];
They should be:

Code: Select all

$data['action'] = $this->url->link('payment/web_payment_software', 'token=' . $this->session->data['token'], 'SSL');
and

Code: Select all

$data['cancel'] = $this->url->link('extension/payment', 'token=' . $this->session->data['token'], 'SSL');
respectively.

Image
Modules for OpenCart 2.3.0.2
Homepage Module [Free - since OpenCart 0.7.7]
Multistore Extensions
Store Manager Multi-Vendor/Multi-Store management tool

If you're not living on the edge ... you're taking up too much space!


User avatar
Expert Member

Posts

Joined
Sat Jun 28, 2008 1:09 am
Location - Tasmania, Australia

Post by fido-x » Mon Nov 03, 2014 8:49 pm

Klarna Fee Order Total
After editing the settings for the Klarna Fee order total method, errors appear on the Order Totals list page of
Undefined indes: 'sort_order' in admin/controller/extension/total.php at line 133
and the same error for "status", although on a different line (of course).

In the controller (admin/controller/extension/total.php) we have:

Code: Select all

$data['extensions'][] = array(
	'name'       => $this->language->get('heading_title'),
	'status'     => $this->config->get($extension . '_status') ? $this->language->get('text_enabled') : $this->language->get('text_disabled'),
	'sort_order' => $this->config->get($extension . '_sort_order'),
	'install'   => $this->url->link('extension/total/install', 'token=' . $this->session->data['token'] . '&extension=' . $extension, 'SSL'),
	'uninstall' => $this->url->link('extension/total/uninstall', 'token=' . $this->session->data['token'] . '&extension=' . $extension, 'SSL'),
	'installed' => in_array($extension, $extensions),
	'edit'      => $this->url->link('total/' . $extension . '', 'token=' . $this->session->data['token'], 'SSL')
);
This code builds an array of the extensions listed in the "admin/controller/total" directory and gets their status, sort order and installed status from the "setting" and "extension" tables in the database.

While this works fine for most extensions, it doesn't work for the Klarna Fee order total method (or, for that matter, the Klarna Account and Klarna Invoice payment methods). In these methods "status" and "sort_order" are not defined as single values but are defined as arrays. What the controller is looking for is:
klarna_fee_status
and
klarna_fee_sort_order
as they are defined in other extensions. But what it finds is:
klarna_fee[$country['code']]_status
and
klarna_fee[$country['code']]_sort_order
I don't know if anyone has used this method or the Klarna payment methods, but I would consider them to be unusable in their current state. The "status" and "sort_order" need to be defined for the method, not just for the countries used within the method.

The Fix
In the controller (admin/controller/total/klarna_fee.php), insert the following at line 73:

Code: Select all

if (isset($this->request->post['klarna_fee_status'])) {
	$data['klarna_fee_status'] = $this->request->post['klarna_fee_status'];
} else {
	$data['klarna_fee_status'] = $this->config->get('klarna_fee_status');
}

if (isset($this->request->post['klarna_fee_sort_order'])) {
	$data['klarna_fee_sort_order'] = $this->request->post['klarna_fee_sort_order'];
} else {
	$data['klarna_fee_sort_order'] = $this->config->get('klarna_fee_sort_order');
}
before:

Code: Select all

$data['countries'] = array();
And, insert the following into "admin/view/template/total/klarna_fee.tpl" at line 28:

Code: Select all

<div class="tab-content">
  <div class="form-group">
    <label class="col-sm-2 control-label" for="input-status"><?php echo $heading_title; ?> <?php echo $entry_status; ?></label>
    <div class="col-sm-10">
      <select name="klarna_fee_status" id="input-status" class="form-control">
        <?php if ($klarna_fee_status) { ?>
        <option value="1" selected="selected"><?php echo $text_enabled; ?></option>
        <option value="0"><?php echo $text_disabled; ?></option>
        <?php } else { ?>
        <option value="1"><?php echo $text_enabled; ?></option>
        <option value="0" selected="selected"><?php echo $text_disabled; ?></option>
        <?php } ?>
      </select>
    </div>
  </div>
  <div class="form-group">
    <label class="col-sm-2 control-label" for="input-sort-order"><?php echo $entry_sort_order; ?></label>
    <div class="col-sm-10">
      <input type="text" name="klarna_fee_sort_order" value="<?php echo $klarna_fee_sort_order; ?>" placeholder="<?php echo $entry_sort_order; ?>" id="input-sort-order" class="form-control" />
    </div>
  </div>
</div>
This will fix the "sort_order" and "status" issues on the Order Total list page without breaking anything on the front-end. And, if it wasn't working on the front-end before (which is probably the case), it should with these changes done.

Klarna Account and Klarna Invoice Payment Gateways
As menthioned, the same issues also occur in both the Klarna Account and Klarna Invoice payment methods, with the same "status" and "sort_order" errors occurring on the Payments list page.

Klarna Account
In the controller (admin/controller/payment/klarna_account.php), insert the following at line 107:

Code: Select all

if (isset($this->request->post['klarna_account_status'])) {
	$data['klarna_account_status'] = $this->request->post['klarna_account_status'];
} else {
	$data['klarna_account_status'] = $this->config->get('klarna_account_status');
}

if (isset($this->request->post['klarna_account_sort_order'])) {
	$data['klarna_account_sort_order'] = $this->request->post['klarna_account_sort_order'];
} else {
	$data['klarna_account_sort_order'] = $this->config->get('klarna_account_sort_order');
}
before:

Code: Select all

$data['countries'] = array();
And, insert the following into "admin/view/template/payment/klarna_account.tpl" at line 33:

Code: Select all

<div class="tab-content">
  <div class="form-group">
    <label class="col-sm-2 control-label" for="input-status"><?php echo $heading_title; ?> <?php echo $entry_status; ?></label>
    <div class="col-sm-10">
      <select name="klarna_account_status" id="input-status" class="form-control">
        <?php if ($klarna_account_status) { ?>
        <option value="1" selected="selected"><?php echo $text_enabled; ?></option>
        <option value="0"><?php echo $text_disabled; ?></option>
        <?php } else { ?>
        <option value="1"><?php echo $text_enabled; ?></option>
        <option value="0" selected="selected"><?php echo $text_disabled; ?></option>
        <?php } ?>
      </select>
    </div>
  </div>
  <div class="form-group">
    <label class="col-sm-2 control-label" for="input-sort-order"><?php echo $entry_sort_order ?></label>
    <div class="col-sm-10">
      <input type="text" name="klarna_account_sort_order" value="<?php echo $klarna_account_sort_order; ?>" placeholder="<?php echo $entry_sort_order; ?>" id="input-sort-order" class="form-control" />
    </div>
  </div>
</div>
Klarna Invoice
In the controller (admin/controller/payment/klarna_invoice.php), insert the following at line 108:

Code: Select all

if (isset($this->request->post['klarna_invoice_status'])) {
	$data['klarna_invoice_status'] = $this->request->post['klarna_invoice_status'];
} else {
	$data['klarna_invoice_status'] = $this->config->get('klarna_invoice_status');
}

if (isset($this->request->post['klarna_invoice_sort_order'])) {
	$data['klarna_invoice_sort_order'] = $this->request->post['klarna_invoice_sort_order'];
} else {
	$data['klarna_invoice_sort_order'] = $this->config->get('klarna_invoice_sort_order');
}
before:

Code: Select all

$data['countries'] = array();
And, insert the following into "admin/view/template/payment/klarna_invoice.tpl" at line 33:

Code: Select all

<div class="tab-content">
  <div class="form-group">
    <label class="col-sm-2 control-label" for="input-status"><?php echo $heading_title; ?> <?php echo $entry_status; ?></label>
    <div class="col-sm-10">
      <select name="klarna_invoice_status" id="input-status" class="form-control">
        <?php if ($klarna_invoice_status) { ?>
        <option value="1" selected="selected"><?php echo $text_enabled; ?></option>
        <option value="0"><?php echo $text_disabled; ?></option>
        <?php } else { ?>
        <option value="1"><?php echo $text_enabled; ?></option>
        <option value="0" selected="selected"><?php echo $text_disabled; ?></option>
        <?php } ?>
      </select>
    </div>
  </div>
  <div class="form-group">
    <label class="col-sm-2 control-label" for="input-sort-order"><?php echo $entry_sort_order ?></label>
    <div class="col-sm-10">
      <input type="text" name="klarna_invoice_sort_order" value="<?php echo $klarna_invoice_sort_order; ?>" placeholder="<?php echo $entry_sort_order; ?>" id="input-sort-order" class="form-control" />
    </div>
  </div>
</div>

Image
Modules for OpenCart 2.3.0.2
Homepage Module [Free - since OpenCart 0.7.7]
Multistore Extensions
Store Manager Multi-Vendor/Multi-Store management tool

If you're not living on the edge ... you're taking up too much space!


User avatar
Expert Member

Posts

Joined
Sat Jun 28, 2008 1:09 am
Location - Tasmania, Australia

Post by MrBangs » Tue Nov 04, 2014 7:13 am

skylimit wrote:Did you upgrade or installed a new one? Do you have any statuses defined in settings->localisation->order statuses ? It works for fresh installation in my case, so it's probably configuration issue or upgrade issue.
MrBangs wrote:I've searched for the answer and if it's been covered I can't find it. In settings when I'm putting in the info for my store, under options it has a dropdown for order status. It's empty. Without being able to choose a process order status and a completed order status it gives me an error and it won't complete my settings.
It's a new clean install.

Newbie

Posts

Joined
Thu Oct 23, 2014 12:03 am
Who is online

Users browsing this forum: No registered users and 61 guests