Subversion Repositories wpShopGermany4

Rev

Rev 7316 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

<div class="wpsg_mod_shippingadress">

        <h2><?php echo __('Gesonderte Lieferadresse', 'wpsg'); ?></h2>
        
        <div class="wpsg_spacer"></div>
        
        <div class="wpsg_inner">
        
                <div class="wpsg_checkoutblock">
                        <label for="act_checkout_shippingadress">
                                <input id="act_checkout_shippingadress" class="wpsg_checkout formfield_checkbox" type="checkbox" name="wpsg[checkout][diff_shippingadress]" value="" <?php echo ((wpsg_isSizedInt($_SESSION['wpsg']['checkout']['diff_shippingadress']))?'checked="checked"':'') ?> onclick="view_checkout_shippingadresss()" />
                                <?php echo __('Gesonderte Lieferadresse abweichend von der Rechnungsadresse verwenden', 'wpsg') ?>
                        </label>                        
                </div>
                
                <div class="wpsg_clear"></div>
                
                <div class="checkout_shippingadress" style="display:none;"> 
                
                        <?php if ($this->view['pflicht']['firma'] != '2') { ?>
                        <div class="wpsg_checkoutblock">
                                <label for="shipping_firma" class="wpsg_checkout"><?php echo __("Firma:", "wpsg"); ?>
                                        <?php if ($this->view['pflicht']['firma'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>
                                </label>
                                <input class="<?php echo (($this->view['pflicht']['firma'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("name", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="shipping_name" name="wpsg[checkout][shipping_firma]" value="<?php echo wpsg_hspc(wpsg_getStr($this->view['basket']['checkout']['shipping_firma'])); ?>" />
                        </div>
                        <?php } ?>
                
                        <?php if ($this->view['pflicht']['anrede'] != '2') { ?>
                        <div class="wpsg_checkoutblock">
                                <label for="shipping_title" class="wpsg_checkout"><?php echo __("Anrede:", "wpsg"); ?>
                                        <?php if ($this->view['pflicht']['anrede'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>
                                </label>
                                <select class="<?php echo (($this->view['pflicht']['anrede'] != '1')?'validate[required_shipping]':''); ?> wpsg_checkout <?php echo ((in_array("title", (array)$this->view['error']))?'wpsg_error':''); ?>" type="select" id="shipping_title" name="wpsg[checkout][shipping_title]">
                                <option value="-1"><?php echo __('Bitte auswählen', 'wpsg'); ?></option>
                                <?php $i=0; foreach (explode("|", $this->view['pflicht']['anrede_auswahl']) as $t) { ?>
                                <option value="<?php echo $i; /*wpsg_hspc($t);*/ $i++; ?>" <?php echo ((wpsg_isSizedString($this->view['basket']['checkout']['shipping_title'], $t))?'selected="selected"':''); ?>><?php echo $t; ?></option>
                                <?php } ?>
                                </select>
                        </div>
                        <?php } ?>
                        
                        <?php if ($this->view['pflicht']['vname'] != '2') { ?>
                        <div class="wpsg_checkoutblock">
                                <label for="shipping_vname" class="wpsg_checkout"><?php echo __("Vorname:", "wpsg"); ?>
                                        <?php if ($this->view['pflicht']['vname'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>
                                </label>
                                <input class="<?php echo (($this->view['pflicht']['vname'] != '1')?'validate[required_shipping]':''); ?> wpsg_checkout <?php echo ((in_array("shipping_vname", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="shipping_vname" name="wpsg[checkout][shipping_vname]" value="<?php echo wpsg_hspc(wpsg_getStr($this->view['basket']['checkout']['shipping_vname'])); ?>" />
                        </div>
                        <?php } ?>
                                
                        <?php if ($this->view['pflicht']['name'] != '2') { ?>
                        <div class="wpsg_checkoutblock">
                                <label for="shipping_name" class="wpsg_checkout"><?php echo __("Name:", "wpsg"); ?>
                                        <?php if ($this->view['pflicht']['name'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
                                </label>
                                <input class="<?php echo (($this->view['pflicht']['name'] != '1')?'validate[required_shipping]':''); ?> wpsg_checkout <?php echo ((in_array("shipping_name", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="shipping_name" name="wpsg[checkout][shipping_name]" value="<?php echo wpsg_hspc(wpsg_getStr($this->view['basket']['checkout']['shipping_name'])); ?>" />
                        </div>
                        <?php } ?>
                                
                        <?php if ($this->view['pflicht']['strasse'] != '2') { ?>
                                
                                <?php if ($this->view['pflicht']['wpsg_showNr'] === '1') { ?>

                                        <div class="wpsg_checkoutblock" id="wpsg_streetnr">
                                                <label for="shipping_strasse" class="street wpsg_checkout"><?php echo __('Straße:', 'wpsg'); ?>
                                                        <?php if ($this->view['pflicht']['strasse'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>
                                                        <input class="<?php echo (($this->view['pflicht']['strasse'] != '1')?'validate[required_shipping]':''); ?> wpsg_checkout <?php echo ((in_array("shipping_strasse", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="shipping_strasse" name="wpsg[checkout][shipping_strasse]" value="<?php echo htmlspecialchars(wpsg_getStr($this->view['basket']['checkout']['shipping_strasse'])); ?>" />
                                                </label>
                                                <label for="shipping_nr" class="nr wpsg_checkout"><?php echo __('Nr:', 'wpsg'); ?>
                                                        <?php if ($this->view['pflicht']['strasse'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>
                                                        <input class="<?php echo (($this->view['pflicht']['strasse'] != '1')?'validate[required_shipping]':''); ?> wpsg_checkout <?php echo ((in_array("shipping_nr", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="shipping_nr" name="wpsg[checkout][shipping_nr]" value="<?php echo htmlspecialchars(wpsg_getStr($this->view['basket']['checkout']['shipping_nr'])); ?>" />
                                                </label>
                                        </div>
                                
                                <?php } else { ?>

                                        <div class="wpsg_checkoutblock">
                                                <label for="shipping_strasse" class="wpsg_checkout"><?php echo __("Straße, Nr.:", "wpsg"); ?>
                                                        <?php if ($this->view['pflicht']['strasse'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>
                                                </label>
                                                <input class="<?php echo (($this->view['pflicht']['strasse'] != '1')?'validate[required_shipping]':''); ?> wpsg_checkout <?php echo ((in_array("shipping_strasse", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="shipping_strasse" name="wpsg[checkout][shipping_strasse]" value="<?php echo wpsg_hspc(wpsg_getStr($this->view['basket']['checkout']['shipping_strasse'])); ?>" />
                                        </div>
                                
                                <?php } ?> 
                                
                        <?php } ?>
                                                
                        <?php if ($this->view['pflicht']['plz'] != '2') { ?>
                        <div class="wpsg_checkoutblock">
                                <label for="shipping_plz" class="wpsg_checkout"><?php echo __("Postleitzahl:", "wpsg"); ?> 
                                        <?php if ($this->view['pflicht']['plz'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>
                                </label>
                                <input class="<?php echo (($this->view['pflicht']['plz'] != '1')?'validate[required_shipping]':''); ?> wpsg_checkout <?php echo ((in_array("shipping_plz", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="shipping_plz" name="wpsg[checkout][shipping_plz]" value="<?php echo wpsg_hspc(wpsg_getStr($this->view['basket']['checkout']['shipping_plz'])); ?>" />
                        </div>
                        <?php } ?>
                                
                        <?php if ($this->view['pflicht']['ort'] != '2') { ?>
                        <div class="wpsg_checkoutblock">
                                <label for="shipping_ort" class="wpshopgermany_checkout"><?php echo __("Ort:", "wpsg"); ?> 
                                        <?php if ($this->view['pflicht']['ort'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>
                                </label>
                                <input class="<?php echo (($this->view['pflicht']['ort'] != '1')?'validate[required_shipping]':''); ?> wpsg_checkout <?php echo ((in_array("shipping_ort", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="shipping_ort" name="wpsg[checkout][shipping_ort]" value="<?php echo wpsg_hspc(wpsg_getStr($this->view['basket']['checkout']['shipping_ort'])); ?>" />
                        </div>
                        <?php } ?>
                                
                        <?php if ($this->view['pflicht']['land'] != '2') { ?>
                        <div class="wpsg_checkoutblock">
                                <label for="shipping_land" class="wpsg_checkout"><?php echo __("Land:", "wpsg"); ?>
                                        <?php if ($this->view['pflicht']['land'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>
                                </label>                                
                                <select name="wpsg[checkout][shipping_land]" class="<?php echo (($this->view['pflicht']['land'] != '1')?'validate[required_shipping]':''); ?> wpsg_checkout <?php echo ((in_array("shipping_land", (array)$this->view['error']))?'wpsg_error':''); ?>" id="shipping_land">
                                        <option value="-1"><?php echo __('Bitte auswählen', 'wpsg'); ?></option>
                                        <?php foreach ($this->view['laender'] as $l) { ?>
                                        <option value="<?php echo $l['id']; ?>" <?php echo (($l['id'] == $this->view['basket']['checkout']['shipping_land'])?'selected="selected"':''); ?>><?php echo wpsg_hspc($l['name']); ?></option>
                                        <?php } ?>
                                </select>
                        </div>
                        <?php } ?>
                 
                        <script type="text/javascript">/* <![CDATA[ */
                                        
                                function view_checkout_shippingadresss()
                                {
                         
                                        if (jQuery('#act_checkout_shippingadress').prop('checked') != true)
                                        {
                                                
                                                jQuery('.checkout_shippingadress').attr('style', 'display:none;');
                                                jQuery('#act_checkout_shippingadress').attr('value', null);

                                                <?php if ($this->get_option('wpsg_form_validation') == '2') { ?>
                                                jQuery.validator.removeClassRules('validate[required_shipping]', { cRequired: true } );
                                                <?php } ?>
                                                
                                        }
                        
                                        if (jQuery('#act_checkout_shippingadress').prop('checked') == true)
                                        {
                                                
                                                jQuery('.checkout_shippingadress').attr('style', 'display:display;');
                                                jQuery('#act_checkout_shippingadress').attr('value', 1);

                                                <?php if ($this->get_option('wpsg_form_validation') == '2') { ?>
                                                jQuery.validator.addClassRules('validate[required_shipping]', { cRequired: true } );
                                                <?php } ?>
                                                
                                        }       
                                        
                                        return false;
                                        
                                }
                
                                jQuery(document).ready(function()
                                {       
                                        
                                        view_checkout_shippingadresss();

                                        land = <?php if (wpsg_isSizedInt($this->view['basket']['checkout']['shipping_land'])) echo $this->view['basket']['checkout']['shipping_land'];
                                        else echo $this->get_option('wpsg_defaultland'); ?>;
                                        jQuery('#shipping_land').val(land);
                                        
                                });
                                
                        /* ]]> */</script>
                </div>
        </div>
</div>