Ecommerce software home
Shopping Cart Software Forum for Ecommerce Templates
 
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

Find us on Facebook Follow us on Twitter View our YouTube channel
Search our site
 All Forums
 Technical
 WordPress for Ecommerce Templates
 Error on products pages
Author « Topic »  

JustDucky923
Ecommerce Template Guru

USA
1332 Posts

Posted - 02/20/2020 :  09:45:29  
I suddenly have an error showing on all of the products:

"Warning: Use of undefined constant related - assumed 'related' (this will throw an Error in a future version of PHP) in /home/xxxxxx/public_html/proddetail.php on line 18"

Site is: curtisknight.com

I had this question on another thread where I was working on a different problem. No one seems to be answering it, so I figured I should break it out into it's own question.

Phil
ECT Moderator

United Kingdom
7617 Posts

Posted - 02/20/2020 :  10:14:46  
Hi Kelly,
What do you have on proddetail.php on line 18 please?




* Database Migrations and Conversions*
* ASP to PHP Cart Conversions*

*Contact Us*
*Buy The PHP Capture Card Plugin*
*Rate Our Services/View Our Feedback*

Edited by - Phil on 02/20/2020 10:45:49

JustDucky923
Ecommerce Template Guru

USA
1332 Posts

Posted - 02/20/2020 :  11:16:16  
$GLOBALS['crosssellaction']=related;

insight
ECT Moderator

USA
4476 Posts

Posted - 02/20/2020 :  12:03:44  
It's exactly as the warning says, you are missing the quotes from that line you added, should be like this:
quote:
$GLOBALS['crosssellaction']='related';


Peter


Professional ecommerce web hosting services
Shared hosting Windows & Linux | Dedicated servers | Domains | SSL
Ecommerce Templates specialists since 2003
https://servelink.com

JustDucky923
Ecommerce Template Guru

USA
1332 Posts

Posted - 02/20/2020 :  12:14:43  
That fixed it!

It's just strange because I haven't changed that page in a very long time, but this error just started showing up in the last couple of days.

insight
ECT Moderator

USA
4476 Posts

Posted - 02/20/2020 :  13:33:18  
Probably a PHP major version update. It's always been wrong to omit the quote marks, but what PHP actually does about it evolves with newer versions. Once it may have been marked by a 'notice' that you probably wouldn't see in the error_log, a new PHP version comes along and they make it a 'warning' that shows up on the page as you had here, next major version it may become an actual 'error' that will completely blow up the page. They are just gently prompting you over time to get your act together

Peter


Professional ecommerce web hosting services
Shared hosting Windows & Linux | Dedicated servers | Domains | SSL
Ecommerce Templates specialists since 2003
https://servelink.com

JustDucky923
Ecommerce Template Guru

USA
1332 Posts

Posted - 02/20/2020 :  13:39:45  
Awesome! Thanks so much for the help and the explanation. You guys are the best.
  « Topic »  
Jump To:
Shopping Cart Software Forum for Ecommerce Templates © 2002-2022 ecommercetemplates.com
This page was generated in 0.03 seconds. Snitz Forums 2000