Initial commit - Dutchie dispensary scraper

This commit is contained in:
Kelly
2025-11-28 19:45:44 -07:00
commit 5757a8e9bd
23375 changed files with 3788799 additions and 0 deletions

View File

@@ -0,0 +1,69 @@
<?php
/**
* Template for Product Grid (used by shortcode)
*/
if (!defined('ABSPATH')) {
exit;
}
$columns = isset($atts['columns']) ? $atts['columns'] : 3;
?>
<div class="dutchie-product-grid dutchie-grid-cols-<?php echo esc_attr($columns); ?>">
<?php foreach ($products as $product): ?>
<div class="dutchie-product-card">
<?php if (!empty($product['image_url_full'])): ?>
<div class="dutchie-product-image">
<img src="<?php echo esc_url($product['image_url_full']); ?>"
alt="<?php echo esc_attr($product['name']); ?>"
loading="lazy" />
</div>
<?php endif; ?>
<div class="dutchie-product-content">
<h3 class="dutchie-product-title">
<?php echo esc_html($product['name']); ?>
</h3>
<?php if (!empty($product['brand'])): ?>
<div class="dutchie-product-brand">
<?php echo esc_html($product['brand']); ?>
</div>
<?php endif; ?>
<?php if (!empty($product['description'])): ?>
<p class="dutchie-product-description">
<?php echo esc_html(wp_trim_words($product['description'], 15)); ?>
</p>
<?php endif; ?>
<div class="dutchie-product-meta">
<?php if (!empty($product['metadata']['thc'])): ?>
<span class="dutchie-meta-item dutchie-thc">
<strong>THC:</strong> <?php echo esc_html($product['metadata']['thc']); ?>
</span>
<?php endif; ?>
<?php if (!empty($product['metadata']['cbd'])): ?>
<span class="dutchie-meta-item dutchie-cbd">
<strong>CBD:</strong> <?php echo esc_html($product['metadata']['cbd']); ?>
</span>
<?php endif; ?>
</div>
<?php if (isset($product['price'])): ?>
<div class="dutchie-product-price">
$<?php echo number_format($product['price'], 2); ?>
</div>
<?php endif; ?>
<?php if (!$product['in_stock']): ?>
<div class="dutchie-out-of-stock">
<?php _e('Out of Stock', 'dutchie-menus'); ?>
</div>
<?php endif; ?>
</div>
</div>
<?php endforeach; ?>
</div>