like append
Code: Select all
if (!empty($data['filter_custom'])) {
$sql .= " AND pd.`custom_field` LIKE '" . $this->db->escape((string)$data['filter_custom'] . '%') . "'";
}
Code: Select all
if (!empty($data['filter_custom'])) {
$sql .= " AND pd.`custom_field` LIKE '" . $this->db->escape((string)$data['filter_custom'] . '%') . "'";
}
Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig
These are the main way in the current release (although you could use vQmod) but as above, I'd wait for the next release of 4 before using it, as the next release should have OCMOD.
UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk
Affected strings cannot be changed by using Event Triggers. It can only be done with OCMod which has been integrated in OC v4.1.0.0 (dev) release on Github.soscodes wrote: ↑Mon Apr 29, 2024 4:22 pmHey, I am using opencart 4.0.2.3 and I want to overwrite some core functionality, for example I want to add some custom filters to getProducts function of admin/model/catalog/product.php.
like appendor I want to change AND condition to OR. How I can do this?Code: Select all
if (!empty($data['filter_custom'])) { $sql .= " AND pd.`custom_field` LIKE '" . $this->db->escape((string)$data['filter_custom'] . '%') . "'"; }
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
Trusting the advice of experienced developers who work with OpenCart day in and day out is invaluable. Their insights come from practical experience and troubleshooting, often uncovering nuances that might not be immediately apparent from official documentation. Following their recommendations, even if it contradicts the official stance, can save you from potential headaches down the road.
https://www.waxedperfection.co.uk/ Car Detailing Product Blog's and Review's
Absolutely! Relying on the guidance of seasoned developers who have extensive experience with OpenCart is incredibly valuable. If OpenCart feels that this version is not stable, the forum link shared above should be added to the main page so that developers are aware of it. Previously, I was using Magento, which releases stable versions only.WaxedPerfection wrote: ↑Mon Apr 29, 2024 9:57 pmTrusting the advice of experienced developers who work with OpenCart day in and day out is invaluable. Their insights come from practical experience and troubleshooting, often uncovering nuances that might not be immediately apparent from official documentation. Following their recommendations, even if it contradicts the official stance, can save you from potential headaches down the road.
See for yourself:
viewtopic.php?t=231401
Okay. If there aren't too many customizations, can we use OpenCart 4.0.2.3 for our live website? We've already invested two months in transitioning from 3.0.3.6 to 4.0.2.3.straightlight wrote: ↑Mon Apr 29, 2024 9:33 pmAffected strings cannot be changed by using Event Triggers. It can only be done with OCMod which has been integrated in OC v4.1.0.0 (dev) release on Github.
Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.
You can try. Some developers like using events and claim they can do what OCMOD can. However, I am not one of them and neither are any of the developers in my team.
UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk
I would not use OC v4.x releases until the official release gets published either from the Github Opencart releases or from the opencart.com website when the time comes. As for the Event Triggers, the Event engine is not meant to replace code, it is meant to repull the data and edit them accordingly by expanding the code by the time it, either, begins or reaches the end of each methods with the exception of language packs. However, for language packs, people tends more to call their own language files from their Event controllers rather than expanding existing language files from the core into their extensions.soscodes wrote: ↑Tue Apr 30, 2024 2:12 pmOkay. If there aren't too many customizations, can we use OpenCart 4.0.2.3 for our live website? We've already invested two months in transitioning from 3.0.3.6 to 4.0.2.3.straightlight wrote: ↑Mon Apr 29, 2024 9:33 pmAffected strings cannot be changed by using Event Triggers. It can only be done with OCMod which has been integrated in OC v4.1.0.0 (dev) release on Github.
Also, until the official release of OpenCart 4 with ocmod, can I use event functions to replace core/parent functions by copying the entire code for the triggered function?
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
Users browsing this forum: No registered users and 19 guests