PluginProbe
FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler / 1.7.0
FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler v1.7.0
1.7.0 1.6.6 1.6.5 1.6.4 1.6.3 1.6.2 1.6.1 1.6.0 1.5.4 1.5.5 1.5.3 1.5.2 1.5.1 1.5.0 1.4.2 1.4.1 1.4.0 1.3.28 1.3.27 1.3.26 1.3.25 1.3.23 1.3.22 1.3.21 1.3.20 All 50 releases
fluent-cart / app / Modules / Templating / BlockTemplates / ProductPageTemplate.php

ProductPageTemplate.php in FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler 1.7.0, at app/Modules/Templating/BlockTemplates/ProductPageTemplate.php

109 lines 3.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace FluentCart\App\Modules\Templating\BlockTemplates;
4
5
6 /**
7 * ProductCategoryTemplate class.
8 *
9 */
10 class ProductPageTemplate
11 {
12
13 /**
14 * The slug of the template.
15 *
16 * @var string
17 */
18 const SLUG = 'single-fluent-products';
19
20 /**
21 * Initialization method.
22 */
23 public function init()
24 {
25 register_block_template('fluent-cart//single-fluent-products', [
26 'title' => $this->getTitle(),
27 'description' => $this->getDescription(),
28 'content' => $this->getDefaultTemplate(),
29 ]);
30 }
31
32 /**
33 * Returns the title of the template.
34 *
35 * @return string
36 */
37 public function getTitle()
38 {
39 return _x('Single Product', 'Template name', 'fluent-cart');
40 }
41
42 /**
43 * Returns the description of the template.
44 *
45 * @return string
46 */
47 public function getDescription()
48 {
49 return __('Displays Single FluentCart Product.', 'fluent-cart');
50 }
51
52
53 public function getDefaultTemplate()
54 {
55 ob_start();
56 ?>
57
58
59 <!-- wp:template-part {"slug":"header","tagName":"header","area":"header"} /-->
60
61 <!-- wp:group {"tagName":"main","align":"full","className":"is-style-default","layout":{"type":"constrained"}} -->
62 <main class="wp-block-group alignfull is-style-default"><!-- wp:group {"align":"wide","layout":{"type":"default"}} -->
63 <div class="wp-block-group alignwide"><!-- wp:spacer {"height":"var:preset|spacing|40"} -->
64 <div style="height:var(--wp--preset--spacing--40)" aria-hidden="true" class="wp-block-spacer"></div>
65 <!-- /wp:spacer -->
66
67 <!-- wp:fluent-cart/product-info -->
68 <div class="wp-block-fluent-cart-product-info my-plugin-product-card"><div class="product-card-inner"><!-- wp:columns -->
69 <div class="wp-block-columns"><!-- wp:column -->
70 <div class="wp-block-column"><!-- wp:fluent-cart/product-gallery {"inside_product_info":"yes"} /--></div>
71 <!-- /wp:column -->
72
73 <!-- wp:column -->
74 <div class="wp-block-column"><!-- wp:post-title /-->
75 <!-- wp:fluent-cart/excerpt /-->
76
77 <!-- wp:fluent-cart/price-range /-->
78
79 <!-- wp:fluent-cart/stock /-->
80
81 <!-- wp:fluent-cart/product-sku /-->
82
83 <!-- wp:fluent-cart/product-package-description /-->
84
85 <!-- wp:fluent-cart/buy-section {"inside_product_info":"yes"} /--></div>
86 <!-- /wp:column --></div>
87 <!-- /wp:columns --></div></div>
88 <!-- /wp:fluent-cart/product-info --></div>
89 <!-- /wp:group -->
90
91 <!-- wp:post-content {"lock":{"move":false,"remove":true},"align":"wide","style":{"spacing":{"blockGap":"0","padding":{"top":"var:preset|spacing|30","bottom":"var:preset|spacing|30"}}},"layout":{"type":"default"}} /-->
92
93 <!-- wp:group {"align":"wide","layout":{"type":"default"}} -->
94 <div class="wp-block-group alignwide"><!-- wp:fluent-cart/product-reviews /--></div>
95 <!-- /wp:group -->
96
97 <!-- wp:group {"align":"wide","layout":{"type":"default"}} -->
98 <div class="wp-block-group alignwide"><!-- wp:shortcode -->
99 [fluent_cart_related_products]
100 <!-- /wp:shortcode --></div>
101 <!-- /wp:group --></main>
102 <!-- /wp:group -->
103
104 <!-- wp:template-part {"slug":"footer","tagName":"footer","area":"footer"} /-->
105 <?php
106 return ob_get_clean();
107 }
108 }
109