Okay
  Public Ticket #3379930
Weird titles and no buy button
Closed

Comments

  • Michael Ghelfi started the conversation

    Hello,

    I'm contacting you about two bugs I encounter on my website.

    My company has to create thousands of products and variations. Your bulk import system doesn't work the way we need it to work, so we built our work.

    Our script does the following : 1) it uses your in-built tool to generate products without variations using mp3 files. 2) it gives attributes and creates variations (mp3 and .wav for 6 different licenses) using the woocommerce REST API.

    But for some reason (check the link)

    1) Our products don't have any button to purchase them directly. It simply disappeared. The option to display the action button is ticked on Elementor.

    2) Their titles have underscores and we can't change that, as your system doesn't allow to choose which product info to display as the first column. Also, we don't know where these underscores come from. On the product pages, they don't show up. Mysterious Jungle - Michael Ghelfi Studios

    Beside that, I've been working with the people at WPDataTables to understand why my website doesn't display our databases correctly and why it did display it perfectly some months ago. The answer is your theme. Using your theme seems to create some JSON errors (according to their devs) and sometimes, the tables filters don't display. The error is on the side of your theme. Please tell me what's going on. (see screenshot)

    Databases - Michael Ghelfi Studios

    Best regards,

    Michael Ghelfi

    Attached files:  Capture d’écran 2023-05-27 161922.png

  •  1,103
    Max replied

    hi

    Could you please provide me access to your wp-admin and I will gladly check the issue you have.

    Thanks,


    Max from the Sonaar.io Crew

  •   Michael Ghelfi replied privately
  •  1,103
    Max replied

    Hi,

    1) This is because your product have not been saved through WordPress interface. They are in the DB tho. If you edit one of your product and click Update, the button will show. (i did an example for your 2 first product) : https://drops.sonaar.io/i/k75Sbl

    I will have to check with our team why this happens and if we can find a fix, we will release a plugin update for this.

    2) The track title are automatically taken from your MP3 ID3 tags. Your track titles contains underscores. I edited your first track title MP3 and it worked. See screenshot: https://drops.sonaar.io/i/DCd3En


    3) I cant reproduce the issue? can you elaborate on steps to reproduce it ? Also, dDoes it work when you active a default WP theme ?  and finally, what are the json error you have ? Im not sure to understand correctly.

    Thanks,


    Max from the Sonaar.io Crew

  • Michael Ghelfi replied

    Hello Max,

    Do you have any info about when you'll release a fix about 1) ?

    Thank you

  •  1,103
    Max replied

    I have just apply the fix on your site. should work now when importing new tracks.

    The fix will be released publicly in around 2 weeks.

    Thanks,


    Max from the Sonaar.io Crew

  • Michael Ghelfi replied

    Thanks!

    Another question: I didn't find (maybe I missed it) the option to include a pdf version of the personalized license once it's bought. How could I do it ?

  •  1,103
    Max replied

    if you use our license feature, a PDF is automatically generated on the server and attached to the order.

    If you want to include a personalized version, i don't really know how to do it. You might want to check with a third party plugin on how to attach a PDF depending the variation..

    Thanks,


    Max from the Sonaar.io Crew

  • Michael Ghelfi replied

    Hello Max,

    I got a question following another question I had weeks earlier. Here's the context :

    "My company has to create thousands of products and variations. Your bulk import system doesn't work the way we need it to work, so we built our own.

    Our script does the following : 1) it uses your in-built tool to generate products without variations using mp3 files. 2) it gives attributes and creates variations (mp3 and .wav for 6 different licenses) using the woocommerce REST API.

    But for some reason our products don't have any button to purchase them directly. It simply disappeared. The option to display the action button is ticked on Elementor.

    You answered :

    This is because your product have not been saved through WordPress interface. They are in the DB tho. If you edit one of your product and click Update, the button will show. (i did an example for your 2 first product) : https://drops.sonaar.io/i/k75Sbl I will have to check with our team why this happens and if we can find a fix, we will release a plugin update for this.

    So now it works when we import new products, but we still have 1300 products that require to be manually updated. We didn't find any way to do it automatically/in bulk.

    Do you have any API call to reupdate/resave all products? Could you provide a code example please ?

    Best regards,

    Michael


  •  1,103
    Max replied

    Hello Michael,

    We dont have any hook for that...

    Perhaps you can script a quick code for this..here an example but be aware that i have absolutely NOT tested it and I don't know if it works. Its only to give you an idea.


    Open your WordPress theme's functions.php file and add the following code:

    function update_woocommerce_products() {
        $args = array(
            'post_type' => 'product',
            'posts_per_page' => -1
        );     $loop = new WP_Query( $args );     if ( $loop->have_posts() ) {
            while ( $loop->have_posts() ) : $loop->the_post();
                global $product;
                $product->save();
            endwhile;
        }     wp_reset_query();
    }
    add_action( 'init', 'update_woocommerce_products' );


    This script will run when WordPress initializes, saving all the products in your WooCommerce store.

    IMPORTANT: Remove this code after you run it once, otherwise, it will execute every time your WordPress site initializes.

    Again, make sure to test this on a development site first to avoid unintentional data loss. Always backup your data before running scripts like this one.



    Thanks,


    Max from the Sonaar.io Crew

  • Michael Ghelfi replied

    Thank you, we will try.