Post by visnetmedia » Fri Aug 09, 2013 4:42 pm

Hi I have a theme but also tested on the default theme and both times I get no confirm button. Is there something that I can change - this is a host installed opencart but would really appreciate help as I cannot make any sales with this problem.
It is weird because the button shows on the rest of the steps to checkout just no button on step 6.
I have put into maintenance mode till I can work it out.

Active Member

Posts

Joined
Fri Feb 12, 2010 7:17 am

Post by visnetmedia » Fri Aug 09, 2013 4:59 pm

Hi from looking at the code I have All in One SEO and in the jquery it has this line:

Code: Select all

$.ajax({
					url: 'index.php?route=checkout/confirm',
					dataType: 'html',
					success: function(html) {
						$('#confirm .checkout-content').html(html);
						
						$('#payment-method .checkout-content').slideUp('slow');
						
						$('#confirm .checkout-content').slideDown('slow');
						
						$('#payment-method .checkout-heading a').remove();
						
						$('#payment-method .checkout-heading').append('<a>Modify &raquo;</a>');	
					},
					error: function(xhr, ajaxOptions, thrownError) {
						alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
					}
				});	
			}
		},
		error: function(xhr, ajaxOptions, thrownError) {
			alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
		}
so not sure if anything here is wrong with SEO but when I add index.php?route=checkout/checkout in the browser it works...

Active Member

Posts

Joined
Fri Feb 12, 2010 7:17 am

Post by Qphoria » Fri Aug 09, 2013 9:52 pm

The button on step 6 comes from the individual payment modules themselves. It is likely that your payment module is just failing. Contact the author of the payment you are using.

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by visnetmedia » Sat Aug 10, 2013 7:21 am

Hi thanks for the reply. I thought it might be that so this is what I had:
Paypal Standard
Qphoria's Offline Credit Card

So then I removed both and put Bank Transfer and it still had no confirm button on either my theme or the default theme.
So is there something else I need to look for? There is nothing in the error logs although at first time selecting payment method I had json error come up:
internal server error
internal server error

Active Member

Posts

Joined
Fri Feb 12, 2010 7:17 am

Post by butte » Sun Aug 11, 2013 12:51 am

When 500 is thrown (internal server error), the machine is confused and Apache halts with a 500 screen. But for disaster rather than comedy, it is the Apache equivalent of the old silver screen cartoon ending, "That's all, folks!" You would ordinarily not be given the luxury of a json error comment on the screen.

Did the oddball theme overwrite ANY files in addition to emplanting its own /theme/oddballtheme/ tree -- whether in /theme/default/ or in model/, controller/, and language/ .php files? A 500 tends to mean, investigate starting with .htaccess file(s) and go from there -- unless another avenue of cause for 500 is apparent or evident.

Guru Member

Posts

Joined
Wed Mar 20, 2013 6:58 am

Post by visnetmedia » Sun Aug 11, 2013 12:19 pm

Hi I am starting from scratch on my local server and getting this error now on delivery step:

Code: Select all

SyntaxError: JSON.parse: unexpected character

OK

<b>Notice</b>: Undefined index: company_id_display in <b>C:\wamp\www\opencart\catalog\controller\checkout\payment_address.php</b> on line <b>144</b><b>Notice</b>: Undefined index: tax_id_display in <b>C:\wamp\www\opencart\catalog\controller\checkout\payment_address.php</b> on line <b>149</b>[]
I have made sure that in admin under Settings > Options > that I have selected the default group and in customer groups I have default as well and Display Company No.:
Display a company no. field. No
Company No. Required:
Select which customer groups must enter their company no. for billing addresses before checkout. No
Display Tax ID.:
Display a Tax ID. field for billing addresses. No
Tax ID Required:
Select which customer groups must enter their Tax ID for billing addresses before checkout. No

so not sure why I am getting the errors.

Active Member

Posts

Joined
Fri Feb 12, 2010 7:17 am

Post by butte » Sun Aug 11, 2013 12:34 pm

Proofread lines 144 and 149. It is balking, literally, at "SyntaxError: JSON.parse: unexpected character". That means a character is out of place (such as flipping sequence of adjacent characers), duplicated (as might happen in doubling-up a ' or " or ;), or unescaped or unnecessarily escaped (by an accordingly missing or present \ such as would be in a \' or a \" where you'll see those sprinkled through the code overall). You can also try flushing your vqmod cache, in case it is remembering something that is no longer there.

Guru Member

Posts

Joined
Wed Mar 20, 2013 6:58 am

Post by visnetmedia » Sun Aug 11, 2013 12:48 pm

Hi thanks I tried removing cache and it didn't make a difference and the error log is still showing those.
Also can't find those lines 144 and 149
My Checkout > shipping_address.tpl is only 135 lines in length.

Active Member

Posts

Joined
Fri Feb 12, 2010 7:17 am

Post by butte » Sun Aug 11, 2013 1:17 pm

You looked at the wrong file -- payment_address.php is the one with the two lines.

Guru Member

Posts

Joined
Wed Mar 20, 2013 6:58 am

Post by visnetmedia » Sun Aug 11, 2013 1:29 pm

Hi thanks this is the payment_address.php

Code: Select all

<?php if ($addresses) { ?>
<input type="radio" name="payment_address" value="existing" id="payment-address-existing" checked="checked" />
<label for="payment-address-existing"><?php echo $text_address_existing; ?></label>
<div id="payment-existing">
  <select name="address_id" style="width: 100%; margin-bottom: 15px;" size="5">
    <?php foreach ($addresses as $address) { ?>
    <?php if ($address['address_id'] == $address_id) { ?>
    <option value="<?php echo $address['address_id']; ?>" selected="selected"><?php echo $address['firstname']; ?> <?php echo $address['lastname']; ?>, <?php echo $address['address_1']; ?>, <?php echo $address['city']; ?>, <?php echo $address['zone']; ?>, <?php echo $address['country']; ?></option>
    <?php } else { ?>
    <option value="<?php echo $address['address_id']; ?>"><?php echo $address['firstname']; ?> <?php echo $address['lastname']; ?>, <?php echo $address['address_1']; ?>, <?php echo $address['city']; ?>, <?php echo $address['zone']; ?>, <?php echo $address['country']; ?></option>
    <?php } ?>
    <?php } ?>
  </select>
</div>
<p>
  <input type="radio" name="payment_address" value="new" id="payment-address-new" />
  <label for="payment-address-new"><?php echo $text_address_new; ?></label>
</p>
<?php } ?>
<div id="payment-new" style="display: <?php echo ($addresses ? 'none' : 'block'); ?>;">
  <table class="form">
    <tr>
      <td><span class="required">*</span> <?php echo $entry_firstname; ?></td>
      <td><input type="text" name="firstname" value="" class="large-field" /></td>
    </tr>
    <tr>
      <td><span class="required">*</span> <?php echo $entry_lastname; ?></td>
      <td><input type="text" name="lastname" value="" class="large-field" /></td>
    </tr>
    <tr>
      <td><?php echo $entry_company; ?></td>
      <td><input type="text" name="company" value="" class="large-field" /></td>
    </tr>
    <?php if ($company_id_display) { ?>
    <tr>
      <td><?php if ($company_id_required) { ?>
        <span class="required">*</span>
        <?php } ?>
        <?php echo $entry_company_id; ?></td>
      <td><input type="text" name="company_id" value="" class="large-field" /></td>
    </tr>
    <?php } ?>
    <?php if ($tax_id_display) { ?>
    <tr>
      <td><?php if ($tax_id_required) { ?>
        <span class="required">*</span>
        <?php } ?>
        <?php echo $entry_tax_id; ?></td>
      <td><input type="text" name="tax_id" value="" class="large-field" /></td>
    </tr>
    <?php } ?>
    <tr>
      <td><span class="required">*</span> <?php echo $entry_address_1; ?></td>
      <td><input type="text" name="address_1" value="" class="large-field" /></td>
    </tr>
    <tr>
      <td><?php echo $entry_address_2; ?></td>
      <td><input type="text" name="address_2" value="" class="large-field" /></td>
    </tr>
    <tr>
      <td><span class="required">*</span> <?php echo $entry_city; ?></td>
      <td><input type="text" name="city" value="" class="large-field" /></td>
    </tr>
    <tr>
      <td><span id="payment-postcode-required" class="required">*</span> <?php echo $entry_postcode; ?></td>
      <td><input type="text" name="postcode" value="" class="large-field" /></td>
    </tr>
    <tr>
      <td><span class="required">*</span> <?php echo $entry_country; ?></td>
      <td><select name="country_id" class="large-field">
          <option value=""><?php echo $text_select; ?></option>
          <?php foreach ($countries as $country) { ?>
          <?php if ($country['country_id'] == $country_id) { ?>
          <option value="<?php echo $country['country_id']; ?>" selected="selected"><?php echo $country['name']; ?></option>
          <?php } else { ?>
          <option value="<?php echo $country['country_id']; ?>"><?php echo $country['name']; ?></option>
          <?php } ?>
          <?php } ?>
        </select></td>
    </tr>
    <tr>
      <td><span class="required">*</span> <?php echo $entry_zone; ?></td>
      <td><select name="zone_id" class="large-field">
        </select></td>
    </tr>
  </table>
</div>
<br />
<div class="buttons">
  <div class="right">
    <input type="button" value="<?php echo $button_continue; ?>" id="button-payment-address" class="button" />
  </div>
</div>
<script type="text/javascript"><!--
$('#payment-address input[name=\'payment_address\']').live('change', function() {
	if (this.value == 'new') {
		$('#payment-existing').hide();
		$('#payment-new').show();
	} else {
		$('#payment-existing').show();
		$('#payment-new').hide();
	}
});
//--></script> 
<script type="text/javascript"><!--
$('#payment-address select[name=\'country_id\']').bind('change', function() {
	if (this.value == '') return;
	$.ajax({
		url: 'index.php?route=checkout/checkout/country&country_id=' + this.value,
		dataType: 'json',
		beforeSend: function() {
			$('#payment-address select[name=\'country_id\']').after('<span class="wait">&nbsp;<img src="catalog/view/theme/default/image/loading.gif" alt="" /></span>');
		},
		complete: function() {
			$('.wait').remove();
		},			
		success: function(json) {
			if (json['postcode_required'] == '1') {
				$('#payment-postcode-required').show();
			} else {
				$('#payment-postcode-required').hide();
			}
			
			html = '<option value=""><?php echo $text_select; ?></option>';
			
			if (json['zone'] != '') {
				for (i = 0; i < json['zone'].length; i++) {
        			html += '<option value="' + json['zone'][i]['zone_id'] + '"';
	    			
					if (json['zone'][i]['zone_id'] == '<?php echo $zone_id; ?>') {
	      				html += ' selected="selected"';
	    			}
	
	    			html += '>' + json['zone'][i]['name'] + '</option>';
				}
			} else {
				html += '<option value="0" selected="selected"><?php echo $text_none; ?></option>';
			}
			
			$('#payment-address select[name=\'zone_id\']').html(html);
		},
		error: function(xhr, ajaxOptions, thrownError) {
			alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
		}
	});
});

$('#payment-address select[name=\'country_id\']').trigger('change');
//--></script>

Line 144 is

Code: Select all

}
Line 149 is

Code: Select all

//--></script>

Active Member

Posts

Joined
Fri Feb 12, 2010 7:17 am

Post by butte » Sun Aug 11, 2013 1:47 pm

However the line counts lay out, these are the lines where it's picking up what is not defined (144-149, sole instances of the two terms, $company_id_display and $entry_company_id):

<?php if ($company_id_display) { ?>
<tr>
<td><?php if ($company_id_required) { ?>
<span class="required">*</span>
<?php } ?>
<?php echo $entry_company_id; ?></td>

Sleep on it . . .

Guru Member

Posts

Joined
Wed Mar 20, 2013 6:58 am

Post by rassalas » Tue Aug 27, 2013 9:10 am

I am having a similar if not the same problem. I recently upgraded to ver 1.5.5.1 and I keep getting an error when I test my checkout process. the error log describes an undefined index, customer_id_Display and Tax_id_display.

I check my Payment address.php and the lines in question look like this:

Code: Select all

						// Company ID
						if ($customer_group_info['company_id_display'] && $customer_group_info['company_id_required'] && !$address_info['company_id']) {
							$json['error']['warning'] = $this->language->get('error_company_id');
						}					
						
						// Tax ID
						if ($customer_group_info['tax_id_display'] && $customer_group_info['tax_id_required'] && !$address_info['tax_id']) {
							$json['error']['warning'] = $this->language->get('error_tax_id');
						}
I'm looking at the double & symbols suspiciously but I see that elsewhere in the file and no problems with that it seems.
any help appreciated.

Newbie

Posts

Joined
Tue Aug 27, 2013 9:05 am

Post by butte » Wed Aug 28, 2013 6:01 am

rassalas, is yours catalog\controller\checkout\payment_address.php or catalog\model\checkout\payment_address.php? Compare it to visnetmedia's payment_address.php above.

Guru Member

Posts

Joined
Wed Mar 20, 2013 6:58 am

Post by rassalas » Wed Aug 28, 2013 7:42 am

butte wrote:rassalas, is yours catalog\controller\checkout\payment_address.php or catalog\model\checkout\payment_address.php? Compare it to visnetmedia's payment_address.php above.
That code was from the first, -> Catalog\controller\checkout\payment_address.php

What Visnet posted looks like something else. Perhaps he's stuck on the second option you mention.
In any case anyone know what's wrong?

Newbie

Posts

Joined
Tue Aug 27, 2013 9:05 am

Post by visnetmedia » Fri Aug 30, 2013 2:39 pm

Hi sorry I started from scratch with no mods or vqmods as no matter what I was doing wasn't changing the errors. It wasn't until I put in the vqmod Paypal Decimal Tax Fix that the errors popped up again so I removed it and I haven't had a problem with that so far..... not sure if that helps anybody.

Active Member

Posts

Joined
Fri Feb 12, 2010 7:17 am

Post by butte » Sat Aug 31, 2013 2:49 am

It actually does help, visnetmedia. When you're sure it stays fixed, go ahead and mark your opening title Solved to flag it for others.

Guru Member

Posts

Joined
Wed Mar 20, 2013 6:58 am

Post by rassalas » Mon Sep 02, 2013 5:50 am

visnetmedia wrote:Hi sorry I started from scratch with no mods or vqmods as no matter what I was doing wasn't changing the errors. It wasn't until I put in the vqmod Paypal Decimal Tax Fix that the errors popped up again so I removed it and I haven't had a problem with that so far..... not sure if that helps anybody.

VisnetMedia, Can you elaborate more? I don't remember ever doing the paypal decimal tax fix VQMod, perhaps I got put in when I tried to upgrade. Still I'm kind of lost how to undo the fix.

Newbie

Posts

Joined
Tue Aug 27, 2013 9:05 am

Post by butte » Mon Sep 02, 2013 8:10 am

If you have that one, rassalas, it will probably be recognizable by name in your /vqmod/xml/ directory. If it consists of just a single .xml file (as many vqmod extensions do), then you can slip it into a setaside/ subdirectory or just keep a copy and delete it on the server. (You don't want just to rename it, it would still be active under its new name.)

If you make that change, you may need to empty your /vqmod/vqcache/ so that the system is not playing with old files for apparent speed (that's essentially what caches are for).

Guru Member

Posts

Joined
Wed Mar 20, 2013 6:58 am

Post by rassalas » Mon Sep 02, 2013 9:05 am

butte wrote:If you have that one, rassalas, it will probably be recognizable by name in your /vqmod/xml/ directory. If it consists of just a single .xml file (as many vqmod extensions do), then you can slip it into a setaside/ subdirectory or just keep a copy and delete it on the server. (You don't want just to rename it, it would still be active under its new name.)

If you make that change, you may need to empty your /vqmod/vqcache/ so that the system is not playing with old files for apparent speed (that's essentially what caches are for).

I'm really not sure we're really talking about my problem, I'm having issues with Company_Id_display and Tax_id_display, but it's in the catalog/controller/checkout directory. I looked into the database tonight with MyPhp, and didn't even find a Tax_id nor Company_id.

Newbie

Posts

Joined
Tue Aug 27, 2013 9:05 am

Post by butte » Mon Sep 02, 2013 9:42 am

rassalas, I responded to your, "don't remember ever doing the paypal decimal tax fix VQMod, perhaps I got put in when I tried to upgrade," when you hadn't yet mentioned the two IDs. A simple "search" using phpMyAdmin isn't as simple as looking for those with a text editor. If you draw down either a phpMyAdmin Export or an OC admin Settings / Backup, both will come down as .sql, then open that with an ordinary text editor, you can use "find" to zero in on whether there is even one company_id or tax_id in it. If none, then they would need to be inserted from known a good source or by hand. If you need to rename it in order to make the editor open it (owing either to the editor or to the operating system "edit" settings), then just tack on .txt, such as backupdatedwhen.sql.txt and open that.

Guru Member

Posts

Joined
Wed Mar 20, 2013 6:58 am
Who is online

Users browsing this forum: No registered users and 16 guests