Forum Replies Created

Viewing 10 replies - 1 through 10 (of 10 total)
  • Thread Starter webdesigner27

    (@webdesigner27)

    I’ve found in another discussion example/wp-admin/admin.php?page=connection-test-admin-page (Replace example.com with your domain) … in this page you can find a button “Sync All Products with Google Merchant Center” … as my shop is concerning a lot of products is needed the “Async” option enabled if not the system crash.

    Hope it helps πŸ™‚

    Thread Starter webdesigner27

    (@webdesigner27)

    In fact “title” seems to not be in the Attributes.
    Changing the private function of the plugin (risky) … it works like a charm and the titles are now correct on Google Merchant πŸ™‚

    protected function map_wc_general_attributes() {
    
        $this->setDescription( $this->get_wc_product_description() );
        $this->setLink( $this->wc_product->get_permalink() );
    
        // set item group id for variations
        if ( $this->is_variation() ) {
            $this->setItemGroupId( $this->parent_wc_product->get_id() );
            $this->setTitle( $this->wc_product->get_name() );
        }
        else $this->setTitle( $this->wc_product->get_title() );
        return $this;
    }

    The problem will be on the next plugin update… i need to find another solution. πŸ˜΅β€πŸ’«

    Thread Starter webdesigner27

    (@webdesigner27)

    @shameemreza

    Thanks a lot for the clarification!
    For safety, I manually synchronized all the products.

    Nothing is changing… and in the feed inside the plugin the titles seem to remain the same πŸ˜€πŸ˜… (i’ve cleaned the caches)

    Let’s wait!?!

    Thread Starter webdesigner27

    (@webdesigner27)

    Of course i will πŸ™‚

    One question… Do I need to do anything after modifying the functions.php file in my child theme within the plugin settings?
    Do I just need to wait for the re-sync?

    Thanks!

    • This reply was modified 2 years, 4 months ago by webdesigner27.
    Thread Starter webdesigner27

    (@webdesigner27)

    πŸ™‚

    get_name() for variation … instead get_title()

    add_filter( 'woocommerce_gla_product_attribute_values', 'gla_custom_variable_product_title', 10, 3 );

    function gla_custom_variable_product_title( $attributes, $product, $adapter ) {
    if ($product->is_type('variable')) {
    $new_title = $product->get_name();
    $attributes['title'] = $new_title;
    }
    return $attributes;
    }

    I will test it now and back with a feedback πŸ˜›

    Thread Starter webdesigner27

    (@webdesigner27)

    Thank you so much @shameemreza!

    I know it’s not a technical discussion forum… but I just need to know the exact value of the attribute. Is it “title”, “Title” or “TITLE” ? πŸ™‚
    The correct filter name is “woocommerce_gla_product_attribute_values“.
    I’ve seen an example in another thread of this forum and the code is ok for eg. changing the GTIN value… but for title?!?!?!? πŸ˜›

    add_filter( 'woocommerce_gla_product_attribute_values', 'my_custom_function', 10, 3 );
    function my_custom_function( $attributes, $product, $adapter ) { $my_new_gtin = get_post_meta( $product->get_id(), '_maxyzla_ean_number', true );
    $attributes['GTIN'] = $my_new_gtin;
    return $attributes;
    }

    cos’ in the Adapter the Prod Name is mapped in the “map_wc_general_attributes” function 😎

    Thanks in advance!

    Thread Starter webdesigner27

    (@webdesigner27)

    Hi @doublezed2 πŸ™‚

    As you can see in the two eg. screenshots…

    The variable product with name “Blauberg – VMR Valvola diffusore Aria in acciaio” have 4 variants (“Blauberg – VMR Valvola diffusore Aria in acciaio 10cm”,”Blauberg – VMR Valvola diffusore Aria in acciaio 12,5cm”,”Blauberg – VMR Valvola diffusore Aria in acciaio 15cm” and “Blauberg – VMR Valvola diffusore Aria in acciaio 20cm”).
    I want the feed to be populated, only for products with variations, with the variant name instead of the parent prod. name that is “Blauberg – VMR Valvola diffusore Aria in acciaio”.

    The problem is similar to that thread

    Thanks πŸ™‚

    Thanks m8 i Will do It.

    Best.

    Hi @ckadenge and sorry for my mistake.
    I will open a new thread. (a new topic right?)

    Cheers!

    • This reply was modified 2 years, 4 months ago by webdesigner27.

    Hi πŸ™‚

    I have the same issue. I want to see, if the product has variations, the variation title as the product title.

    I’m stuck :/ with a lot of product with same name

    • This reply was modified 2 years, 4 months ago by webdesigner27.
Viewing 10 replies - 1 through 10 (of 10 total)