Post by philbydevil » Wed Jul 25, 2012 1:13 pm

I'm going to attempt to do the mod I mentioned above myself (making the register part hidden until the customer clicks on a radio/checkbox), as I haven't heard back from Q, who is probably busy changing extension code for Shoppica themes ;). Can someone please briefly explain what code I need to hide/show tables.

This is what I see in the shipping area where the fields are hidden until you check the box:

Code: Select all

          <table>
            <tr>
              <td width="100%">
			    <?php if ($shipping_indicator) { ?>
      		    <input style="vertical-align: middle;" type="checkbox" value="1" checked="checked" onchange="(this.checked) ? $('#shippingAddress').slideDown('fast') : $('#shippingAddress').slideUp('fast');" name="shipping_indicator" id="shipping_indicator" style="margin: 15px 5px 20px 5px;" /><label for="shipping_indicator"><span style="vertical-align: middle;"><?php echo $text_indicator; ?></span></label>
      			<?php } else { ?>
        		<input style="vertical-align: middle;" type="checkbox" value="1" onclick="(this.checked) ? $('#shippingAddress').slideDown('fast') : $('#shippingAddress').slideUp('fast');" name="shipping_indicator" id="shipping_indicator" style="margin: 15px 5px 20px 5px;" /><label for="shipping_indicator"><?php echo $text_indicator; ?></label>
      			<?php } ?>
              </td>
            </tr>
          </table>
          <table class="register-form" id="shippingAddress" style="<?php if (!$shipping_indicator) { ?>display:none<?php } ?>">
So, could I make it something like this:

Code: Select all

          <table>
            <tr>
              <td width="100%">
			    <?php if ($register_indicator) { ?>
      		    <input style="vertical-align: middle;" type="checkbox" value="1" checked="checked" onchange="(this.checked) ? $('#registerAccount').slideDown('fast') : $('#registerAccount').slideUp('fast');" name="register_indicator" id="register_indicator" style="margin: 15px 5px 20px 5px;" /><label for="register_indicator"><span style="vertical-align: middle;"><?php echo $text_register_indicator; ?></span></label>
      			<?php } else { ?>
        		<input style="vertical-align: middle;" type="checkbox" value="1" onclick="(this.checked) ? $('#registerAccount').slideDown('fast') : $('#registerAccount').slideUp('fast');" name="register_indicator" id="register_indicator" style="margin: 15px 5px 20px 5px;" /><label for="register_indicator"><?php echo $text_register_indicator; ?></label>
      			<?php } ?>
              </td>
            </tr>
          </table>
          <table class="register-form" id="registerAccount" style="<?php if (!$register_indicator) { ?>display:none<?php } ?>">
Or is my approach of just changing the labels not going to work? Do I have to look at the controller files at all?

Thanks.

I heart cmd-f, cmd-c, cmd-v, cmd-z + vQmod.
My favourite page...
v1.5.4.1


User avatar
Active Member

Posts

Joined
Fri Dec 03, 2010 5:20 am

Post by philbydevil » Wed Jul 25, 2012 4:56 pm

Yep, it seems to work: https://www.hahana.com.au/index.php?rou ... eckout_one

Just got to clean things up a bit....

I heart cmd-f, cmd-c, cmd-v, cmd-z + vQmod.
My favourite page...
v1.5.4.1


User avatar
Active Member

Posts

Joined
Fri Dec 03, 2010 5:20 am

Post by philbydevil » Wed Jul 25, 2012 10:10 pm

Q - I have answered most of the questions I asked you via PM....

I do have another one though. On my default "Register" page this shows with a checkbox:
I have read and agree to the Privacy Policy
But when I copy the code that controls this over to checkout_one.tpl, this shows (still with the checkbox):
I have read and agree to the %s
I'm sure I've done this before, but how do I change the %s to Privacy Policy? Do I have to add some code to the controller?

FIXED:
Added this to the controller:

Code: Select all

		if ($this->config->get('config_account_id')) {
			$this->load->model('catalog/information');
			
			$information_info = $this->model_catalog_information->getInformation($this->config->get('config_account_id'));
			
			if ($information_info) {
				$this->data['text_agree'] = sprintf($this->language->get('text_agree'), $this->url->link('information/information/info', 'information_id=' . $this->config->get('config_account_id'), 'SSL'), $information_info['title'], $information_info['title']);
			} else {
				$this->data['text_agree'] = '';
			}
		} else {
			$this->data['text_agree'] = '';
		}
		
		if (isset($this->request->post['agree'])) {
      		$this->data['agree'] = $this->request->post['agree'];
		} else {
			$this->data['agree'] = false;
		}

I heart cmd-f, cmd-c, cmd-v, cmd-z + vQmod.
My favourite page...
v1.5.4.1


User avatar
Active Member

Posts

Joined
Fri Dec 03, 2010 5:20 am

Post by philbydevil » Thu Jul 26, 2012 6:42 am

Final problem/s:

If a customer is registering an account, and doesn't fill in a required field before clicking "Continue", the page reloads with the form hidden again.

You can test this by going to https://www.hahana.com.au/index.php?rou ... eckout_one and selecting the "Express Checkout" box, and then just clicking on "Continue" (without filling in any details).

Maybe part of the same problem... since I added the extra checkbox to hide the billing address, captcha, etc, I'm getting these errors in my log:

Code: Select all

Undefined variable: register_indicator in /catalog/view/theme/default/template/checkout/checkout_one.tpl on line 47
Undefined variable: text_register_indicator in /catalog/view/theme/default/template/checkout/checkout_one.tpl on line 50
Undefined variable: register_indicator in /catalog/view/theme/default/template/checkout/checkout_one.tpl on line 77
I know some code need to be added to the controller but not sure what?

There's also this error, which I don't think is related:

Code: Select all

Undefined index:  error_warning in /vqmod/vqcache/vq2-catalog_controller_checkout_cart.php on line 399
Modified checkout_one.tpl is attached and controller file.

I heart cmd-f, cmd-c, cmd-v, cmd-z + vQmod.
My favourite page...
v1.5.4.1


User avatar
Active Member

Posts

Joined
Fri Dec 03, 2010 5:20 am

Post by Qphoria » Thu Jul 26, 2012 7:03 am

Please do not post my commercial code in a public forum

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by philbydevil » Thu Jul 26, 2012 7:31 am

Ok, sorry. Did you get the files though and are you able to help me with the problems/errors?

I heart cmd-f, cmd-c, cmd-v, cmd-z + vQmod.
My favourite page...
v1.5.4.1


User avatar
Active Member

Posts

Joined
Fri Dec 03, 2010 5:20 am

Post by philbydevil » Thu Jul 26, 2012 9:39 am

I've fixed the errors in the error log.

Just need help with this one, thanks:
If a customer is registering an account, and doesn't fill in a required field before clicking "Continue", the page reloads with the form hidden again.

You can test this by going to https://www.hahana.com.au/index.php?rou ... eckout_one and selecting the "Express Checkout" box, and then just clicking on "Continue" (without filling in any details).

I heart cmd-f, cmd-c, cmd-v, cmd-z + vQmod.
My favourite page...
v1.5.4.1


User avatar
Active Member

Posts

Joined
Fri Dec 03, 2010 5:20 am

Post by Qphoria » Fri Jul 27, 2012 2:33 am

philbydevil wrote:I've fixed the errors in the error log.

Just need help with this one, thanks:
If a customer is registering an account, and doesn't fill in a required field before clicking "Continue", the page reloads with the form hidden again.

You can test this by going to https://www.hahana.com.au/index.php?rou ... eckout_one and selecting the "Express Checkout" box, and then just clicking on "Continue" (without filling in any details).
Easiest solution would be to set that checkbox based on whether or not the payment_firstname was entered. If it was entered, then you know the form was loaded already and there is data there.

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by philbydevil » Fri Jul 27, 2012 6:21 am

And we do that with some sort of javascript right?

The only example I've been able to find is this:

Code: Select all

//--></script>
<script type="text/javascript"><!--
function SetCB(formID,textboxID,checkboxID)
{
var FormObject=document.forms[formID];
var CBObject=FormObject.elements[checkboxID];
if(FormObject.elements[textboxID].value!='')
CBObject.checked=true;
else
CBObject.checked=false;
return true;
}
</script>

<form name="myform">
<table>
<tr>
<td><input type="text" name="textbox1"
onBlur="SetCB('myform','textbox1','checkbox1');">< /td>
<td><input type="checkbox" name="checkbox1" value="true"></td>
</tr>
<tr>
<td><input type="text" name="textbox2"
onBlur="SetCB('myform','textbox2','checkbox2');">< /td>
<td><input type="checkbox" name="checkbox2" value="true"></td>
</tr>
<tr>
<td><input type="text" name="textbox3"
onBlur="SetCB('myform','textbox3','checkbox3');">< /td>
<td><input type="checkbox" name="checkbox3" value="true"></td>
</tr>
</table>
</form>
It's from: http://www.highdots.com/forums/javascri ... 30631.html

Is this along the right track? If so, how would I modify this for my needs?

Code: Select all

<div id="content"><?php echo $content_top; ?>
  <h1><?php echo $heading_title; ?></h1>
    <?php if ($error_warning) { ?>
    <div class="warning"><?php echo $error_warning; ?></div>
    <?php } ?>


<table width="100%">
<tr><td width="60%" valign="top">
  <h2><?php echo $text_new_customer; ?></h2>
  <p><b><br /><?php if ($register_indicator) { ?>
                <input style="vertical-align: middle;" type="checkbox" value="1" checked="checked" onchange="(this.checked) ? $('#registerAccount').slideDown('fast') : $('#registerAccount').slideUp('fast');" name="register_indicator" id="register_indicator" style="margin: 15px 5px 20px 5px;" /><label for="register_indicator"><span style="vertical-align: middle;"></span></label>
               <?php } else { ?>
              <input style="vertical-align: middle;" type="checkbox" value="1" onclick="(this.checked) ? $('#registerAccount').slideDown('fast') : $('#registerAccount').slideUp('fast');" name="register_indicator" id="register_indicator" style="margin: 15px 5px 20px 5px;" /><label for="register_indicator"></label>
               <?php } ?>&nbspExpress Checkout</b></p>
  <p><?php echo $text_checkout_one_express; ?></p><br>
</td>
<td width="10%"></td>
<!-- LOGIN FORM -->
<td width="30%" valign="top">
  <h2><?php echo $text_returning_customer; ?></h2>
<p></p>
<form action="<?php echo str_replace('&', '&', $action); ?>" method="post" enctype="multipart/form-data" id="login">
  <b><?php echo $entry_email; ?></b><br /><input type="text" name="email_login" /><br /><br />
<b><?php echo $entry_password; ?></b><br /><input type="password" name="password_login" /><br />
<a href="<?php echo str_replace('&', '&', $forgotten); ?>"><?php echo $text_forgotten_password; ?></a><br /><br />
		<div class="button">
          <div class="right" style="text-align:right;"><a onclick="$('#login').submit();" class="button"><span><?php echo $button_login; ?></span></a></div>
        </div>
      </div>

      <?php if ($redirect) { ?>
      <input type="hidden" name="redirect" value="<?php echo str_replace('&', '&', $redirect); ?>" />
      <?php } ?>

    </form>
    <!-- LOGIN FORM -->
</td></tr>
</table>

<table class="register-form" id="registerAccount" style="<?php if (!$register_indicator) { ?>display:none<?php } ?>">
<tr><td width="50%" valign="top">

    <div class="left">
      <!-- BILLING FORM -->
      <form action="<?php echo $action; ?>" method="post" enctype="multipart/form-data" id="register">
        <b style="margin-bottom: 2px; display: block;"><?php echo $text_billing_address; ?></b>
        <div class="content">
          <table class="register-form">
            <tr>
              <td width="30%"><span class="required">*</span> <?php echo $entry_firstname; ?></td>
              <td><input type="text" name="firstname" value="<?php echo $firstname; ?>" />
                <?php if ($error_firstname) { ?>
                <span class="error"><?php echo $error_firstname; ?></span>
                <?php } ?></td>
            </tr>
            <tr>

I heart cmd-f, cmd-c, cmd-v, cmd-z + vQmod.
My favourite page...
v1.5.4.1


User avatar
Active Member

Posts

Joined
Fri Dec 03, 2010 5:20 am

Post by Qphoria » Fri Jul 27, 2012 8:25 am

No. There is no Javascript involved with that. That is simple a php form variable.

Sent from my SPH-D710 using Tapatalk 2

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by philbydevil » Fri Jul 27, 2012 10:01 am

Qphoria wrote:No. There is no Javascript involved with that. That is simple a php form variable.
Ok, great. And could you please help me with the code?

I heart cmd-f, cmd-c, cmd-v, cmd-z + vQmod.
My favourite page...
v1.5.4.1


User avatar
Active Member

Posts

Joined
Fri Dec 03, 2010 5:20 am

Post by philbydevil » Mon Jul 30, 2012 1:00 pm

OnNets wrote:Hi Q,

Is there any way after login, if the cart is empty, the customer redirect to account page instead of shopping cart?
I would like to know this too. I have guest checkout turned off, so customers visit checkout_one for two reasons:
1. to create an account (cart usually empty)
2. to start the checkout process (items in cart)

So, if the customer's cart is empty, how can we make the "Continue" button redirect them to the main account page (index.php?route=account/account)?

If there are products in the cart, the continue button should redirect to checkout_two (as it already does).

I guess it would get good for the "Login" button to function the same, but it's not as important for me.

Thanks.

I heart cmd-f, cmd-c, cmd-v, cmd-z + vQmod.
My favourite page...
v1.5.4.1


User avatar
Active Member

Posts

Joined
Fri Dec 03, 2010 5:20 am

Post by TToc » Mon Oct 01, 2012 10:52 pm

Hi Qphoria, could you possibly tell me if your Uber checkout extension is compatible with the Google Analytics Expert extension by Spitos? I'm currently using this in my site, but I'm looking to implement an easier checkout solution, but I'd like to make sure that I can still track the customer experience, cart abandonment etc via the Google analystics extension.

Many thanks.

New member

Posts

Joined
Mon Jun 25, 2012 9:45 pm

Post by Qphoria » Mon Oct 01, 2012 10:54 pm

TToc wrote:Hi Qphoria, could you possibly tell me if your Uber checkout extension is compatible with the Google Analytics Expert extension by Spitos? I'm currently using this in my site, but I'm looking to implement an easier checkout solution, but I'd like to make sure that I can still track the customer experience, cart abandonment etc via the Google analystics extension.

Many thanks.
Never used the mod, but assuming it uses either the model confirm() function or the checkout success page... both of those are unchanged by my mod so it should work the same

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by TToc » Mon Oct 01, 2012 11:01 pm

Thanks for the fast reply. I'm honestly not sure what methods it uses as I'm not really a coder. But I know it tracks the stages through the checkout procedure as a goal funnel in google analytics so you can see at which point a customer abandons the process, I'm wondering how this would function with a fast checkout solution such as yours.

New member

Posts

Joined
Mon Jun 25, 2012 9:45 pm

Post by Qphoria » Mon Oct 01, 2012 11:06 pm

TToc wrote:Thanks for the fast reply. I'm honestly not sure what methods it uses as I'm not really a coder. But I know it tracks the stages through the checkout procedure as a goal funnel in google analytics so you can see at which point a customer abandons the process, I'm wondering how this would function with a fast checkout solution such as yours.
Well as it only has 2 steps.. I'd guess that pretty much makes it not all that useful for much other than the success page result to see who started and who finished

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by TToc » Mon Oct 01, 2012 11:12 pm

Thats fine actually, as long as we can continue to track those stages that would be ok. Thanks :)

New member

Posts

Joined
Mon Jun 25, 2012 9:45 pm

Post by TToc » Tue Oct 02, 2012 11:55 pm

Hi Qphoria, I purchased your checkout and I'm very pleased with its results. Thanks for writing it! I do however have one question thats got me stumped, since I installed it, whenever a customer places an order - and registers an account - the email address assigned to the shop receives an email which looks like its intended for the customer saying 'Thank you for registering' Including their login details in the email.

I know that this is an option which you can enable in System -> Settings -> Mail -> New Account Alert Mail

But this is option is set to off, and it only started happening after I installed the new checkout, I couldn't see any options about this in the controls for the checkout, do you have any idea why this might be happening?

I'm using OpenCart 1.5.2.1

Thanks! :)

New member

Posts

Joined
Mon Jun 25, 2012 9:45 pm

Post by Qphoria » Thu Oct 04, 2012 2:23 am

TToc wrote:Hi Qphoria, I purchased your checkout and I'm very pleased with its results. Thanks for writing it! I do however have one question thats got me stumped, since I installed it, whenever a customer places an order - and registers an account - the email address assigned to the shop receives an email which looks like its intended for the customer saying 'Thank you for registering' Including their login details in the email.

I know that this is an option which you can enable in System -> Settings -> Mail -> New Account Alert Mail

But this is option is set to off, and it only started happening after I installed the new checkout, I couldn't see any options about this in the controls for the checkout, do you have any idea why this might be happening?

I'm using OpenCart 1.5.2.1

Thanks! :)
This is fixed in the next version.

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by TToc » Fri Oct 05, 2012 10:06 pm

Ok, thanks :)

New member

Posts

Joined
Mon Jun 25, 2012 9:45 pm
Who is online

Users browsing this forum: No registered users and 177 guests