unicco
Forum Replies Created
-
Forum: Plugins
In reply to: [Breadcrumb NavXT] Multiple parents for a pageWhere can I find this “Breadcrumb NavXT Paths extension plugin”? I’m looking for a way to control which category (in the parent-structure) should be shown to the user.
Forum: Plugins
In reply to: [WooCommerce] How to change default shipping method programmaticallyI were expericing a problem, where the system by default selected local pickup ~ free. This is due to the fact, that the get_default_method returns the first id, which in my case, was the local pickup. I wanted a more intelligent solution, as the majority of my customers choose an delivery-option indifferent from the local pickup. I wanted the cheapest shipping to be selected as default, and ignore the local pickup.
function ea_default_shipping_method( $method ) { $_cheapest_cost = 100000; $packages = WC()->shipping()->get_packages()[0]['rates']; foreach ( array_keys( $packages ) as $key ) { if ( ( $packages[$key]->cost > 0 ) && ( $packages[$key]->cost < $_cheapest_cost ) ) { $_cheapest_cost = $packages[$key]->cost; $method_id = $packages[$key]->id; } } return $method_id; } add_filter( 'woocommerce_shipping_chosen_method', 'ea_default_shipping_method', 10 );
Forum: Plugins
In reply to: [qTranslate X] Custom order and languageHi again,
I’ve tested this, and it seems to work perfectly, thanks Clause!:
global $q_config; if (get_post_meta($order->id, 'lang_code', true) != '') { $q_config['language'] = get_post_meta($order->id, 'lang_code', true); }
generates the invoice in the language I’ve specified.
Forum: Plugins
In reply to: [qTranslate X] Custom order and languageThanks, I’ll try this tomorrow. I’ll let you know how it works.
Forum: Plugins
In reply to: [qTranslate X] Custom order and languageAll strings is using the __, so wordpress knows it has to translate them. But I’m not sure where I can configure/change which language they actually should translate into. Could be nice if there was some global variable I could assign, or something. Dunno if it makes sense?
Forum: Plugins
In reply to: [qTranslate X] Custom order and languageYeah, I’ve looked at these sites ??
I havn’t really found a good solution for this yet, course – as I explain – I’d like to control the invoices generated language at the orders details. Could be nice, if there was a smarter way than using the:
$text = apply_filters(‘translate_text’, $text, $lang=null, $flags=0);
$term = apply_filters(‘translate_term’, $term, $lang=null, $taxonomy=null);
$url = apply_filters(‘translate_url’, $url, $lang=null);Course as I see it, I’ve to apply this on all strings, in order to change to language accordingly to my fields languagecode.
Forum: Plugins
In reply to: [qTranslate X] Custom order and languageAm I forced to implement translate_text(), parsing my fields 2-char languagecode, on all strings?
Isn’t there a smarter way to do this?
Forum: Plugins
In reply to: [qTranslate X] Minicart doesn't change language on lang-switchHi kristjan683,
It’s pretty long time sense I fixed this issue, so it’s pretty blurry what I exactly made of changes.
I’m using Avada theme – they might have fixed it already, not sure of that.
Anyways, I changed the .js theme file located in /themes/Avada/assets/js/wc-cart-fragments.js to this:
https://gist.github.com/unicco33/e11747836cb51a80128faae3ce0db3f6In /themes/avada/class-avada-scripts.php on line 49 I commented this out:
if( class_exists( ‘WooCommerce’ ) && class_exists( ‘SitePress’ ) ) {The condition was never true, so
wp_deregister_script( ‘wc-cart-fragments’ );
wp_register_script( ‘wc-cart-fragments’, get_template_directory_uri() . ‘/assets/js/wc-cart-fragments.js’, array( ‘jquery’, ‘jquery-cookie’ ), $theme_info->get( ‘Version’ ), true );was never executed.
It might be different, ofcourse, if you’re using other themes. Hope this helps.
I’m experiencing the same issue. Nginx times out and returns 502 bad gateway. Have tried setting the max_execution_time to 30000 – same error.
Likewise Found Velancia Property, my site have pretty many images (Media displays 2000 elements) – so that might be the issue. Nevertheless, are there any fixed for this?
Your way too slow, I changed to SendGrid instead – works perfectly
Thanks for your reply leslierad. Following his instructions fixed the switching-issue. Nevertheless my meta-descriptions is still mixed. All tags in meta-descriptions are gone, so I’ve to add them manually. This wouldn’t be a problem, if I had 3 pages. But 1300-pages, god………………..”/QY()”¤)%(/)”(
Forum: Plugins
In reply to: [qTranslate X] Minicart doesn't change language on lang-switchOh, thats seems right. I’ve just tried changing language, and adding an item to cart. After the item has been added, and the cart’s total have been calcucated, the correct language is displayed in the minicart. It only becomes a problem, in that period where the users change language, to he actually puts something in the cart.
Guess I’ve to live with this. Thanks anyways.
Forum: Plugins
In reply to: [qTranslate X] Minicart doesn't change language on lang-switchHow are things working out ? ??
Forum: Plugins
In reply to: [qTranslate X] Minicart doesn't change language on lang-switchhttp atm.
Yes, the producttitle is displayed as:
“[:da]dansk[:en]engelsk[:no]norsk[:sv]svensk[:de]tysk[:]”So it’s basically everything with the minicart that are troubling.
You can see it at 91.121.165.163 https://www.ejstruplys.dk.
Forum: Plugins
In reply to: [qTranslate X] Minicart doesn't change language on lang-switchPerfect!