- Cambios

git-svn-id: https://192.168.0.254/svn/Proyectos.OriginalHouse_Web/trunk@8 54e8636e-a86c-764f-903d-b964358a1ae2
This commit is contained in:
David Arranz 2011-07-06 14:42:24 +00:00
parent c93a07d1b2
commit d2bf562055
137 changed files with 184 additions and 730 deletions

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 90 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 93 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

View File

@ -0,0 +1 @@
,DAVID-PC/David,David-PC,06.07.2011 16:24,file:///D:/Usuarios/David/AppData/Roaming/LibreOffice/3;

View File

@ -1,4 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<project-private xmlns="http://www.netbeans.org/ns/project-private/1">
<editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/1"/>
<editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/1">
<file>
<url>wp-content/plugins/thecartpress/customposttypes/ProductCustomPostType.class.php</url>
<line>158</line>
</file>
</editor-bookmarks>
</project-private>

View File

@ -323,8 +323,8 @@ class TheCartPress {
function postsOrderby( $orderby ) {
if ( is_tax( 'tcp_product_tag' ) || is_tax( 'tcp_product_category' ) || is_tax( 'tcp_product_supplier' ) ) {
global $wpdb;
$desc = isset( $_SESSION['tcp_order_desc'] ) ? $_SESSION['tcp_order_desc'] : 'desc';
$type = isset( $_SESSION['tcp_order_type'] ) ? $_SESSION['tcp_order_type'] : 'date';
$desc = isset( $_SESSION['tcp_order_desc'] ) ? $_SESSION['tcp_order_desc'] : 'asc';
$type = isset( $_SESSION['tcp_order_type'] ) ? $_SESSION['tcp_order_type'] : 'title';
switch ( $type ) {
case 'order':
$orderby = "CAST(tcp_postmeta_order.meta_value AS UNSIGNED) $desc, {$wpdb->posts}.post_title";
@ -336,7 +336,7 @@ class TheCartPress {
$orderby = "{$wpdb->posts}.post_title $desc";
break;
case 'date':
$orderby = "{$wpdb->posts}.post_date $desc"; //, {$wpdb->posts}.post_title";
$orderby = "{$wpdb->posts}.post_date $desc, {$wpdb->posts}.post_title";
break;
case 'author':
$orderby = "tcp_users.display_name $desc, {$wpdb->posts}.post_title";

View File

@ -53,7 +53,7 @@ class ProductCustomPostType {
'capability_type' => 'post',
'hierarchical' => false, //allways false
'query_var' => true,
'supports' => array( 'title', 'excerpt', 'editor', 'thumbnail', 'comments' ),
'supports' => array( 'title', 'excerpt', 'editor', 'thumbnail'),
'taxonomies' => array( ProductCustomPostType::$PRODUCT_CATEGORY ), // Permalinks format
'rewrite' => array( 'slug' => isset( $thecartpress->settings['product_rewrite'] ) ? $thecartpress->settings['product_rewrite'] : 'products' ),
'has_archive' => isset( $thecartpress->settings['product_rewrite'] ) && $thecartpress->settings['product_rewrite'] != '' ? $thecartpress->settings['product_rewrite'] : 'products',
@ -62,6 +62,7 @@ class ProductCustomPostType {
if ( is_admin() ) {
add_filter( 'post_row_actions', array( $this, 'postRowActions' ) );
add_filter( 'manage_edit-' . ProductCustomPostType::$PRODUCT . '_columns', array( $this, 'customColumnsDefinition' ) );
add_filter( 'manage_edit-' . ProductCustomPostType::$PRODUCT . '_sortable_columns', array( $this, 'customSortableColumnsDefinition' ) );
}
$labels = array(
'name' => _x( 'Categories', 'taxonomy general name', 'tcp' ),
@ -110,18 +111,38 @@ class ProductCustomPostType {
add_action( 'manage_posts_custom_column', array( $this, 'managePostCustomColumns' ) );
add_action( 'restrict_manage_posts', array( $this, 'restrictManagePosts' ) );
add_filter( 'parse_query', array( $this, 'parseQuery' ) ); //TODO 3.1
add_filter( 'request', array( $this, 'request' ) ); //TODO 3.1
//for quick edit
//add_action('quick_edit_custom_box', array( $this, 'quickEditCustomBox' ), 10, 2 );
add_action('quick_edit_custom_box', array( $this, 'quickEditCustomBox' ), 10, 2 );
}
}
/*function quickEditCustomBox( $column_name, $post_type ) {
function request ( $vars ) {
global $current_screen;
if ( $current_screen->post_type == ProductCustomPostType::$PRODUCT ) {
if(is_admin() && !isset($vars['orderby'])) {
$vars['orderby'] = 'title';
$vars['order'] = 'asc';
}
}
return $vars;
}
function quickEditCustomBox( $column_name, $post_type ) {
if ( $post_type == ProductCustomPostType::$PRODUCT ) {
global $post; //TODO
if ('price' == $column_name)
echo 'price:', tcp_get_the_price( $post->ID );
global $post; //TODO
if ('order' == $column_name)
{?>
<fieldset class="inline-edit-col-left">
<div class="inline-edit-col">
<label class="alignleft">
<span class="title">Orden</span>
<input type="text" name="tcp_order"/>
</label>
</fieldset>
<?php }
}
}*/
}
function postRowActions( $actions, $post_line = null ) {
global $post;
@ -146,9 +167,10 @@ class ProductCustomPostType {
$columns = array(
'cb' => '<input type="checkbox" />',
'title' => __( 'Name', 'tcp' ),
'label' => __( 'label', 'tcp' ),
'price' => __( 'Type - price', 'tcp' ),
'date' => __( 'date', 'tcp' ),
'order' => __( 'Order (in loops/catalogue)', 'tcp' ),
'label' => __( 'label', 'tcp' ),
'price' => __( 'Price', 'tcp' ),
'date' => __( 'Date', 'tcp' ),
//'comments' => __('Comments', 'tcp' ),
);
global $thecartpress;
@ -156,6 +178,16 @@ class ProductCustomPostType {
return $columns;
}
function customSortableColumnsDefinition( $columns ){
$columns['order'] = __( 'Order (in loops/catalogue)', 'tcp' );
$columns['price'] = __( 'Price', 'tcp' );
$columns['cats'] = __('Categories', 'tcp');
return $columns;
}
/**
* Prints the custom fields values in the products list
*/
@ -168,8 +200,12 @@ class ProductCustomPostType {
$label = tcp_get_the_meta( 'tcp_back_end_label', $post->ID );
if ( strlen( $label ) ) echo $label;
} elseif ( 'price' == $column_name ) {
echo tcp_get_the_product_type( $post->ID ) . ' - ' . tcp_format_the_price( tcp_get_the_price( $post->ID ) );
}
//echo tcp_get_the_product_type( $post->ID ) . ' - ' . tcp_format_the_price( tcp_get_the_price( $post->ID ) );
echo tcp_format_the_price( tcp_get_the_price( $post->ID ) );
} elseif ( 'order' == $column_name ) {
echo tcp_get_the_order( $post->ID ) ;
}
}
/**

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 812 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 899 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 951 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 799 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 878 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 907 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 822 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 900 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 932 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 806 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 850 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 887 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 361 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 392 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 696 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Some files were not shown because too many files have changed in this diff Show More