Post by epixmedia » Mon Jan 12, 2015 10:31 pm

Hi all, I've moved a website to its live URL and switched sagepay to live.

Upon putting through an order we are getting this error when sagepay tries to return you to the website - during testing on the development URL we had no problems...

Notice : Undefined variable: text in /public_html/vqmod/vqcache/vq2-catalog_model_checkout_order.php on line 451 Warning : Cannot modify header information - headers already sent by (output started at /public_html/index.php:108) in /public_html/vqmod/vqcache/vq2-system_engine_controller.php on line 28 Warning : Cannot modify header information - headers already sent by (output started at /public_html/index.php:108) in /public_html/vqmod/vqcache/vq2-system_engine_controller.php on line 29

Any ideas what might be causing it? Do I need to reinstall vqmod because we've change the URL or anything?

Cheers!

Zoe

Newbie

Posts

Joined
Thu Feb 27, 2014 10:59 pm

Post by melbagnato » Wed Jan 14, 2015 1:42 pm

Hi Zoe, try the following:

(1) Clear your vqmod cache and see if the problem persists
(2) Paste the code behind "/public_html/vqmod/vqcache/vq2-catalog_model_checkout_order.php" here so we can see what the lines around it do. According to your error message, you are missing a variable declaration.

If you want, PM me some details and I'll look into it for you.

- Mel

http://online.enterpriseconsulting.com.au

Site with OpenCart extensions & code downloads, many new extensions coming soon!
Follow us on twitter for more updates

Image


User avatar
Active Member

Posts

Joined
Wed Jan 13, 2010 1:39 pm
Location - Melbourne

Post by epixmedia » Thu Jan 15, 2015 3:55 am

Thanks Mel,

Cleared the cache but still getting the error.

/vq2-catalog_model_checkout_order.php Line 451 error:Undefined variable
$text .= sprintf($language->get('text_new_greeting'), html_entity_decode($order_info['store_name'], ENT_QUOTES, 'UTF-8')) . "\n\n";

It looks like its the first time $text is used i that php file. I wondered if it was the . in .= but in the previous version that I deleted from the cache that line is without the . and also errored...

Newbie

Posts

Joined
Thu Feb 27, 2014 10:59 pm

Post by melbagnato » Thu Jan 15, 2015 8:49 am

That line appends information to the $text variable, so it might be that you have an extension that is using the variable in the wrong way before actually defining it.

Any chance you can attach (or PM me) the whole file? Alternatively send me some server details and I'll take a look for you.

- Mel ?

http://online.enterpriseconsulting.com.au

Site with OpenCart extensions & code downloads, many new extensions coming soon!
Follow us on twitter for more updates

Image


User avatar
Active Member

Posts

Joined
Wed Jan 13, 2010 1:39 pm
Location - Melbourne

Post by melbagnato » Thu Jan 15, 2015 8:31 pm

Hi Zoe,

let's try a test. I want you to modify your "/public_html/vqmod/vqcache/vq2-catalog_model_checkout_order.php" file.

In your file, there is a line that says:

Code: Select all

// Text Mail
$text .= sprintf($language->get('text_new_greeting'), html_entity_decode($order_info['store_name'], ENT_QUOTES, 'UTF-8')) . "\n\n";
Can you change this to say:

Code: Select all

// Text Mail
if(isset($text)){
    $text .= sprintf($language->get('text_new_greeting'), html_entity_decode($order_info['store_name'], ENT_QUOTES, 'UTF-8')) . "\n\n";
}else{
    $text = sprintf($language->get('text_new_greeting'), html_entity_decode($order_info['store_name'], ENT_QUOTES, 'UTF-8')) . "\n\n";
}
If this works, then we'll need to modify the extension that has this line in it.

- Mel

http://online.enterpriseconsulting.com.au

Site with OpenCart extensions & code downloads, many new extensions coming soon!
Follow us on twitter for more updates

Image


User avatar
Active Member

Posts

Joined
Wed Jan 13, 2010 1:39 pm
Location - Melbourne

Post by epixmedia » Thu Jan 15, 2015 8:41 pm

Hi Mel, still getting the error. The file that errors before I cleared the cache did already have $test .=

When I cleared the cache and placed a new order it had changed to $test =

So I wasn't sure that would work. What's the quested way of finding the module with that line in it? It might be something I can disable.

Newbie

Posts

Joined
Thu Feb 27, 2014 10:59 pm

Post by melbagnato » Thu Jan 15, 2015 9:24 pm

Hi Zoe,

In your vqmod\xml directory there will be a file that has this line. If it helps, there is a line nearby that says:

Code: Select all

			// Can not send confirmation emails for CBA orders as email is unknown
If you can't find it, send me your server's details via a PM and I'll do it for you.

- Mel

http://online.enterpriseconsulting.com.au

Site with OpenCart extensions & code downloads, many new extensions coming soon!
Follow us on twitter for more updates

Image


User avatar
Active Member

Posts

Joined
Wed Jan 13, 2010 1:39 pm
Location - Melbourne

Post by epixmedia » Thu Jan 15, 2015 9:29 pm

ok, Just opened and checked all 6 XML's in vqmod and none of them contain that comment or the $test variable.... :S

Newbie

Posts

Joined
Thu Feb 27, 2014 10:59 pm

Post by melbagnato » Thu Jan 15, 2015 9:34 pm

Look under "catalog\model\checkout\order.php" around line 437 (depending on your OC version).

- Mel

http://online.enterpriseconsulting.com.au

Site with OpenCart extensions & code downloads, many new extensions coming soon!
Follow us on twitter for more updates

Image


User avatar
Active Member

Posts

Joined
Wed Jan 13, 2010 1:39 pm
Location - Melbourne

Post by epixmedia » Thu Jan 15, 2015 9:40 pm

ok, so line 437 appears to be the same - shall I try editing that if your else/if and if it works create my own vqmod?

$text .= sprintf($language->get('text_new_greeting'), html_entity_decode($order_info['store_name'], ENT_QUOTES, 'UTF-8')) . "\n\n";

Newbie

Posts

Joined
Thu Feb 27, 2014 10:59 pm

Post by melbagnato » Thu Jan 15, 2015 9:52 pm

That line should say:

Code: Select all

$text = sprintf($language->get('text_new_greeting'), html_entity_decode($order_info['store_name'], ENT_QUOTES, 'UTF-8')) . "\n\n";
Did you change the original code ? If you tell me the version of OC you have, I'll send you the original.

- Mel

http://online.enterpriseconsulting.com.au

Site with OpenCart extensions & code downloads, many new extensions coming soon!
Follow us on twitter for more updates

Image


User avatar
Active Member

Posts

Joined
Wed Jan 13, 2010 1:39 pm
Location - Melbourne

Post by epixmedia » Thu Jan 15, 2015 11:06 pm

Hi Mel, editing that file worked! But I know its not ideal to edit core files - do you know why werent the vqmod cache files not making a difference?

Cheers :)

Newbie

Posts

Joined
Thu Feb 27, 2014 10:59 pm

Post by melbagnato » Sun Jan 18, 2015 9:50 pm

Hi Zoe,

not sure what vqmod files you had loaded, so I can't tell you what was meant to override that line. But either way, your original files shouldn't have been changed, and it looks like someone modified it at some stage.

If my fixed helped you out and you feel like rewarding my time, there's a lovely blue button you can click on below ;)

Let me know if you need anything else.

- Mel

http://online.enterpriseconsulting.com.au

Site with OpenCart extensions & code downloads, many new extensions coming soon!
Follow us on twitter for more updates

Image


User avatar
Active Member

Posts

Joined
Wed Jan 13, 2010 1:39 pm
Location - Melbourne

Post by ppmm500 » Thu Jan 22, 2015 3:27 am

Been getting the following error:

Undefined variable: salesrep_id in /home/madamrag/public_html/vqmod/vqcache/vq2-catalog_view_theme_journal2_template_checkout_register.tpl on line 42

I have contacted the theme support and they said it's because the variable salesrep_id is not defined in the module's controller, so the template fails to display it

would be grateful if anyone could help me fix this.

Newbie

Posts

Joined
Thu Jan 22, 2015 12:36 am

Post by whazupdez » Fri Jan 30, 2015 9:00 pm

Hi,

I'm facing very similar issue. I just moved my opencart development folder to the root, and now I'm getting error on step 6: confirm order. I can't proceed. Please help!

Parse error: syntax error, unexpected T_PUBLIC in /var/www/vhosts/dresstokill.my/httpdocs/vqmod/vqcache/vq2-catalog_model_checkout_order.php on line 674

I have tried to clear vqmod cache, still getting the error. Anyone has any idea?

Thanks
Desmond

Newbie

Posts

Joined
Fri Jan 30, 2015 8:56 pm
Who is online

Users browsing this forum: No registered users and 70 guests