Change shipping address and change billing address
12 |
Main_page=checkout_shipping_address main_page=checkout_payment_address |
This will load the list of Address book forms and addresses:
This process shows how the file is contained. In the tpl_modules_checkout_address_book.php template, select the default address:
1 |
<?php echo Zen_draw_radio_field (' address ', $addresses->fields[' address_book_id '), ($addresses->fields[' address_book_id '] = = $_session[' sendto '), ' id= ' name-'. $addresses->fields[' address_book_id '). ' "');?> |
If the Radio box is selected and depends entirely on the current $_session[' sendto ', you can see from the example figure above that the tpl_modules_checkout_address_book.php template is two controllers (Checkout_ Shipping_address and Checkout_payment_address) contains, whether the address is selected should not only rely on the current $_session[' sendto '), I found in the zen-cart151 default template is so set, This is obviously a bug, but it's not a big problem. First add at the beginning of tpl_modules_checkout_address_book.php
12345 |
if ($addressType = = ' BillTo ') {$checked = $_session[' BillTo '];} else{$checked = $_session[' SendTo ');} |
Then put
1 |
<?php echo Zen_draw_radio_field (' address ', $addresses->fields[' address_book_id '), ($addresses->fields[' address_book_id '] = = $_session[' sendto '), ' id= ' name-'. $addresses->fields[' address_book_id '). ' "');?> |
Replace with:
1 |
<?php echo Zen_draw_radio_field (' address ', $addresses->fields[' address_book_id '), ($addresses->fields[' address_book_id '] = = $checked), ' id= ' name-'. $addresses->fields[' address_book_id '). ' "');?> |
Such a small bug in Zen-cart all the current version of the same, that means that as long as the point to modify the billing address, click Continue, then the billing address can be changed, and your intention is probably not to make any changes. Enterprise Templates Web site |