Jump to content
Dr. Rolex

jQuery/Ajax Fast checkout/Login/Create account/Shopping Cart/Bootstrap MATC 2.3.3

Recommended Posts

Dr.Rolex: I tried your code and based on that I fixed mine. I will do some tests. Thank you!.

 

I have just few questions:

 

1. I think this line is already obsolete in form_check.js.php, right? Object "selected" is nowhere used.

 

if (selected) selected.className = 'moduleRow';

 

2. I didn't change anything in ajaxManagerTest.class.php but I see your code is already using tables and not divs. So I have adapted form_check.js.php this way:

 

$('body').on('click', '.moduleRow', function(event){
$(this).parent().find('div').removeClass('moduleRowSelected');
$(this).parent().find('input[type=radio]').attr('checked',false);
$(this).addClass('moduleRowSelected');
$(this).find('input[type=radio]').prop('checked',true);
....

 

3. How exactly are you naming values of radio buttons?

 

If you name one radio button shipping_0 and then you name another one payment_0, clicking on shipping_0 will affect also radio button in payment area (also payment_0 will be clicked, because of that "0" in name). This is because of form_check.js.php code. I thought about solution to have global $radio_buttons variable and just increase it through all radio buttons. At the end I change code in form_check.js.php. This is full click function:

 

 

$('body').on('click', '.moduleRow', function(event){
$(this).parent().find('div').removeClass('moduleRowSelected');
$(this).parent().find('input[type=radio]').attr('checked',false);
$(this).addClass('moduleRowSelected');
$(this).find('input[type=radio]').prop('checked',true);

buttonselect = $(this).attr('value');

var selectable = $(this).find('input[type=radio]').prop('id');

// one button is not an array
var shipping = document.getElementById('shipping');
if (shipping)
{
	 shipping.checked=true;
}

if (selectable.search("shipping_") == 0)
{
	 selected_shipping = buttonselect;
}

if (selectable.search("address_") == 0)
{
	 selected_address = buttonselect;
}

if (selectable.search("payment_") == 0)
{
	 selected_payment = buttonselect;
}

if (selectable.search("payment_address_") == 0)
{
	 selected_payment_address = buttonselect;
}

});

 

thanks

Edited by HuffYk

Share this post


Link to post
Share on other sites

btw. the code is cleaner using JQuery but I still don't know how to set default :). $(document).ready(function(){ is called too soon. Is there something as ?

 

$('body').on('ItemLoaded', 'itemLocatedAtTheBottomOfPage', function(event){

Share this post


Link to post
Share on other sites

Hi

 

First of all : Many thanks for this contrib. I'm working on Os 2.3

 

I think I'm stupid girl : I've 2 little problem and I've search the whole day but solutions doesn't come....

 

Problem 1 : design

Problem 2 : continue button is not on the page.

 

shopping cart is OK, I can edit adresses... all other fonctionality are perfect.

 

enclose a print screen

 

thanks for your help

probleme_contrib.doc

Share this post


Link to post
Share on other sites

I was able to do defaults at last... I used hidden img tag with onload script which set all javascript variables correctly. Now I'm fighting with another problem. I built into this package dependency between shipping and payment modules. When shipping and payment modules are in edit mode, visibility is working fine (it means payment modules which should not be allowed for specific shipping module are now correctly disabled). However I need to fix "update" part - it means when shipping method is selected and also payment method is selected, I have to correct behavior after clicking on "update" buttons. It means when I click update on shipping module, also payment module has to go to edit mode because of possible dependency changes. And if clicking update on payment module, it has to show only dependant modules:

 

1. regarding update of payment modules, I might be able to fix it - I have already idea how to do it.

2. regarding update of shipping modules I have problem. I tried to change refreshshipping this way:

 

function ajaxRefreshShipping(async) {

ajaxSendRequest('ajaxAction=showShipping',ajaxUpdateContentMulti,true,'shipping_area', async);

ajaxSendRequest('ajaxAction=showPayment',ajaxUpdateContentMulti,true,'payment_area', async);

return false;

}

 

but it is not working. I was looking for solution but so far without luck:(. How can I enable for editing shipping and also payment areas?

Share this post


Link to post
Share on other sites

OK I solved both problems. The 2nd one I solved with calling async false:

 

function ajaxRefreshShipping(async) {

ajaxSendRequest('ajaxAction=showShipping',ajaxUpdateContentMulti,true,'shipping_area', false);

ajaxSendRequest('ajaxAction=showPayment',ajaxUpdateContentMulti,true,'payment_area', async);

return false;

}

Edited by HuffYk

Share this post


Link to post
Share on other sites

OK I solved both problems. The 2nd one I solved with calling async false:

 

function ajaxRefreshShipping(async) {

ajaxSendRequest('ajaxAction=showShipping',ajaxUpdateContentMulti,true,'shipping_area', false);

ajaxSendRequest('ajaxAction=showPayment',ajaxUpdateContentMulti,true,'payment_area', async);

return false;

}

Glad you finally made it work, however, perhaps it would have been easier to have used the built in functions like this:

ajaxRefreshShipping(false);

 

It's a lot of code to entangle oneself into.. Not so easy to find where to look and easy to get completely mad after hours of sleepless coding and still no luck in solving whatever problem one might have. Ha ha..

 

Have completely started all over again, Will the above be fully compatible with V2.3.3.4 in other words straight over write of files.

It should work, I can't see anything interfering with the code after upgrading to V2.3.3.4.

 

 

1. I think this line is already obsolete in form_check.js.php, right? Object "selected" is nowhere used.

Yes, you can probably remove it.

 

2. I didn't change anything in ajaxManagerTest.class.php but I see your code is already using tables and not divs. So I have adapted form_check.js.php this way:

Actually, the original code used tables, I made an effort to convert it to div's after reading comments from people ravaging over how bad it was to use tables. Today, I know better and don't listen to those overzealous animals. :P

 

3. How exactly are you naming values of radio buttons?

 

Well, you can do it in many ways, but the currently used method is simply first to set an "iterator variable" to 0 with:

$radio_buttons = 0;

 

and then add 1 to it (while in the loop) with:

$radio_buttons++;

 

So with the following code the value for the first button will be 0 and the next button will have 1 as value:

value="' . $radio_buttons . '"

 

If you name one radio button shipping_0 and then you name another one payment_0, clicking on shipping_0 will affect also radio button in payment area (also payment_0 will be clicked, because of that "0" in name). This is because of form_check.js.php code. I thought about solution to have global $radio_buttons variable and just increase it through all radio buttons. At the end I change code in form_check.js.php. This is full click function:

 

This shouldn't happen. But you did figure it out, right?

Otherwise you could simply try changing the $radio_buttons to start with different numbers, changing one of them to:

 

$radio_buttons = 100;

 

btw. the code is cleaner using JQuery but I still don't know how to set default :). $(document).ready(function(){ is called too soon. Is there something as ?

...

I was able to do defaults at last... I used hidden img tag with onload script which set all javascript variables correctly.

 

Hidden img tag with onload event isn't a pretty solution, but if it works it work. :D

I'm not sure I understand what you mean by setting the defaults? You mean which radio button that shold be checked as default?

This is not done with jQuery, it's coded in the PHP, here for example:

 

<?php
	 // set the radio button to be checked if it is the method chosen
	 $checked = false;
	 $checked = (($selection[$i]['id'] == (isset($payment) ? $payment : '')) ? true : false);
	 if ($payment == null && $i == 0) $checked = true;[/font][/font]
[font=verdana,geneva,sans-serif]		 if (!isset($payment) && $i == 0) $checked = true;
	 if ( ($checked == true) || ($n == 1) ) {
	 echo '				 <tr class="moduleRow moduleRowSelected" value="' . $radio_buttons . '">' . "\n";
	 } else {
	 echo '				 <tr class="moduleRow" value="' . $radio_buttons . '">' . "\n";
	 }
	 ?>

 

I realize the last post is almost a month old so maybe you have solved your problems, but I'll try to answer the rest of you tomorrow.

Share this post


Link to post
Share on other sites

Hi

 

By setting defaults I meant setting default payment and shipping. I coded dependency between shipping and payment (each shipping method has list of allowed payment methods - it is currently hard coded but it works :) ). So I had to find out the way to control default values to not break dependency rules. I was able to fix php code, but problem was javascript defaults stored in variables selected_shipping and selected_payment. These were always zero and only clicking on radio button set them correctly. So when I for example didn't click any radio button and just clicked "update" button, always shipping and payment with index 0 was taken. Thanks to hidden img hack I was able set correct values also in javascript :)

 

My next problem now is this:

 

I have created shopping cart box in header and need to update its quantity and total price. This I was able to do just with changing IDs and classes of some objects. However one thing is still open - in header I have information text which is stating something like this "Buy more for 23 EUR and get another 6% discount". Of course I have to update this text when total in cart changes. So now I'm looking for place to fix this :) My guess is jquery-oscart.js from where I got also those IDs and classes :)

Share this post


Link to post
Share on other sites

I have created shopping cart box in header and need to update its quantity and total price. This I was able to do just with changing IDs and classes of some objects. However one thing is still open - in header I have information text which is stating something like this "Buy more for 23 EUR and get another 6% discount". Of course I have to update this text when total in cart changes. So now I'm looking for place to fix this :) My guess is jquery-oscart.js from where I got also those IDs and classes :)

 

You could try with adding the code that displays that text in includes/modules/boxes/bm_shopping_cart.php, find this around line 92

if ( isset($_GET['updateCart']) && (int)$_GET['ajax']  )
  {
  $cart_contents_string .= '<div id="shopping_cart_box">' . [YOUR CODE HERE] . '</div>';
   echo $cart_contents_string;
   die ;
  }

 

Then in ajax/javascript/ajaxManager.js replace the updateCart function to something like this:

$.fn.updateCart = function() {
// Updating cart total
//
 $.ajax({
  type: 'POST',
  url: encodeURI($('form[name=boxcart_quantity]').attr('action')) + '&updateCart=1&ajax=1',
  beforeSend: function() {
   showLoading('shoppingCart');
  },
  success: function(data) {
   var span_cart_box = $( data ).closest( "#span_cart_box" ),
  shopping_cart_box = $( data ).closest( "#shopping_cart_box" );
   $('#span_cart_box').replaceWith( span_cart_box );
   $('#shopping_cart_box').replaceWith( shopping_cart_box );
  },
  complete: function() {
   $('#overlay').remove();
  }
 });
 return(false);
}

 

Make sure that the element that contains the "Buy more ..." text has the same ID (in the example I have used shopping_cart_box), so jQuery knows where to put it.

Share this post


Link to post
Share on other sites

Hi

 

how exactly is controlled order of boxes? I understand code for boxes is in relevant functions in ajaxManagerTest.class.php as showPaymentInfo, showChangeAddress and all other show... functions, but where exactly is code which defines what is order of these function calls? I was not able to find it :). Also if I would like to have login box in shipping_area and create account in "payment_area" how to do it? :). I tried to change this in several places and without luck

 

thanks

Share this post


Link to post
Share on other sites

I think I found the answer for both questions. Order is defined in file ajax\ajaxManager.php.

 

If somebody wants to switch login and create account here are steps I did:

 

file: ajaxManagerTest.class.php

 

function: showLogin

change

echo tep_draw_form('login', tep_href_link('ajax/ajaxManager.php', 'ajaxAction=PerformLogin&&target=payment_area', 'SSL'), 'post', 'id="login_form"', true);

to

echo tep_draw_form('login', tep_href_link('ajax/ajaxManager.php', 'ajaxAction=PerformLogin&&target=shipping_area', 'SSL'), 'post', 'id="login_form"', true);

 

function: showCreateAccount

change

echo tep_draw_form('create_account', tep_href_link('ajax/ajaxManager.php', 'ajaxAction=PerformCreateAccount&&target=shipping_area', 'SSL'), 'post', 'id="create_account"', true) . tep_draw_checkbox_field('guest_account', true, false, 'style="display:none;" id="guest_account"');

to

echo tep_draw_form('create_account', tep_href_link('ajax/ajaxManager.php', 'ajaxAction=PerformCreateAccount&&target=payment_area', 'SSL'), 'post', 'id="create_account"', true) . tep_draw_checkbox_field('guest_account', true, false, 'style="display:none;" id="guest_account"');

 

 

function: _showShipping

change line

if (!ajaxSessionIsRegistered('customer_id')) $this->showCreateAccount('');

to

if (!tep_session_is_registered('customer_id')) $this->showLogin('');

 

function: _showPayment

change line

if (!tep_session_is_registered('customer_id')) $this->showLogin('');

to

if (!ajaxSessionIsRegistered('customer_id')) $this->showCreateAccount('');

 

function: PerformLogin

change

echo '<divresult name="payment_area">'.$buffer.'</divresult>';

to

echo '<divresult name="shipping_area">'.$buffer.'</divresult>';

 

 

change code

$shipping_error = false;
$shipping_buffer = $this->performAction2Buffer("showShipping", $get, $shipping_error);
echo '<divresult name="shipping_area">'.$shipping_buffer.'</divresult>';

to

$payment_error = false;
$payment_buffer = $this->performAction2Buffer("showPayment", $get, $payment_error);
echo '<divresult name="payment_area">'.$payment_buffer.'</divresult>';

 

function: _PerformLogin

change

$this->showPayment('');

to

$this->showShipping('');

 

function: PerformCreateAccount

change

echo '<divresult name="shipping_area">'.$buffer.'</divresult>';

to

echo '<divresult name="payment_area">'.$buffer.'</divresult>';

 

change

$payment_error = false;
$payment_buffer = $this->performAction2Buffer("showPayment", $get, $payment_error);
echo '<divresult name="payment_area">'.$payment_buffer.'</divresult>';

to

$shipping_error = false;
$shipping_buffer = $this->performAction2Buffer("showShipping", $get, $shipping_error);
echo '<divresult name="shipping_area">'.$shipping_buffer.'</divresult>';

 

function: _PerformCreateAccount

change

$this->showShipping('');

to

$this->showPayment('');

 

file: ajaxManager.js

function: ajaxPerformLogin

change

ajaxSendRequest(url,data,true,'payment_area', true, "POST");

to

ajaxSendRequest(url,data,true,'shipping_area', true, "POST");

 

change

ajaxSendRequest('ajaxAction=PerformLogin&email_address='+login_email_address+'&password='+login_password,ajaxUpdateContentMulti,true,'payment_area', false);

to

ajaxSendRequest('ajaxAction=PerformLogin&email_address='+login_email_address+'&password='+login_password,ajaxUpdateContentMulti,true,'shipping_area', false);

 

function: ajaxPerformCreateAccount

change

ajaxSendRequest(url,data,true,'shipping_area', true, "POST");

ajaxSendRequest(url,data,true,'payment_area', true, "POST");

 

and change

, ajaxUpdateContentMulti, true, 'shipping_area', false);

to

, ajaxUpdateContentMulti, true, 'payment_area', false);

 

and thats it. Hope I have not forgotten something :). Everything seems to be working fine afterwards.

Edited by HuffYk

Share this post


Link to post
Share on other sites

you are welcome Dr.Rolex. Thank YOU for this contrib in 1st place :).

 

Here is small fix for those who would like to use guest account. Problem is that delivery and billing addresses are not initialized in global $order variable and this makes modules which are linked only to specific zone not functional.

 

here is fix for shipping part

basically $order variable has to be initialized after $sendto is set (so delivery array in $order is correctly initialized). For guest account $sendto is using $order variable, thats why another "new order" is needed to initialize it correctly

 

find this code in function _showShipping (file ajaxManagerTest.class.php)

 

ajaxSessionUnregister("shipping");
$order = new order;
if (GUEST_CHECKOUT == 'false' || ( GUEST_CHECKOUT == 'true' && ALLOW_CREATE_ACCOUNT == 'true' && $guest == false)) {
// if no shipping destination address was selected, use the customers own address as default
if (!ajaxSessionIsRegistered('sendto')) {
 $sendto = $customer_default_address_id;
 ajaxSessionRegister('sendto',$sendto);
} else {
 // verify the selected shipping address
 $check_address_query = tep_db_query("select count(*) as total from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . (int)$customer_id . "' and address_book_id = '" . (int)$sendto . "'");
 $check_address = tep_db_fetch_array($check_address_query);
 if ($check_address['total'] != '1') {
 $sendto = $customer_default_address_id;
 if (ajaxSessionIsRegistered('shipping')) ajaxSessionUnregister('shipping');
 }
}
} elseif (GUEST_CHECKOUT == 'true') {
// if no shipping destination address was selected, use the customers own address as default
if (!ajaxSessionIsRegistered('sendto')) {
 $sendto = $order->customer;
 ajaxSessionRegister('sendto',$sendto);
}
}

change to

ajaxSessionUnregister("shipping");
if (GUEST_CHECKOUT == 'false' || ( GUEST_CHECKOUT == 'true' && ALLOW_CREATE_ACCOUNT == 'true' && $guest == false)) {
// if no shipping destination address was selected, use the customers own address as default
if (!ajaxSessionIsRegistered('sendto')) {
 $sendto = $customer_default_address_id;
 ajaxSessionRegister('sendto',$sendto);
} else {
 // verify the selected shipping address
 $check_address_query = tep_db_query("select count(*) as total from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . (int)$customer_id . "' and address_book_id = '" . (int)$sendto . "'");
 $check_address = tep_db_fetch_array($check_address_query);
 if ($check_address['total'] != '1') {
 $sendto = $customer_default_address_id;
 if (ajaxSessionIsRegistered('shipping')) ajaxSessionUnregister('shipping');
 }
}
} elseif (GUEST_CHECKOUT == 'true') {
// if no shipping destination address was selected, use the customers own address as default
if (!ajaxSessionIsRegistered('sendto')) {
 if (!isset($order)) $order = new order;
 $sendto = $order->customer;
 ajaxSessionRegister('sendto',$sendto);
}
}
$order = new order;

 

here is fix for payment part

similar fix is needed also for payment part. Here it is more tricky. There are payment modules which check not just billing address but also delivery. Thats why both variables has to be set ($sendto and $billto)

 

find this code in function _showPayment (file ajaxManagerTest.class.php)

ajaxSessionUnregister("payment");
if (GUEST_CHECKOUT == 'false' || ( GUEST_CHECKOUT == 'true' && ALLOW_CREATE_ACCOUNT == 'true' && $guest == false)) {
// if no billing destination address was selected, use the customers own address as default
if (!ajaxSessionIsRegIstered('billto')) {
 $billto = $customer_default_address_id;
 ajaxSessionRegister('billto',$billto);
} else {
 // verify the selected billing address
 $check_address_query = tep_db_query("select count(*) as total from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . (int)$customer_id . "' and address_book_id = '" . (int)$billto . "'");
 $check_address = tep_db_fetch_array($check_address_query);
 if ($check_address['total'] != '1') {
 $billto = $customer_default_address_id;
 if (ajaxSessionIsRegistered('payment')) ajaxSessionUnregister('payment');
 }
}
} elseif (GUEST_CHECKOUT == 'true') {
// if no billing destination address was selected, use the customers own address as default
if (!ajaxSessionIsRegistered('billto')) {
 $billto = $order->customer;
 ajaxSessionRegister('billto',$billto);
}
}
$order = new order;

 

change it to

 

ajaxSessionUnregister("payment");
if (GUEST_CHECKOUT == 'false' || ( GUEST_CHECKOUT == 'true' && ALLOW_CREATE_ACCOUNT == 'true' && $guest == false)) {
// if no billing destination address was selected, use the customers own address as default
if (!ajaxSessionIsRegIstered('billto')) {
 $billto = $customer_default_address_id;
 ajaxSessionRegister('billto',$billto);
} else {
 // verify the selected billing address
 $check_address_query = tep_db_query("select count(*) as total from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . (int)$customer_id . "' and address_book_id = '" . (int)$billto . "'");
 $check_address = tep_db_fetch_array($check_address_query);
 if ($check_address['total'] != '1') {
 $billto = $customer_default_address_id;
 if (ajaxSessionIsRegistered('payment')) ajaxSessionUnregister('payment');
 }
}
// if no shipping destination address was selected, use the customers own address as default
if (!ajaxSessionIsRegistered('sendto')) {
 $sendto = $customer_default_address_id;
 ajaxSessionRegister('sendto',$sendto);
} else {
 // verify the selected shipping address
 $check_address_query = tep_db_query("select count(*) as total from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . (int)$customer_id . "' and address_book_id = '" . (int)$sendto . "'");
 $check_address = tep_db_fetch_array($check_address_query);
 if ($check_address['total'] != '1') {
 $sendto = $customer_default_address_id;
 if (ajaxSessionIsRegistered('shipping')) ajaxSessionUnregister('shipping');
 }
}
} elseif (GUEST_CHECKOUT == 'true') {
if (!isset($order)) $order = new order;
// if no billing destination address was selected, use the customers own address as default
if (!ajaxSessionIsRegistered('billto')) {
 $billto = $order->customer;
 ajaxSessionRegister('billto',$billto);
}
// if no shipping destination address was selected, use the customers own address as default
if (!ajaxSessionIsRegistered('sendto')) {
 $sendto = $order->customer;
 ajaxSessionRegister('sendto',$sendto);
}
}
$order = new order;

 

thats it.

Edited by HuffYk

Share this post


Link to post
Share on other sites

Hi All i just installed the module but i have a bug into the shipping procedure.

 

When i select one of my shipping options and click on UPDATE is will get the following error.

 

Warning: Illegal string offset 'id' in/XXX/XXX/public_html/includes/classes/shipping.phpon line 25

 

Warning: Illegal string offset 'id' n/XXX/XXX/public_html/public_html/includes/classes/shipping.phpon line 25

 

This is the code where the bug is in /includes/classes/shipping.php

 

if ( (tep_not_null($module)) && (in_array(substr($module['id'], 0, strpos($module['id'], '_')) . '.' . substr($PHP_SELF, (strrpos($PHP_SELF, '.')+1)), $this->modules)) ) {

$include_modules[] = array('class' => substr($module['id'], 0, strpos($module['id'], '_')), 'file' => substr($module['id'], 0, strpos($module['id'], '_')) . '.' . substr($PHP_SELF, (strrpos($PHP_SELF, '.')+1)));

} else {

 

Hope to solved the problem soon and thanks for the replay

Share this post


Link to post
Share on other sites

Hi All i just installed the module but i have a bug into the shipping procedure.

 

When i select one of my shipping options and click on UPDATE is will get the following error.

 

Warning: Illegal string offset 'id' in/XXX/XXX/public_html/includes/classes/shipping.phpon line 25

 

Warning: Illegal string offset 'id' n/XXX/XXX/public_html/public_html/includes/classes/shipping.phpon line 25

 

This is the code where the bug is in /includes/classes/shipping.php

 

if ( (tep_not_null($module)) && (in_array(substr($module['id'], 0, strpos($module['id'], '_')) . '.' . substr($PHP_SELF, (strrpos($PHP_SELF, '.')+1)), $this->modules)) ) {

$include_modules[] = array('class' => substr($module['id'], 0, strpos($module['id'], '_')), 'file' => substr($module['id'], 0, strpos($module['id'], '_')) . '.' . substr($PHP_SELF, (strrpos($PHP_SELF, '.')+1)));

} else {

 

Hope to solved the problem soon and thanks for the replay

 

Hello Masterpiece,

 

This is a late reply so I'm guessing that you have probably already solved this?

 

As long as you don't have any other problems with the module (like problem with selecting shipping & payment modules) then you don't have to worry about this warning.

If you are bugged by it then put a @ in front of the IF statement at line 25, this should stop any warning messages from being displayed.

Share this post


Link to post
Share on other sites

Hello All,

 

I installed the module yesterday and it looks great. Thanks Dr. Rolex.

 

I haven't tested it completely yet but I am having some issues that I'm not sure if these are bugs or if it's from my installation.

 

I went through the first couple of pages of the forum and scanned the remaining pages but I couldn't find anything similar to my issues and I would much appreciate any help.

 

 

First, when I try to change the ordered product quantity (plus/minus), it takes 3 to 4 seconds to update the number inside the input box.

 

Secondly, after adding products into my cart I choose Fast Checkout and on ajax_checkout.php page as soon as I click on a plus/minus icon of any of items it deletes one or more items from the cart. And if I have only one item in the cart then same thing happens - it removes the item from the cart.

 

 

The Remove "X" icon doesn't remove the item from the cart. I see the tep_draw_checkbox_field('cart_delete[]', $order->products[$i]['id'], false, 'style="display:none;"')  inside the code, however the checkbox doesn't appear on the page since it has display:none and frankly I'm not sure what does trigger the checkbox to display.

 

I have been trying to resolve these issues since yesterday without any success and any help would be much appreciated.

 

I was wondering if there is a newer upgraded Rev that I can download. I initially downloaded the Rev.3 and Updated with Rev.4.

 

Thanks in advance.

Share this post


Link to post
Share on other sites

I´m lovong your contrib but i´m having a slight issue and i hope you can point me in the right direction.

 

It´s when you get to the fast checkout:

 

If you select shipping and press update before you select and update your choice of payment the radio button "Confirm Order" won´t show and you get stuck.

 

To solve it you have to refresh the page and make shure to select payment first and then shipping (doing it this way always works but its frustrating since the potential customer doesn´t know this :)

Share this post


Link to post
Share on other sites

Anyone who know how to have the box with shipping in the fast checkout to not show until you have selected payment?

Share this post


Link to post
Share on other sites

I realize I'm a bit late to the party now, but anyhow..

 

 

Hello All,

 

I installed the module yesterday and it looks great. Thanks Dr. Rolex.

 

I haven't tested it completely yet but I am having some issues that I'm not sure if these are bugs or if it's from my installation.

 

I went through the first couple of pages of the forum and scanned the remaining pages but I couldn't find anything similar to my issues and I would much appreciate any help.

 

 

First, when I try to change the ordered product quantity (plus/minus), it takes 3 to 4 seconds to update the number inside the input box.

 

 

 

It sound like you're a victim of a terrible slow host provider.

If everything works. numbers/amounts are updated as they should, then it must be your provider. You should check which provider has the lowest latency in your country/region and then try that one instead. I haven't tried many of them and I don't really use shared hosting anymore (other than for osC demo) but Hostgator used to run a descent service for a reasonable $$$.

 

 

 

Secondly, after adding products into my cart I choose Fast Checkout and on ajax_checkout.php page as soon as I click on a plus/minus icon of any of items it deletes one or more items from the cart. And if I have only one item in the cart then same thing happens - it removes the item from the cart.

 

I have been trying to resolve these issues since yesterday without any success and any help would be much appreciated.

 

I was wondering if there is a newer upgraded Rev that I can download. I initially downloaded the Rev.3 and Updated with Rev.4.

 

Thanks in advance.

 

The last package that I uploaded is the one from 28 Aug 2013 called "Ajax Fast checkout 2.3.3 Rev2". The newer ones are from other contributors so I don't know what has changed in them.

 

If you only have 1 quantity of a product and press the minus (-) image then it should remove the product entirely from the cart since the quantity is 0.

 

I'm sorry Ed, but I have tried with reinstalling my latest release of this Add-On on a fresh osC install and everything works the way it should.

Perhaps you could send me a link to you store so I can have a look at it? (Send via PM if you don't want it leaked here)

 

 

 

The Remove "X" icon doesn't remove the item from the cart. I see the tep_draw_checkbox_field('cart_delete[]', $order->products[$i]['id'], false, 'style="display:none;"')  inside the code, however the checkbox doesn't appear on the page since it has display:none and frankly I'm not sure what does trigger the checkbox to display.

 

It's gone almost 1.5 years since I uploaded my last revision, my PHP/jQuery skills were still pretty bad back then so some bits of the code are most probably "not optimal".

 

If you look right below the cart_delete[] checkbox you can see a <span> with ID #cart-delete and with the "X" image inside.

The jQuery event handler is triggered when you click an element with ID #cart-delete. It then looks what value the rel attribute have to figure out which product that should be removed

Share this post


Link to post
Share on other sites

I´m lovong your contrib but i´m having a slight issue and i hope you can point me in the right direction.

 

It´s when you get to the fast checkout:

 

If you select shipping and press update before you select and update your choice of payment the radio button "Confirm Order" won´t show and you get stuck.

 

To solve it you have to refresh the page and make shure to select payment first and then shipping (doing it this way always works but its frustrating since the potential customer doesn´t know this :)

 

Hello Jimmy,

 

If I understand you correctly then the module is working as it's supposed to do.

 

You always have to select both a Shipping Method and a Payment Method for the "Confirm Order" button to show. Each of the two buttons should be visible until their respective method have been selected. Are you sure that you just didn't miss the "Update" button located beneath the "Payment Method window", that is to the bottom right of your screen?

 

If you want me to take a look at it, perhaps you could PM me a link to your shop?

Share this post


Link to post
Share on other sites

I am trying to use this module and would appreciate a step in the right direction to get it working properly.  We want to use this module over the original one for 2.2 that it is based off of, because this module has guest checkout functionality.  So because of this - we have tried setting this up on a 2.2 rca2 installation.  For the most part it seems to be functioning, except for one issue.  When we try using the login feature it just gets stuck on the loading gif.  If we enter incorrect login details it will come back with the error like it should, but if correct details are entered it gets stuck at the loading gif and nothing happens.  I do not see any errors and am not sure how to figure out why it is doing this.

 

I have attached a screenshot of where it gets stuck.

Highly appreciate any help.

post-167281-0-20277200-1421890502_thumb.png

Edited by rjckicks1

Share this post


Link to post
Share on other sites

Addition: I tried using the updated database (ran sql queries to update it from 2.2 rca2 to 2.3) and tried the module on a fresh install - getting the same issue.  The login box just gets stuck.  So I am thinking now maybe it has something to do with the database?  Any advice is much appreciated.

Share this post


Link to post
Share on other sites

Addition: I tried using the updated database (ran sql queries to update it from 2.2 rca2 to 2.3) and tried the module on a fresh install - getting the same issue.  The login box just gets stuck.  So I am thinking now maybe it has something to do with the database?  Any advice is much appreciated.

 

If you open the console in Chrome (Windows: Ctrl + Shift + J, Mac: Cmd + Opt + J) and then try to login, do you get any error messages?

 

If you're not getting any errors, then go to the Network tab instead, Click on XHR and then try to login again. You should see a new request to ajaxManager.php?ajaxAction=PerformLogin&target=payment_area.

 

Click on that request and go to the Response tab on the right half of the Developer Tools. You should see the html code that you want displayed, i.e. the same thing that would be displayed if you logged in the "normal" way and then went to the Fast Checkout.

 

If there's something is wrong in the html code you're getting in the response, then the problem is server side, i.e. your PHP code. If the html looks right, then the problem is client side, i.e. your Javascript code.

 

If you try reloading the page after you see the loading gif, are you still not logged in or does that log you in?

 

Also, are you getting the same error on different browsers?

Share this post


Link to post
Share on other sites

I am wondering if this would work with the MVS shipping module. If not has anyone tried to get it to work for that. I would love this if only able to work with the MVS contribution

Share this post


Link to post
Share on other sites

I almost got this working I think in MVS. However, I dont see a checkout button when using fast checkout. Am I missing something here? If anyone wants it for MVS I can either upload it here or in the contribution section of MVS. Most likely with permission I can add it to the contribution section of MVS.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×