" /> <?php } else { ?> <input type="text" class="form-control start-date" name="start" /> <span class="input-group-addon">to</span> <input type="text" class="form-control end-date" name="end" /> <?php } ?> </div> <?php if (count($dates) == 0) { ?> <p class="help-block"><?php printf(__('Please give us an idea when you are staying in Bali so we can organize your %s. We suggest to start by booking a room first.', 'tauchterminal'), TauchTerminal_Tulamben::getProductTypeBySKU($product->get_sku())); ?> </p> <?php } else { ?> <p class="help-block"><?php echo __('You already selected your dates.', 'tauchterminal'); ?> </p> <?php } ?> </div> </div> <?php
if (wc_product_sku_enabled() && ($product->get_sku() || $product->is_type('variable'))) { ?> <span class="sku_wrapper hidden"><?php _e('SKU:', 'woocommerce'); ?> <span class="sku" itemprop="sku"><?php echo ($sku = $product->get_sku()) ? $sku : __('N/A', 'woocommerce'); ?> </span></span> <input type="hidden" name="isFamily" value="<?php echo TauchTerminal_Tulamben::getProductTypeBySKU($sku) == 'family'; ?> "> <input type="hidden" name="isBungalow" value="<?php echo TauchTerminal_Tulamben::getProductTypeBySKU($sku) == 'bungalow'; ?> "> <?php } ?> <?php echo $product->get_categories(', ', '<span class="posted_in">' . _n('Category:', 'Categories:', $cat_count, 'woocommerce') . ' ', '</span>'); ?> <?php echo $product->get_tags(', ', '<span class="tagged_as">' . _n('Tag:', 'Tags:', $tag_count, 'woocommerce') . ' ', '</span>'); ?>
?> </p> </div> </div> <div class="form-group"> <label for="quantity-person" class="col-sm-3 control-label"><?php echo __('Persons', 'tauchterminal'); ?> </label> <div class="col-sm-9"> <?php $max_value = apply_filters('woocommerce_quantity_input_max', $product->backorders_allowed() ? '' : $product->get_stock_quantity(), $product); if (!$max_value && TauchTerminal_Tulamben::isRoomProduct($product->get_sku())) { if (TauchTerminal_Tulamben::getProductTypeBySKU($product->get_sku()) == 'family') { $max_value = 5; } elseif (TauchTerminal_Tulamben::getProductTypeBySKU($product->get_sku()) == 'deluxe') { $max_value = 3; } else { $max_value = 2; } } woocommerce_quantity_input(array('input_name' => 'quantity-person', 'min_value' => apply_filters('woocommerce_quantity_input_min', 1, $product), 'max_value' => apply_filters('woocommerce_quantity_input_max', $product->backorders_allowed() ? '' : $product->get_stock_quantity(), $product), 'input_value' => isset($_POST['quantity-person']) ? wc_stock_amount($_POST['quantity-person']) : 1)); ?> </div> </div> <?php // var_dump($product->get_attributes()); wc_get_template('single-product-rooms/add-to-cart/attributes.php', array('attributes' => $product->get_attributes())); // Enqueue variation scripts wp_enqueue_script('wc-add-to-cart-variation'); wc_get_template('single-product-rooms/add-to-cart/variable.php', array('available_variations' => $available_variations, 'attributes' => $product->get_variation_attributes(), 'selected_attributes' => $product->get_variation_default_attributes()));