PluginProbe
FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler / 1.6.4
FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler v1.6.4
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 1.3.19 trunk 1.2.0 All 47 releases
fluent-cart / app / Modules / Templating / BlockTemplates / ProductPageTemplate.php

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

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