-
Notifications
You must be signed in to change notification settings - Fork 0
/
mp_product.php
126 lines (82 loc) · 4.09 KB
/
mp_product.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
<?php get_header(); ?>
<?php
$btnclass = mpt_load_mp_btn_color();
$iconclass = mpt_load_whiteicon_in_btn();
$tagcolor = mpt_load_icontag_color();
?>
<!-- Post -->
<div id="product-single-wrapper">
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<?php
$headerbgcolor = esc_attr(get_post_meta( $post->ID, '_mpt_post_header_bg_color', true ));
$headertextcolor = esc_attr(get_post_meta( $post->ID, '_mpt_post_header_text_color', true ));
$contentbgcolor = esc_attr(get_post_meta( $post->ID, '_mpt_post_content_bg_color', true ));
$contenttextcolor = esc_attr(get_post_meta( $post->ID, '_mpt_post_content_text_color', true ));
?>
<div class="header-section"<?php echo ($headerbgcolor != '#' && !empty($headerbgcolor) ? ' style="background: '.$headerbgcolor.';"' : '') ?>>
<div class="outercontainer">
<div class="container">
<div class="clear padding30"></div>
<h1 class="page-header"><span<?php echo ($headertextcolor != '#' && !empty($headertextcolor) ? ' style="color: '.$headertextcolor.';"' : '') ?>><?php the_title(); ?></span></h1>
<div class="post-meta">
<p><?php _e( 'Categorized in ', 'flexmarket' ); ?><?php the_terms( $post->ID, 'product_category' , '<span class="label label-tag">' , '</span> <span class="label label-tag">' , '</span>' ); ?> <?php the_terms( $post->ID, 'product_tag' , '<span class="label label-tag">' , '</span> <span class="label label-tag">' , '</span>' ); ?> </p>
</div>
<div class="clear padding15"></div>
</div><!-- / container -->
</div><!-- / outercontainer -->
</div><!-- / header-section -->
<div class="content-section"<?php echo ($contentbgcolor != '#' && !empty($contentbgcolor) ? ' style="background: '.$contentbgcolor.';"' : '') ?>>
<div class="outercontainer">
<div class="clear padding30"></div>
<div class="container">
<div class="row-fluid">
<div class="span8">
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?><?php echo ($contenttextcolor != '#' && !empty($contenttextcolor) ? ' style="color: '.$contenttextcolor.';"' : '') ?>>
<?php mpt_load_top_code(); ?>
<?php if (has_post_thumbnail( $post->ID )) : ?>
<?php
$id = get_the_ID();
$image1 = get_post_meta( $id, '_mpt_video_featured_image_2', true );
$image2 = get_post_meta( $id, '_mpt_video_featured_image_3', true );
if (!empty($image1) || !empty($image2)) {
mpt_load_image_carousel( $id , 'tb-860' , true );
} else {
mpt_load_featured_image( $id , 'tb-860' , true , $btnclass , $iconclass );
}
?>
<?php endif; ?>
<div class="clear padding25"></div>
<div class="row-fluid">
<div class="span3">
<?php flexmarket_product_price(true , NULL , true , $tagcolor); ?>
</div>
<div class="span9 align-right">
<?php flexmarket_buy_button(true, 'single' , NULL , $btnclass); ?>
</div>
</div>
<div class="clear"></div>
<?php the_content(); ?>
<div class="clear padding20"></div>
<?php edit_post_link('Edit this entry.', '<p>', '</p>'); ?>
<div class="clear padding30"></div>
<?php
$showcomments = get_post_meta( $post->ID, '_mpt_post_show_comments', true );
if ( $showcomments == 'on') {
comments_template();
}
?>
</div>
<?php endwhile; endif; ?>
<?php mpt_load_bottom_code(); ?>
</div><!-- / span8 -->
<div id="sidebar" class="span4">
<?php get_sidebar(); ?>
</div>
</div><!-- / row-fluid -->
<div class="padding20"></div>
</div><!-- / container -->
</div><!-- / outercontainer -->
</div><!-- / content-section -->
</div><!-- / page-wrapper -->
<?php get_template_part('footer', 'widget'); ?>
<?php get_footer(); ?>