Post by joelarocque » Tue Feb 16, 2016 11:32 pm

I'm running the latest OpenCart 2.1.0.2 with the latest version of vqmod. The problem I'm running into is the following error:

Notice: Undefined index: geocode in /home/josephlarocque/public_html/vqmod/vqcache/vq2-catalog_controller_information_contact.php on line 240

The thing is I have set the geocode in my store settings so I'm totally confused as to why this error should even occur. Any assistance would be appreciated as I want to provide all the possible support to my customers that I can possibly give.

Thanks in advance for your assistance

Joseph
www.wordsandrobotics.com

Joseph La Rocque
CEO
Words and Robotics LLC
Greenville, NC 27858
Phone: +1-252-258-7749
Email: joseph@wordsandrobotics.com
Website: http://www.wordsandrobotics.com
Website Hosted by: www.EvolveWebHost.com (Specializing in OpenCart Hosting)


User avatar
Newbie

Posts

Joined
Mon Feb 01, 2016 1:31 am
Location - Greenville, NC 27858

Post by joelarocque » Wed Feb 17, 2016 12:58 am

I tracked it down to an error in the default2 theme. The following line was causing the error:

$data['geocode'] = $data['default2']['geocode'] ?: $data['geocode'];

I swapped out the default2 theme for the default them and no errors. But, also the mail is not being received from the contact form. Any recommendations on how to trace the code so I can see what is actually happening when I try to send mail from OpenCart? I would like to keep using the default2 theme but I don't know how to modify the line of code in question.

As always, thanks in advance for your help.

Joseph

Joseph La Rocque
CEO
Words and Robotics LLC
Greenville, NC 27858
Phone: +1-252-258-7749
Email: joseph@wordsandrobotics.com
Website: http://www.wordsandrobotics.com
Website Hosted by: www.EvolveWebHost.com (Specializing in OpenCart Hosting)


User avatar
Newbie

Posts

Joined
Mon Feb 01, 2016 1:31 am
Location - Greenville, NC 27858

Post by artcore » Wed Feb 17, 2016 2:02 am

The shorthand ternary ?: is from php 5.3 and above. Maybe check your php version and make sure you're at least using 5.3 and strongly advice to use at least 5.5 and the mail issues and others might go away.

$data['geocode'] = $data['default2']['geocode'] ?: $data['geocode'];

Without shorthand:
$data['geocode'] = $data['default2']['geocode'] ? $data['default2']['geocode'] : $data['geocode'];

Attn: I no longer provide OpenCart extensions, nor future support - this includes forum posts.
Reason: OpenCart version 3+ ;D

Thanks!


User avatar
Active Member

Posts

Joined
Tue Jul 09, 2013 4:13 am
Location - The Netherlands

Post by joelarocque » Wed Feb 17, 2016 5:15 am

I moved my theme back from Default2 to default and mail is working now.

Joseph

Joseph La Rocque
CEO
Words and Robotics LLC
Greenville, NC 27858
Phone: +1-252-258-7749
Email: joseph@wordsandrobotics.com
Website: http://www.wordsandrobotics.com
Website Hosted by: www.EvolveWebHost.com (Specializing in OpenCart Hosting)


User avatar
Newbie

Posts

Joined
Mon Feb 01, 2016 1:31 am
Location - Greenville, NC 27858

Post by Randem » Wed Feb 17, 2016 6:08 am


NEVER take serious; anyone who gives negative impact statements with no ABSOLUTE proof!
OpenCart Helpful Information * Upgrade 1.5 to 2.1 * Upgrade 2.1 to 2.2
"Why do people NEVER have enough time to do it right but ALWAYS enough time to do it over?"
DO NOT EVER GIVE SOMEONE YOU DON"T KNOW ADMIN ACCESS TO ANYTHING!
I am NOT affiliated with OpenCart


User avatar
Active Member

Posts

Joined
Sat Sep 27, 2014 9:17 am
Who is online

Users browsing this forum: No registered users and 34 guests