Changeset 1736171
- Timestamp:
- 09/26/2017 10:56:47 AM (9 years ago)
- Location:
- cardojo-lite/trunk
- Files:
-
- 4 edited
-
includes/cardojo-core-functions.php (modified) (2 diffs)
-
includes/class-cardojo-shortcode-inventory.php (modified) (2 diffs)
-
templates/cardojo-dashboard.php (modified) (1 diff)
-
templates/cardojo-inventory.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
cardojo-lite/trunk/includes/cardojo-core-functions.php
r1736135 r1736171 1953 1953 $current_year = date('Y'); 1954 1954 $current_month = $month; 1955 1956 1955 1957 1956 $search_args = array( 1958 'post_type' => ' deal',1957 'post_type' => 'vehicle', 1959 1958 'post_status' => array( 'publish' ), 1960 1959 'posts_per_page' => -1, 1961 1960 'author' => get_current_user_id(), 1962 'year' => $current_year, 1963 'monthnum' => $current_month 1964 1961 'meta_query' => array( 1962 'relation' => 'AND', 1963 array( 1964 'key' => '_sold_date_year', 1965 'value' => $current_year 1966 ), 1967 array( 1968 'key' => '_sold_date_month', 1969 'value' => $current_month 1970 ) 1971 ) 1965 1972 ); 1966 1973 … … 1978 1985 $current_year = $year; 1979 1986 $current_month = $month; 1980 1981 1987 1982 1988 $search_args = array( 1983 'post_type' => ' deal',1989 'post_type' => 'vehicle', 1984 1990 'post_status' => array( 'publish' ), 1985 1991 'posts_per_page' => -1, 1986 1992 'author' => get_current_user_id(), 1987 'year' => $current_year, 1988 'monthnum' => $current_month 1989 1993 'meta_query' => array( 1994 'relation' => 'AND', 1995 array( 1996 'key' => '_sold_date_year', 1997 'value' => $current_year 1998 ), 1999 array( 2000 'key' => '_sold_date_month', 2001 'value' => $current_month 2002 ) 2003 ) 1990 2004 ); 1991 2005 -
cardojo-lite/trunk/includes/class-cardojo-shortcode-inventory.php
r1735464 r1736171 92 92 update_post_meta( $car_id, '_sold', 1 ); 93 93 $date = strtotime(date("Y-m-d H:i:s")); 94 $date_year = date("Y"); 95 $date_month = date("m"); 94 96 update_post_meta( $car_id, '_sold_date', $date ); 97 update_post_meta( $car_id, '_sold_date_year', $date_year ); 98 update_post_meta( $car_id, '_sold_date_month', $date_month ); 95 99 update_post_meta( $car_id, '_featured', 0 ); 96 100 update_post_meta( $car_id, '_paid_featured', 0 ); … … 108 112 update_post_meta( $car_id, '_sold', 0 ); 109 113 update_post_meta( $car_id, '_sold_date', "" ); 114 update_post_meta( $car_id, '_sold_date_year', "" ); 115 update_post_meta( $car_id, '_sold_date_month', "" ); 110 116 111 117 // Message -
cardojo-lite/trunk/templates/cardojo-dashboard.php
r1735464 r1736171 290 290 // ['Month', 'Orders', 'Customers'], 291 291 ['Month', 'Sales'], 292 ['<?php esc_html_e('Jan.', 'cardojo' ); ?>', <?php echo cardojo_get_total_sales_by_month( 1); ?>],293 ['<?php esc_html_e('Feb.', 'cardojo' ); ?>', <?php echo cardojo_get_total_sales_by_month( 2); ?>],294 ['<?php esc_html_e('Mar.', 'cardojo' ); ?>', <?php echo cardojo_get_total_sales_by_month( 3); ?>],295 ['<?php esc_html_e('Apr.', 'cardojo' ); ?>', <?php echo cardojo_get_total_sales_by_month( 4); ?>],296 ['<?php esc_html_e('May', 'cardojo' ); ?>', <?php echo cardojo_get_total_sales_by_month( 5); ?>],297 ['<?php esc_html_e('Jun.', 'cardojo' ); ?>', <?php echo cardojo_get_total_sales_by_month( 6); ?>],298 ['<?php esc_html_e('Jul.', 'cardojo' ); ?>', <?php echo cardojo_get_total_sales_by_month( 7); ?>],299 ['<?php esc_html_e('Aug.', 'cardojo' ); ?>', <?php echo cardojo_get_total_sales_by_month( 8); ?>],300 ['<?php esc_html_e('Sep.', 'cardojo' ); ?>', <?php echo cardojo_get_total_sales_by_month( 9); ?>],301 ['<?php esc_html_e('Oct.', 'cardojo' ); ?>', <?php echo cardojo_get_total_sales_by_month( 10); ?>],302 ['<?php esc_html_e('Nov.', 'cardojo' ); ?>', <?php echo cardojo_get_total_sales_by_month( 11); ?>],303 ['<?php esc_html_e('Dec.', 'cardojo' ); ?>', <?php echo cardojo_get_total_sales_by_month( 12); ?>]292 ['<?php esc_html_e('Jan.', 'cardojo' ); ?>', <?php echo cardojo_get_total_sales_by_month( "01" ); ?>], 293 ['<?php esc_html_e('Feb.', 'cardojo' ); ?>', <?php echo cardojo_get_total_sales_by_month( "02" ); ?>], 294 ['<?php esc_html_e('Mar.', 'cardojo' ); ?>', <?php echo cardojo_get_total_sales_by_month( "03" ); ?>], 295 ['<?php esc_html_e('Apr.', 'cardojo' ); ?>', <?php echo cardojo_get_total_sales_by_month( "04" ); ?>], 296 ['<?php esc_html_e('May', 'cardojo' ); ?>', <?php echo cardojo_get_total_sales_by_month( "05" ); ?>], 297 ['<?php esc_html_e('Jun.', 'cardojo' ); ?>', <?php echo cardojo_get_total_sales_by_month( "06" ); ?>], 298 ['<?php esc_html_e('Jul.', 'cardojo' ); ?>', <?php echo cardojo_get_total_sales_by_month( "07" ); ?>], 299 ['<?php esc_html_e('Aug.', 'cardojo' ); ?>', <?php echo cardojo_get_total_sales_by_month( "08" ); ?>], 300 ['<?php esc_html_e('Sep.', 'cardojo' ); ?>', <?php echo cardojo_get_total_sales_by_month( "09" ); ?>], 301 ['<?php esc_html_e('Oct.', 'cardojo' ); ?>', <?php echo cardojo_get_total_sales_by_month( "10" ); ?>], 302 ['<?php esc_html_e('Nov.', 'cardojo' ); ?>', <?php echo cardojo_get_total_sales_by_month( "11" ); ?>], 303 ['<?php esc_html_e('Dec.', 'cardojo' ); ?>', <?php echo cardojo_get_total_sales_by_month( "12" ); ?>] 304 304 ]); 305 305 -
cardojo-lite/trunk/templates/cardojo-inventory.php
r1735464 r1736171 505 505 $vehicle_image_extended_gallery = get_post_meta($car_ID, 'vehicle_image_extended_gallery',true); 506 506 $vehicle_cover_image = get_post_meta($car_ID, 'vehicle_cover_image',true); 507 508 $sold_date_year = esc_attr(get_post_meta($car_ID, '_sold_date_year',true)); 509 $sold_date_month = esc_attr(get_post_meta($car_ID, '_sold_date_month',true)); 507 510 508 511 ?>
Note: See TracChangeset
for help on using the changeset viewer.