示例#1
0
    if (empty($this->shipping_address)) {
        ?>
	                    <div>
	                        <input id="sameasbilling" name="sameasbilling" type="checkbox" checked="checked" onclick="citruscartShowHideDiv( 'shipping_input_addressForm' ); citruscartGetShippingRates( 'onCheckoutShipping_wrapper', document.adminForm ); citruscartGetPaymentOptions( 'onCheckoutPayment_wrapper', document.adminForm ); "/>&nbsp;
	                        <?php 
        echo JText::_('COM_CITRUSCART_SAME_AS_BILLING_ADDRESS');
        ?>
	                    </div>
					<?php 
    }
    ?>
            		<?php 
    $shipattribs = array('class' => 'inputbox', 'size' => '1', 'onchange' => "citruscartCheckoutSetShippingAddress('{$baseurl}'+this.options[this.selectedIndex].value, 'shippingDefaultAddress', '" . JText::_('COM_CITRUSCART_UPDATING_SHIPPING_RATES') . "', '" . JText::_('COM_CITRUSCART_UPDATING_CART') . "', '" . JText::_('COM_CITRUSCART_UPDATING_ADDRESS') . "', this.form, this.options[this.selectedIndex].value ); ");
    // display select list of stored addresses
    if ($user->id) {
        echo CitruscartSelect::address($user->id, $this->shipping_address->address_id, 'shipping_address_id', 2, $shipattribs, 'shipping_address_id', false, true);
    }
    ?>
						<div id="shippingDefaultAddress">
							<?php 
    if (!empty($this->shipping_address)) {
        echo $this->shipping_address->title . " " . $this->shipping_address->first_name . " " . $this->shipping_address->last_name . "<br>";
        echo $this->shipping_address->company . "<br>";
        echo $this->shipping_address->address_1 . " " . $this->shipping_address->address_2 . "<br>";
        echo $this->shipping_address->city . ", " . $this->shipping_address->zone_name . " " . $this->shipping_address->postal_code . "<br>";
        echo $this->shipping_address->country_name . "<br>";
    }
    ?>
						 </div>
						 <?php 
    echo $this->shipping_address_form;
echo JText::_('COM_CITRUSCART_SHIPPING_ADDRESS');
?>
</th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr>
                            <td><?php 
echo JText::_('COM_CITRUSCART_SELECT_FROM_SAVED_ADDRESSES') . ":";
?>
</td>
                        </tr>
                        <tr>
                            <td><?php 
$shipattribs = array('class' => 'inputbox', 'size' => '1', 'onchange' => 'CitruscartSetAddressToDiv(\'shipping\');CitruscartGetOrderTotals();');
echo CitruscartSelect::address($row->user_id, '', 'shipping_address_id', 2, $shipattribs, 'shipping_address_id', true);
?>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <div>
                                    <input id="sameasbilling" name="sameasbilling" type="checkbox" onclick="CitruscartDisableShippingAddressControls(this);" />&nbsp;
                                    <?php 
echo JText::_('COM_CITRUSCART_SAME_AS_BILLING_ADDRESS');
?>
:
                                </div>
                            </td>
                        </tr>
                        <tr>
?>
</th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr>
                            <td><?php 
echo JText::_('COM_CITRUSCART_SELECT_FROM_SAVED_ADDRESSES') . ":";
?>
</td>
                        </tr>
                        <tr>
                            <td>
                                <?php 
$billattribs = array('class' => 'inputbox', 'size' => '1', 'onchange' => 'CitruscartSetAddressToDiv(\'billing\'); CitruscartGetOrderTotals();');
echo CitruscartSelect::address($row->user_id, '', 'billing_address_id', 1, $billattribs, 'billing_address_id', true);
?>
                            </td>
                        </tr>
                        <tr>
                           <td colspan="2">&nbsp;</td>
                        </tr>
                        <tr>
                            <td>
                                <div id="billing_save_to_address_book_div">
                                    <input id="billing_save_to_address_book" name="billing_save_to_address_book"
                                    onclick="CitruscartShowAddressNameForSaveToAddressBook(this, 'billing_address_name_row', 'billing_input_address_name')" type="checkbox" />&nbsp;
                                    <?php 
echo JText::_('COM_CITRUSCART_SAVE_TO_ADDRESS_BOOK');
?>
:
示例#4
0
                <?php 
if ($this->showShipping) {
    ?>
              <div id="shippingAddress">
	            <h4 id='shipping_address_header' class="address_header">
	               <?php 
    echo JText::_('COM_CITRUSCART_SHIPPING_ADDRESS');
    ?>
	            </h4>

	            <?php 
    if (!empty($this->addresses)) {
        $shipattribs = array('class' => 'inputbox', 'size' => '1', 'onchange' => "citruscartGrayOutAddressDiv('" . JText::_('COM_CITRUSCART_UPDATING_ADDRESS') . "');citruscartDoTask('{$baseurl}'+this.options[this.selectedIndex].value, 'shippingDefaultAddress', '', '', false); citruscartGetShippingRates( 'onCheckoutShipping_wrapper', document.adminForm, CitruscartDeleteCombinedGrayDiv ); ");
        // CitruscartGetCheckoutTotals();
        // display select list of stored addresses
        echo CitruscartSelect::address(JFactory::getUser()->id, $this->shipping_address->address_id, 'shipping_address_id', 2, $shipattribs, 'shipping_address_id', false);
        if (count($this->addresses) == 1) {
            echo "<input type=\"hidden\" id=\"shipping_address_id\" name=\"shipping_address_id\" value=\"" . $this->shipping_address->address_id . "\" />";
        }
    }
    ?>

                <?php 
    if (empty($this->addresses)) {
        ?>
                    <div>
                        <input id="sameasbilling" name="sameasbilling" type="checkbox" onclick="citruscartDisableShippingAddressControls(this,this.form);" />&nbsp;
                        <?php 
        echo JText::_('COM_CITRUSCART_SAME_AS_BILLING_ADDRESS');
        ?>
: