Post by stringsetc » Wed Aug 28, 2013 12:02 am

Hi all,

Recently installed a new mobile theme for my site (on oc 1.5.1.3) which has it's own .tpl files and also a vqmod file. Installed it on Friday with a view to configuring it all this week (first day back today). I found some php notices in the error log , have just double checked the cart is working and to my horror have found that guest checkout is completely broken.

Code: Select all

PHP Notice:  Undefined index: email in /public_html/vqmod/vqcache/vq2-catalog_controller_checkout_guest.php on line 30
That's the error I've got. After uninstalling the mobile theme vqmod and flushing the cache the problem seems to have gone. The strange thing is that the vqmod doesnt seem to mention "email" anywhere and the core file /catalog/controller/checkout/guest.php looks normal and hasn't been changed.

Code: Select all

if ((utf8_strlen($this->request->post['email']) > 96) || !preg_match('/^[^\@]+@.*\.[a-z]{2,6}$/i', $this->request->post['email'])) {
					$json['error']['email'] = $this->language->get('error_email');
				}
I've had problems with vq2-catalog_controller_checkout_guest.php flipping out before and messing up my site, any one any ideas on the cause? I'm using a non-standard theme for the main site , but also really confused as to how the mobile theme's vqmod could have caused this problem.

Ideas?
Last edited by stringsetc on Wed Aug 28, 2013 2:21 am, edited 1 time in total.

Active Member

Posts

Joined
Thu Feb 16, 2012 11:59 pm

Post by MarketInSG » Wed Aug 28, 2013 12:55 am

check with the developer. most likely the email field had been removed / renamed in the mobile side, causing the undefined index error


User avatar
Guru Member

Posts

Joined
Wed Nov 16, 2011 11:53 am
Location - Singapore

Post by stringsetc » Wed Aug 28, 2013 2:42 am

it's a freebe and the guy hasn't responded to my emails over the weekend so I'm not holding out much hope, for free it's great it's just fustrating when everything else works great.

I've attached the .xml to see if anyone can spot something obvious, to my untrained eye there is no reference to "email" so I'm struggling.

any help much appreciated

Active Member

Posts

Joined
Thu Feb 16, 2012 11:59 pm

Post by stringsetc » Wed Aug 28, 2013 3:29 am

just tried commenting out some of the code for "email" in guest.php and it then jumps down to "fax" and "telephone" and throws up the same errors.

totally confused.

Active Member

Posts

Joined
Thu Feb 16, 2012 11:59 pm

Post by MarketInSG » Wed Aug 28, 2013 10:15 am

honestly, there isn't anything wrong with the script you attached. might be with your theme then.


User avatar
Guru Member

Posts

Joined
Wed Nov 16, 2011 11:53 am
Location - Singapore

Post by stringsetc » Wed Aug 28, 2013 11:23 pm

thanks for having a look

i just don't understand how the vqmod from the mobile theme which is setup as a seperate store, when it's enabled it messes up the other theme on a different store, just doesn't seem logical. when I disable the mobile store vqmod and refresh the other stores theme works fine with no errors.

Active Member

Posts

Joined
Thu Feb 16, 2012 11:59 pm

Post by MarketInSG » Thu Aug 29, 2013 12:55 am

that vqmod doesn't seem to be causing any issue. Are you sure there isn't other files to it? You might need to get someone to look deeper into it though.


User avatar
Guru Member

Posts

Joined
Wed Nov 16, 2011 11:53 am
Location - Singapore

Post by DWWD » Fri Sep 27, 2013 2:09 pm

I've had a similar problem with 1.5.5.1, but I was getting a JSON error with the email index not being valid. The error was pointing to a core file (not in the vqcache).

The problem was that the variables are set in the data when #button-guest is clicked (checkout.tpl)

Code: Select all

$('#button-guest').live('click', function() {
	$.ajax({
		url: 'index.php?route=checkout/guest/validate',
		type: 'post',
		data: $('#payment-address input[type=\'text\'], #payment-address input[type=\'checkbox\']:checked, #payment-address input[type=\'radio\']:checked, #payment-address input[type=\'hidden\'], #payment-address select'),
		dataType: 'json',
I thought this might have been the template, but then I realised that I had changed the input type of my email field to type email (instead of text), so the value was never passed back to guest validate.

Here's the amended code:

Code: Select all

$('#button-guest').live('click', function() {
	$.ajax({
		url: 'index.php?route=checkout/guest/validate',
		type: 'post',
		data: $('#payment-address input[type=\'text\'], #payment-address input[type=\'email\'], #payment-address input[type=\'checkbox\']:checked, #payment-address input[type=\'radio\']:checked, #payment-address input[type=\'hidden\'], #payment-address select'),
		dataType: 'json',

User avatar
New member

Posts

Joined
Fri Nov 14, 2008 9:58 pm
Location - Moulton, Spalding
Who is online

Users browsing this forum: No registered users and 85 guests