tiagoalves83
Forum Replies Created
-
Forum: Plugins
In reply to: [Print Invoice & Delivery Notes for WooCommerce] some fatal errorI got the same problem, I needed to edit the plugin’s core to prevent this error.
This error happens when:
1) you added a product with variation
2) your customer buy the product with that variation
3) you remove the variation
4) you try to print the delivery note … ( ERROR!)So I had to edit: classwcdn-print.php because line 139 is returning false
$product = $this->order->get_product_from_item( $item );
line 142 replace to:
if( $product && isset( $item['variation_id'] ) && $item['variation_id'] > 0 ) {
line 162 replace to:
if( $product && $product->exists() && $product->is_downloadable() && $product->has_file() && ( $this->order->status == 'completed' || ( get_option( 'woocommerce_downloads_grant_access_after_payment' ) == 'yes' && $this->order->status == 'processing' ) ) ) {
add this before line 171 “// Set the single price”
if ($product) {
add this before line 186 “// Pass complete item array”
}
that is it…
@chabis can you correct this at the core ? Maybe doing a better solution than mine…
Forum: Plugins
In reply to: [Claudio Sanches - Correios for WooCommerce] SuggestionDude, it is your plugin. I appreciate the time you took to develop it.
My suggestion was to add a option to just use the product weight for shipping calculation.
Correios just cares if the box specs obeys minimun and maximum dimensions. Other than that, it will consider the weight for calculation.
Telling the plugin to use just the weight of the products will make the store owner assumes responsability for the package dimensions.
That is it.
Forum: Plugins
In reply to: [Claudio Sanches - Correios for WooCommerce] SuggestionI believe that GoHorse is add a comment “// Checks if the cart is not just virtual goods.” and actually checks the products measures, doesn’t it ?
I made just a suggestion, you don’t need to offend programming skills of people.
I will use the filter instead. Thanks.
I am having:
Notice: Use of undefined constant E_USER_DEPRECATED - assumed 'E_USER_DEPRECATED' in /home/natural/public_html/wordpress/wp-content/plugins/codestyling-localization/codestyling-localization.php on line 2491
in 1.99.30 version
WordPress 3.5.1 with DEBUG ‘ON’ inside wp-config.php
PHP Version 5.2.17Forum: Plugins
In reply to: [Posts 2 Posts] Any chance of a commercial version with UI support?@mikkelbreum, I have the plugin done ( I am not using all the post to post setting). It is using another plugin: Advanced Custom Fields (with Repeater Field USD 25.00). I tried to publish at the www.ads-software.com, but I made something wrong at the readme.txt and my script was not accepted (My first plugin). After that, I did not try again.
Hi,
the “Parser Error” in single.php can be corrected by replacing ‘<?’ for ‘<?php’ on line 29 in single.php fileHi,
just replace the ‘<?’ for ‘<?php’ in line 29 of /views/project/single.php
If I remove the code below in wedevs-project-manager/views/project/single.php, then I can see the project view …
if ( $activities ) { foreach ($activities as $activity) { ?> <li> <?php echo do_shortcode( $activity->comment_content ); ?> <span class="date">- <?php echo cpm_get_date( $activity->comment_date, true ); ?></span> </li> <? } }
Hi,
same problem using multisite …
Parse error: syntax error, unexpected end of file in /var/www/wordpress.localhost/wp-content/plugins/wedevs-project-manager/views/project/single.php on line 33
a) I can see the initial view.
b) After the project creation I get the “Parse error” above.
c) Then, If I return to the initial view, the project is there, but if I try open the project, I get the same “Parse error”.How do you process your views ?
I will try to debug.Forum: Plugins
In reply to: [Posts 2 Posts] Any chance of a commercial version with UI support?Hi scribu, I am developing a UI to p2p plugin. I alredy have a functional plugin. It’s working nice!
I just need the complete list of args for the “p2p_register_connection_type” function.
I got some args from the wiki (https://github.com/scribu/wp-posts-to-posts/wiki/) and from the code (https://github.com/scribu/wp-posts-to-posts/blob/master/core/api.php).
Are there other args ?
Can you provide a code example with all args ?Thank you.
Ok … I made a patch to walkers.php the counter is working for categories. I did not test with multiple taxonomies.
Replace function count() inside class QMT_Data_Container for this:
function count() { $old_query = qmt_get_query(); if ( $this->data['is-selected'] ) { return $GLOBALS['wp_query']->post_count; } $query = array( 'tax_query' => array( 'relation' => 'AND' ) ); // Considering previous choices if ( isset( $old_query[ $this->taxonomy ] ) ) { $terms = explode('+', $old_query[ $this->taxonomy ]); $terms[] = $this->term->slug; } else { $terms = $this->term->slug; } $query['tax_query'][] = array ( 'taxonomy' => $this->taxonomy, 'field' => 'slug', 'terms' => $terms, 'include_children' => 0, 'operator' => 'AND' ); return QMT_Count::get( $query ); }
Now, how do I remove the categories that do not have posts ?
More debugging …
It seens the problem is in walkers.php:
QMT_Data_Container
function count() { $old_query = qmt_get_query(); if ( $this->data['is-selected'] ) { return $GLOBALS['wp_query']->post_count; } // Considering previous choices if ( isset( $old_query[ $this->taxonomy ] ) ) { $query = $old_query; $query[$this->taxonomy] = $query[$this->taxonomy] . "+" . $this->term->slug; } else { $query = array_merge( $old_query, array( $this->taxonomy => $this->term->slug ) ); } return QMT_Count::get( $query ); }
I dont know how to fix the query, the query that is being generate is:
SELECT COUNT(*) FROM wp_posts WHERE 1=1 AND wp_posts.post_type = 'post' AND (wp_posts.post_status = 'publish' OR wp_posts.post_status = 'private') ORDER BY wp_posts.post_date DESC
I made some debugging …
Inside widgets.php we have the function:private function generate_lists( $taxonomies, $data )
the the get_terms function returns the correct number of posts …
$terms = $this->get_terms( $taxonomy );
but the walker mess up with the count inside:
$data_tax = array( 'taxonomy' => $taxonomy, 'title' => get_taxonomy( $taxonomy )->label, 'term-list' => $walker->walk( $terms, 0 ) );
I dont know how the Walker class works … If anyone can help ?
Another question: Is there a way to remove the terms that do not have any posts?
Nice!
You said that “the query is not restricted to that post type. But is the query restricted to any post type? Do I still need the filter function to use custom post type?
If I share taxonomies to different post types, the plugin will be able to query all post types associated to that taxonomy? (this sounds good …)
Ok, now seens to work:
gdtt-terms-cloud.php
Inside function results($instance):
change:foreach ($instance as $name => $value) { ... }
to:
foreach ($instance as $name => $value) { $args[] = $name."=".$value; }