Advertisement
Guest User

WC Vendors Pro product-edit.php file NC

a guest
Dec 17th, 2015
204
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.21 KB | None | 0 0
  1. <?php
  2. /**
  3. * The template for displaying the Product edit form
  4. *
  5. * Override this template by copying it to yourtheme/wc-vendors/dashboard/
  6. *
  7. * @package WCVendors_Pro
  8. * @version 1.1.3
  9. */
  10. /**
  11. * DO NOT EDIT ANY OF THE LINES BELOW UNLESS YOU KNOW WHAT YOU'RE DOING
  12. *
  13. */
  14.  
  15. $title = ( is_numeric( $object_id ) ) ? __('Save Changes', 'wcvendors-pro') : __('Add Product', 'wcvendors-pro');
  16. $product = ( is_numeric( $object_id ) ) ? wc_get_product( $object_id ) : null;
  17.  
  18. // Get basic information for the product
  19. $product_title = ( isset($product) && null !== $product ) ? $product->post->post_title : '';
  20. $product_description = ( isset($product) && null !== $product ) ? $product->post->post_content : '';
  21. $product_short_description = ( isset($product) && null !== $product ) ? $product->post->post_excerpt : '';
  22.  
  23. /**
  24. * Ok, You can edit the template below but be careful!
  25. */
  26. ?>
  27.  
  28. <h2><?php echo $title; ?></h2>
  29.  
  30. <!-- Product Edit Form -->
  31. <form method="post" action="" id="wcv-product-edit" class="wcv-form">
  32.  
  33. <!-- Basic Product Details -->
  34. <div class="wcv-product-basic wcv-product">
  35. <!-- Product Title -->
  36. <?php WCVendors_Pro_Product_Form::title( $object_id, $product_title ); ?>
  37. <!-- Product Description -->
  38. <?php WCVendors_Pro_Product_Form::description( $object_id, $product_description ); ?>
  39. <!-- Product Short Description -->
  40. <?php WCVendors_Pro_Product_Form::short_description( $object_id, $product_short_description ); ?>
  41. <!-- Product Categories -->
  42. <?php WCVendors_Pro_Product_Form::categories( $object_id, true ); ?>
  43. <!-- Product Tags -->
  44. <?php WCVendors_Pro_Product_Form::tags( $object_id ); ?>
  45. <!-- Product Attributes (if any) -->
  46. <?php WCVendors_Pro_Form_helper::attribute( $object_id ); ?>
  47. </div>
  48.  
  49. <div class="all-100">
  50. <!-- Media uploader -->
  51. <div class="wcv-product-media">
  52. <?php WCVendors_Pro_Form_helper::product_media_uploader( $object_id ); ?>
  53. </div>
  54. </div>
  55.  
  56. <hr />
  57.  
  58. <div class="all-100">
  59. <!-- Product Type -->
  60. <div class="wcv-product-type">
  61. <?php WCVendors_Pro_Product_Form::product_type( $object_id ); ?>
  62. </div>
  63. </div>
  64.  
  65. <div class="all-100">
  66. <div class="wcv-tabs top" data-prevent-url-change="true">
  67.  
  68. <?php WCVendors_Pro_Product_Form::product_meta_tabs( ); ?>
  69.  
  70. <!-- General Product Options -->
  71. <div class="wcv-product-general tabs-content" id="general">
  72.  
  73. <div class="hide_if_grouped">
  74. <?php WCVendors_Pro_Product_Form::sku( $object_id ); ?>
  75. </div>
  76.  
  77. <div class="options_group show_if_external">
  78. <?php WCVendors_Pro_Product_Form::external_url( $object_id ); ?>
  79. <?php WCVendors_Pro_Product_Form::button_text( $object_id ); ?>
  80. </div>
  81.  
  82. <div class="show_if_simple show_if_external">
  83. <!-- Price -->
  84. WCVendors_Pro_Form_Helper::select( array(
  85. 'post_id' => $object_id,
  86. 'id' => '_regular_price',
  87. 'label' => __( 'Price', 'wcvendors-pro' ),
  88. 'wrapper_start' => '<div class="all-100">',
  89. 'wrapper_end' => '</div>',
  90. 'options' => array(
  91. '1' => __( '$1.00', 'wcvendors-pro' ),
  92. '2' => __( '$2.00', 'wcvendors-pro' ),
  93. '3' => __( '$3.00', 'wcvendors-pro' )
  94. ),
  95. )
  96. );
  97. <!-- Sale Price -->
  98. WCVendors_Pro_Form_Helper::input( array(
  99. 'id' => '_sale_price',
  100. 'type' => 'hidden',
  101. 'value' => '',
  102. )
  103. );
  104. </div>
  105.  
  106. <div class="show_if_simple show_if_external">
  107. <!-- Tax -->
  108. <?php WCVendors_Pro_Product_Form::tax( $object_id ); ?>
  109. </div>
  110.  
  111. <div class="show_if_downloadable" id="files_download">
  112. <!-- Downloadable files -->
  113. <?php WCVendors_Pro_Product_Form::download_files( $object_id ); ?>
  114. <!-- Download Limit -->
  115. <?php WCVendors_Pro_Product_Form::download_limit( $object_id ); ?>
  116. <!-- Download Expiry -->
  117. <?php WCVendors_Pro_Product_Form::download_expiry( $object_id ); ?>
  118. <!-- Download Type -->
  119. <?php WCVendors_Pro_Product_Form::download_type( $object_id ); ?>
  120. </div>
  121. </div>
  122.  
  123.  
  124. <!-- Inventory -->
  125. <div class="wcv-product-inventory inventory_product_data tabs-content" id="inventory">
  126.  
  127. <?php WCVendors_Pro_Product_Form::manage_stock( $object_id ); ?>
  128.  
  129. <?php do_action( 'woocommerce_product_options_stock' ); ?>
  130.  
  131. <div class="stock_fields show_if_simple show_if_variable">
  132. <?php WCVendors_Pro_Product_Form::stock_qty( $object_id ); ?>
  133. <?php WCVendors_Pro_Product_Form::backorders( $object_id ); ?>
  134. </div>
  135.  
  136. <?php WCVendors_Pro_Product_Form::stock_status( $object_id ); ?>
  137. <div class="options_group show_if_simple show_if_variable">
  138. <?php WCVendors_Pro_Product_Form::sold_individually( $object_id ); ?>
  139. </div>
  140.  
  141. <?php do_action( 'woocommerce_product_options_sold_individually' ); ?>
  142.  
  143. <?php do_action( 'woocommerce_product_options_inventory_product_data' ); ?>
  144.  
  145. </div>
  146.  
  147. <!-- Shipping -->
  148. <div class="wcv-product-shipping shipping_product_data tabs-content" id="shipping">
  149.  
  150. <div class="hide_if_grouped">
  151.  
  152. <!-- Shipping rates -->
  153. <?php WCVendors_Pro_Product_Form::shipping_rates( $object_id ); ?>
  154. <!-- weight -->
  155. <?php WCVendors_Pro_Product_Form::weight( $object_id ); ?>
  156. <!-- Dimensions -->
  157. <?php WCVendors_Pro_Product_Form::dimensions( $object_id ); ?>
  158. <?php do_action( 'woocommerce_product_options_dimensions' ); ?>
  159. <!-- shipping class -->
  160. <?php WCVendors_Pro_Product_Form::shipping_class( $object_id ); ?>
  161. <?php do_action( 'woocommerce_product_options_shipping' ); ?>
  162. </div>
  163.  
  164. </div>
  165.  
  166. <!-- Upsells and grouping -->
  167. <div class="wcv-product-upsells tabs-content" id="linked_product">
  168. <?php WCVendors_Pro_Product_Form::up_sells( $object_id ); ?>
  169.  
  170. <?php WCVendors_Pro_Product_Form::crosssells( $object_id ); ?>
  171. </div>
  172.  
  173.  
  174. <?php WCVendors_Pro_Product_Form::form_data( $object_id ); ?>
  175. <?php WCVendors_Pro_Product_Form::save_button( $title ); ?>
  176. <?php WCVendors_Pro_Product_Form::draft_button( __('Save Draft',' wcvendors-pro') ); ?>
  177.  
  178. </div>
  179. </div>
  180. </form>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement