*

Satbeer Singh

  • ****
  • 113 posts
Creating another div for Premium Listings
« on: September 20, 2016, 11:05:25 AM »
how can i Create another div for Premium Listings in zara to show only those listings which are premium

*

MB Themes

  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

Satbeer Singh

  • ****
  • 113 posts
Re: Creating another div for Premium Listings
« Reply #2 on: September 20, 2016, 01:39:36 PM »
i think u r not understanding,what i m trying to say is
that in theme there is div for the latest items posted on the main page
i want to make another div for premium listing below it so that my customers can have a look on it

*

MB Themes

Re: Creating another div for Premium Listings
« Reply #3 on: September 20, 2016, 01:59:34 PM »
@Satbeer
You would need to duplicate code for latest shown on homepage and replace loop with premium items.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

Satbeer Singh

  • ****
  • 113 posts
Re: Creating another div for Premium Listings
« Reply #4 on: September 20, 2016, 06:41:25 PM »
Sir can u please send me the code to be replaced for it.

*

MB Themes

Re: Creating another div for Premium Listings
« Reply #5 on: September 21, 2016, 11:28:13 AM »
@Satbeer Singh
I would start with this:
Code: [Select]
    <!-- PREMIUM LISTINGS -->
    <div id="latest" class="white prem">
      <h2 class="home">
        <?php _e('Premium listings''zara'); ?>
      </h2>

      <?php if( osc_count_premiums() > 0) { ?>
        <div class="block">
          <div class="wrap">
            <?php $c 1?>
            <?php while( osc_has_premiums() ) { ?>
              <div class="simple-prod o<?php echo $c?>">
                <div class="simple-wrap">
                  <?php if(function_exists('fi_make_favorite')) { echo fi_make_favorite(); } ?>

                  <div class="item-img-wrap">
                    <?php if(osc_count_premium_resources()) { ?>
                      <?php if(osc_count_premium_resources() == 1) { ?>
                        <a class="img-link" href="<?php echo osc_premium_title(); ?>"><img src="<?php echo osc_resource_thumbnail_url(); ?>" title="<?php echo osc_esc_html(osc_premium_title()); ?>" alt="<?php echo osc_esc_html(osc_premium_title()); ?>" /></a>
                      <?php } else { ?>
                        <a class="img-link" href="<?php echo osc_item_url(); ?>">
                          <?php for ( $i 0osc_has_premium_resources(); $i++ ) { ?>
                            <?php if($i <= 1) { ?>
                              <img class="link<?php echo $i?>" src="<?php echo osc_resource_thumbnail_url(); ?>" title="<?php echo osc_esc_html(osc_premium_title()); ?>" alt="<?php echo osc_esc_html(osc_premium_title()); ?>" />
                            <?php ?>
                          <?php ?>
                        </a>
                      <?php ?>
                    <?php } else { ?>
                      <a class="img-link" href="<?php echo osc_premium_title(); ?>"><img src="<?php echo osc_current_web_theme_url('images/no-image.png'); ?>" title="<?php echo osc_esc_html(osc_premium_title()); ?>" alt="<?php echo osc_esc_html(osc_premium_title()); ?>" /></a>
                    <?php ?>

                    <a class="orange-but" title="<?php echo osc_esc_html(__('Quick view''zara')); ?>" href="<?php echo osc_item_url(); ?>" title="<?php echo osc_esc_html(__('Open this listing''zara')); ?>"><i class="fa fa-hand-pointer-o"></i></a>
                  </div>

                  <?php
                    $now 
time();
                    
$your_date strtotime(osc_premium_pub_date());
                    
$datediff $now $your_date;
                    
$item_d floor($datediff/(60*60*24));

                    if(
$item_d == 0) {
                      
$item_date __('today''zara');
                    } else if(
$item_d == 1) {
                      
$item_date __('yesterday''zara');
                    } else {
                      
$item_date date(osc_get_preference('date_format''zara_theme'), $your_date);
                    }
                  
?>


                  <?php if(osc_item_is_premium()) { ?>
                    <div class="new">
                      <span class="top"><?php _e('premium''zara'); ?></span>
                    </div>
                  <?php ?>                 
                 
                  <a class="title" href="<?php echo osc_item_url(); ?>"><?php echo osc_highlight(osc_premium_title(), 100); ?></a>

                  <?php if( osc_price_enabled_at_items() ) { ?>
                    <div class="price"><span><?php echo osc_premium_formated_price(); ?></span></div>
                  <?php ?>
                </div>
              </div>
             
              <?php $c++; ?>
            <?php ?>
          </div>
        </div>
     
        <div class="home-see-all">
          <a href="<?php echo osc_search_url(array('page' => 'search'));?>"><?php _e('See all offers''zara'); ?></a>
          <i class="fa fa-angle-down"></i>
        </div>
      <?php } else { ?>
        <div class="empty"><?php _e('No premium listings''zara'); ?></div>
      <?php ?>

      <?php View::newInstance()->_erase('items') ; ?>
    </div>


Rest is on you.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots