Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- if (!defined('ABSPATH')) {
- exit; // Exit if accessed directly
- }
- ?>
- <?php
- $term = $args['term'];
- ?>
- <script type="text/javascript">
- function hideDiv(elem) {
- if(elem.value == 0){
- document.getElementById("product-description").style.display = "none";
- } }
- </script>
- <?php do_action('wc_quick_view_enqueue_scripts'); ?>
- <form name="addItem" id="frm-leasing-addItem" class="cart" method="post" action="" enctype="multipart/form-data">
- <div class="leasing-single-container" id="term-<?php echo $term->term_id; ?>" >
- <div class="term-single-image">
- <?php getWooTermThumbnail($term); ?>
- </div>
- <?php
- $description = wc_format_content(term_description());
- ?>
- <div class="term-single-info">
- <h1 class="page-title">
- <?php woocommerce_page_title(); ?>
- </h1>
- <?php if ($description) { ?>
- <div class="term-single-description">
- <?php echo $description; ?>
- </div>
- <?php } ?>
- <div class="selectBox">
- <div class="products-dropdown-container">
- <select class="products-dropdown" name="lease-product" id="sel-lease-product" onchange="hideDiv">
- <option value="0"><?php _e('Select product', 'wp-woo-leasing'); ?></option>
- <?php
- $args = array(
- 'posts_per_page' => -1,
- 'tax_query' => array(
- array(
- 'taxonomy' => 'product_cat',
- 'field' => 'id',
- 'terms' => $term->term_id
- )
- ),
- 'post_type' => 'product',
- 'orderby' => 'price',
- 'order' => 'ASC',
- );
- $products = new WP_Query($args);
- echo "<ul>";
- while ($products->have_posts()) {
- $products->the_post();
- $productId = get_the_ID();
- $product = wc_get_product($productId);
- $availability = $product->get_availability();
- //if ($availability['class'] != "in-stock")
- //continue;
- ?>
- <option data-productId="<?php echo $productId; ?>" value="<?php echo $productId; ?>"><?php the_title(); ?></option>
- <?php } ?>
- </select>
- </div>
- </div>
- <div class="selectBox" id="products-variation-container">
- <select class="product-variation-dropdown" name="product-variation" id="sel-product-variation">
- <option value="0"><?php _e('Select variation', 'wp-woo-leasing'); ?></option>
- </select>
- </div>
- <!-- <input type="submit" name="btn-submit" class="button alt" id="leasingAddItem" value="<?php _e('Add Item', 'wp-woo-leasing'); ?>" data-value="<?php _e('Add Item', 'wp-woo-leasing'); ?>" />-->
- </div>
- </div>
- <div class="leasing-single-container" >
- <div class="leasing-col1" >
- <div id="product-description" class="product-description"></div>
- <div id="product-price-details" class="product-price-details"></div>
- </div>
- <div class="leasing-col2" >
- <div id="leasingErrors"></div>
- <div id="leasingSuccessMsg" style="display: none"><?php _e('Item added', 'wp-woo-leasing'); ?></div>
- <center><h2 id="addOnTitle" style="display: none"><?php _e('Product Addon', 'wp-woo-leasing'); ?> til <?php woocommerce_page_title(); ?></h2></center>
- <div class="leasing-column">
- <div class="lease-col1">
- <div class="products-addons-container" id="products-addons-container"></div>
- <div class="productGrandTotal" id="productGrandTotal"></div>
- <div id="productStartingPrice" class="productStartingPrice"></div>
- </div>
- <div class="lease-col2">
- <div class="leasing-widget-container">
- <?php dynamic_sidebar('leasing-sidebar'); ?>
- </div>
- </div>
- </div>
- </div>
- </div>
- </form>
- <div class="leasing-single-container" >
- <div id="checkoutFields">
- <?php do_action('leasing_chekout_fields'); ?>
- </div>
- </div>
- <div class="ajaxModal"></div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement