Showing posts with label opencart. Show all posts
Showing posts with label opencart. Show all posts

Sep 20, 2016

Migrating payment extensions to OpenCart 2.2 and 2.3

This is an incomplete list of changes.

In OpenCart 2.2.x
  • In catalog/model/ there is no function currency->getCode()
    (Fatal error: Call to undefined method Cart\Currency::getCode() in ...on line ...)
    //$currency = $this->currency->getCode(); // OC <= 2.1
    $currency = $this->config->get('config_currency'); // OC 2.2
  • In controllers, the prefix to default templates has been automatically added.
    Remove the "default/template" from load->view()
In OpenCart 2.3.x
Along with the listed changes for OpenCart 2.2.x we have noticed these changes:
  • Directory structure has been changed, from catalog/controller/payment/ to catalog/controller/extension/payment. This affects view files, breadcrumbs in the admin as well as the controller class name, files and URL routes.



Sep 10, 2016

OpenCart plačilni modul Activa (Nestpay)

Za vse verzije OpenCart smo izdelali plačilni modul Activa.

Activa z dnem 30.9.2016 prehaja iz sistema e24PaymentPipe na nov sistem Nestpay.

Modul je dostopen na direktoriju OpenCart Extensions:

Za nakup modula nas kontaktirajte preko e-mail naslova info@krejzi.si

Activa podpira naslednje plačilne kartice:
MasterCard, Maestro, Visa, Visa Electron

Članice sistema Activa so:
Banka Celje, Banka Koper, BKS Bank, Deželna banka Slovenije, Gorenjska banka, Hranilnica LON, Hranilnica Vipava, Nova KBM, Poštna banka Slovenije, Probanka, Raiffeisen banka in Sberbank. Več informacij:



OpenCart plačilni modul Bankart


Za vse verzije OpenCart smo izdelali plačilni modul Bankart

Modul je dostopen na direktoriju OpenCart Extensions.

Za nakup modula nas kontaktirajte preko e-mail naslova info@krejzi.si

Bankart podpira naslednje plačilne kartice: 
Karanta, MasterCard, Visa, Visa Electron, Maestro

Banke, ki so članice sistema Bankart, so:
Abanka Vipa, Banka Sparkasse, Delavska hranilnica, Factor banka, Hypo Alpe-Adria-Bank, Nova Ljubljanska banka, Nova Kreditna banka Maribor, SKB banka in UniCredit Banka Slovenija.


Sep 9, 2016

OpenCart plačilni modul Moneta


Za vse verzije OpenCart smo izdelali plačilni modul Moneta.

Modul je dostopen na direktoriju OpenCart Extensions:

Za nakup modula nas kontaktirajte preko e-mail naslova info@krejzi.si


Nov 11, 2014

Developer notes for migrating extensions to OpenCart 2

My condolences to anyone reading this.

Please note that this is not a full list of changes, as I've only been working with payment gateway extensions at the moment.

Opencart released version 2 in October 2014 with major layout and structure changes. When looking at the new version at first glance the codebase seems the same and you'd think extensions should work by default. They won't.

The first thing to notice is that they completely changed templates files - HTML structure, forms. TPL files should be completely rewritten. But at least the new admin layout looks nice.
  • Admin template files use forms, columns.
  • Catalog template files use a new default page layout
  • Any custom error template files need to adhere to the new layout.

Methods visibilty in classes is changed to public. Using private or protected will not work.
class ControllerPaymentPPStandard extends Controller {
public function index() { ...

Catalog model has a new property (terms & conditions URL) that is returned in the method data array.:
'terms'      => '',

There is no render function in controllers in version 2. Using the call
$this->render(); has been changed to
return $this->load->view($template_file, $data);
Important thing to note here is that $data must be a local variable, not a class attribute.

Redirection is changed from
$this->redirect(...)
to
$this->response->redirect(...)


Methods
$this->model_checkout_order->confirm() and
$this->model_checkout_order->update() have been changed to
$this->model_checkout_order->addOrderHistory();