Post by RandyHoward » Sat Sep 07, 2019 11:38 am

Hi all, very new to OpenCart. I'm using the events system to avoid modifying core files.

Our goal is to create a single page checkout - so all sections display at once on the page instead of each section loaded with ajax in the default checkout page.

The core controllers already have all the logic I need, I just have to change the output of lines like this:
$this->response->setOutput($this->load->view('checkout/payment_method', $data));

To this:
return $this->load->view('checkout/payment_method', $data);

I just need these controllers to return the HTML rather than default way the controller handles the output. I plan to pull the sections into a twig template in much the same way that the header and footer sections are pulled in.

I've set up an event on the trigger "catalog/controller/checkout/payment_method/before" and changed the route to my own custom controller. This works fine, but all I'm doing there is copy/pasting everything from the core controller into my custom controller and changing a single line. Preferably I'd like to keep using all the logic in the core controller so that we don't bypass core updates to these files though. Does anybody know how I can get this to work?

Newbie

Posts

Joined
Sat Sep 07, 2019 11:28 am

Post by thekrotek » Sat Sep 07, 2019 3:21 pm

Just use OCMod/VQMod and forget that completely stupid even system, which barely exists in OpenCart comparing to WordPress or Joomla.

Professional OpenCart extensions, support and custom work.
Contact me via email or Skype by support@thekrotek.com


User avatar
Expert Member
Online

Posts

Joined
Sun Jul 03, 2016 12:24 am


Post by paulfeakins » Tue Sep 10, 2019 12:33 am

thekrotek wrote:
Sat Sep 07, 2019 3:21 pm
Just use OCMod/VQMod
I'd probably use vQmod to build this as you can edit it more easily.

For quick, professional OpenCart support please email info@antropy.co.uk


User avatar
Expert Member

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - Reigate, Surrey, United Kingdom

Post by thekrotek » Tue Sep 10, 2019 1:51 am

paulfeakins wrote:
Tue Sep 10, 2019 12:33 am
I'd probably use vQmod to build this as you can edit it more easily.
Actually, VQMod is only 1 click easier than OCMod, if you put modification file in "system" folder :-)

Professional OpenCart extensions, support and custom work.
Contact me via email or Skype by support@thekrotek.com


User avatar
Expert Member
Online

Posts

Joined
Sun Jul 03, 2016 12:24 am


Post by paulfeakins » Wed Sep 11, 2019 4:23 pm

thekrotek wrote:
Tue Sep 10, 2019 1:51 am
Actually, VQMod is only 1 click easier than OCMod, if you put modification file in "system" folder :-)
That is true, I knew that one.

It can be a bit harder to debug 3rd party OCMODS when all the code is in the database as sometimes we'd find something by greping the files but with that you also have to search the database etc.

For quick, professional OpenCart support please email info@antropy.co.uk


User avatar
Expert Member

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - Reigate, Surrey, United Kingdom
Who is online

Users browsing this forum: thekrotek and 23 guests