Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * This file is part of TheCartPress.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
- /**
- * The loop that displays products in configurable UL,LI mode.
- *
- * @package TheCartPRess
- * @subpackage
- * @since 1.1.3
- */
- ?>
- <?php /* If there are no products to display, such as an empty archive page */ ?>
- <?php if ( ! have_posts() ) : ?>
- <article id="post-0" class="post no-results not-found">
- <header class="entry-header">
- <h1 class="entry-title"><?php _e( 'Nothing Found', 'twentyeleven' ); ?></h1>
- </header><!-- .entry-header -->
- <div class="entry-content">
- <p><?php _e( 'Apologies, but no results were found for the requested archive. Perhaps searching will help find a related post.', 'twentyeleven' ); ?>
- </p>
- <?php get_search_form(); ?>
- </div><!-- .entry-content -->
- </article><!-- #post-0 -->
- <?php endif; ?>
- <?php
- $currency = tcp_the_currency( false );
- if ( ! isset( $instance ) ) $instance = get_option( 'ttc_settings' );
- $see_title = isset( $instance['see_title'] ) ? $instance['see_title'] : true;
- $title_tag = isset( $instance['title_tag'] ) ? $instance['title_tag'] : '';
- $see_image = isset( $instance['see_image'] ) ? $instance['see_image'] : true;
- $image_size = isset( $instance['image_size'] ) ? $instance['image_size'] : 'true';
- $see_excerpt = isset( $instance['see_excerpt'] ) ? $instance['see_excerpt'] : true;
- $see_content = isset( $instance['see_content'] ) ? $instance['see_content'] : false;
- $see_price = isset( $instance['see_price'] ) ? $instance['see_price'] : true;
- $see_buy_button = isset( $instance['see_buy_button'] ) ? $instance['see_buy_button'] : false;
- $see_author = isset( $instance['see_author'] ) ? $instance['see_author'] : false;
- $see_posted_on = isset( $instance['see_posted_on'] ) ? $instance['see_posted_on'] : false;
- $see_taxonomies = isset( $instance['see_taxonomies'] ) ? $instance['see_taxonomies'] : false;
- $see_meta_utilities = isset( $instance['see_meta_utilities'] ) ? $instance['see_meta_utilities'] : false;
- $see_sorting_panel = isset( $instance['see_sorting_panel'] ) ? $instance['see_sorting_panel'] : false;
- $number_of_columns = isset( $instance['columns'] ) ? (int)$instance['columns'] : 2;
- //custom areas. Usefull to insert other template tag from WordPress or another plugins
- $see_first_custom_area = isset( $instance['see_first_custom_area'] ) ? $instance['see_first_custom_area'] : false;
- $see_second_custom_area = isset( $instance['see_second_custom_area'] ) ? $instance['see_second_custom_area'] : false;
- $see_third_custom_area = isset( $instance['see_third_custom_area'] ) ? $instance['see_third_custom_area'] : false;
- $see_pagination = isset( $instance['see_pagination'] ) ? $instance['see_pagination'] : false;
- $column = $number_of_columns;
- if ( isset( $instance['title_tag'] ) && $instance['title_tag'] != '' ) {
- $title_tag = '<' . $instance['title_tag'] . ' class="entry-title">';
- $title_end_tag = '</' . $instance['title_tag'] . '>';
- } else {
- $title_tag = '';
- $title_end_tag = '';
- }
- ?>
- <?php if ( $see_sorting_panel ) {
- tcp_the_sort_panel();
- } ?>
- <?php /* Start the Loop.*/ ?>
- <div id="left_gallery">
- <ul class="tcp_products_list">
- <?php
- while ( have_posts() ) : the_post();
- if ( $column == 0 ) $column = $number_of_columns;
- $tcp_col = $number_of_columns - $column + 1;
- $class = array( 'tcp_' . $number_of_columns . '_cols', 'tcp_col_' . $tcp_col );
- //$td_class = 'class="' . join( ' ', get_post_class( $class ) ) . '"'; ?>
- <li id="td-post-<?php the_ID(); ?>" class="tcp_col <?php echo implode( ' ', $class ); ?>">
- <?php $column--;?>
- <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
- <div class="product">
- <?php if ( $see_title ) : ?><?php if ( $see_image ) : ?><a href="#dialog<?php the_ID(); ?>" title="<?php the_title(); ?>" rel="facebox"><?php if ( function_exists( 'the_post_thumbnail' ) ) the_post_thumbnail( 'thumbnail' ); ?></a><?php endif; ?><?php endif; ?>
- </div>
- <div id="dialog<?php the_ID(); ?>" class="window">
- <div class="top">
- <?php if ( $see_title ) : ?>
- <?php echo $title_tag;?>
- <h3 class="title"><?php the_title(); ?></h3>
- <?php echo $title_end_tag;?>
- <?php endif; ?>
- </div>
- <div class="left">
- <?php if ( $see_image ) : ?><?php if ( function_exists( 'the_post_thumbnail' ) ) the_post_thumbnail( 'large' ); ?><?php endif; ?>
- </div>
- <div class="right">
- <?php if ( $see_price ) :?>
- <p class="price">Price: <?php tcp_the_price_label();?></p>
- <?php endif;?>
- <?php the_content(); ?>
- <div id="cart"><span style="float:left; display:none;"><img src="../wp-content/themes/soulabstract_v1/images/shopcart.png" /></span><span style="float:right"><a href="http://www.soulabstract.com/contact/"><img src="http://www.soulabstract.com/wp-content/themes/soulabstract_v1/images/contactmfp.jpg" /></a><span style="display:none"><?php tcp_the_buy_button( $post_id, true ); ?></span></style></div>
- </div>
- </div>
- <div id="mask"></div>
- </div><!-- #post-## -->
- </li>
- <?php endwhile; // End the loop ?>
- <?php for(; $column > 0; $column-- ) :
- $class = array( 'tcp_' . $number_of_columns . '_cols', 'tcp_col_' . ++$tcp_col );?>
- <li class="tcp_col <?php echo implode( ' ', $class ); ?> tcp_td_empty"> </li>
- <?php endfor; ?>
- </ul>
- </div>
- <div id="right_gallery">
- <?php
- query_posts('p=250');
- while (have_posts()) : the_post();
- endwhile;
- ?>
- <?php the_content('Read More »'); ?>
- </div>
- <span style="clear:both"></span>
- <?php /* Display pagination */
- if ( $see_pagination ) tcp_get_the_pagination(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement