Post by xds » Tue Jul 13, 2010 12:02 pm

Hello,
I was looking to develop a module to auto-insert an item into a customers order based on other things in their cart and I am pretty sure I know how I can do this, but I wanted to know if it would be possible to have said module hook the insert function in admin/controller/sale/order.php without me actually having to add the code in this controller file itself.

Pretty much my goal is to develop this in a fashion that won't require any updates to this controller in the future when upgrading to newer versions of opencart that may overwrite this controller. I am new to opencart and this is my first attempt at modding it, but I figure with the way it's laid out there might be a method of achieving this.

Thanks.

Thanks for 1.5!


xds
New member

Posts

Joined
Mon Jul 12, 2010 9:53 am

Post by Qphoria » Tue Jul 13, 2010 12:58 pm

We are looking into hooking events, but nothing is in place at this time.

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by mjalajel » Sat Jun 04, 2011 11:34 pm

That would be a great feature to be added. O0

Newbie

Posts

Joined
Thu May 26, 2011 11:57 pm

Post by rahman » Wed Sep 21, 2011 1:23 pm

Hello,
Any update to the events/hooks system?

Newbie

Posts

Joined
Wed Sep 21, 2011 1:21 pm

Post by Xsecrets » Wed Sep 21, 2011 2:00 pm

no and I wouldn't hold my breath. It won't be happening anytime soon. for now you can use vqmod. It's been discussed as possible for 1.6 or 2.0, but development hasn't even begun on 1.6 yet, and my guess is that it won't happen till 2.0

OpenCart commercial mods and development http://spotonsolutions.net
Layered Navigation
Shipment Tracking
Vehicle Year/Make/Model Filter


Guru Member

Posts

Joined
Sun Oct 25, 2009 3:51 am
Location - FL US

Post by Qphoria » Wed Sep 21, 2011 7:02 pm

I thought about using vQmod to implement a hook system to give it a trial run. I think it has great potential... daniel has never been keen on the idea.. but it has been discussed.

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by Johnathan » Wed Sep 21, 2011 10:04 pm

Qphoria wrote:I thought about using vQmod to implement a hook system to give it a trial run. I think it has great potential... daniel has never been keen on the idea.. but it has been discussed.
:D For some reason that strikes me as funny...virtually modifying files so you can have hooks to functionally modify them.

Would there be any real benefit to doing this? It might not be quite as clean-cut to find where in the files, but it seems like anything you can do with hooks you can do with vQmod.

Image Image Image Image Image


User avatar
Administrator

Posts

Joined
Fri Dec 18, 2009 3:08 am


Post by Qphoria » Wed Sep 21, 2011 11:19 pm

Johnathan wrote:
Qphoria wrote:I thought about using vQmod to implement a hook system to give it a trial run. I think it has great potential... daniel has never been keen on the idea.. but it has been discussed.
:D For some reason that strikes me as funny...virtually modifying files so you can have hooks to functionally modify them.

Would there be any real benefit to doing this? It might not be quite as clean-cut to find where in the files, but it seems like anything you can do with hooks you can do with vQmod.
lol well using vQmod to try a feature that would normally exist if vQmod wasn't used... ;)

Hooks still have their place in many other projects, namely wordpress. vQmod is an external system that just happens to work well but was created because of lack of proper hook... opencart should really have its own hook system in place tho for proper api integration.

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am
Who is online

Users browsing this forum: No registered users and 8 guests