Subversion Repositories SmartDukaan

Rev

Rev 19359 | Blame | Compare with Previous | Last modification | View Log | RSS feed

<style type="text/css">
h5{font-weight: bold;text-decoration: underline;}
h4{font-weight: bold;text-decoration: underline;}

        td:first-child {border:1px solid  #e6e6e6;}
        td{
        padding:2px;
    border:1px solid #e6e6e6;
}
tr{width:100%;}
    table{
        font-size: 13px;
    }
.redcolor {
        color:red;
}
</style>
<?php if(isset($response) && !empty($response)):?>
<div class="container">
        <div class="row-fluid"> 
                <div class="col-xs-12 bgwhite" style="margin:5px 0;">
                
                        <h4 class="text-center">Accessories cashback scheme for April</h4>
                        
                        
                        <div id="foreng">
                                <!-- <h5>Exclusive offer only for you (<?php //echo $user_email;?>)</h5> -->
                            <div style="margin:5px 0;">
                                        Orders placed till <?php echo date('d-M',$response['last_run_timestamp']/1000);?>.
                                        <table cellpadding="1" cellspacing="1" width="100%">
                                                
                                                <?php if(isset($response['delivered_order_value'])):?>
                                                        <tr>
                                                                <td>Delivered Orders</td>
                                                                <td> &#8377; <?php echo number_format($response['delivered_order_value']);?></td>
                                                        </tr>
                                                <?php endif;?>
                                                <?php if(isset($response['pending_order_value'])):?>
                                                        <tr>
                                                                <td>In process Orders </td>
                                                                <td> &#8377; <?php echo number_format($response['pending_order_value']);?></td>
                                                        </tr>
                                                <?php endif;?>
                                                <tr>
                                                                <td><b>Total</b></td>
                                                                <td> <b>&#8377; <?php echo number_format($response['pending_order_value'] + $response['delivered_order_value']);?></b></td>
                                                </tr>
                                        </table>
                                        
                                <div style="margin:15px 0 10px;">
                                        
                                        <?php //if(isset($needtoachieveval) && $needtoachieveval >0){
                                                $totalval = $response['delivered_order_value'] + $response['pending_order_value'];
                                                $getcashback = 0;
                                                
                                                if($totalval< $response['target1']){
                                                        echo "* You are not eligible for cashback.";
                                                }
                                                else if($totalval< $response['target2']){
                                                        if($response['maxCashBack']< intval(($totalval*$response['target1_cash_back_percetage'])/100)){
                                                                $getcashback = $response['maxCashBack'];
                                                        }
                                                        else{
                                                                $getcashback = intval(($totalval*$response['target1_cash_back_percetage'])/100);
                                                        }
                                                        echo "* You are eligible for <span class='redcolor'>". $response['target1_cash_back_percetage']."%</span> cashback.<br> ";
                                                        echo "* <span class='redcolor'>&#8377;".number_format($getcashback) ."</span> will be credited to your account on 20th May subject to orders delivered.";
                                                }
                                                else{
                                                        if($response['maxCashBack']< intval(($totalval*$response['target2_cash_back_percetage'])/100)){
                                                                $getcashback = $response['maxCashBack'];
                                                        }
                                                        else{
                                                                $getcashback = intval(($totalval*$response['target2_cash_back_percetage'])/100);
                                                        }
                                                        echo "* You are eligible for <span class='redcolor'>". $response['target2_cash_back_percetage']."%</span> cashback.<br>";
                                                        echo "* <span class='redcolor'>&#8377;".number_format($getcashback) ."</span> will be credited to your account on 20th May subject to orders delivered.";
                                                }
                                        ?>
                                        <hr style="border-top: 2px solid #eee;">
                                </div>
                                </div>
                                
                                <h5>Scheme Target</h5>
                                
                                <div style="margin:5px 0;">

                                        <table cellpadding="1" cellspacing="1" width="100%">
                                                <tr><td><b>Total purchase in April</b></td><td><b>Cashback</b></td></tr>
                                                <?php if(isset($response['target1'])&& isset($response['target1_cash_back_percetage'])):?>
                                                        <tr>
                                                                <td>Above <span class="redcolor">&#8377; <?php echo number_format($response['target1']);?>*</span></td>
                                                                <td class="redcolor"><?php echo $response['target1_cash_back_percetage']?>%</td>
                                                        </tr>
                                                <?php endif;?>
                                                <?php if(isset($response['target2'])&& isset($response['target2_cash_back_percetage'])):?>
                                                        <tr>
                                                                <td>Above <span class="redcolor">&#8377; <?php echo number_format($response['target2']);?>*</span></td>
                                                                <td class="redcolor"><?php echo $response['target2_cash_back_percetage']?>%</td>
                                                        </tr>
                                                <?php endif;?>
                                        </table>

                                </div>
                                
                                <div class="bgreen" style="margin:5px 0;font-size:12px;">
                                        <b><u>Terms and condtions:</u></b><br>
                                        <ul style="padding-left: 20px;">
                                        <li> You can achieve your target by placing multiple orders during April.</li>
                                        <li> Max cashback will be <span class="redcolor">&#8377; <?php echo number_format($response['maxCashBack']);?></span>.</li>
                                        <li> Above scheme is applicable only to you (<b><?php echo $user_email;?></b>).</li>
                                        <li> <span class="redcolor">*Smart watch</span>, <span class="redcolor">memory card</span> and <span class="redcolor">pendrive</span> do not qualify in the above scheme.</li>
                                        <li> Cashback available only on orders billed and fulfilled by <b>saholic.com</b>.</li>
                                        <li> Cashback available only on delivered orders.</li>
                                        <li> Cashback will be credited to your account by 20th May 2016.</li>
                                        <li> <b>ProfitMandi</b> shall have final discretion on matters relating to cashback.</li>
                                        </ul>
                                        <?php
//                                              $gocount =0;
//                                              foreach($response['sub_categories_not_applicable'] as $rkey){
//                                              echo $subcat[$rkey];
//                                              $gocount = $gocount +1;
//                                              if(count($response['sub_categories_not_applicable'])>1 && count($response['sub_categories_not_applicable'])!= $gocount){
//                                                      echo ", ";
//                                              }
                                        //}
                                        ?>
                                        
                                </div>
                                <?php  //if(isset($needtoachieveval)):?>
                                
                                                                                                
                            <?php //endif;?>
                        </div>
                        
                        
                </div>
        </div>
</div>
<?php else:?>
        <div class="well text-center emptyCart">
                        No offer available for you.             
        </div>

<?php endif;?>