Post by asabbah44 » Tue Jul 23, 2019 5:44 am

Warning: Use of undefined constant OPENCART_SERVER - assumed 'OPENCART_SERVER' (this will throw an Error in a future version of PHP) in admin/controller/extension/extension/promotion.php on line 6

Any one can help me how to solve this problem ?

Newbie

Posts

Joined
Tue Jul 23, 2019 5:39 am

Post by letxobnav » Tue Jul 23, 2019 10:10 pm

all depends on how and where you defined the constant OPENCART_SERVER

Crystal Light Centrum Taiwan
Extensions: MailQueue | SUKHR | VBoces

“Data security is paramount at [...], and we are committed to protecting the privacy of anyone who is associated with our [...]. We’ve made a lot of improvements and will continue to make them.”
When you know your life savings are gone.


User avatar
Expert Member

Posts

Joined
Fri Aug 18, 2017 4:35 pm
Location - Taiwan

Post by Johnathan » Tue Jul 23, 2019 10:14 pm

That file is not a normal OpenCart file, so you've installed an extension that adds it, but has a bug in it. It's using a constant that doesn't exist, so either the extension is not installed correctly, or the developer missed adding it in their code. Contact the developer for support.

Image
Image Image Image Image


User avatar
Global Moderator

Posts

Joined
Fri Dec 18, 2009 3:08 am


Post by xxvirusxx » Tue Jul 23, 2019 10:50 pm

Johnathan wrote:
Tue Jul 23, 2019 10:14 pm
That file is not a normal OpenCart file
It is ;D
https://github.com/opencart/opencart/bl ... motion.php
Last edited by xxvirusxx on Wed Jul 24, 2019 5:06 am, edited 1 time in total.

My converted modules | Buy me a beer | Opencart upgrade service


User avatar
Expert Member

Posts

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

Post by WaxedPerfection » Tue Jul 23, 2019 11:47 pm

I would think its an ealier version of OC, but im sure the OP will let us know. the later versions do have the promo file.

New member

Posts

Joined
Sun Mar 26, 2017 8:23 pm

Post by asabbah44 » Wed Jul 24, 2019 4:26 am

Johnathan wrote:
Tue Jul 23, 2019 10:14 pm
That file is not a normal OpenCart file, so you've installed an extension that adds it, but has a bug in it. It's using a constant that doesn't exist, so either the extension is not installed correctly, or the developer missed adding it in their code. Contact the developer for support.
The problem appear when I enable models that included in modules section , I install 3 module only Featured, Latest and Specials after that the problem appeared .

Newbie

Posts

Joined
Tue Jul 23, 2019 5:39 am

Post by xxvirusxx » Wed Jul 24, 2019 5:05 am

What version you use? 3.0.3.1, 3.0.3.2 or version from github?

My converted modules | Buy me a beer | Opencart upgrade service


User avatar
Expert Member

Posts

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

Post by letxobnav » Wed Jul 24, 2019 2:28 pm

guess it was introduced at 3.0.3.1

some marketplace promotion nonsense.
constant is supposed to be added to admin/config.php by install or upgrade.

Crystal Light Centrum Taiwan
Extensions: MailQueue | SUKHR | VBoces

“Data security is paramount at [...], and we are committed to protecting the privacy of anyone who is associated with our [...]. We’ve made a lot of improvements and will continue to make them.”
When you know your life savings are gone.


User avatar
Expert Member

Posts

Joined
Fri Aug 18, 2017 4:35 pm
Location - Taiwan

Post by Root66 » Wed Jul 24, 2019 3:59 pm

I would think its an easier adaptation of OC, however, I'm sure the OP will tell us. the later forms do have the promotion record.

User avatar
Newbie

Posts

Joined
Wed Jul 24, 2019 2:39 pm


Post by xxvirusxx » Wed Jul 24, 2019 4:21 pm

You can remove that file.
I thought it was an interesting module/extension...but it is just to display that banner.....
letxobnav wrote:
Wed Jul 24, 2019 2:28 pm
some marketplace promotion nonsense.
Yep. And is loaded in advertise, analytics, captcha, dashboard, feed, fraud, menu, module, payment, report, shipping, theme and total.

My converted modules | Buy me a beer | Opencart upgrade service


User avatar
Expert Member

Posts

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

Post by Johnathan » Wed Jul 24, 2019 10:26 pm

Ha, I even checked version 3.0.2.0 before posting! I guess it's new in the 3.0.3.x versions.

letxobnav wrote:
Wed Jul 24, 2019 2:28 pm
guess it was introduced at 3.0.3.1

some marketplace promotion nonsense.
constant is supposed to be added to admin/config.php by install or upgrade.
For the original poster, if you want to fix the error the line you'd want to add to /admin/config.php is this:

Code: Select all

define('OPENCART_SERVER', 'https://www.opencart.com/');

xxvirusxx wrote:
Wed Jul 24, 2019 4:21 pm
You can remove that file.
I thought it was an interesting module/extension...but it is just to display that banner.....
Given that it's just for ads, I'd probably recommend removing it too.

Image
Image Image Image Image


User avatar
Global Moderator

Posts

Joined
Fri Dec 18, 2009 3:08 am


Post by asabbah44 » Thu Jul 25, 2019 1:24 am

xxvirusxx wrote:
Wed Jul 24, 2019 5:05 am
What version you use? 3.0.3.1, 3.0.3.2 or version from github?
3.0.3.2

Newbie

Posts

Joined
Tue Jul 23, 2019 5:39 am

Post by asabbah44 » Thu Jul 25, 2019 1:38 am

Thank you for all
I solved the problem by rename the Promotion file and the error disappear

Newbie

Posts

Joined
Tue Jul 23, 2019 5:39 am

Post by 1l » Sun Apr 05, 2020 5:44 pm

Please, can you describe what I have to do to solve the problem?

1l
Newbie

Posts

Joined
Tue Aug 15, 2017 3:41 pm

Post by letxobnav » Sun Apr 05, 2020 6:10 pm

what problem?

Crystal Light Centrum Taiwan
Extensions: MailQueue | SUKHR | VBoces

“Data security is paramount at [...], and we are committed to protecting the privacy of anyone who is associated with our [...]. We’ve made a lot of improvements and will continue to make them.”
When you know your life savings are gone.


User avatar
Expert Member

Posts

Joined
Fri Aug 18, 2017 4:35 pm
Location - Taiwan

Post by Jane Blonde » Thu Oct 08, 2020 9:36 pm

WaxedPerfection wrote:
Tue Jul 23, 2019 11:47 pm
I would think its an ealier version of OC, but im sure the OP will let us know. the later versions do have the promo file.
It's in version 3.0.3.6. I'd also like it to stop displaying, I'm not a coder. seams like a bug. Disabling all extensions/modules doesn't fix it.

New member

Posts

Joined
Tue Jul 19, 2011 6:35 pm

Post by letxobnav » Thu Oct 08, 2020 10:53 pm

in admin/controller/extension/extension/promotion.php
add:

Code: Select all

return '';
after:

Code: Select all

public function index() {

Crystal Light Centrum Taiwan
Extensions: MailQueue | SUKHR | VBoces

“Data security is paramount at [...], and we are committed to protecting the privacy of anyone who is associated with our [...]. We’ve made a lot of improvements and will continue to make them.”
When you know your life savings are gone.


User avatar
Expert Member

Posts

Joined
Fri Aug 18, 2017 4:35 pm
Location - Taiwan

Post by Jane Blonde » Thu Oct 08, 2020 11:09 pm

Perfect.
Thanks letxobnav
d

New member

Posts

Joined
Tue Jul 19, 2011 6:35 pm
Who is online

Users browsing this forum: No registered users and 30 guests