Post by Qphoria » Wed May 25, 2022 2:37 am

I was looking to see how ocmod has changed with 4.0 and haven't seen any references to it in the code. Does it still exist?

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by uksitebuilder » Wed May 25, 2022 3:21 am

Apparently not. It has been replaced by the 'Events' system.

see Daniel's News Announcement, 2nd line of the "Added" section and the "REMOVED" section: viewtopic.php?f=2&t=228481

User avatar
Guru Member

Posts

Joined
Thu Jun 09, 2011 11:37 pm
Location - United Kindgom

Post by Qphoria » Wed May 25, 2022 3:39 am

Ah I was looking for some sort of announcement.. Thanks!

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by OSWorX » Wed May 25, 2022 2:33 pm

Qphoria wrote:
Wed May 25, 2022 2:37 am
I was looking to see how ocmod has changed with 4.0 and haven't seen any references to it in the code. Does it still exist?
Already discussed here in this forum several times in the past - where have you been??

Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.


User avatar
Guru Member

Posts

Joined
Mon Jan 11, 2010 10:52 pm
Location - Austria

Post by Qphoria » Wed May 25, 2022 11:27 pm

LOL admittedly not been active in the forums much.

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by IP_CAM » Thu May 26, 2022 12:14 am

Well, you most likely didn't miss much ... :laugh:

My Github OC Site: https://github.com/IP-CAM
5'200 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

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

Post by Johnathan » Thu May 26, 2022 7:40 am

Glad you're still alive though :laugh:

Image Image Image Image Image


User avatar
Administrator

Posts

Joined
Fri Dec 18, 2009 3:08 am


Post by khnaz35 » Thu May 26, 2022 9:43 pm

Seems someone already came-up with vQMOD for OC 4 so no need to convert the extensions for OC 4. Just little tweaks and vQMOD will do the job for OCMOD replacement.

Urgent Questions shoot here: khnaz35@gmail.com
Enjoy nature ;) :) :-*


User avatar
Active Member

Posts

Joined
Mon Aug 27, 2018 11:30 pm
Location - Malaysia

Post by thekrotek » Thu May 26, 2022 9:55 pm

khnaz35 wrote:
Thu May 26, 2022 9:43 pm
Seems someone already came-up with vQMOD for OC 4 so no need to convert the extensions for OC 4. Just little tweaks and vQMOD will do the job for OCMOD replacement.
It was expected from the very beginning. It was absolutely unnecessary to remove OCMod, but nobody listens to developers when it comes to adding/removing features to OC.

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


User avatar
Expert Member

Posts

Joined
Sun Jul 03, 2016 12:24 am


Post by xxvirusxx » Thu May 26, 2022 10:01 pm

I think if a developer want, can create a patch to add back Ocmod.

Upgrade Service | OC 2.3.0.2 PHP 8 | My Custom OC 3.0.3.8 | Buy me a beer


User avatar
Expert Member

Posts

Joined
Tue Jul 17, 2012 10:35 pm
Location - România

Post by IP_CAM » Thu May 26, 2022 10:47 pm

xxvirusxx wrote:
Thu May 26, 2022 10:01 pm
I think if a developer want, can create a patch to add back Ocmod.
Great, it will then end up with about the same problems as experienced already in OC v.2.x and v.3.x :laugh:

My Github OC Site: https://github.com/IP-CAM
5'200 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

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

Post by JNeuhoff » Thu May 26, 2022 10:54 pm

xxvirusxx wrote:
Thu May 26, 2022 10:01 pm
I think if a developer want, can create a patch to add back Ocmod.
I could port our Integrated VQmod (which supports both VQmod XML or OCmod XML) to OpenCart 4 if there is sufficient demand for it. It would work like the OpenCart 3 OCmod.

Having said that, XML-based modification systems are not the longterm solution. XML is a structured markup language for documents or protocols, it is not meant to be a programming language. What OpenCart really needs are more trigger points for events, and proper extension mechanisms, such as chained class extensions, support for decorator design patterns, etc.

The danger with XML based modifications for OC 4 is that we'll see all these poor quality extensions again.

The OpenCart marketplace really needs a quality control or vetting process of some sort for 3rd party extensions.

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by IP_CAM » Thu May 26, 2022 11:29 pm

I could port our Integrated VQmod (which supports both VQmod XML or OCmod XML) to OpenCart 4
Well, that would at least solve this Problem for good, because otherwise, it will end up in Chaos again. You just have to make sure, that the 'Owner' of the VqMod Name will accept your Proposal, since VqMod seems to be a 'registered' Trademark Name, as quoted already by it's 'Owner'. You just have to accept the Fact, that OC-Newcomers have no Idea on such 'Details', and they use, what they get.
It would be a real Progress, to make OC v.4 to be a Success. ;)

My Github OC Site: https://github.com/IP-CAM
5'200 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

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

Post by khnaz35 » Fri May 27, 2022 12:06 am

Let's hope it work in all party favours.

Urgent Questions shoot here: khnaz35@gmail.com
Enjoy nature ;) :) :-*


User avatar
Active Member

Posts

Joined
Mon Aug 27, 2018 11:30 pm
Location - Malaysia

Post by xxvirusxx » Fri May 27, 2022 12:58 am

JNeuhoff wrote:
Thu May 26, 2022 10:54 pm
The danger with XML based modifications for OC 4 is that we'll see all these poor quality extensions again.
Events should be used for extension/modules which make "changes" in the core and not to upload extension whitout core changes: like bank transfer payment, language files if will be the case....

https://github.com/opencart/opencart/di ... nt-2818749

Upgrade Service | OC 2.3.0.2 PHP 8 | My Custom OC 3.0.3.8 | Buy me a beer


User avatar
Expert Member

Posts

Joined
Tue Jul 17, 2012 10:35 pm
Location - România

Post by by mona » Fri May 27, 2022 2:19 am

This thread feels like we are in the presence of royalty.
Thank you to all of the legends in this thread. You all rock and always will.
Retro is in and vQmod is back
Long live the Queen !

DISCLAIMER:
You should not modify core files .. if you would like to donate a cup of coffee I will write it in a modification for you.


https://www.youtube.com/watch?v=zXIxDoCRc84


User avatar
Expert Member

Posts

Joined
Mon Jun 10, 2019 9:31 am

Post by marvinkleinmusic » Wed Jun 01, 2022 10:09 pm

Is it even possible to edit the php files with the new event system?

Let's consider this example. I want to change the validation for the postcode to only accepts characters which are numeric.
catalog/controller/account/address.php

Line 293:

Code: Select all

if ($country_info && $country_info['postcode_required'] && (utf8_strlen($this->request->post['postcode']) < 2 || utf8_strlen($this->request->post['postcode']) > 10)) {
with ocmod I could search for this part and replace it with this code

Code: Select all

if ($country_info && $country_info['postcode_required'] && (utf8_strlen($this->request->post['postcode']) < 2 || utf8_strlen($this->request->post['postcode']) > 10 || !is_numeric($this->request->post['postcode']))) {
Is this possible with the event system? Or do I'll need to use VQMod to achive this?


Posts

Joined
Sat Nov 17, 2018 3:32 am

Post by Qphoria » Wed Jun 01, 2022 10:39 pm

You could do it with events with something like this: viewtopic.php?f=144&t=221533
But as he says there its a bit convoluted as you need to handle the setup for the find/replace code yourself and effectively writing your own code for each change to do what vQmod already does at a wider scale with portable scripts.

The event system is powerful but I think it should be limited to calling functions based on a certain step triggered in the process.
For example if you want to send some data to a 3rd party marketing campaign, you could make an event to send that data after each of these (but not limited to) available events. Again these are just sample events but effectively show all the potential places some event can be "triggered"
before/after registration
before/after addtocart
before/after enter shipping address
before/after enter payment address
before/after enter coupon
before/after place order

So pretty much any "action" that you can do in the cart, can then call to some trigger which allows for custom "events" to be run or "functions" to be called that are assigned to that trigger event. But it isn't granular enough for changing small things like adding/removing fields or custom lines of code which is where vQmod comes in.

Image


User avatar
Administrator

Posts

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

Users browsing this forum: No registered users and 42 guests