PluginProbe
Product Labels, Quick View, Buy Now, Pre-Orders, Frequently Bought Together & More for WooCommerce – Merchant / trunk
Product Labels, Quick View, Buy Now, Pre-Orders, Frequently Bought Together & More for WooCommerce – Merchant vtrunk
2.3.1 2.3.0 2.2.8 2.2.7 trunk 1.10.0 1.10.1 1.10.2 1.10.3 1.10.4 1.10.5 1.11.0 1.11.1 1.11.2 1.6 1.7 1.8 1.8.1 1.8.2 1.8.3 1.9.0 1.9.1 1.9.10 1.9.11 1.9.12 All 59 releases
merchant / templates / modules / quick-view / content.php

content.php in Product Labels, Quick View, Buy Now, Pre-Orders, Frequently Bought Together & More for WooCommerce – Merchant trunk, at templates/modules/quick-view/content.php

162 lines 4.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /**
4 * Quick View AJAX modal content template.
5 *
6 * @var array $args Template args: product (WC_Product), settings (array).
7 *
8 * @since 2.3.0
9 */
10
11 if ( ! defined( 'ABSPATH' ) ) {
12 exit; // Exit if accessed directly
13 }
14
15 $product = $args['product'];
16 $settings = $args['settings'];
17
18 $product_id = $product->get_id();
19 $hide_quantity = ( empty( $settings[ 'show_quantity' ] ) ) ? 'merchant-hide-quantity' : '';
20 ?>
21 <div id="product-<?php echo absint( $product_id ); ?>" <?php wc_product_class( '', $product ); ?>>
22 <div class="merchant-quick-view-row">
23 <div class="merchant-quick-view-column">
24 <div class="merchant-quick-view-product-gallery">
25 <?php woocommerce_show_product_images(); ?>
26 </div>
27 </div>
28
29 <div class="merchant-quick-view-column">
30 <div class="merchant-quick-view-summary product-gallery-summary">
31 <div class="merchant-quick-view-product-title">
32 <h2 class="product_title entry-title"><?php echo esc_html( $product->get_title() ); ?></h2>
33 </div>
34
35 <?php if ( 0 !== $product->get_average_rating() ) : ?>
36 <div class="merchant-quick-view-product-rating">
37 <div class="woocommerce-product-rating">
38 <?php echo wp_kses( wc_get_rating_html( $product->get_average_rating() ), merchant_kses_allowed_tags() ); ?>
39 </div>
40 </div>
41 <?php endif; ?>
42
43 <div class="merchant-quick-view-product-price">
44 <div class="price"><?php echo wp_kses( $product->get_price_html(), merchant_kses_allowed_tags() ); ?></div>
45 </div>
46
47 <?php if ( 'top' === $settings[ 'place_product_description' ] ) : ?>
48 <?php
49 /**
50 * Hook 'merchant_quick_view_before_product_description'
51 *
52 * @since 1.9.14
53 */
54 do_action( 'merchant_quick_view_before_product_description' );
55
56 $description = $settings[ 'description_style' ] === 'full' ? $product->get_description() : $product->get_short_description();
57
58 /**
59 * `merchant_quick_view_description`
60 *
61 * @since 1.9.16
62 */
63 $description = apply_filters( 'merchant_quick_view_description', $description );
64 ?>
65 <div class="merchant-quick-view-product-excerpt">
66 <?php echo wp_kses_post( do_shortcode( $description ) ); ?>
67 </div>
68
69 <?php
70 /**
71 * Hook 'merchant_quick_view_before_product_description'
72 *
73 * @since 1.9.14
74 */
75 do_action( 'merchant_quick_view_after_product_description' );
76 ?>
77 <?php endif; ?>
78
79 <?php
80 /**
81 * Hook 'merchant_quick_view_before_add_to_cart'
82 *
83 * @since 1.9.14
84 */
85 do_action( 'merchant_quick_view_before_add_to_cart', $product, $settings );
86 ?>
87 <div class="merchant-quick-view-product-add-to-cart <?php echo esc_attr( $hide_quantity ); ?>">
88 <?php woocommerce_template_single_add_to_cart(); ?>
89 </div>
90
91 <a href="<?php echo esc_url( get_permalink( $product_id ) ); ?>" class="merchant-quick-view-full-details-link">
92 <?php echo esc_html__( 'View Full Details', 'merchant' ); ?>
93 </a>
94
95 <?php
96 /**
97 * Hook 'merchant_quick_view_after_add_to_cart'
98 *
99 * @since 1.9.14
100 */
101 do_action( 'merchant_quick_view_after_add_to_cart', $product, $settings );
102
103 /**
104 * Hook 'merchant_quick_view_product_summary'
105 *
106 * Fires right after the add-to-cart area, mirroring where modules like
107 * Trust Badges and Payment Logos render on the real single product page
108 * (`woocommerce_single_product_summary`, priority 30).
109 *
110 * @since 2.3.0
111 */
112 do_action( 'merchant_quick_view_product_summary', $product, $settings );
113 ?>
114
115 <?php if ( 'bottom' === $settings[ 'place_product_description' ] ) : ?>
116 <?php
117 /**
118 * Hook 'merchant_quick_view_before_product_description'
119 *
120 * @since 1.9.14
121 */
122 do_action( 'merchant_quick_view_before_product_description' );
123
124 $description = $settings[ 'description_style' ] === 'full' ? $product->get_description() : $product->get_short_description();
125
126 /**
127 * `merchant_quick_view_description`
128 *
129 * @since 1.9.16
130 */
131 $description = apply_filters( 'merchant_quick_view_description', $description );
132 ?>
133 <div class="merchant-quick-view-product-excerpt">
134 <?php echo wp_kses_post( do_shortcode( $description ) ); ?>
135 </div>
136
137 <?php
138 /**
139 * Hook 'merchant_quick_view_after_product_description'
140 *
141 * @since 1.9.14
142 */
143 do_action( 'merchant_quick_view_after_product_description' );
144 ?>
145 <?php endif; ?>
146 <div class="merchant-quick-view-product-meta">
147 <?php woocommerce_template_single_meta(); ?>
148 </div>
149
150 <?php
151 /**
152 * Hook 'merchant_quick_view_after_product_excerpt'
153 *
154 * @since 1.0.0
155 */
156 do_action( 'merchant_quick_view_after_product_meta' );
157 ?>
158 </div>
159 </div>
160 </div>
161 </div>
162