Forum Replies Created

Viewing 15 replies - 31 through 45 (of 125 total)
  • Thread Starter ffwebdesigner

    (@ffwebdesigner)

    thanks, that helped a lot!

    Thread Starter ffwebdesigner

    (@ffwebdesigner)

    as this might be helpful: the complete solution for others:

    copy archive-product.php from woocommerce plugin theme folder to your theme_folder/woocommerce/single_product/archive-product.php

    after do_action( ‘woocommerce_before_shop_loop’ ); insert the following code:

    $args = array(
            'post_type'      => 'product',
            'posts_per_page' => -1
        );
        $loop = new WP_Query( $args );
        while ( $loop->have_posts() ) : $loop->the_post();
            global $product;
            $volumen = $product->get_attribute( 'pa_Volumen' );
            if ( ! add_post_meta( $product->get_id(), 'Volumen', $volumen, true ) ) { 
               update_post_meta ( $product->get_id(), 'Volumen', $volumen );
            }
        endwhile;
        wp_reset_query();

    then load a frontend product category one. it should copy the products attribute volumen to the post meta volumen for all products in your shop. i’m doing this on the archive page as i found it quite hard to get alle products objects / functions to work in functions.php. check the result for some products on the edit page. you should see new custom meta volume. DISABLE THE CODE WHEN EVERYTHING HAS BEEN COPIED THE RIGHT WAY.

    next, extend your functions.php inside theme folder:

    
    // new sorting criteria
    add_filter('woocommerce_get_catalog_ordering_args', 'custom_woocommerce_get_catalog_ordering_args');
     
    function custom_woocommerce_get_catalog_ordering_args( $args ) {
        global $wp_query;
        if (isset($_GET['orderby'])) {
            switch ($_GET['orderby']) :
                case 'Volumen_asc' :
                    $args['order'] = 'ASC';
                    $args['meta_key'] = 'Volumen';
                    $args['orderby'] = 'meta_value_num';
                break;
            endswitch;
        }
        return $args;
    }
    
    // define new standard sorting option for all category archives
    
    add_filter('woocommerce_get_catalog_ordering_args', 'am_woocommerce_catalog_orderby');
    function am_woocommerce_catalog_orderby( $args ) {
        $args['meta_key'] = 'Volumen';
        $args['orderby'] = 'meta_value_num';
        $args['order'] = 'ASC'; 
        return $args;
    }
     
    /**
     *  Adds the sorting options to dropdown list .. The logic/criteria is in the method above
     */
    add_filter('woocommerce_catalog_orderby', 'custom_woocommerce_catalog_orderby');
     
    function custom_woocommerce_catalog_orderby( $sortby ) {
        $sortby['Volumen_asc'] = 'Volumen aufsteigend';
        return $sortby;
    }

    works like a charme. only thing i still have to fix: the plugin “woocommerce product filters” is bitting this piece of code in the ass… still working on a fix. without that plugin this solution should work like charme. you might want to integrate the copying of attribute > meta into a on save_post hook.

    enjoy your wp shop!

    Thread Starter ffwebdesigner

    (@ffwebdesigner)

    hi 3 sons,

    i’m trying to do a new standard sorting of all products on any category page.
    value to be sorted by is $product->get_attribute( ‘pa_Volumen’ ); pa_Volumen is numerical.

    the above code doesn’t work as i already guessed because attributes are not post metas. the standard sorting of posts can only be changed to post metas.

    maybe one idea: how about converting just pa_Volumen attribute of each product to post meta – for ALL products? couldn’t find a working code to do that…

    Thread Starter ffwebdesigner

    (@ffwebdesigner)

    i dropped this issue also on https://codecanyon.net/item/woof-woocommerce-products-filter/11498469/support?ref=realmag777 as we got premium. all credentials in there – but the solution here might help others too.

    same here. after update > 5.3.2 with google recaptcha activated the our forms didn’t work no more. should really be fixed. without recaptcha everything worked fine but spam dropped in immediately. thanks for the hint, @hardcorowa_jadwiga!

    Thread Starter ffwebdesigner

    (@ffwebdesigner)

    awwwww… so theres also a combination of unique cols? the entries in one row and two columns must not be empty? that seemed to fix it, plus recreating the index. taht was new to me. there are duplicate entries for object_id and term_taxonomy_id. just the combination of both must be unique.

    Thread Starter ffwebdesigner

    (@ffwebdesigner)

    table up to 2,7gb after just 5 days again… emptied the table.
    as soon as i take the comment out from /wp-content/plugins/woocommerce/packages/action-scheduler/classes/data-stores/ActionSchedulerHybridStore.php line 242
    return $this->primary_store->save_action( $action, $date );
    i get errors again:

    Fatal error: Uncaught RuntimeException: Fehler beim Speichern der Aktion: Fehler beim Speichern der Aktion: Datenbankfehler. in /wp-content/plugins/woocommerce/packages/action-scheduler/classes/migration/ActionScheduler_DBStoreMigrator.php:44 Stack trace: #0 /wp-content/plugins/woocommerce/packages/action-scheduler/classes/data-stores/ActionScheduler_HybridStore.php(243): ActionScheduler_DBStoreMigrator->save_action(Object(ActionScheduler_Action), NULL) #1 /wp-content/plugins/woocommerce/packages/action-scheduler/classes/ActionScheduler_ActionFactory.php(177): ActionScheduler_HybridStore->save_action(Object(ActionScheduler_Action)) #2 /wp-content/plugins/woocommerce/packages/action-scheduler/classes/ActionScheduler_ActionFactory.php(84): ActionScheduler_ActionFactory->store(Object(ActionScheduler_Action)) #3 /wp-content/plugi in /wp-content/plugins/woocommerce/packages/action-scheduler/classes/migration/ActionScheduler_DBStoreMigrator.php on line 44

    Thread Starter ffwebdesigner

    (@ffwebdesigner)

    hi alex,

    just forgot to copy that line, thanks. interested in checking / fixing the issue for money? your hp is offline, please send contact details if interestested.

    cheers
    frank

    Thread Starter ffwebdesigner

    (@ffwebdesigner)

    most lines are

    0″,”212″,”Aktion über Async Request ignoriert”,”2021-02-18 10:51:33″,”2021-02-18 11:51:33

    action over async request ignored.

    i love all in one security which might block async requests. in this case: not. no idea where the blocked async request comes from.

    as like with the enormous variety of woocommerce images sizes (standard 2021 theme 8000 images x 8 sizes = 64000 images) i’d try to reduce server load to the max. which actions do we really need?

    Thread Starter ffwebdesigner

    (@ffwebdesigner)

    Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 4096 bytes) in /wp-content/plugins/woocommerce/packages/action-scheduler/functions.php on line 272

    btw…with germanized installed i always got fatal errors after migrating to a different server. unresolvable after reading and trying more than 20 threads. thus, i edited

    /wp-content/plugins/woocommerce/packages/action-scheduler/classes/data-stores/ActionSchedulerHybridStore.php line 242

    //return $this->primary_store->save_action( $action, $date );

    this line threw the fatal error. everything looking good with that line commented out. the gigantic size appeared also before i edited that line.

    may i just empty wp_actionscheduler_logs in phpmyadmin?

    Thread Starter ffwebdesigner

    (@ffwebdesigner)

    ok danke! hatte bereits alle plugins ausser germanized und woocommerce deaktiviert. brachte auch nichts. forsche jetzt weiter direkt via woocommerce.

    Thread Starter ffwebdesigner

    (@ffwebdesigner)

    ah ok…alles leider erfolglos getestet. produkte mit varianten bleiben ohne mwst.

    frage: ist es eigentlich normal dass man germaniuzed und germanized pro parallel am laufen hat?

    i got exactely the same error here. help appreciated.

    Thread Starter ffwebdesigner

    (@ffwebdesigner)

    hotfix if you may pre-select images attached from wp-meida gallery:

    open /includes/CustomMetabox.php
    change line 100 to

    echo '<li><input style="position: absolute;left: -9999px" type="radio" name="SZSource" id="SZSource-1" value="1" checked="checked" /><a href="#SZTab_wpgallery">WP Media Gallery</a></li>';

    now on every post edit page wp media gallery will be preselected.

    • This reply was modified 4 years, 7 months ago by ffwebdesigner.
    Thread Starter ffwebdesigner

    (@ffwebdesigner)

    fixed it! developer! please add me as admin so i can upload the fix for the plugin.
    multiedit.js
    change line 206
    jQuery('table#list-table tr#multishow span').live( 'click' , function (){
    to
    jQuery('body').on('click', 'table#list-table tr#multishow span', function(){
    then the plugin works alright again, multiedit tabs visibble in editor and editable.

Viewing 15 replies - 31 through 45 (of 125 total)