Zen-cart Change the shipping address and change the billing address process bug

Source: Internet
Author: User
Tags php template

 Change the shipping address and change the billing address 1 2 main_page=checkout_shipping_address main_page=checkout_payment_address This will load the Address book form and list of addresses: This process shows how the file is contained. Tpl_modules_check

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

Zen-cart Change the shipping address and change the billing address process bug

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.