Subversion Repositories wpShopGermany4

Rev

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

<?php

        /**
         * Template für die Übersichtsseite der Abonnements im Frontend
         */
 
?>

<div class="wpsg_mod_kundenverwaltung_abo wpsg">

        <?php echo $this->writeFrontendMessage(); ?>
        
        <?php if (wpsg_isSizedArray($this->view['arOrder'])) { ?>
                
                <div class="wpsg_mod_abo_order_product_wrap">
                <?php foreach ($this->view['arOrder'] as $oOrder) { ?>
                
                        <?php foreach ($this->callMod('wpsg_mod_abo', 'getAboProductsFromOrder', Array($oOrder->id)) as $oOrderProduct) { $aboStatus = $this->callMod('wpsg_mod_abo', 'getAboProductStatus', Array($oOrder->id, $oOrderProduct->getProductKey())); ?>
                        
                                <div class="wpsg_mod_abo_order_product">

                                        <h1 class="entry-title title">
                                                <?php echo wpsg_translate(__('Abo "#1#" aus Bestellung #2#', 'wpsg'), $oOrderProduct->getProduct()->getProductName(), $oOrder->getNr()); ?>
                                        </h1>
                                        
                                        <?php $nAttachmentID = $this->imagehandler->getAttachmentID($oOrderProduct->getProductKey()); ?>
                                        
                                        <?php if (wpsg_isSizedInt($nAttachmentID)) { ?>
                                                <div class="image">
                                                        <?php echo wp_get_attachment_image($nAttachmentID, array(100, 100), false, array()); ?>
                                                </div>
                                        <?php } ?>
                        
                                        <div class="content">
                                        
                                                <div class="start">
                                                        <span class="label"><?php echo __('Erstkauf (Startzeitpunkt):', 'wpsg'); ?></span>
                                                        <span class="value">
                                                                
                                                                <?php echo wpsg_formatTimestamp(strtotime($oOrder->cdate)); ?>
                                                                
                                                        </span>
                                                </div>
                                                <div class="price">
                                                        <span class="label"><?php echo wpsg_translate(__('Preis (#1# Tage):', 'wpsg'), $oOrderProduct->getProduct()->wpsg_mod_abo_durration); ?></span>
                                                        <span class="value"><?php echo wpsg_ff($oOrderProduct->getProduct()->wpsg_mod_abo_price, $this->get_option('wpsg_currency')); ?></span>
                                                </div>
                                                <div class="duration">
                                                        <span class="label"><?php echo __('Laufzeit (Endzeitpunkt):', 'wpsg'); ?></span>
                                                        <span class="value">
                                                                
                                                                <?php $exp = $this->callMod('wpsg_mod_abo', 'getOrderAboExpiration', array($oOrder->id, $oOrderProduct->getProductKey())); ?>
                                                                
                                                                <?php if (strtotime($exp) > time()) { ?>
                                                                        <span class="duration_running"><?php echo $exp; ?></span>
                                                                <?php } else { ?>
                                                                        <span class="duration_expired"><?php echo $exp; ?></span>
                                                                <?php }  ?>
                                                                
                                                        </span>
                                                </div>                                  
                                                <div class="status">
                                                        <span class="label"><?php echo __('Verlängerung:', 'wpsg'); ?></span>
                                                        <span class="value">
                                                                                                        
                                                                <?php if ($aboStatus['status'] === wpsg_mod_abo::STATUS_ACTIVE) { ?>
                                                                        
                                                                        <span class="status_activ"><?php echo __('Aktiv'); ?></span>
                                                                        
                                                                        <?php if (strtotime($aboStatus['mail_admin_stop']) > 0) { ?>
        
                                                                                <?php echo __('Kündigung ausstehend', 'wpsg'); ?>
                                                                                
                                                                        <?php } else { ?>
                                                                        
                                                                                <?php if (in_array($this->get_option('wpsg_mod_abo_autoexpire_customer'), Array(wpsg_mod_abo::CUSTOMER_AUTO_MAIL, wpsg_mod_abo::CUSTOMER_AUTO_DIRECT))) { ?>
                                                                                <span class="link_wrap"><a href="<?php echo $this->getUrl(wpsg_ShopController::URL_ABO, 'wpsg_mod_abo', 'stoprenewal', Array('order_id' => $oOrder->id, 'product_key' => $oOrderProduct->getProductKey())); ?>"><?php echo __('Deaktivieren'); ?></a></span>
                                                                                <?php } ?>
                                                        
                                                                        <?php } ?>
                                                                        
                                                                <?php } else if ($aboStatus['status'] === wpsg_mod_abo::STATUS_STOPPED) { ?>
                                                                        <span class="status_inactiv"><?php echo __('Inaktiv') ?></span>
                                                                <?php } ?> 
                                                                
                                                        </span>
                                                </div>
                                        </div>
                                        
                                        <div class="wpsg_clear"></div>
                                        
                                </div>
                                
                        <?php } // foreach OrderProducts ?>
                                                        
                <?php } // foreach Order ?>
                </div>
                
        <?php } else { ?>
        
                <p><?php echo __('Bisher kein(e) Abonnement(s) vorhanden.', 'wpsg'); ?></p>
                
        <?php } ?>
</div>