Okay
  Public Ticket #3755110
Help with chart on product page
Open

Comments

  • darren waggott started the conversation

    When i link the tables to the product page, they pull the data from the post id correctly. 

    However when i pull place the chart from the same table the table either shows blank, or uses the test / dummy data from the VAR1 or current_post_id and not the actual post id, iv tried creating shortcode and filter function to pull the data directly from the shortcode in wordpress, but with no success.

    We are desperate to get this sorted. We are also willing to pay as the support from TMS is Terrible!

    The other tickets have still been waiting and not replied to for what is now 16 HOURS..... iv created this new ticket in hopes that someone will reply....

  • darren waggott replied

    CAN SOMEONE HELP WITH THIS! 

  •  1,846
    Miloš replied

    Hi Darren,
    1. In regards to the waiting time, I am sorry, but we are not able to provide real time support, the waiting time, depending on the work load, can be from a couple of hours up to two days - but we do our best to respond as quickly as possible.

    We elaborated on our Support work hours and average waiting times on the other ticket.



    2. If I understand, when you only set the Table's shortcode on the product Page, in this case it filters by the 'current Post iD' as expected?

    But when you add the chart connected from that Table, then the table begins having those issues as you described?

    Could you please record a Video of your screen - show us more details on how you configured the source Table to filter by the current POST ID and how it works when just the table is on the Page?
    Then if you can also show us the behaviour/the issue of the table, when you add its source chart - as you described, the table is either blank or sometimes it does not filter as expected.

    If a Video can't be sent here, you can upload it anywhere like weTransfer.

    If it shows any sensitive data, just mark the reply as PRIVATE, for security reasons, so only we can see it.

    2.  We can then remote in and try to isolate the issue with your permission :

    Please provide me a temporary WP-admin (administrator) user for your site where this happens, so we could log in and take a look ‘from the inside’ as that’s the most efficient way to see and resolve the issue. 

    We do not interfere with any data or anything else except for the plugin (in case that’s a production version of the site), and of course, we do not provide login data to third parties. 

    You can write credentials here just check PRIVATE Reply so nobody can see them except us.


    And confirm the Chart ID, please.

    Kind Regards, 

    Miloš Jovanović
    [email protected]

    Rate my support

    Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps and floor plans, choropleth maps and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia demo sites | Docs | Discord Community

    You can try wpDataTables add-ons before purchasing on these sandbox sites:

    Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables

  •   darren waggott replied privately
  •   darren waggott replied privately
  •   darren waggott replied privately
  • darren waggott replied

    iv just noticed, if i go on the back end, then choose a product from woocommerce products then i "view" the product. The chart Shows. However if i navigate anywhere on the website to a product. The chart does not display.

  • darren waggott replied

    iv tried creating a custom js to pass the value of the product id:

    document.addEventListener('DOMContentLoaded', function() {
        // Ensure you are on a WooCommerce product page
        if (typeof wdtProductId !== 'undefined' && wdtProductId !== null) {
            var productId = wdtProductId;
            window.wpdatatableVars = window.wpdatatableVars || {};
            window.wpdatatableVars.CURRENT_POST_ID = productId;
        } else {
            console.error('Product ID not found.');
        }
    });


    Does NOT WORK

  • darren waggott replied

    i have discoved that if i go on the back end or if i go in the the shop page. the tab le displays.
    But if i use a link or a link from a custom post loop the  %CURRENT_POST_ID% is not passed to the table and the table does not load.

  • darren waggott replied

    i tried this: 

    function get_current_post_id() {
        global $post;
        if ( isset( $post->ID ) ) {
            return $post->ID;
        } else {
            return 0; // Return 0 if the post ID is not set
        }
    }
    add_shortcode( 'current_post_id', 'get_current_post_id' );

    then i pass the post id through the shortcode.

    STILL DOES NOT WORK

  • darren waggott replied

    iv not tried this:


    function wpdatatables_add_current_post_id_placeholder( $placeholders ) {
        global $post;
        if ( isset( $post->ID ) ) {
            $placeholders['%CURRENT_POST_ID%'] = $post->ID;
        } else {
            $placeholders['%CURRENT_POST_ID%'] = 0; // Default value if post ID isn't set
        }
        return $placeholders;
    }
    add_filter( 'wpdatatables_filter_sql_execution_vars', 'wpdatatables_add_current_post_id_placeholder' );

    Still no avail

  • darren waggott replied

    i still cannot get the table to display, if going through links, custom post looks or via the links on the tables created via, wpdatatabled.
    However the charts do show if i go in through the woocommerce backend or through the product shop archive page.
    Iv tried multiple soultions and attempted to create functions, that i have not disabled. Whilst waiting for the support ticket to be answered

  •   Miloš replied privately
  •  1,846
    Miloš replied

    Hi Darren,

    Apologies, I just forgot to add something important, based on your last update.

    You mentioned that the charts are showing if you go through the WooCommerce back-end or through the product shop archive Page.

    So, this could be a specific conflict you have on the front-end of the Site.

    More details on that subject :

    wpDataTables is a WYSIWYG (What You See Is What You Get) concept-based plugin.

     This means that the chart should look the same both in the back-end and in the front-end. 

    If your front-end chart looks and behaves differently than in the back-end, this usually implies that there is another plugin (or the current theme) that's changing the behavior of our plugin.

    Can you please change the theme and see if the issue is resolved?

     If not, then please deactivate all other plugins except for our plugin, refresh the page where the issue is, and see if it is resolved (it should be).

     If it is, then start activating other plugins one by one, and after each activation refresh the page to see if the issue reoccurred. 

    Once it does reoccur, you will have found the plugin causing the issue.

     

    Let me know if you isolate a conflict with these steps.



    If not, try going through other advised steps/checks from the last reply and let me know how it goes. We will keep following up and going to include our developers to help if needed.

    Thank you.

    Kind Regards, 

    Miloš Jovanović
    [email protected]

    Rate my support

    Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps and floor plans, choropleth maps and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia demo sites | Docs | Discord Community

    You can try wpDataTables add-ons before purchasing on these sandbox sites:

    Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables