<?php if (!empty(getDiscountPlan())): ?>
    <section id="discountOffer">
        <div class="adds discount-plan">
            <!--- Dynamic Offer Block--->
            <?php foreach (getDiscountPlan() as $aSideDiscountPlan): ?>
                <?php if (in_array(6, unserialize($aSideDiscountPlan->onapp))): ?>
                    <div class="text-center  adds-inner">
                        <div class="dynamic-adds">
                            <div class="offer-title"><?php echo $aSideDiscountPlan->title ?></div>
                            <div class="offer-description">
                                <div class="on-factor">Enjoy <?php $aSideDiscountPlan->onfunc === '2' ? print $aSideDiscountPlan->discount . '%' : print to_currency($aSideDiscountPlan->discount) ?> discount for minimum order amount <?php echo to_currency($aSideDiscountPlan->min_order) ?></div>
                                <div class="on-factor">
                                    <?php if (in_array(4, unserialize($aSideDiscountPlan->onapp))): ?>
                                        <span>Delivery</strong></span>
                                    <?php endif; ?>
                                    <?php if (in_array(5, unserialize($aSideDiscountPlan->onapp))): ?>
                                        <span>Collection</span>
                                    <?php endif; ?>
                                </div>
                                <div class="on-factor">
                                    <?php $addsSideDiscountPlanDaysArray = array('1' => 'Sun', '2' => 'Mon', '3' => 'Tue', '4' => 'Wed', '5' => 'Thu', '6' => 'Fri', '7' => 'Sat') ?>
                                    <?php foreach (unserialize($aSideDiscountPlan->onday) as $aday): ?>
                                        <?php echo $addsSideDiscountPlanDaysArray[$aday] ?>
                                    <?php endforeach; ?>
                                </div>
                                <div class="on-factor text-uppercase"><?php echo $aSideDiscountPlan->start_time . ' - ' . $aSideDiscountPlan->end_time ?></div>
                            </div>
                        </div>
                    </div> 
                <?php endif; ?>
            <?php endforeach; ?>
            <!--- Static Offer Block--->
            <!--<div class="block text-center text-capitalize"><img src="<?php echo ONLINE_RESOURCES_PATH ?>images/voucher-disc.jpg"></div>-->
        </div>
    </section>
<?php endif; ?>