Jump to content
Dr. Rolex

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

Recommended Posts

I think I found a minor bug

 

   for ($j=0, $n2=sizeof($quotes[$i]['methods']); $j<$n2; $j++) {
    // set the radio button to be checked if it is the method chosen
    $checked = (($quotes[$i]['id'] . '_' . $quotes[$i]['methods'][$j]['id'] == $shipping['id']) ? true : false);
    if ( ($checked == true) || ($n == 1 && $n2 == 1) ) {
	 echo '				  <div id="defaultSelected" class="moduleRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="selectRowEffect(this, ' . $radio_buttons . '); ajaxPerformShippingSelection();">' . "\n";
    } else {
	 echo '				  <div class="moduleRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="selectRowEffect(this, ' . $radio_buttons . '); ajaxPerformShippingSelection();">' . "\n";
    }
    ?>
    <span><?php echo $quotes[$i]['methods'][$j]['title']; ?></span>
    <?php
    if ( ($n > 1) || ($n2 > 1) ) {
	 ?>
	 <span><?php echo $currencies->format(tep_add_tax($quotes[$i]['methods'][$j]['cost'], (isset($quotes[$i]['tax']) ? $quotes[$i]['tax'] : 0))); ?></span>
	 <span><?php echo tep_draw_radio_field('shipping', $quotes[$i]['id'] . '_' . $quotes[$i]['methods'][$j]['id'], '', 'id="shipping_'.$radio_buttons.'"');?></span>
	 <?php
    } else {
	 ?>
	 <span style="float: right;"><?php echo $currencies->format(tep_add_tax($quotes[$i]['methods'][$j]['cost'], $quotes[$i]['tax'])) . tep_draw_hidden_field('shipping', $quotes[$i]['id'] . '_' . $quotes[$i]['methods'][$j]['id'], 'id="shipping"'); ?></span>
	 <?php
    }
    ?>
   </div>
   <?php
   $radio_buttons++;
  }

 

$shipping['id'] doesn't change and always shows checked the first option.

 

If you choose to change the shipping method, it change to the first option automatically ignoring your previous option.

 

Payment options have the same issue, but it doesn't show selected the previous option, so... not affect you.

Share this post


Link to post
Share on other sites

i think it would be great if someone can perhaps implement a "guest" checkout option for this checkout, would complete it perfectly.

 

i found a guest checkout that seems to work with 2.3.3 but not sure how to implement on this one, so that the username/password field doesn't show when you get to the ajax form.

Share this post


Link to post
Share on other sites

I think I found a minor bug

(...)

 

$shipping['id'] doesn't change and always shows checked the first option.

 

If you choose to change the shipping method, it change to the first option automatically ignoring your previous option.

 

Payment options have the same issue, but it doesn't show selected the previous option, so... not affect you.

 

That's weird, for me it works. I don't use more than one shipping option but when testing with Flat rate and Per Item, the shipping cost changes when product is added/removed and the shipping option stays the same.

 

If you increase o decrease a product, Comments box and MATC are reset :(

This also sounds weird as this works for me. The shipping can be refreshed when you add/remove product so the cost for them goes above/under the free shipping limit, perhaps that's what happening to you?

Check your network & console tabs in Chrome's developer tools for errors. Also make sure to check the Apache/PHP error log.

 

The Add-On is not without bugs (yet) however and it probably needs a bit of fine tuning for some store owners to be fully compatible with the specific shop.

 

Here are some more updates that everyone should apply:

 

This one prevents customers from confirming orders without choosing shipping/payment methods:

 

In ./ajax/classes/ajaxManagerTest.class.php around line 91, find:

if ($_resp['error'] == false) {
if ($cart->count_contents() < 1) {
 include(DIR_WS_LANGUAGES . $language . '/' . FILENAME_SHOPPING_CART);
 $_resp = array('error'=>true, 'message'=> TEXT_CART_EMPTY);
}
}

Replace with:

// if the customer is not logged on, redirect them to the login page
if (!ajaxSessionIsRegistered('customer_id')) {
$navigation->set_snapshot(array('mode' => 'SSL', 'page' => FILENAME_CHECKOUT_PAYMENT));
tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL'));
}
// if there is nothing in the customers cart, redirect them to the shopping cart page
if ($_resp['error'] == false) {
if ($cart->count_contents() < 1) {
 include_once(DIR_WS_LANGUAGES . $language . '/' . FILENAME_SHOPPING_CART);
 $_resp = array('error'=>true, 'message'=> TEXT_CART_EMPTY);
}
}

// if no shipping method has been selected, redirect the customer to the shipping method selection page
if (!ajaxSessionIsRegistered('shipping') || !ajaxSessionIsRegistered('sendto')) {
include_once(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CHECKOUT_SHIPPING);
$_resp = array('error'=>true, 'message'=> TEXT_CHOOSE_SHIPPING_METHOD);
}
if ( (tep_not_null(MODULE_PAYMENT_INSTALLED)) && (!ajaxSessionIsRegistered('payment')) ) {
include_once(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CHECKOUT_PAYMENT);
$_resp = array('error'=>true, 'message'=> ERROR_NO_PAYMENT_MODULE_SELECTED);
}

 

If your order total isn't updating properly when removing a product (probably only occurs if you also use jQuery/Ajax Shopping Cart, find this in ./ext/modules/shopping_cart/jquery-oscart.js around line 248:

 

async: false,
 success: function(data) {
 if ( filename == 'ajax_checkout.php')
 {
 ajaxRefreshProducts();
 }
 boxcartTotal.remove();
 parentRemove.html(data);
},

Replace with:

async: false,
 success: function(data) {
 if ( filename == 'ajax_checkout.php')
 {
 ajaxRefreshProducts();
 ajaxPerformShippingRefresh();
 }
 boxcartTotal.remove();
 parentRemove.html(data);
},

It's probably not a bad idea to add:

async:false,

to all or most of the jQuery Ajax Requests.

 

So change all instances that look something like this:

$.ajax({
type: 'POST',
url: encodeURI($('form[name=boxcart_quantity]').attr('action')) + '&show_total=1',
data: $('form[name=boxcart_quantity]').serialize(),
success: function(data) {
[ some code... ]
},
complete: function() {
[ some code... ]
}
});

To something like this:

$.ajax({
type: 'POST',
url: encodeURI($('form[name=boxcart_quantity]').attr('action')) + '&show_total=1',
data: $('form[name=boxcart_quantity]').serialize(),
async: false,
success: function(data) {
[ some code... ]
},
complete: function() {
[ some code... ]
}
});

This will make the requests synchronous.

 

You can do this, if you want to experiment, in ajaxmanager.js also. Check for the functins that have (async) at the last part of the function, like this:

function ajaxRefreshShipping(async) {

 

They are set to true as default. If you have problem with an area not refreshing properly (perhaps the spinning loading image won't go away), then setting the appropriate function to do a synchronous request (false) would be the first action I would try.

 

For example, if the order total area isn't refreshing when updating products, try to set:

ajaxRefreshTotals();

In ./ajax/javascript/ajaxmanager.js around line 598 to:

ajaxRefreshTotals(false);

 

This particular line only affect the order total when no shipping method have been selected.

 

These are some of the functions that you can use to refresh the different areas of the module:

 

// Refresh Shipping Area

ajaxRefreshShipping(async);

 

// Refresh Payment Area

ajaxRefreshPayment(async);

 

// Refresh Products Area

ajaxRefreshProducts(async);

 

// Refresh Totals Area

ajaxRefreshTotals(async);

 

// Refresh All areas

ajaxRefresh();

 

Find more functins to play with under this code in ajaxmanager.js:

//------------------------------------------------------------------<< page Actions

 

To test how they function, go to the fast checkout on your shop open Chromes console and, for example, simply write:

ajaxRefreshShipping(); [ENTER]

 

Also take a look at the network tab => XHR when you've done this to see the server response.

 

Oh, and one last thing for those that have updated to MySQLi. The function tep_db_query in:

includes/functions/database.php

admin/includes/functions/database.php

 

didn't work properly with the code posted on Git, it worked for me when I changed from:

function tep_db_query($query, $link = 'db_link') {
global $$link;

if (defined('STORE_DB_TRANSACTIONS') && (STORE_DB_TRANSACTIONS == 'true')) {
 error_log('QUERY ' . $query . "\n", 3, STORE_PAGE_PARSE_TIME_LOG);
}

$result = mysqli_query($$link, $query) or tep_db_error($query, mysqli_errno($$link), mysqli_error($$link));

if (defined('STORE_DB_TRANSACTIONS') && (STORE_DB_TRANSACTIONS == 'true')) {
 $result_error = mysqli_error($$link);
 error_log('RESULT ' . $result . ' ' . $result_error . "\n", 3, STORE_PAGE_PARSE_TIME_LOG);
}

return $result;
}

To:

function tep_db_query($query, $link = 'db_link') {
global $$link;

if (defined('STORE_DB_TRANSACTIONS') && (STORE_DB_TRANSACTIONS == 'true')) {
error_log('QUERY ' . $query . "\n", 3, STORE_PAGE_PARSE_TIME_LOG);
}

$result = mysqli_query($$link, $query);

if ($result === false) tep_db_error($query, mysqli_errno($$link), mysqli_error($$link));

if (defined('STORE_DB_TRANSACTIONS') && (STORE_DB_TRANSACTIONS == 'true')) {
$result_error = mysqli_error($$link);
error_log('RESULT ' . $result . ' ' . $result_error . "\n", 3, STORE_PAGE_PARSE_TIME_LOG);
}

return $result;
}

 

If you get an error in the Apache log that looks like this:

mysqli_real_escape_string() expects parameter 1 to be mysqli, null given in ./includes/functions/database.php

Then you probably need to add tep_exit(); or session_write_close(); before the end of a function and before any exit; or die; call.

 

 

I'll post more info & bug fixes when I have time (and have found the little buggers!).

 

Good luck!

 

// Dr. Rolex

Edited by Dr. Rolex

Share this post


Link to post
Share on other sites
That's weird, for me it works. I don't use more than one shipping option but when testing with Flat rate and Per Item, the shipping cost changes when product is added/removed and the shipping option stays the same.

When you change de shipping method this change correctly, there isn't problem. But if you want to change the shipping method selected, you click on edit and the shipping method that you choose previously should be selected on radio buttons, and always is selected the flat rate :(

 

This also sounds weird as this works for me. The shipping can be refreshed when you add/remove product so the cost for them goes above/under the free shipping limit, perhaps that's what happening to you?

If you write some order comments in the comments box, and then you change the shipping method or payment method or increase/decrease a product... this comments that you wrote previously are deleted.

 

Thanks in advance :)

 

Sorry for my bad english :(

Share this post


Link to post
Share on other sites

When you change de shipping method this change correctly, there isn't problem. But if you want to change the shipping method selected, you click on edit and the shipping method that you choose previously should be selected on radio buttons, and always is selected the flat rate :(

 

Thanks in advance :)

 

Sorry for my bad english :(

 

Haha, nothing to be sorry for! I understand you. :thumbsup:

If you write some order comments in the comments box, and then you change the shipping method or payment method or increase/decrease a product... this comments that you wrote previously are deleted.

To fix the disappearing comments, do the following changes:

 

In jquery-oscart.js

Find and remove/comment the following two sections of code:

if (getElement('shippingselected') != null)
           {
               var shipping = getValue('shippingselected');
               ajaxSendRequest('ajaxAction=PerformShippingSelection&shipping=inrikesbrev_1aklassbrev',ajaxUpdateContentMulti,true,'shipping_area');
           }

 

if ( filename == 'ajax_checkout.php' )
               {
                   //ajaxRefreshTotals();
                   if (getElement('shippingselected') != null)
                   {
                       var shipping = getValue('shippingselected');
                       ajaxSendRequest('ajaxAction=PerformShippingSelection&shipping=inrikesbrev_1aklassbrev',ajaxUpdateContentMulti,true,'shipping_area');
                   }
               }

In ajaxmanager.js find and replace the ajaxPerformShippingRefresh function with the following code:

function ajaxPerformShippingRefresh() {
       submitted = false;
       var orderTotalNewValue = parseFloat(getValue('orderTotalNewValue'));
       var orderTotalOldValue = parseFloat(getValue('orderTotalOldValue'));


       if (getElement('shippingselected') != null)
       {
           var shipping = getValue('shippingselected');

           if (getElement('freeShippingOver') != null) {
               var freeShippingOver =  parseFloat(getValue('freeShippingOver'));
               if ((orderTotalOldValue > freeShippingOver && orderTotalNewValue < freeShippingOver) || (orderTotalOldValue < freeShippingOver && orderTotalNewValue > freeShippingOver)) {
                   ajaxSendRequest('ajaxAction=PerformShippingSelection&shipping='+shipping,ajaxUpdateContentMulti,true,'shipping_area', false);
               } else {
                   ajaxRefreshTotals(false);
               }

           } else {
               ajaxSendRequest('ajaxAction=PerformShippingSelection&shipping='+shipping,ajaxUpdateContentMulti,true,'totals_area');
           }    
       } else {
           ajaxRefreshShipping(false);
           ajaxRefreshTotals();
       }
       return false;
   }

 

Also, this code is obsolete and should be removed, in jquery-oscart.js around line 223:

// Refresh shopping cart if current page is ajax_checkout.php !
   //
   if ( filename == 'ajax_checkout.php' )
   {
 ajaxRefreshTotals();
 if (getElement('shippingselected') != null)
 {
  var shipping = getValue('shippingselected');
 ajaxSendRequest('ajaxAction=PerformShippingSelection&shipping=inrikesbrev_1aklassbrev',ajaxUpdateContentMulti,true,'shipping_area');
 }
   }

 

However, if you add/remove product so it goes above/below the free shipping limit the shipping area must refresh, otherwise the customer will complete the order without receiving free shipping or paying for shipping that should be free.

Share this post


Link to post
Share on other sites

When you change de shipping method this change correctly, there isn't problem. But if you want to change the shipping method selected, you click on edit and the shipping method that you choose previously should be selected on radio buttons, and always is selected the flat rate :(

 

To fix this, do the following changes in ajaxManagerTest.class.php

 

Find this around line 1984:

if ( !ajaxSessionIsRegistered('shipping') || ( ajaxSessionIsRegistered('shipping') && ($shipping == false) && (tep_count_shipping_modules() > 1) ) )
{
$shipping = $shipping_modules->cheapest();
}

Replace with:

if ( !isset($shipping) || ( isset($shipping) && ($shipping == false) && (tep_count_shipping_modules() > 1) ) )
{
$shipping = $shipping_modules->cheapest();
}

 

Find this code around line 2354:

<?php
 if ( ($selection[$i]['id'] == (isset($payment) ? $payment : '')) || ($n == 1) ) {
 echo '				 <div id="defaultSelected" class="moduleRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="selectRowEffectPayment(this, ' . $radio_buttons . ')">' . "\n";
 } else {
 echo '				 <div class="moduleRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="selectRowEffectPayment(this, ' . $radio_buttons . ')">' . "\n";
 }
 ?>

Replace with:

<?php
 // set the radio button to be checked if it is the method chosen
 $checked = (($selection[$i]['id'] == (isset($payment) ? $payment : '')) ? true : false);
 if ($payment == null && $i == 2) $checked = true;
 if ( ($checked == true) || $n == 1 ) {
 echo '				 <div id="defaultSelected" class="moduleRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="selectRowEffectPayment(this, ' . $radio_buttons . ')">' . "\n";
 } else {
 echo '				 <div class="moduleRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="selectRowEffectPayment(this, ' . $radio_buttons . ')">' . "\n";
 }
 ?>

 

Also, found another bug, find this code around line 2151:

javascript:ajaxRefreshShipping();ajaxRefreshShipping();return false;

Replace with:

javascript:ajaxRefreshShipping();return false;

 

This should fix it.

Share this post


Link to post
Share on other sites

Forgot one step in the instructions to fix payment module not selected issue.

 

In ajaxManagerTest.class.php find this code around line 2236:

function _showPayment($get) {
if (!tep_session_is_registered('customer_id')) $this->showLogin('');
else
{
global $order, $currencies, $order_total_modules, $cart, $language, $customer_id, $customer_default_address_id,$billto;

Replace with:

function _showPayment($get) {
if (!tep_session_is_registered('customer_id')) $this->showLogin('');
else
{
global $order, $currencies, $order_total_modules, $cart, $language, $customer_id, $customer_default_address_id,$billto,$payment;

 

The thing changed is that $payment need to be global.

 

Also, a couple of lines below, find:

<?php
  if (sizeof($selection) > 1) {
   echo tep_draw_radio_field('payment', $selection[$i]['id'], false, 'align="right" id="payment_'.$radio_buttons.'"');
  } else {
   echo tep_draw_hidden_field('payment', $selection[$i]['id'],'id="payment_'.$radio_buttons.'"');
  }
  ?></span>

Replace with:

<?php
  if (sizeof($selection) > 1) {
   echo tep_draw_radio_field('payment', $selection[$i]['id'], $checked, 'align="right" id="payment_'.$radio_buttons.'"');
  } else {
   echo tep_draw_hidden_field('payment', $selection[$i]['id'],'id="payment_'.$radio_buttons.'"');
  }
  ?></span>

Edited by Dr. Rolex

Share this post


Link to post
Share on other sites

And one final modification.

 

To avoid getting two selection fields highlighted, change this in ajaxManagerTest.class.php around line 2340:

echo '				 <div id="defaultSelected" class="moduleRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="selectRowEffectPayment(this, ' . $radio_buttons . ')">' . "\n";

To this:

echo '				 <div id="defaultSelectedPayment" class="moduleRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="selectRowEffectPayment(this, ' . $radio_buttons . ')">' . "\n";

 

In ./ajax/javascript/form_check.js.php, find around line 56:

function selectRowEffectPayment(object, buttonselect) {
if (!selected) {
if (document.getElementById) {
 selected = document.getElementById('defaultSelected');
} else {
 selected = document.all['defaultSelected'];
}
}

Replace with:

function selectRowEffectPayment(object, buttonselect) {
if (!selected) {
if (document.getElementById) {
 selected = document.getElementById('defaultSelectedPayment');
} else {
 selected = document.all['defaultSelectedPayment'];
}
}

Share this post


Link to post
Share on other sites

Hello,

 

The fix for comments box doesn't works to me :(

 

The other fixes works perfectly :)

Share this post


Link to post
Share on other sites

Hello,

 

The fix for comments box doesn't works to me :(

 

The other fixes works perfectly :)

 

Ok, don't worry, we'll fix this.

 

First, I need you to check your jquery-oscart.js file for code that look something like this:

ajaxSendRequest('ajaxAction=PerformShippingSelection [..blablalba..] 'shipping_area');

If you find any, try to remove it or comment it and try again.

 

If that doesn't work, look for code in jquery-oscart.js that look like the code below, and if you do; remove or comment the code:

ajaxRefreshShipping();
- OR -
ajaxRefreshShipping(false);

 

If this doesn't resolve it for you, I need you to check on which of the following situations that the error occurs (that is, write something in the comment box and then try each of the steps in turn and see if the text disappears):

 

Note: Make sure that your free shipping value is set high enough so adding or removing a product wont go above/below the limit!

 

1: Remove product by pressing the red cross button

 

2: Add or remove product by pressing plus/minus button

 

3: Add product by dragging a product and drop it on the shopping cart

Share this post


Link to post
Share on other sites

I don't have the code that you say me to remove

 

Free shipping isn't enabled :)

 

Making step 1 comments aren't deleted

 

Making step 2 comments are deleted, when I increase o decrease one product, comments are deleted.

 

Making step 3, I think that I don't understand you correctly, if I go to product listing to add a new product, comments are deleted, but shipping and payment method too

 

Thanks for your time :)

Share this post


Link to post
Share on other sites

I don't have the code that you say me to remove

 

Free shipping isn't enabled :)

 

Making step 1 comments aren't deleted

 

Making step 2 comments are deleted, when I increase o decrease one product, comments are deleted.

 

Making step 3, I think that I don't understand you correctly, if I go to product listing to add a new product, comments are deleted, but shipping and payment method too

 

Thanks for your time :)

 

Step 3: Drag a product (the image or the text from the best sellers list) from any box (for example: best sellers, specials, what's new, reviews) to the shopping cart WHILE you are at ajax_checkout.php

 

The product should be added in the same way as if you dragged it from the product listing or a product page and with drag I mean Drag & Drop to the shopping cart infobox.

 

See what happens if you comment the following code in jquery-oscart.js around line 794:

if ( filename == 'ajax_checkout.php' )
  {
   ajaxPerformShippingRefresh();
  }

 

Is the comments still removed when your press minus/plus button?

Share this post


Link to post
Share on other sites

To do step 3 I will look for a box with buy button :blush:

 

If I comment this code (line 794), when I press minus/plus button comments aren't delete but, subtotal, shipping cost and total that is under the black line doesn't update. Shopping cart box and subtotal thats appears over the black line update correctly

Share this post


Link to post
Share on other sites

To do step 3 I will look for a box with buy button :blush:

 

If you have installed jQuery/Ajax Shopping Cart 2.3.3 you should be able to drag the product image with your mouse to the shopping cart and the drop it. The image will explode and the product will be added. But perhaps I misunderstood you and you haven't installed that Add-On?

 

If I comment this code (line 794), when I press minus/plus button comments aren't delete but, subtotal, shipping cost and total that is under the black line doesn't update. Shopping cart box and subtotal thats appears over the black line update correctly

 

 

This means that it's this function in ajaxManager.js that needs to be modified:

function ajaxPerformShippingRefresh() {
 submitted = false;
 var orderTotalNewValue = parseFloat(getValue('orderTotalNewValue'));
 var orderTotalOldValue = parseFloat(getValue('orderTotalOldValue'));

 if (getElement('shippingselected') != null)
 {
  var shipping = getValue('shippingselected');
  if (getElement('freeShippingOver') != null) {
   var freeShippingOver =  parseFloat(getValue('freeShippingOver'));
   if ((orderTotalOldValue > freeShippingOver && orderTotalNewValue < freeShippingOver) || (orderTotalOldValue < freeShippingOver && orderTotalNewValue > freeShippingOver)) {
 ajaxSendRequest('ajaxAction=PerformShippingSelection&shipping='+shipping,ajaxUpdateContentMulti,true,'shipping_area', false);
   } else {
 ajaxRefreshTotals(false);
   }
  } else {
   ajaxSendRequest('ajaxAction=PerformShippingSelection&shipping='+shipping,ajaxUpdateContentMulti,true,'totals_area');
  }
 } else {
  ajaxRefreshShipping(false);
  ajaxRefreshTotals();
 }
 return false;
}

 

Try to comment/modify/switch place of the following lines inside that function until you get it right:

ajaxSendRequest('ajaxAction=PerformShippingSelection&shipping='+shipping,ajaxUpdateContentMulti,true,'shipping_area', false);

 

ajaxSendRequest('ajaxAction=PerformShippingSelection&shipping='+shipping,ajaxUpdateContentMulti,true,'totals_area');

 

ajaxRefreshShipping(false);

 

All of them will refresh the shipping area removing any comments.

Share this post


Link to post
Share on other sites

Awesome! I can drag the product haha

 

Step 3, if I drag the product, only shopping cart box is update

 

The other fix... I'll try it, but I only have a little knowledge about php and css. Anyway if I can make it works I'll post it :)

Share this post


Link to post
Share on other sites

I'm trying to understand what you mean, since I'm not using states myself I don't really know what's supposed to happen.

 

Should the State/Province have a dropdown after the customer choose his/her country?

 

I can't reproduce this error on my own server, I just get an input field for the state and no errors when submitting the form.

 

You could try replacing this code:

if (ACCOUNT_STATE == 'true') {
$this->getAndPrepare('state', $get, $state);
$zone_id = false;
}

With:

if (ACCOUNT_STATE == 'true') {
$this->getAndPrepare('state', $get, $state);
if (isset($HTTP_POST_VARS['zone_id'])) {
 $this->getAndPrepare('zone_id', $get, $zone_id);
} else {
 $zone_id = false;
}
}

 

 

There are several more bugs that I have found and fixed on my own server, as well as performance updates.

When I have the time and inclination I will upload a new release with these changes applied.

 

hi

if you go that poster's link,

 

http://demo.arnlweb.com/catalog233/shopping_cart.php

 

you add product to the cart, go to fast checkout and the ajax checkout form.

 

you can input all your name, address details, etc

 

the state field is a text input field,

but if you select USA as country, then agree terms and press continue.

 

The actual page reloads except this time, the state field is now a dropdown with a list of american states, and that error message pops up.

 

after doing that though, if you select another country however, like UK (which i dont think he has put any states in for), and continue, the state dropdown is still there showing american states, and if you press continue, it will go the next page,

 

but in your address, the state will show as "undefined".

 

Even when changing billing or shipping address later on in the form, it seems that particular site is having problem with States, in particular USA.

 

is this plugin not loading states dynamically when a country is selected?

 

i'm guessing there needs to be something/plugin for 2.3.3 which will automatically refresh the states dropdown depending on country selected,

 

i found one for 2.2 but not sure if this can work with 2.3

 

http://addons.oscommerce.com/info/2028

Edited by vampirehunter

Share this post


Link to post
Share on other sites

hi

if you go that poster's link,

 

http://demo.arnlweb.com/catalog233/shopping_cart.php

 

you add product to the cart, go to fast checkout and the ajax checkout form.

 

you can input all your name, address details, etc

 

the state field is a text input field,

but if you select USA as country, then agree terms and press continue.

 

The actual page reloads except this time, the state field is now a dropdown with a list of american states, and that error message pops up.

 

after doing that though, if you select another country however, like UK (which i dont think he has put any states in for), and continue, the state dropdown is still there showing american states, and if you press continue, it will go the next page,

 

but in your address, the state will show as "undefined".

 

Even when changing billing or shipping address later on in the form, it seems that particular site is having problem with States, in particular USA.

 

is this plugin not loading states dynamically when a country is selected?

 

i'm guessing there needs to be something/plugin for 2.3.3 which will automatically refresh the states dropdown depending on country selected,

 

i found one for 2.2 but not sure if this can work with 2.3

 

http://addons.oscommerce.com/info/2028

 

I think he fixed it with the patch I posted a couple of posts above this one, because it seems to work now.

 

I selected United States and wrote Alabama in the field and it refreshed fine, this address was the one returned:

 

Alan Smith

Test 1

City, AL 400 00

United States

 

Use the first package that I uploaded, then download the second one and overwrite the old file with the one included.

After that, you may need to apply the patches that I have posted here, but check if you have any errors first before you modify the code.

 

When I'm done with the Guest checkout modification, I will make a new complete package with all the patches applied.

The Guest checkout mod is working now, the customer can skip the account creation if he/she wants and just enter the customer details that the store owner requires.

 

Since it's being only session based, no database modifications will be required more then perhaps adding an option to the admin where the store owner can enable/disable the feature.

 

There is still some code cleanup, bug fixes (probably) and security fixes that needs to be added/examined, so it will still take some time until it's completed.

 

There's also the problem that the code I'm working with now have both this Add-On and the jQuery/Ajax Shopping Cart 2.3.3 installed. I'm not sure how much hassle it will be to separate the two again, probably not that much but we'll see I guess...

Edited by Dr. Rolex

Share this post


Link to post
Share on other sites

Hi

I think when you leave the states field blank. The page reloads and then the error keeps showing.

 

 

 

 

 

I think he fixed it with the patch I posted a couple of posts above this one, because it seems to work now.

 

I selected United States and wrote Alabama in the field and it refreshed fine, this address was the one returned:

 

Alan Smith

Test 1

City, AL 400 00

United States

 

Use the first package that I uploaded, then download the second one and overwrite the old file with the one included.

After that, you may need to apply the patches that I have posted here, but check if you have any errors first before you modify the code.

 

When I'm done with the Guest checkout modification, I will make a new complete package with all the patches applied.

The Guest checkout mod is working now, the customer can skip the account creation if he/she wants and just enter the customer details that the store owner requires.

 

Since it's being only session based, no database modifications will be required more then perhaps adding an option to the admin where the store owner can enable/disable the feature.

 

There is still some code cleanup, bug fixes (probably) and security fixes that needs to be added/examined, so it will still take some time until it's completed.

 

There's also the problem that the code I'm working with now have both this Add-On and the jQuery/Ajax Shopping Cart 2.3.3 installed. I'm not sure how much hassle it will be to separate the two again, probably not that much but we'll see I guess...

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

×