ArcticFritid
Forum Replies Created
-
Forum: Plugins
In reply to: [Plugin Organizer] Disabled plugins dissapear in post type “product”Also i find these 2 notices/errors in my wp-debug log now and then:
[24-May-2017 07:41:03 UTC] PHP Notice: Undefined index: HTTP_USER_AGENT in /wp-content/mu-plugins/PluginOrganizerMU.class.php on line 402
[24-May-2017 08:35:20 UTC] WordPress database error You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘status != ‘trash’ GROUP BY post_id’ at line 1 for query SELECT post_id FROM wp_po_plugins WHERE permalink = ‘www.arctic-fritid.no/nye-produkter/’ and post_id != 11526 AND secure = 1 status != ‘trash’ GROUP BY post_id made by include(‘wp-admin/edit-form-advanced.php’), do_meta_boxes, PO_Template->get_post_meta_box, PluginOrganizer->find_duplicate_permalinksBrgds
RuneForum: Plugins
In reply to: [WooCommerce Login Popup and Shortcodes] Not translatableRemove the 2 slashes in front of:
add_action( 'plugins_loaded', array( self::$instance, 'load_textdomain' ) );
Then just add in the below function:
function load_textdomain() { load_plugin_textdomain( 'woo-login-popup-shortcodes', false, plugin_basename( dirname( __FILE__ ) ) . '/languages' ); }
Forum: Plugins
In reply to: [WooCommerce Login Popup and Shortcodes] Not translatableHere you have the edited code, staring in line 47 of file plugin.php
public static function instance() {
if ( ! isset( self::$instance ) && ! ( self::$instance instanceof WOO_LOGIN_POPUP_SHORTCODES ) ) {
self::$instance = new WOO_LOGIN_POPUP_SHORTCODES;
self::$instance->setup_constants();add_action( 'plugins_loaded', array( self::$instance, 'load_textdomain' ) );
self::$instance->includes();
// self::$instance->roles = new WIDGETOPTS_Roles();
}
return self::$instance;
}function load_textdomain() {
load_plugin_textdomain( 'woo-login-popup-shortcodes', false, plugin_basename( dirname( __FILE__ ) ) . '/languages' );
}
Brgds
RuneForum: Plugins
In reply to: [WooCommerce Login Popup and Shortcodes] Not translatableWell, after fixing the small issues around i found that it actually destroy my sites cache on all pages.. I just had to deactivate it again ??
Forum: Plugins
In reply to: [WooCommerce Login Popup and Shortcodes] Not translatableOk, i have fixed everything.. I found that the load textdomain action was commented out and no function set for that. Set a new function for languages folder and translation now works perfect.
Great plugin ??
Forum: Plugins
In reply to: [WooCommerce Weight Based Shipping] Change value of quantityOk, i found a solution. This line caused the problem:
$weight = $cart->cart_contents_weight;
This because it gives the weight based on standard quantity which always is 1 with Bookings. I built a function that calculate cart weight based on the custom quantity and replaced that line, then also updated the “weight * quantity” line to also use the custom quantity.
Brgds
RuneForum: Plugins
In reply to: [WooCommerce Weight Based Shipping] Change value of quantityYes the bookings is created as any other product so just add the weight in the shipping tab. Did a print of your array and the weight was there an ok.
There isn’t any function that prevent this from beeing executed?
$buckets[$class]->addWeight((float)$product->get_weight() * 3);
I am using the Booking extension to rent hiking, sports and fishing equipment. If you have a look here you will see how it works, https://www.pulpitrockadventure.com
Works great now, only problem left is to get the weight based shipping to work, important because the weight can differ between 1kg to 30kg and then shipping will differ a lot.
Brgds
RuneForum: Plugins
In reply to: [WooCommerce Weight Based Shipping] Change value of quantityNo, it works ok without any changes. plugin calculate shipping correctly if i adds ie. 5 items to the cart. Problems with Booking plugin is that you can not set different quantity for each item, it set quantity to 1 and i have to add quantity ie 3 as a separate postmeta. So i was hoping that by changing the quantity value in your plugin should change the weight as to the quantity i have added as separate postmeta. But as mention even by hardcoding the buckets line no changes appear.
Rune
Forum: Plugins
In reply to: [WooCommerce Weight Based Shipping] Change value of quantityHello,
I can see changes instantly if i change this line, just add value 10:
$weight = $cart->cart_contents_weight;
Nothing happens if i do changes here:
$buckets[$class]->addWeight((float)$product->get_weight() * 3);
Cleaned cache and tested with different products
Rune
Forum: Plugins
In reply to: [Yoast SEO] Fatal error: Cannot redeclare class WPSEO_Metabox…The developer does he not support this forum?
Forum: Plugins
In reply to: [Yoast SEO] Fatal error: Cannot redeclare class WPSEO_Metabox…No imports, a new install with just a few products..
Forum: Alpha/Beta/RC
In reply to: WP Mail sems to crash siteWell another test just discovered that the problem is my new server. Just downgrade to 3.9.2 and same was the same. My 2 other servers with the exact same installs works just fine with 3.9.2 and 4.0beta4
Thanks
Yes i have fixed that part, but i still get page not found if i use categories from the FAQ’s dropdown menu: https://www.sports-markedet.no/topics/generelt/
Forum: Fixing WordPress
In reply to: My query with posts and custom taxonomies wont workSolution is found, below code works great ??
SELECT * FROM $wpdb->posts LEFT JOIN $wpdb->postmeta m1 ON($wpdb->posts.ID = m1.post_id) LEFT JOIN $wpdb->postmeta m2 ON($wpdb->posts.ID = m2.post_id) LEFT JOIN $wpdb->term_relationships ON($wpdb->posts.ID = $wpdb->term_relationships.object_id) LEFT JOIN $wpdb->term_taxonomy ON($wpdb->term_relationships.term_taxonomy_id = $wpdb->term_taxonomy.term_taxonomy_id) WHERE $wpdb->term_taxonomy.term_id = '$_POST[cp_auction_category]' AND $wpdb->term_taxonomy.taxonomy = 'auctions' AND (m1.meta_key = 'closed' AND m1.meta_value = '0') AND (m2.meta_key = 'featured' AND m2.meta_value >= '0') AND $wpdb->posts.post_author='$author' AND $wpdb->posts.post_status = 'publish' AND $wpdb->posts.post_type = 'auction' ORDER BY m2.meta_value AND $wpdb->posts.post_date DESC";
This fixed my last question ??
SELECT DISTINCT wposts.* FROM $wpdb->posts wposts, $wpdb->postmeta wpostmeta, $wpdb->postmeta wpostmeta2 WHERE wposts.ID = wpostmeta.post_id AND wposts.ID = wpostmeta2.post_id AND (wpostmeta.meta_key = 'closed' AND wpostmeta.meta_value = '0') AND (wpostmeta2.meta_key = 'featured' AND wpostmeta2.meta_value >= '0') AND wposts.post_status = 'publish' AND wposts.post_type = 'auction' ORDER BY wpostmeta2.meta_value AND wposts.post_date DESC";