Subversion Repositories wpShopGermany4

Rev

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

Rev Author Line No. Line
5759 daniel 1
<?php
2
 
3
    /**
4
     * Integration der Variantenauswahl in die Produktverwaltung
5
     */
5767 daniel 6
 
5759 daniel 7
?>
8
 
5767 daniel 9
<div class="wpsg_mod_productvariants_product_wrap" id="wpsg_mod_productvariants_product_wrap_<?php echo $GLOBALS['wpsg_produkt_index']; ?>" wpsg-productindex="<?php echo $GLOBALS['wpsg_produkt_index']; ?>">
5760 daniel 10
    <?php foreach ($this->view['wpsg_mod_productvariants']['arVariants'] as $var) { ?>
11
 
5767 daniel 12
        <div class=wpsg_mod_productvariants_product wpsg_mod_productvariants_type_<?php echo $var['type']; ?>">
13
 
14
            <?php if ($var['type'] == wpsg_mod_productvariants::TYPE_SELECT) { ?>
5760 daniel 15
 
5767 daniel 16
                <label class="wpsg_mod_productvariants_label" for="wpsg_mod_productvariants_<?php echo $this->view['wpsg_mod_productvariants']['product_id']; ?>_<?php echo $var['id']; ?>"><?php echo wpsg_hspc($var['name']); ?></label>
17
 
18
                <select class="wpsg_mod_productvariants_change" id="wpsg_mod_productvariants_<?php echo $this->view['wpsg_mod_productvariants']['product_id']; ?>_<?php echo $var['id']; ?>" name="wpsg_mod_productvariants[<?php echo $var['id']; ?>]">
19
                    <?php foreach ($var['arVariation'] as $vari) { ?>
20
                    <option <?php echo (($this->view['wpsg_mod_productvariants']['product_variants'][$var['id']] == $vari['id'])?'selected="selected"':''); ?> value="<?php echo $vari['id']; ?>"><?php echo wpsg_hspc($vari['name']); ?></option>
21
                    <?php } ?>
22
                </select>
5760 daniel 23
 
5767 daniel 24
            <?php } else if ($var['type'] == wpsg_mod_productvariants::TYPE_RADIO) { ?>
25
 
26
                <label class="wpsg_mod_productvariants_label"><?php echo wpsg_hspc($var['name']); ?></label>
27
 
28
                <?php foreach ($var['arVariation'] as $vari) { ?>
29
                <label class="wpsg_mod_productvariants_variation_label">
30
                    <input class="wpsg_mod_productvariants_change" <?php echo (($this->view['wpsg_mod_productvariants']['product_variants'][$var['id']] == $vari['id'])?'checked="checked"':''); ?> type="radio" name="wpsg_mod_productvariants[<?php echo $var['id']; ?>]" value="<?php echo $vari['id']; ?>" />
31
                    <span><?php echo wpsg_hspc($vari['name']); ?></span>
32
                </label>
33
                <?php } ?>
34
 
35
            <?php } ?>
5760 daniel 36
 
37
        </div>
5759 daniel 38
 
5760 daniel 39
    <?php } ?>
5767 daniel 40
 
41
    <script type="text/javascript">/* <![CDATA[ */
42
 
43
        jQuery(document).ready(function() {
44
 
45
            jQuery('#wpsg_mod_productvariants_product_wrap_<?php echo $GLOBALS['wpsg_produkt_index']; ?>').bind('change', wpsg_mod_productvariants_reload);
46
 
47
        } );
48
 
49
    /* ]]> */</script>
50
 
5760 daniel 51
</div>