Advertisement
Guest User

Untitled

a guest
Sep 29th, 2016
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.83 KB | None | 0 0
  1. <?php
  2. if (!defined('ABSPATH')) {
  3. exit; // Exit if accessed directly
  4. }
  5. ?>
  6. <?php
  7. $term = $args['term'];
  8. ?>
  9. <script type="text/javascript">
  10. function hideDiv(elem) {
  11. if(elem.value == 0){
  12. document.getElementById("product-description").style.display = "none";
  13. } }
  14. </script>
  15. <?php do_action('wc_quick_view_enqueue_scripts'); ?>
  16. <form name="addItem" id="frm-leasing-addItem" class="cart" method="post" action="" enctype="multipart/form-data">
  17. <div class="leasing-single-container" id="term-<?php echo $term->term_id; ?>" >
  18. <div class="term-single-image">
  19. <?php getWooTermThumbnail($term); ?>
  20. </div>
  21. <?php
  22. $description = wc_format_content(term_description());
  23. ?>
  24. <div class="term-single-info">
  25. <h1 class="page-title">
  26. <?php woocommerce_page_title(); ?>
  27. </h1>
  28. <?php if ($description) { ?>
  29. <div class="term-single-description">
  30. <?php echo $description; ?>
  31. </div>
  32. <?php } ?>
  33.  
  34.  
  35. <div class="selectBox">
  36. <div class="products-dropdown-container">
  37. <select class="products-dropdown" name="lease-product" id="sel-lease-product" onchange="hideDiv">
  38. <option value="0"><?php _e('Select product', 'wp-woo-leasing'); ?></option>
  39. <?php
  40. $args = array(
  41. 'posts_per_page' => -1,
  42. 'tax_query' => array(
  43. array(
  44. 'taxonomy' => 'product_cat',
  45. 'field' => 'id',
  46. 'terms' => $term->term_id
  47. )
  48. ),
  49. 'post_type' => 'product',
  50. 'orderby' => 'price',
  51. 'order' => 'ASC',
  52. );
  53. $products = new WP_Query($args);
  54. echo "<ul>";
  55. while ($products->have_posts()) {
  56. $products->the_post();
  57. $productId = get_the_ID();
  58. $product = wc_get_product($productId);
  59. $availability = $product->get_availability();
  60. //if ($availability['class'] != "in-stock")
  61. //continue;
  62. ?>
  63. <option data-productId="<?php echo $productId; ?>" value="<?php echo $productId; ?>"><?php the_title(); ?></option>
  64. <?php } ?>
  65. </select>
  66. </div>
  67. </div>
  68. <div class="selectBox" id="products-variation-container">
  69. <select class="product-variation-dropdown" name="product-variation" id="sel-product-variation">
  70. <option value="0"><?php _e('Select variation', 'wp-woo-leasing'); ?></option>
  71. </select>
  72. </div>
  73. <!-- <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'); ?>" />-->
  74.  
  75. </div>
  76. </div>
  77. <div class="leasing-single-container" >
  78. <div class="leasing-col1" >
  79. <div id="product-description" class="product-description"></div>
  80. <div id="product-price-details" class="product-price-details"></div>
  81. </div>
  82. <div class="leasing-col2" >
  83. <div id="leasingErrors"></div>
  84. <div id="leasingSuccessMsg" style="display: none"><?php _e('Item added', 'wp-woo-leasing'); ?></div>
  85. <center><h2 id="addOnTitle" style="display: none"><?php _e('Product Addon', 'wp-woo-leasing'); ?> til <?php woocommerce_page_title(); ?></h2></center>
  86. <div class="leasing-column">
  87. <div class="lease-col1">
  88. <div class="products-addons-container" id="products-addons-container"></div>
  89. <div class="productGrandTotal" id="productGrandTotal"></div>
  90. <div id="productStartingPrice" class="productStartingPrice"></div>
  91.  
  92.  
  93. </div>
  94. <div class="lease-col2">
  95. <div class="leasing-widget-container">
  96. <?php dynamic_sidebar('leasing-sidebar'); ?>
  97. </div>
  98. </div>
  99. </div>
  100.  
  101. </div>
  102.  
  103. </div>
  104. </form>
  105. <div class="leasing-single-container" >
  106. <div id="checkoutFields">
  107. <?php do_action('leasing_chekout_fields'); ?>
  108. </div>
  109. </div>
  110. <div class="ajaxModal"></div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement