...
This commit is contained in:
@@ -0,0 +1,59 @@
|
||||
# Product Catalog
|
||||
|
||||
{% let products = get_products() %}
|
||||
|
||||
## All Products
|
||||
|
||||
{% for product in products %}
|
||||
### {{ product.name }}
|
||||
|
||||
**Price:** {{ format_price(product.price) }}
|
||||
|
||||
#### Features:
|
||||
{% for feature in product.features %}
|
||||
- {{ feature }}
|
||||
{% endfor %}
|
||||
|
||||
*Status: {% if product.available %}✅ In Stock{% else %}❌ Out of Stock{% endif %}*
|
||||
|
||||
---
|
||||
{% endfor %}
|
||||
|
||||
## Available Products
|
||||
|
||||
{% let available_products = get_available_products() %}
|
||||
*Available Products: {{ available_products.len() }}*
|
||||
|
||||
{% for product in available_products %}
|
||||
### {{ product.name }}
|
||||
|
||||
**Price:** {{ format_price(product.price) }}
|
||||
|
||||
---
|
||||
{% endfor %}
|
||||
|
||||
## Total Catalog Value
|
||||
|
||||
**Total Value:** {{ format_price(calculate_total_price()) }}
|
||||
|
||||
## User Information
|
||||
|
||||
{% let user = get_user() %}
|
||||
|
||||
**Name:** {{ user.name }}
|
||||
**Email:** {{ user.email }}
|
||||
**Role:** {{ user.role }}
|
||||
**Theme:** {{ user.settings.theme }}
|
||||
|
||||
### Order History
|
||||
|
||||
{% for order in user.orders %}
|
||||
- **{{ order.id }}** ({{ order.date }}) - {{ format_price(order.total) }}
|
||||
{% endfor %}
|
||||
|
||||
## All Product Features
|
||||
|
||||
{% let features = get_all_features() %}
|
||||
{% for feature in features %}
|
||||
- {{ feature }}
|
||||
{% endfor %}
|
2
rhai_engine/examples/simple/producttemplates/readme.md
Normal file
2
rhai_engine/examples/simple/producttemplates/readme.md
Normal file
@@ -0,0 +1,2 @@
|
||||
the data objects which need to be filled into product_catalog.tera come from ../scripts/
|
||||
|
Reference in New Issue
Block a user