Attachments
OCextensions.JPG (159.69 KiB) Viewed 2804 times
to fix this change the line 18 of file admin/controller/extension/extension/promotion.php
from
Code: Select all
return $response;
Code: Select all
return '';
https://www.aboutnet.gr
Κατασκευή Ιστοσελίδων & E-shop
UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk
The request in admin/controller/extension/extension/promotion.php should be checking for a correct response before sending to the view.
Changing.
Code: Select all
if ($response) {
Code: Select all
if ($response && curl_getinfo($curl, CURLINFO_HTTP_CODE) === 200) {
I prefer this solution - at least the ads/promotions banner will continue to show up correctly after the server issue has been rectified.ADD Creative wrote: ↑Thu Apr 25, 2024 7:31 pmThe issue seems to be that the OPENCART_SERVER is using Cloudflare, which is messing up the response when retrieving the advert.
The request in admin/controller/extension/extension/promotion.php should be checking for a correct response before sending to the view.
Changing.To.Code: Select all
if ($response) {
Code: Select all
if ($response && curl_getinfo($curl, CURLINFO_HTTP_CODE) === 200) {
Check out our ever-growing list of extensions for OpenCart here.
Some useful extensions for a better admin experience: Image File Manager Pro • Drag & Drop Sort Order
Reach out to us at hello@softmonke.com for your OpenCart web development needs or feedback for our extensions.
Thanks the fix helped. But that is not the way. I am always afraid that just like with licensing of modules, the connection does not work between the servers. Then your shop is down or no checkout is possible.
Maybe it makes sense to also add this fix to the upcoming OC 3.0.4.0 , too? The opencart.com uses CloudFlare which is known to cause quite few problems.ADD Creative wrote: ↑Thu Apr 25, 2024 7:31 pmThe issue seems to be that the OPENCART_SERVER is using Cloudflare, which is messing up the response when retrieving the advert.
The request in admin/controller/extension/extension/promotion.php should be checking for a correct response before sending to the view.
Changing.To.Code: Select all
if ($response) {
Code: Select all
if ($response && curl_getinfo($curl, CURLINFO_HTTP_CODE) === 200) {
Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig
I've done a pull request.JNeuhoff wrote: ↑Thu Apr 25, 2024 11:50 pmMaybe it makes sense to also add this fix to the upcoming OC 3.0.4.0 , too? The opencart.com uses CloudFlare which is known to cause quite few problems.
https://github.com/opencart/opencart/pull/13894
The more, when it makes troubles since months?
I understand that Daniel wants to make benefit as much as he can, but this way?
Not really.
And about the "solution" above: I prefer to add a
Code: Select all
return '';
Code: Select all
public function index() {
Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.
Just adding another shout out to ADD Creative for this fix.ADD Creative wrote: ↑Thu Apr 25, 2024 7:31 pmCode: Select all
if ($response && curl_getinfo($curl, CURLINFO_HTTP_CODE) === 200) {
inframes.com Website Design with Opencart, Wordpress, Lucee and bespoke application design and development
Just another one that found this solution useful as suddenly the last 3 days, both of my oc 3.0.3.8 stores stopped loading the extension page without any reason.ADD Creative wrote: ↑Thu Apr 25, 2024 7:31 pmThe issue seems to be that the OPENCART_SERVER is using Cloudflare, which is messing up the response when retrieving the advert.
The request in admin/controller/extension/extension/promotion.php should be checking for a correct response before sending to the view.
Changing.To.Code: Select all
if ($response) {
Code: Select all
if ($response && curl_getinfo($curl, CURLINFO_HTTP_CODE) === 200) {
I tried this and works.
Thanks for the solution!
aboutnet wrote: ↑Thu Apr 25, 2024 6:33 pmHi,
to fix this change the line 18 of file admin/controller/extension/extension/promotion.php
fromtoCode: Select all
return $response;
Refresh the modification and you are ready!Code: Select all
return '';
Worked, thank you
Why not just bin the whole Fn and simply
Code: Select all
return '';

viewtopic.php?t=234855#p875283
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
Errm, that is the solution proposed above. I am suggesting remove the rest of the function so the the curl call is never made rather than just changing line 18.
Users browsing this forum: Amazon [Bot] and 23 guests