Re: [SOLVED] Trying to create an event to override order invoice
Just to drive my point across....
The OFFICIAL developer documentation of OpenCart: https://docs.opencart.com/en-gb/developer/module/
No mention of events, no sample code, no event lists, in fact it still shows old code paths and talks about OCMOD.
- Sat Oct 26, 2024 8:36 pm
- Replies 11
- Views 1665
Re: [SOLVED] Trying to create an event to override order invoice
::) to me they are new. Refused to even learn how they worked because they were so poorly implemented initially, were buggy, and don't mention the fact that commands and how to use this events system have changed many many times during minor versions as well as major. Opencart is a mess - its develo...
Jump to post- Sat Oct 26, 2024 8:33 pm
- Replies 11
- Views 1665
Re: [SOLVED] Trying to create an event to override order invoice
Could you specify more detail please? Why would you need to check this, and what does the variable actually contain? is it the source Twig or the rendered twig? what would you do if this is set and why would you worry about it specifically if you are trying to override the entire template?
Thanks
- Fri Oct 25, 2024 6:40 pm
- Replies 11
- Views 1665
Re: Trying to create an event to override order invoice
No its ok I found out that simply returning $this->load->view overwrites the output:
Code: Select all
return $this->load->view('extension/better_invoice/event/order_invoice', $data);
- Fri Oct 25, 2024 2:12 am
- Replies 11
- Views 1665
Re: Trying to create an event to override order invoice
I've fixed the issue and now it is running as intended, my issue now is what is the best practice for replacing the template with my own? it appears I cannot change the process and my only real option is to just call $this->response->setOutput($this->load->view( and then exit; killing any ongoing ex...
Jump to post- Fri Oct 25, 2024 12:20 am
- Replies 11
- Views 1665
Re: Trying to create an event to override order invoice
still doing nothing.
Jump to post- Thu Oct 24, 2024 12:06 am
- Replies 11
- Views 1665
[SOLVED] Trying to create an event to override order invoice
I'm having an aweful bad time here trying to use the new opencart 4.0.2.3 events... Here is my event install code: $data = [ 'code' => 'better_invoice', 'description' => 'Better Invoice Event', 'trigger' => 'admin/view/sale/order_invoice/before', 'action' => 'extension/better_invoice/controller/invo...
Jump to post- Wed Oct 23, 2024 11:50 pm
- Replies 11
- Views 1665
Re: Webp for pictures in description
Today is a little better though https://webdesires.co.uk/seo-tool/?test ... 2-12-04-34 But a lot more improvement needed, and I recommend better hosting too when you can. A2 are not great.
Jump to post- Fri Jan 14, 2022 8:05 pm
- Replies 34
- Views 6123
Re: Webp for pictures in description
I struggled to run any lighthouse tests on your site, your server seems to be EXTREMELY slow. I just get timeouts when trying to test it. And even when just browsing the site myself. Dont know if this is just an issue right now with your hosting or a recurring incident. anyway I dont know why you t...
Jump to post- Fri Jan 14, 2022 8:00 pm
- Replies 34
- Views 6123
Re: Webp for pictures in description
Hello mate, We have experience with this sort of thing with another client, in our case we simply needed to just resize the images down as they were being planted into product descriptions are full sized images which was not good for speed. So we have code for pulling out all images uncompressed an...
Jump to post- Thu Jan 13, 2022 11:46 pm
- Replies 34
- Views 6123
Re: iphone users cannot checkout in 3.0.3.2
It is most likely to do with the Javascript error which you will see in console on a desktop: https://webdesires.dev/u/050122/opera_TwflG7z7ug.png Any sort of javascript errors can cause weird behaviour, especially in safari and mobile browsers in general. Sometimes a javascript error can halt all j...
Jump to post- Wed Jan 05, 2022 8:23 pm
- Replies 15
- Views 6402
Re: Webp for pictures in description
Since you use the Journal3 framework (including for example \Journal3\Utils\Img) you really would have to get in touch with the Journal3 support on this. Or use a standard compliant web theme. As regards product description: In a standard OpenCart framework, it would require some modifications in t...
Jump to post- Wed Jan 05, 2022 7:27 pm
- Replies 34
- Views 6123
Re: Webp for pictures in description
You need to be careful with WebP, not all browsers support it and worse still there is some quirky behaviour with some older (not too old) iphones from my experience. You should look into having ModPageSpeed installed on your server like we have on our hosting plans, it will automagically serve webp...
Jump to post- Wed Jan 05, 2022 7:21 pm
- Replies 34
- Views 6123
Re: How to fix Google Chrome SameSite of OpenCart 3.0.3.2?
We have released a plugin that handles all this for you - Secure Cookies & Sessions (with Strict, Lax, None samesite)
Jump to post- Tue Dec 15, 2020 12:11 pm
- Replies 12
- Views 6667
Re: Page getting logout once payment is done and redirected back to the site
We have released a plugin that handles all this for you and more, for your specific issue you need to cownload our "None" version - Secure Cookies & Sessions (with Strict, Lax, None samesite)
Jump to post- Tue Nov 17, 2020 9:19 am
- Replies 22
- Views 8302
Re: [SOLVED] Help: How to put the attribute SameSite "none" in cookies. ? OP 3.0.3
We have released a plugin that handles all this for you - Secure Cookies & Sessions (with Strict, Lax, None samesite)
Jump to post- Tue Nov 17, 2020 9:18 am
- Replies 33
- Views 18375
Re: AuthNetSim transaction *nearly* completes
SIM is outdated now and will be replaced soon by Accept Hosted, which actually has a proper iFrame solution.
We have developed an Accept Hosted plugin:
Authorize.Net Accept Hosted
- Wed Sep 16, 2020 4:38 am
- Replies 10
- Views 2617
Re: Authorize.net Accept.js
We have just released Accept Hosted for oc 2.x and 3.x should go live in the next 10 hours or so.
https://www.opencart.com/index.php?rout ... n_id=40294
- Sat Sep 12, 2020 5:47 pm
- Replies 2
- Views 3210
Re: Cloud Plugin Approval?
Like I said, not much people are actually using cloud version of OpenCart and browse only the Marketplace from OC admin. This isn't a WordPress, both upgrade routine and Marketplace functionality are half-baked in OpenCart as many other things. This has always been this way and this will always be....
Jump to post- Sat Sep 05, 2020 1:14 am
- Replies 8
- Views 1500
Re: Cloud Plugin Approval?
Just ignore the cloud version. Most store owners use standalone. Well this is bad advice, since many people now are using the extension search from within OpenCart itself, we have had a few people now say they could not find plugins and then when we have sent links have said "oh I didnt know n...
Jump to post- Mon Aug 31, 2020 6:42 pm
- Replies 8
- Views 1500