Files
cannaiq/wordpress-plugin/templates/single-product.php
Kelly 511629b4e6 Rename WordPress plugin from Dutchie Menus to Crawlsy Menus v1.3.0
- Renamed plugin to avoid WordPress.org naming conflict causing false update notifications
- Added /downloads static route to serve plugin zip file
- Updated all CSS classes from dutchie- to crawlsy- prefix
- Added plugin zip to backend/public/downloads for hosting
- Plugin available at: https://dispos.crawlsy.com/downloads/crawlsy-menus-1.3.0.zip

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-01 16:29:21 -07:00

99 lines
4.0 KiB
PHP

<?php
/**
* Template for Single Product (used by shortcode)
*/
if (!defined('ABSPATH')) {
exit;
}
?>
<div class="crawlsy-single-product crawlsy-layout-horizontal">
<?php if (!empty($product['image_url_full'])): ?>
<div class="crawlsy-single-product-image">
<img src="<?php echo esc_url($product['image_url_full']); ?>"
alt="<?php echo esc_attr($product['name']); ?>" />
</div>
<?php endif; ?>
<div class="crawlsy-single-product-details">
<h2 class="crawlsy-single-product-title">
<?php echo esc_html($product['name']); ?>
</h2>
<?php if (!empty($product['brand'])): ?>
<div class="crawlsy-single-product-brand">
<strong><?php _e('Brand:', 'crawlsy-menus'); ?></strong>
<?php echo esc_html($product['brand']); ?>
</div>
<?php endif; ?>
<?php if (!empty($product['description'])): ?>
<div class="crawlsy-single-product-description">
<?php echo wp_kses_post(nl2br($product['description'])); ?>
</div>
<?php endif; ?>
<div class="crawlsy-single-product-info">
<?php if (!empty($product['metadata']['thc'])): ?>
<div class="crawlsy-info-item">
<strong><?php _e('THC:', 'crawlsy-menus'); ?></strong>
<span><?php echo esc_html($product['metadata']['thc']); ?></span>
</div>
<?php endif; ?>
<?php if (!empty($product['metadata']['cbd'])): ?>
<div class="crawlsy-info-item">
<strong><?php _e('CBD:', 'crawlsy-menus'); ?></strong>
<span><?php echo esc_html($product['metadata']['cbd']); ?></span>
</div>
<?php endif; ?>
<?php if (!empty($product['metadata']['terpenes'])): ?>
<div class="crawlsy-info-item crawlsy-terpenes">
<strong><?php _e('Terpenes:', 'crawlsy-menus'); ?></strong>
<?php if (is_array($product['metadata']['terpenes'])): ?>
<span><?php echo esc_html(implode(', ', $product['metadata']['terpenes'])); ?></span>
<?php else: ?>
<span><?php echo esc_html($product['metadata']['terpenes']); ?></span>
<?php endif; ?>
</div>
<?php endif; ?>
<?php if (!empty($product['metadata']['effects'])): ?>
<div class="crawlsy-info-item crawlsy-effects">
<strong><?php _e('Effects:', 'crawlsy-menus'); ?></strong>
<?php if (is_array($product['metadata']['effects'])): ?>
<span><?php echo esc_html(implode(', ', $product['metadata']['effects'])); ?></span>
<?php else: ?>
<span><?php echo esc_html($product['metadata']['effects']); ?></span>
<?php endif; ?>
</div>
<?php endif; ?>
<?php if (!empty($product['metadata']['flavors'])): ?>
<div class="crawlsy-info-item crawlsy-flavors">
<strong><?php _e('Flavors:', 'crawlsy-menus'); ?></strong>
<?php if (is_array($product['metadata']['flavors'])): ?>
<span><?php echo esc_html(implode(', ', $product['metadata']['flavors'])); ?></span>
<?php else: ?>
<span><?php echo esc_html($product['metadata']['flavors']); ?></span>
<?php endif; ?>
</div>
<?php endif; ?>
</div>
<?php if (isset($product['price'])): ?>
<div class="crawlsy-single-product-price">
$<?php echo number_format($product['price'], 2); ?>
</div>
<?php endif; ?>
<?php if (!$product['in_stock']): ?>
<div class="crawlsy-out-of-stock">
<?php _e('Out of Stock', 'crawlsy-menus'); ?>
</div>
<?php endif; ?>
</div>
</div>