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>
This commit is contained in:
Kelly
2025-12-01 16:29:21 -07:00
parent e345707db2
commit 511629b4e6
10 changed files with 264 additions and 247 deletions

View File

@@ -1,53 +1,53 @@
/**
* Dutchie Menus - WordPress Plugin Styles
* Crawlsy Menus - WordPress Plugin Styles
*/
/* Product Grid */
.dutchie-product-grid {
.crawlsy-product-grid {
display: grid;
gap: 24px;
margin: 20px 0;
}
.dutchie-grid-cols-2 {
.crawlsy-grid-cols-2 {
grid-template-columns: repeat(2, 1fr);
}
.dutchie-grid-cols-3 {
.crawlsy-grid-cols-3 {
grid-template-columns: repeat(3, 1fr);
}
.dutchie-grid-cols-4 {
.crawlsy-grid-cols-4 {
grid-template-columns: repeat(4, 1fr);
}
.dutchie-grid-cols-6 {
.crawlsy-grid-cols-6 {
grid-template-columns: repeat(6, 1fr);
}
@media (max-width: 1024px) {
.dutchie-grid-cols-4,
.dutchie-grid-cols-6 {
.crawlsy-grid-cols-4,
.crawlsy-grid-cols-6 {
grid-template-columns: repeat(3, 1fr);
}
}
@media (max-width: 768px) {
.dutchie-grid-cols-3,
.dutchie-grid-cols-4,
.dutchie-grid-cols-6 {
.crawlsy-grid-cols-3,
.crawlsy-grid-cols-4,
.crawlsy-grid-cols-6 {
grid-template-columns: repeat(2, 1fr);
}
}
@media (max-width: 480px) {
.dutchie-product-grid {
.crawlsy-product-grid {
grid-template-columns: 1fr;
}
}
/* Product Card */
.dutchie-product-card {
.crawlsy-product-card {
background: #fff;
border-radius: 8px;
overflow: hidden;
@@ -57,32 +57,32 @@
flex-direction: column;
}
.dutchie-product-card:hover {
.crawlsy-product-card:hover {
transform: translateY(-4px);
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}
.dutchie-product-image {
.crawlsy-product-image {
width: 100%;
aspect-ratio: 1;
overflow: hidden;
background: #f5f5f5;
}
.dutchie-product-image img {
.crawlsy-product-image img {
width: 100%;
height: 100%;
object-fit: cover;
}
.dutchie-product-content {
.crawlsy-product-content {
padding: 16px;
flex: 1;
display: flex;
flex-direction: column;
}
.dutchie-product-title {
.crawlsy-product-title {
font-size: 18px;
font-weight: 600;
margin: 0 0 8px 0;
@@ -90,48 +90,48 @@
line-height: 1.4;
}
.dutchie-product-brand {
.crawlsy-product-brand {
font-size: 14px;
color: #666;
margin-bottom: 8px;
}
.dutchie-product-description {
.crawlsy-product-description {
font-size: 14px;
color: #666;
line-height: 1.6;
margin: 0 0 12px 0;
}
.dutchie-product-meta {
.crawlsy-product-meta {
display: flex;
flex-wrap: wrap;
gap: 12px;
margin: 12px 0;
}
.dutchie-meta-item {
.crawlsy-meta-item {
font-size: 13px;
padding: 4px 10px;
border-radius: 4px;
background: #f0f0f0;
}
.dutchie-meta-item strong {
.crawlsy-meta-item strong {
color: #333;
}
.dutchie-thc {
.crawlsy-thc {
background: #e8f5e9;
color: #2e7d32;
}
.dutchie-cbd {
.crawlsy-cbd {
background: #e3f2fd;
color: #1565c0;
}
.dutchie-product-price {
.crawlsy-product-price {
font-size: 20px;
font-weight: 700;
color: #2e7d32;
@@ -139,7 +139,7 @@
padding-top: 12px;
}
.dutchie-out-of-stock {
.crawlsy-out-of-stock {
display: inline-block;
padding: 6px 12px;
background: #ffebee;
@@ -151,7 +151,7 @@
}
/* Single Product */
.dutchie-single-product {
.crawlsy-single-product {
background: #fff;
border-radius: 8px;
padding: 24px;
@@ -159,25 +159,25 @@
margin: 20px 0;
}
.dutchie-layout-horizontal {
.crawlsy-layout-horizontal {
display: grid;
grid-template-columns: 400px 1fr;
gap: 32px;
}
.dutchie-layout-vertical {
.crawlsy-layout-vertical {
display: flex;
flex-direction: column;
gap: 24px;
}
@media (max-width: 768px) {
.dutchie-layout-horizontal {
.crawlsy-layout-horizontal {
grid-template-columns: 1fr;
}
}
.dutchie-single-product-image {
.crawlsy-single-product-image {
width: 100%;
aspect-ratio: 1;
overflow: hidden;
@@ -185,19 +185,19 @@
background: #f5f5f5;
}
.dutchie-single-product-image img {
.crawlsy-single-product-image img {
width: 100%;
height: 100%;
object-fit: cover;
}
.dutchie-single-product-details {
.crawlsy-single-product-details {
display: flex;
flex-direction: column;
gap: 16px;
}
.dutchie-single-product-title {
.crawlsy-single-product-title {
font-size: 28px;
font-weight: 700;
margin: 0;
@@ -205,22 +205,22 @@
line-height: 1.3;
}
.dutchie-single-product-brand {
.crawlsy-single-product-brand {
font-size: 16px;
color: #666;
}
.dutchie-single-product-brand strong {
.crawlsy-single-product-brand strong {
color: #333;
}
.dutchie-single-product-description {
.crawlsy-single-product-description {
font-size: 16px;
line-height: 1.6;
color: #555;
}
.dutchie-single-product-info {
.crawlsy-single-product-info {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
gap: 16px;
@@ -229,44 +229,44 @@
border-radius: 8px;
}
.dutchie-info-item {
.crawlsy-info-item {
display: flex;
flex-direction: column;
gap: 4px;
}
.dutchie-info-item strong {
.crawlsy-info-item strong {
font-size: 14px;
color: #333;
text-transform: uppercase;
letter-spacing: 0.5px;
}
.dutchie-info-item span {
.crawlsy-info-item span {
font-size: 16px;
color: #555;
}
.dutchie-info-item.dutchie-terpenes span,
.dutchie-info-item.dutchie-effects span,
.dutchie-info-item.dutchie-flavors span {
.crawlsy-info-item.crawlsy-terpenes span,
.crawlsy-info-item.crawlsy-effects span,
.crawlsy-info-item.crawlsy-flavors span {
font-size: 14px;
}
.dutchie-single-product-price {
.crawlsy-single-product-price {
font-size: 32px;
font-weight: 700;
color: #2e7d32;
}
/* Loading State */
.dutchie-loading {
.crawlsy-loading {
text-align: center;
padding: 40px;
color: #666;
}
.dutchie-loading:after {
.crawlsy-loading:after {
content: "...";
animation: dots 1.5s steps(4, end) infinite;
}
@@ -293,7 +293,7 @@
}
/* Error State */
.dutchie-error {
.crawlsy-error {
padding: 16px;
background: #ffebee;
color: #c62828;

View File

@@ -1,5 +1,5 @@
/**
* Dutchie Menus - WordPress Plugin JavaScript
* Crawlsy Menus - WordPress Plugin JavaScript
*/
(function($) {
@@ -24,7 +24,7 @@
});
});
document.querySelectorAll('.dutchie-product-image img[data-src]').forEach(img => {
document.querySelectorAll('.crawlsy-product-image img[data-src]').forEach(img => {
imageObserver.observe(img);
});
}
@@ -48,7 +48,7 @@
threshold: 0.1
});
document.querySelectorAll('.dutchie-product-card').forEach(card => {
document.querySelectorAll('.crawlsy-product-card').forEach(card => {
cardObserver.observe(card);
});
}

View File

@@ -1,13 +1,13 @@
<?php
/**
* Plugin Name: Dutchie Menus
* Plugin Name: Crawlsy Menus
* Plugin URI: https://creationshop.io
* Description: Display cannabis product menus from your Dutchie scraper with Elementor integration
* Description: Display cannabis product menus from Crawlsy with Elementor integration
* Version: 1.3.0
* Author: Creationshop
* Author URI: https://creationshop.io
* License: GPL v2 or later
* Text Domain: dutchie-menus
* Text Domain: crawlsy-menus
* Requires PHP: 7.4
*/
@@ -15,15 +15,15 @@ if (!defined('ABSPATH')) {
exit; // Exit if accessed directly
}
define('DUTCHIE_MENUS_VERSION', '1.3.0');
define('DUTCHIE_MENUS_API_URL', 'https://dispos.crawlsy.com/api');
define('DUTCHIE_MENUS_PLUGIN_DIR', plugin_dir_path(__FILE__));
define('DUTCHIE_MENUS_PLUGIN_URL', plugin_dir_url(__FILE__));
define('CRAWLSY_MENUS_VERSION', '1.3.0');
define('CRAWLSY_MENUS_API_URL', 'https://dispos.crawlsy.com/api');
define('CRAWLSY_MENUS_PLUGIN_DIR', plugin_dir_path(__FILE__));
define('CRAWLSY_MENUS_PLUGIN_URL', plugin_dir_url(__FILE__));
/**
* Main Plugin Class
*/
class Dutchie_Menus_Plugin {
class Crawlsy_Menus_Plugin {
private static $instance = null;
@@ -44,9 +44,12 @@ class Dutchie_Menus_Plugin {
public function init() {
// Initialize plugin
load_plugin_textdomain('dutchie-menus', false, dirname(plugin_basename(__FILE__)) . '/languages');
load_plugin_textdomain('crawlsy-menus', false, dirname(plugin_basename(__FILE__)) . '/languages');
// Register shortcodes
// Register shortcodes (keeping backward compatible shortcode names)
add_shortcode('crawlsy_products', [$this, 'products_shortcode']);
add_shortcode('crawlsy_product', [$this, 'single_product_shortcode']);
// Legacy shortcode support
add_shortcode('dutchie_products', [$this, 'products_shortcode']);
add_shortcode('dutchie_product', [$this, 'single_product_shortcode']);
}
@@ -55,11 +58,11 @@ class Dutchie_Menus_Plugin {
* Register Elementor Widgets
*/
public function register_elementor_widgets($widgets_manager) {
require_once DUTCHIE_MENUS_PLUGIN_DIR . 'widgets/product-grid.php';
require_once DUTCHIE_MENUS_PLUGIN_DIR . 'widgets/single-product.php';
require_once CRAWLSY_MENUS_PLUGIN_DIR . 'widgets/product-grid.php';
require_once CRAWLSY_MENUS_PLUGIN_DIR . 'widgets/single-product.php';
$widgets_manager->register(new \Dutchie_Menus_Product_Grid_Widget());
$widgets_manager->register(new \Dutchie_Menus_Single_Product_Widget());
$widgets_manager->register(new \Crawlsy_Menus_Product_Grid_Widget());
$widgets_manager->register(new \Crawlsy_Menus_Single_Product_Widget());
}
/**
@@ -67,17 +70,17 @@ class Dutchie_Menus_Plugin {
*/
public function enqueue_scripts() {
wp_enqueue_style(
'dutchie-menus-styles',
DUTCHIE_MENUS_PLUGIN_URL . 'assets/css/dutchie-menus.css',
'crawlsy-menus-styles',
CRAWLSY_MENUS_PLUGIN_URL . 'assets/css/crawlsy-menus.css',
[],
DUTCHIE_MENUS_VERSION
CRAWLSY_MENUS_VERSION
);
wp_enqueue_script(
'dutchie-menus-script',
DUTCHIE_MENUS_PLUGIN_URL . 'assets/js/dutchie-menus.js',
'crawlsy-menus-script',
CRAWLSY_MENUS_PLUGIN_URL . 'assets/js/crawlsy-menus.js',
['jquery'],
DUTCHIE_MENUS_VERSION,
CRAWLSY_MENUS_VERSION,
true
);
}
@@ -87,10 +90,10 @@ class Dutchie_Menus_Plugin {
*/
public function add_admin_menu() {
add_menu_page(
'Dutchie Menus',
'Dutchie Menus',
'Crawlsy Menus',
'Crawlsy Menus',
'manage_options',
'dutchie-menus',
'crawlsy-menus',
[$this, 'admin_page'],
'dashicons-products',
30
@@ -101,7 +104,13 @@ class Dutchie_Menus_Plugin {
* Register Plugin Settings
*/
public function register_settings() {
register_setting('dutchie_menus_settings', 'dutchie_api_token');
register_setting('crawlsy_menus_settings', 'crawlsy_api_token');
// Migrate old setting if exists
$old_token = get_option('dutchie_api_token');
if ($old_token && !get_option('crawlsy_api_token')) {
update_option('crawlsy_api_token', $old_token);
}
}
/**
@@ -110,19 +119,19 @@ class Dutchie_Menus_Plugin {
public function admin_page() {
?>
<div class="wrap">
<h1>Dutchie Menus Settings</h1>
<p>Version <?php echo DUTCHIE_MENUS_VERSION; ?> by <a href="https://creationshop.io" target="_blank">Creationshop</a></p>
<h1>Crawlsy Menus Settings</h1>
<p>Version <?php echo CRAWLSY_MENUS_VERSION; ?> by <a href="https://creationshop.io" target="_blank">Creationshop</a></p>
<form method="post" action="options.php">
<?php settings_fields('dutchie_menus_settings'); ?>
<?php do_settings_sections('dutchie_menus_settings'); ?>
<?php settings_fields('crawlsy_menus_settings'); ?>
<?php do_settings_sections('crawlsy_menus_settings'); ?>
<table class="form-table">
<tr>
<th scope="row"><label for="dutchie_api_token">API Token</label></th>
<th scope="row"><label for="crawlsy_api_token">API Token</label></th>
<td>
<input type="password" id="dutchie_api_token" name="dutchie_api_token"
value="<?php echo esc_attr(get_option('dutchie_api_token')); ?>"
<input type="password" id="crawlsy_api_token" name="crawlsy_api_token"
value="<?php echo esc_attr(get_option('crawlsy_api_token')); ?>"
class="regular-text" />
<p class="description">Your authentication token from the admin dashboard. The token includes your store configuration.</p>
</td>
@@ -141,8 +150,8 @@ class Dutchie_Menus_Plugin {
<script>
jQuery(document).ready(function($) {
$('#test-api-connection').on('click', function() {
var apiUrl = '<?php echo DUTCHIE_MENUS_API_URL; ?>';
var apiToken = $('#dutchie_api_token').val();
var apiUrl = '<?php echo CRAWLSY_MENUS_API_URL; ?>';
var apiToken = $('#crawlsy_api_token').val();
$('#api-test-result').html('<p>Testing connection...</p>');
@@ -190,7 +199,7 @@ class Dutchie_Menus_Plugin {
}
ob_start();
include DUTCHIE_MENUS_PLUGIN_DIR . 'templates/product-grid.php';
include CRAWLSY_MENUS_PLUGIN_DIR . 'templates/product-grid.php';
return ob_get_clean();
}
@@ -213,7 +222,7 @@ class Dutchie_Menus_Plugin {
}
ob_start();
include DUTCHIE_MENUS_PLUGIN_DIR . 'templates/single-product.php';
include CRAWLSY_MENUS_PLUGIN_DIR . 'templates/single-product.php';
return ob_get_clean();
}
@@ -221,14 +230,14 @@ class Dutchie_Menus_Plugin {
* Fetch Products from API
*/
public function fetch_products($args = []) {
$api_token = get_option('dutchie_api_token');
$api_token = get_option('crawlsy_api_token');
if (!$api_token) {
return false;
}
$query_args = http_build_query($args);
$url = DUTCHIE_MENUS_API_URL . '/products?' . $query_args;
$url = CRAWLSY_MENUS_API_URL . '/products?' . $query_args;
$response = wp_remote_get($url, [
'headers' => [
@@ -251,13 +260,13 @@ class Dutchie_Menus_Plugin {
* Fetch Single Product from API
*/
public function fetch_product($id) {
$api_token = get_option('dutchie_api_token');
$api_token = get_option('crawlsy_api_token');
if (!$api_token) {
return false;
}
$url = DUTCHIE_MENUS_API_URL . '/products/' . intval($id);
$url = CRAWLSY_MENUS_API_URL . '/products/' . intval($id);
$response = wp_remote_get($url, [
'headers' => [
@@ -278,8 +287,8 @@ class Dutchie_Menus_Plugin {
}
// Initialize Plugin
function dutchie_menus() {
return Dutchie_Menus_Plugin::instance();
function crawlsy_menus() {
return Crawlsy_Menus_Plugin::instance();
}
dutchie_menus();
crawlsy_menus();

View File

@@ -10,57 +10,57 @@ if (!defined('ABSPATH')) {
$columns = isset($atts['columns']) ? $atts['columns'] : 3;
?>
<div class="dutchie-product-grid dutchie-grid-cols-<?php echo esc_attr($columns); ?>">
<div class="crawlsy-product-grid crawlsy-grid-cols-<?php echo esc_attr($columns); ?>">
<?php foreach ($products as $product): ?>
<div class="dutchie-product-card">
<div class="crawlsy-product-card">
<?php if (!empty($product['image_url_full'])): ?>
<div class="dutchie-product-image">
<div class="crawlsy-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">
<div class="crawlsy-product-content">
<h3 class="crawlsy-product-title">
<?php echo esc_html($product['name']); ?>
</h3>
<?php if (!empty($product['brand'])): ?>
<div class="dutchie-product-brand">
<div class="crawlsy-product-brand">
<?php echo esc_html($product['brand']); ?>
</div>
<?php endif; ?>
<?php if (!empty($product['description'])): ?>
<p class="dutchie-product-description">
<p class="crawlsy-product-description">
<?php echo esc_html(wp_trim_words($product['description'], 15)); ?>
</p>
<?php endif; ?>
<div class="dutchie-product-meta">
<div class="crawlsy-product-meta">
<?php if (!empty($product['metadata']['thc'])): ?>
<span class="dutchie-meta-item dutchie-thc">
<span class="crawlsy-meta-item crawlsy-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">
<span class="crawlsy-meta-item crawlsy-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">
<div class="crawlsy-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 class="crawlsy-out-of-stock">
<?php _e('Out of Stock', 'crawlsy-menus'); ?>
</div>
<?php endif; ?>
</div>

View File

@@ -8,50 +8,50 @@ if (!defined('ABSPATH')) {
}
?>
<div class="dutchie-single-product dutchie-layout-horizontal">
<div class="crawlsy-single-product crawlsy-layout-horizontal">
<?php if (!empty($product['image_url_full'])): ?>
<div class="dutchie-single-product-image">
<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="dutchie-single-product-details">
<h2 class="dutchie-single-product-title">
<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="dutchie-single-product-brand">
<strong><?php _e('Brand:', 'dutchie-menus'); ?></strong>
<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="dutchie-single-product-description">
<div class="crawlsy-single-product-description">
<?php echo wp_kses_post(nl2br($product['description'])); ?>
</div>
<?php endif; ?>
<div class="dutchie-single-product-info">
<div class="crawlsy-single-product-info">
<?php if (!empty($product['metadata']['thc'])): ?>
<div class="dutchie-info-item">
<strong><?php _e('THC:', 'dutchie-menus'); ?></strong>
<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="dutchie-info-item">
<strong><?php _e('CBD:', 'dutchie-menus'); ?></strong>
<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="dutchie-info-item dutchie-terpenes">
<strong><?php _e('Terpenes:', 'dutchie-menus'); ?></strong>
<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: ?>
@@ -61,8 +61,8 @@ if (!defined('ABSPATH')) {
<?php endif; ?>
<?php if (!empty($product['metadata']['effects'])): ?>
<div class="dutchie-info-item dutchie-effects">
<strong><?php _e('Effects:', 'dutchie-menus'); ?></strong>
<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: ?>
@@ -72,8 +72,8 @@ if (!defined('ABSPATH')) {
<?php endif; ?>
<?php if (!empty($product['metadata']['flavors'])): ?>
<div class="dutchie-info-item dutchie-flavors">
<strong><?php _e('Flavors:', 'dutchie-menus'); ?></strong>
<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: ?>
@@ -84,14 +84,14 @@ if (!defined('ABSPATH')) {
</div>
<?php if (isset($product['price'])): ?>
<div class="dutchie-single-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="dutchie-out-of-stock">
<?php _e('Out of Stock', 'dutchie-menus'); ?>
<div class="crawlsy-out-of-stock">
<?php _e('Out of Stock', 'crawlsy-menus'); ?>
</div>
<?php endif; ?>
</div>

View File

@@ -7,14 +7,14 @@ if (!defined('ABSPATH')) {
exit;
}
class Dutchie_Menus_Product_Grid_Widget extends \Elementor\Widget_Base {
class Crawlsy_Menus_Product_Grid_Widget extends \Elementor\Widget_Base {
public function get_name() {
return 'dutchie_product_grid';
return 'crawlsy_product_grid';
}
public function get_title() {
return __('Dutchie Product Grid', 'dutchie-menus');
return __('Crawlsy Product Grid', 'crawlsy-menus');
}
public function get_icon() {
@@ -31,7 +31,7 @@ class Dutchie_Menus_Product_Grid_Widget extends \Elementor\Widget_Base {
$this->start_controls_section(
'content_section',
[
'label' => __('Content', 'dutchie-menus'),
'label' => __('Content', 'crawlsy-menus'),
'tab' => \Elementor\Controls_Manager::TAB_CONTENT,
]
);
@@ -39,9 +39,9 @@ class Dutchie_Menus_Product_Grid_Widget extends \Elementor\Widget_Base {
$this->add_control(
'store_id',
[
'label' => __('Store ID', 'dutchie-menus'),
'label' => __('Store ID', 'crawlsy-menus'),
'type' => \Elementor\Controls_Manager::NUMBER,
'default' => get_option('dutchie_default_store_id', 1),
'default' => get_option('crawlsy_default_store_id', 1),
'min' => 1,
]
);
@@ -49,17 +49,17 @@ class Dutchie_Menus_Product_Grid_Widget extends \Elementor\Widget_Base {
$this->add_control(
'category_id',
[
'label' => __('Category ID', 'dutchie-menus'),
'label' => __('Category ID', 'crawlsy-menus'),
'type' => \Elementor\Controls_Manager::NUMBER,
'default' => '',
'description' => __('Leave empty to show all categories', 'dutchie-menus'),
'description' => __('Leave empty to show all categories', 'crawlsy-menus'),
]
);
$this->add_control(
'limit',
[
'label' => __('Number of Products', 'dutchie-menus'),
'label' => __('Number of Products', 'crawlsy-menus'),
'type' => \Elementor\Controls_Manager::NUMBER,
'default' => 12,
'min' => 1,
@@ -70,14 +70,14 @@ class Dutchie_Menus_Product_Grid_Widget extends \Elementor\Widget_Base {
$this->add_control(
'columns',
[
'label' => __('Columns', 'dutchie-menus'),
'label' => __('Columns', 'crawlsy-menus'),
'type' => \Elementor\Controls_Manager::SELECT,
'default' => '3',
'options' => [
'2' => __('2 Columns', 'dutchie-menus'),
'3' => __('3 Columns', 'dutchie-menus'),
'4' => __('4 Columns', 'dutchie-menus'),
'6' => __('6 Columns', 'dutchie-menus'),
'2' => __('2 Columns', 'crawlsy-menus'),
'3' => __('3 Columns', 'crawlsy-menus'),
'4' => __('4 Columns', 'crawlsy-menus'),
'6' => __('6 Columns', 'crawlsy-menus'),
],
]
);
@@ -85,10 +85,10 @@ class Dutchie_Menus_Product_Grid_Widget extends \Elementor\Widget_Base {
$this->add_control(
'in_stock_only',
[
'label' => __('In Stock Only', 'dutchie-menus'),
'label' => __('In Stock Only', 'crawlsy-menus'),
'type' => \Elementor\Controls_Manager::SWITCHER,
'label_on' => __('Yes', 'dutchie-menus'),
'label_off' => __('No', 'dutchie-menus'),
'label_on' => __('Yes', 'crawlsy-menus'),
'label_off' => __('No', 'crawlsy-menus'),
'return_value' => 'yes',
'default' => 'yes',
]
@@ -97,10 +97,10 @@ class Dutchie_Menus_Product_Grid_Widget extends \Elementor\Widget_Base {
$this->add_control(
'search',
[
'label' => __('Search Filter', 'dutchie-menus'),
'label' => __('Search Filter', 'crawlsy-menus'),
'type' => \Elementor\Controls_Manager::TEXT,
'default' => '',
'description' => __('Filter products by name', 'dutchie-menus'),
'description' => __('Filter products by name', 'crawlsy-menus'),
]
);
@@ -110,7 +110,7 @@ class Dutchie_Menus_Product_Grid_Widget extends \Elementor\Widget_Base {
$this->start_controls_section(
'display_section',
[
'label' => __('Display Options', 'dutchie-menus'),
'label' => __('Display Options', 'crawlsy-menus'),
'tab' => \Elementor\Controls_Manager::TAB_CONTENT,
]
);
@@ -118,10 +118,10 @@ class Dutchie_Menus_Product_Grid_Widget extends \Elementor\Widget_Base {
$this->add_control(
'show_image',
[
'label' => __('Show Image', 'dutchie-menus'),
'label' => __('Show Image', 'crawlsy-menus'),
'type' => \Elementor\Controls_Manager::SWITCHER,
'label_on' => __('Yes', 'dutchie-menus'),
'label_off' => __('No', 'dutchie-menus'),
'label_on' => __('Yes', 'crawlsy-menus'),
'label_off' => __('No', 'crawlsy-menus'),
'return_value' => 'yes',
'default' => 'yes',
]
@@ -130,10 +130,10 @@ class Dutchie_Menus_Product_Grid_Widget extends \Elementor\Widget_Base {
$this->add_control(
'show_price',
[
'label' => __('Show Price', 'dutchie-menus'),
'label' => __('Show Price', 'crawlsy-menus'),
'type' => \Elementor\Controls_Manager::SWITCHER,
'label_on' => __('Yes', 'dutchie-menus'),
'label_off' => __('No', 'dutchie-menus'),
'label_on' => __('Yes', 'crawlsy-menus'),
'label_off' => __('No', 'crawlsy-menus'),
'return_value' => 'yes',
'default' => 'yes',
]
@@ -142,10 +142,10 @@ class Dutchie_Menus_Product_Grid_Widget extends \Elementor\Widget_Base {
$this->add_control(
'show_thc',
[
'label' => __('Show THC', 'dutchie-menus'),
'label' => __('Show THC', 'crawlsy-menus'),
'type' => \Elementor\Controls_Manager::SWITCHER,
'label_on' => __('Yes', 'dutchie-menus'),
'label_off' => __('No', 'dutchie-menus'),
'label_on' => __('Yes', 'crawlsy-menus'),
'label_off' => __('No', 'crawlsy-menus'),
'return_value' => 'yes',
'default' => 'yes',
]
@@ -154,10 +154,10 @@ class Dutchie_Menus_Product_Grid_Widget extends \Elementor\Widget_Base {
$this->add_control(
'show_cbd',
[
'label' => __('Show CBD', 'dutchie-menus'),
'label' => __('Show CBD', 'crawlsy-menus'),
'type' => \Elementor\Controls_Manager::SWITCHER,
'label_on' => __('Yes', 'dutchie-menus'),
'label_off' => __('No', 'dutchie-menus'),
'label_on' => __('Yes', 'crawlsy-menus'),
'label_off' => __('No', 'crawlsy-menus'),
'return_value' => 'yes',
'default' => 'yes',
]
@@ -166,10 +166,10 @@ class Dutchie_Menus_Product_Grid_Widget extends \Elementor\Widget_Base {
$this->add_control(
'show_description',
[
'label' => __('Show Description', 'dutchie-menus'),
'label' => __('Show Description', 'crawlsy-menus'),
'type' => \Elementor\Controls_Manager::SWITCHER,
'label_on' => __('Yes', 'dutchie-menus'),
'label_off' => __('No', 'dutchie-menus'),
'label_on' => __('Yes', 'crawlsy-menus'),
'label_off' => __('No', 'crawlsy-menus'),
'return_value' => 'yes',
'default' => 'no',
]
@@ -181,7 +181,7 @@ class Dutchie_Menus_Product_Grid_Widget extends \Elementor\Widget_Base {
$this->start_controls_section(
'style_section',
[
'label' => __('Style', 'dutchie-menus'),
'label' => __('Style', 'crawlsy-menus'),
'tab' => \Elementor\Controls_Manager::TAB_STYLE,
]
);
@@ -189,11 +189,11 @@ class Dutchie_Menus_Product_Grid_Widget extends \Elementor\Widget_Base {
$this->add_control(
'card_background',
[
'label' => __('Card Background', 'dutchie-menus'),
'label' => __('Card Background', 'crawlsy-menus'),
'type' => \Elementor\Controls_Manager::COLOR,
'default' => '#ffffff',
'selectors' => [
'{{WRAPPER}} .dutchie-product-card' => 'background-color: {{VALUE}};',
'{{WRAPPER}} .crawlsy-product-card' => 'background-color: {{VALUE}};',
],
]
);
@@ -201,7 +201,7 @@ class Dutchie_Menus_Product_Grid_Widget extends \Elementor\Widget_Base {
$this->add_control(
'card_border_radius',
[
'label' => __('Border Radius', 'dutchie-menus'),
'label' => __('Border Radius', 'crawlsy-menus'),
'type' => \Elementor\Controls_Manager::SLIDER,
'size_units' => ['px'],
'range' => [
@@ -214,7 +214,7 @@ class Dutchie_Menus_Product_Grid_Widget extends \Elementor\Widget_Base {
'size' => 8,
],
'selectors' => [
'{{WRAPPER}} .dutchie-product-card' => 'border-radius: {{SIZE}}{{UNIT}};',
'{{WRAPPER}} .crawlsy-product-card' => 'border-radius: {{SIZE}}{{UNIT}};',
],
]
);
@@ -222,11 +222,11 @@ class Dutchie_Menus_Product_Grid_Widget extends \Elementor\Widget_Base {
$this->add_control(
'text_color',
[
'label' => __('Text Color', 'dutchie-menus'),
'label' => __('Text Color', 'crawlsy-menus'),
'type' => \Elementor\Controls_Manager::COLOR,
'default' => '#333333',
'selectors' => [
'{{WRAPPER}} .dutchie-product-card' => 'color: {{VALUE}};',
'{{WRAPPER}} .crawlsy-product-card' => 'color: {{VALUE}};',
],
]
);
@@ -251,61 +251,61 @@ class Dutchie_Menus_Product_Grid_Widget extends \Elementor\Widget_Base {
$args['search'] = $settings['search'];
}
$plugin = Dutchie_Menus_Plugin::instance();
$plugin = Crawlsy_Menus_Plugin::instance();
$products = $plugin->fetch_products($args);
if (!$products) {
echo '<p>' . __('No products found.', 'dutchie-menus') . '</p>';
echo '<p>' . __('No products found.', 'crawlsy-menus') . '</p>';
return;
}
$columns = $settings['columns'];
?>
<div class="dutchie-product-grid dutchie-grid-cols-<?php echo esc_attr($columns); ?>">
<div class="crawlsy-product-grid crawlsy-grid-cols-<?php echo esc_attr($columns); ?>">
<?php foreach ($products as $product): ?>
<div class="dutchie-product-card">
<div class="crawlsy-product-card">
<?php if ($settings['show_image'] === 'yes' && !empty($product['image_url_full'])): ?>
<div class="dutchie-product-image">
<div class="crawlsy-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">
<div class="crawlsy-product-content">
<h3 class="crawlsy-product-title">
<?php echo esc_html($product['name']); ?>
</h3>
<?php if ($settings['show_description'] === 'yes' && !empty($product['description'])): ?>
<p class="dutchie-product-description">
<p class="crawlsy-product-description">
<?php echo esc_html(wp_trim_words($product['description'], 15)); ?>
</p>
<?php endif; ?>
<div class="dutchie-product-meta">
<div class="crawlsy-product-meta">
<?php if ($settings['show_thc'] === 'yes' && !empty($product['metadata']['thc'])): ?>
<span class="dutchie-meta-item dutchie-thc">
<span class="crawlsy-meta-item crawlsy-thc">
<strong>THC:</strong> <?php echo esc_html($product['metadata']['thc']); ?>
</span>
<?php endif; ?>
<?php if ($settings['show_cbd'] === 'yes' && !empty($product['metadata']['cbd'])): ?>
<span class="dutchie-meta-item dutchie-cbd">
<span class="crawlsy-meta-item crawlsy-cbd">
<strong>CBD:</strong> <?php echo esc_html($product['metadata']['cbd']); ?>
</span>
<?php endif; ?>
</div>
<?php if ($settings['show_price'] === 'yes' && isset($product['price'])): ?>
<div class="dutchie-product-price">
<div class="crawlsy-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 class="crawlsy-out-of-stock">
<?php _e('Out of Stock', 'crawlsy-menus'); ?>
</div>
<?php endif; ?>
</div>

View File

@@ -7,14 +7,14 @@ if (!defined('ABSPATH')) {
exit;
}
class Dutchie_Menus_Single_Product_Widget extends \Elementor\Widget_Base {
class Crawlsy_Menus_Single_Product_Widget extends \Elementor\Widget_Base {
public function get_name() {
return 'dutchie_single_product';
return 'crawlsy_single_product';
}
public function get_title() {
return __('Dutchie Single Product', 'dutchie-menus');
return __('Crawlsy Single Product', 'crawlsy-menus');
}
public function get_icon() {
@@ -31,7 +31,7 @@ class Dutchie_Menus_Single_Product_Widget extends \Elementor\Widget_Base {
$this->start_controls_section(
'content_section',
[
'label' => __('Content', 'dutchie-menus'),
'label' => __('Content', 'crawlsy-menus'),
'tab' => \Elementor\Controls_Manager::TAB_CONTENT,
]
);
@@ -39,22 +39,22 @@ class Dutchie_Menus_Single_Product_Widget extends \Elementor\Widget_Base {
$this->add_control(
'product_id',
[
'label' => __('Product ID', 'dutchie-menus'),
'label' => __('Product ID', 'crawlsy-menus'),
'type' => \Elementor\Controls_Manager::NUMBER,
'default' => '',
'description' => __('Enter the product ID to display', 'dutchie-menus'),
'description' => __('Enter the product ID to display', 'crawlsy-menus'),
]
);
$this->add_control(
'layout',
[
'label' => __('Layout', 'dutchie-menus'),
'label' => __('Layout', 'crawlsy-menus'),
'type' => \Elementor\Controls_Manager::SELECT,
'default' => 'horizontal',
'options' => [
'horizontal' => __('Horizontal', 'dutchie-menus'),
'vertical' => __('Vertical', 'dutchie-menus'),
'horizontal' => __('Horizontal', 'crawlsy-menus'),
'vertical' => __('Vertical', 'crawlsy-menus'),
],
]
);
@@ -65,7 +65,7 @@ class Dutchie_Menus_Single_Product_Widget extends \Elementor\Widget_Base {
$this->start_controls_section(
'display_section',
[
'label' => __('Display Options', 'dutchie-menus'),
'label' => __('Display Options', 'crawlsy-menus'),
'tab' => \Elementor\Controls_Manager::TAB_CONTENT,
]
);
@@ -73,10 +73,10 @@ class Dutchie_Menus_Single_Product_Widget extends \Elementor\Widget_Base {
$this->add_control(
'show_image',
[
'label' => __('Show Image', 'dutchie-menus'),
'label' => __('Show Image', 'crawlsy-menus'),
'type' => \Elementor\Controls_Manager::SWITCHER,
'label_on' => __('Yes', 'dutchie-menus'),
'label_off' => __('No', 'dutchie-menus'),
'label_on' => __('Yes', 'crawlsy-menus'),
'label_off' => __('No', 'crawlsy-menus'),
'return_value' => 'yes',
'default' => 'yes',
]
@@ -85,10 +85,10 @@ class Dutchie_Menus_Single_Product_Widget extends \Elementor\Widget_Base {
$this->add_control(
'show_price',
[
'label' => __('Show Price', 'dutchie-menus'),
'label' => __('Show Price', 'crawlsy-menus'),
'type' => \Elementor\Controls_Manager::SWITCHER,
'label_on' => __('Yes', 'dutchie-menus'),
'label_off' => __('No', 'dutchie-menus'),
'label_on' => __('Yes', 'crawlsy-menus'),
'label_off' => __('No', 'crawlsy-menus'),
'return_value' => 'yes',
'default' => 'yes',
]
@@ -97,10 +97,10 @@ class Dutchie_Menus_Single_Product_Widget extends \Elementor\Widget_Base {
$this->add_control(
'show_description',
[
'label' => __('Show Description', 'dutchie-menus'),
'label' => __('Show Description', 'crawlsy-menus'),
'type' => \Elementor\Controls_Manager::SWITCHER,
'label_on' => __('Yes', 'dutchie-menus'),
'label_off' => __('No', 'dutchie-menus'),
'label_on' => __('Yes', 'crawlsy-menus'),
'label_off' => __('No', 'crawlsy-menus'),
'return_value' => 'yes',
'default' => 'yes',
]
@@ -109,10 +109,10 @@ class Dutchie_Menus_Single_Product_Widget extends \Elementor\Widget_Base {
$this->add_control(
'show_thc',
[
'label' => __('Show THC', 'dutchie-menus'),
'label' => __('Show THC', 'crawlsy-menus'),
'type' => \Elementor\Controls_Manager::SWITCHER,
'label_on' => __('Yes', 'dutchie-menus'),
'label_off' => __('No', 'dutchie-menus'),
'label_on' => __('Yes', 'crawlsy-menus'),
'label_off' => __('No', 'crawlsy-menus'),
'return_value' => 'yes',
'default' => 'yes',
]
@@ -121,10 +121,10 @@ class Dutchie_Menus_Single_Product_Widget extends \Elementor\Widget_Base {
$this->add_control(
'show_cbd',
[
'label' => __('Show CBD', 'dutchie-menus'),
'label' => __('Show CBD', 'crawlsy-menus'),
'type' => \Elementor\Controls_Manager::SWITCHER,
'label_on' => __('Yes', 'dutchie-menus'),
'label_off' => __('No', 'dutchie-menus'),
'label_on' => __('Yes', 'crawlsy-menus'),
'label_off' => __('No', 'crawlsy-menus'),
'return_value' => 'yes',
'default' => 'yes',
]
@@ -133,10 +133,10 @@ class Dutchie_Menus_Single_Product_Widget extends \Elementor\Widget_Base {
$this->add_control(
'show_terpenes',
[
'label' => __('Show Terpenes', 'dutchie-menus'),
'label' => __('Show Terpenes', 'crawlsy-menus'),
'type' => \Elementor\Controls_Manager::SWITCHER,
'label_on' => __('Yes', 'dutchie-menus'),
'label_off' => __('No', 'dutchie-menus'),
'label_on' => __('Yes', 'crawlsy-menus'),
'label_off' => __('No', 'crawlsy-menus'),
'return_value' => 'yes',
'default' => 'yes',
]
@@ -145,10 +145,10 @@ class Dutchie_Menus_Single_Product_Widget extends \Elementor\Widget_Base {
$this->add_control(
'show_effects',
[
'label' => __('Show Effects', 'dutchie-menus'),
'label' => __('Show Effects', 'crawlsy-menus'),
'type' => \Elementor\Controls_Manager::SWITCHER,
'label_on' => __('Yes', 'dutchie-menus'),
'label_off' => __('No', 'dutchie-menus'),
'label_on' => __('Yes', 'crawlsy-menus'),
'label_off' => __('No', 'crawlsy-menus'),
'return_value' => 'yes',
'default' => 'yes',
]
@@ -157,10 +157,10 @@ class Dutchie_Menus_Single_Product_Widget extends \Elementor\Widget_Base {
$this->add_control(
'show_brand',
[
'label' => __('Show Brand', 'dutchie-menus'),
'label' => __('Show Brand', 'crawlsy-menus'),
'type' => \Elementor\Controls_Manager::SWITCHER,
'label_on' => __('Yes', 'dutchie-menus'),
'label_off' => __('No', 'dutchie-menus'),
'label_on' => __('Yes', 'crawlsy-menus'),
'label_off' => __('No', 'crawlsy-menus'),
'return_value' => 'yes',
'default' => 'yes',
]
@@ -172,7 +172,7 @@ class Dutchie_Menus_Single_Product_Widget extends \Elementor\Widget_Base {
$this->start_controls_section(
'style_section',
[
'label' => __('Style', 'dutchie-menus'),
'label' => __('Style', 'crawlsy-menus'),
'tab' => \Elementor\Controls_Manager::TAB_STYLE,
]
);
@@ -180,11 +180,11 @@ class Dutchie_Menus_Single_Product_Widget extends \Elementor\Widget_Base {
$this->add_control(
'background_color',
[
'label' => __('Background Color', 'dutchie-menus'),
'label' => __('Background Color', 'crawlsy-menus'),
'type' => \Elementor\Controls_Manager::COLOR,
'default' => '#ffffff',
'selectors' => [
'{{WRAPPER}} .dutchie-single-product' => 'background-color: {{VALUE}};',
'{{WRAPPER}} .crawlsy-single-product' => 'background-color: {{VALUE}};',
],
]
);
@@ -192,7 +192,7 @@ class Dutchie_Menus_Single_Product_Widget extends \Elementor\Widget_Base {
$this->add_control(
'border_radius',
[
'label' => __('Border Radius', 'dutchie-menus'),
'label' => __('Border Radius', 'crawlsy-menus'),
'type' => \Elementor\Controls_Manager::SLIDER,
'size_units' => ['px'],
'range' => [
@@ -205,7 +205,7 @@ class Dutchie_Menus_Single_Product_Widget extends \Elementor\Widget_Base {
'size' => 8,
],
'selectors' => [
'{{WRAPPER}} .dutchie-single-product' => 'border-radius: {{SIZE}}{{UNIT}};',
'{{WRAPPER}} .crawlsy-single-product' => 'border-radius: {{SIZE}}{{UNIT}};',
],
]
);
@@ -213,11 +213,11 @@ class Dutchie_Menus_Single_Product_Widget extends \Elementor\Widget_Base {
$this->add_control(
'text_color',
[
'label' => __('Text Color', 'dutchie-menus'),
'label' => __('Text Color', 'crawlsy-menus'),
'type' => \Elementor\Controls_Manager::COLOR,
'default' => '#333333',
'selectors' => [
'{{WRAPPER}} .dutchie-single-product' => 'color: {{VALUE}};',
'{{WRAPPER}} .crawlsy-single-product' => 'color: {{VALUE}};',
],
]
);
@@ -229,64 +229,64 @@ class Dutchie_Menus_Single_Product_Widget extends \Elementor\Widget_Base {
$settings = $this->get_settings_for_display();
if (empty($settings['product_id'])) {
echo '<p>' . __('Please enter a product ID.', 'dutchie-menus') . '</p>';
echo '<p>' . __('Please enter a product ID.', 'crawlsy-menus') . '</p>';
return;
}
$plugin = Dutchie_Menus_Plugin::instance();
$plugin = Crawlsy_Menus_Plugin::instance();
$product = $plugin->fetch_product($settings['product_id']);
if (!$product) {
echo '<p>' . __('Product not found.', 'dutchie-menus') . '</p>';
echo '<p>' . __('Product not found.', 'crawlsy-menus') . '</p>';
return;
}
$layout = $settings['layout'];
?>
<div class="dutchie-single-product dutchie-layout-<?php echo esc_attr($layout); ?>">
<div class="crawlsy-single-product crawlsy-layout-<?php echo esc_attr($layout); ?>">
<?php if ($settings['show_image'] === 'yes' && !empty($product['image_url_full'])): ?>
<div class="dutchie-single-product-image">
<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="dutchie-single-product-details">
<h2 class="dutchie-single-product-title">
<div class="crawlsy-single-product-details">
<h2 class="crawlsy-single-product-title">
<?php echo esc_html($product['name']); ?>
</h2>
<?php if ($settings['show_brand'] === 'yes' && !empty($product['brand'])): ?>
<div class="dutchie-single-product-brand">
<strong><?php _e('Brand:', 'dutchie-menus'); ?></strong>
<div class="crawlsy-single-product-brand">
<strong><?php _e('Brand:', 'crawlsy-menus'); ?></strong>
<?php echo esc_html($product['brand']); ?>
</div>
<?php endif; ?>
<?php if ($settings['show_description'] === 'yes' && !empty($product['description'])): ?>
<div class="dutchie-single-product-description">
<div class="crawlsy-single-product-description">
<?php echo wp_kses_post(nl2br($product['description'])); ?>
</div>
<?php endif; ?>
<div class="dutchie-single-product-info">
<div class="crawlsy-single-product-info">
<?php if ($settings['show_thc'] === 'yes' && !empty($product['metadata']['thc'])): ?>
<div class="dutchie-info-item">
<strong><?php _e('THC:', 'dutchie-menus'); ?></strong>
<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 ($settings['show_cbd'] === 'yes' && !empty($product['metadata']['cbd'])): ?>
<div class="dutchie-info-item">
<strong><?php _e('CBD:', 'dutchie-menus'); ?></strong>
<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 ($settings['show_terpenes'] === 'yes' && !empty($product['metadata']['terpenes'])): ?>
<div class="dutchie-info-item dutchie-terpenes">
<strong><?php _e('Terpenes:', 'dutchie-menus'); ?></strong>
<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: ?>
@@ -296,8 +296,8 @@ class Dutchie_Menus_Single_Product_Widget extends \Elementor\Widget_Base {
<?php endif; ?>
<?php if ($settings['show_effects'] === 'yes' && !empty($product['metadata']['effects'])): ?>
<div class="dutchie-info-item dutchie-effects">
<strong><?php _e('Effects:', 'dutchie-menus'); ?></strong>
<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: ?>
@@ -308,14 +308,14 @@ class Dutchie_Menus_Single_Product_Widget extends \Elementor\Widget_Base {
</div>
<?php if ($settings['show_price'] === 'yes' && isset($product['price'])): ?>
<div class="dutchie-single-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="dutchie-out-of-stock">
<?php _e('Out of Stock', 'dutchie-menus'); ?>
<div class="crawlsy-out-of-stock">
<?php _e('Out of Stock', 'crawlsy-menus'); ?>
</div>
<?php endif; ?>
</div>