• Resolved Pioneer Web Design

    (@swansonphotos)


    I have found a few other posts that seemed to resolved the issue I am having, but they are not very recent and the fix does not work.

    That fix was to disable the TablePress cache so the shortcode would be like this:

    [table id=12 cache_table_output=false /]

    What is rather odd here is that we have other TablePress tables in use on this site and those have no issue using a Cart66 shortcode within a TablePress cell.

    Works. (The Product Chart near bottom of page is used throughout the site without issue).

    Does not work.

    Note: This test table was working until I swapped Column A and Column B. I set this chart up as my original work, after much ado, did not work (the Cart66 ‘Add to Cart’ Buttons do not work). It contains only Cart66 shortcodes and simple text (No HTML). I swapped the columns as the folks over at Cart66 reported to me that the issue I was having was a TablePress issue and had to do with how TablePress…here, I will just quote them:

    I do know that often times TablePress creates issues with Cloud products. Something in the serialization causes issues. You may have to use the buy now links…

    Seeing as I am now stuck in the middle, I figured perhaps that Cart66 and TablePress (both very popular plugins) could take a harder look at this.

    https://wordpress.org/plugins/tablepress/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    thanks for your question, and sorry for the trouble.

    To be honest, I’m failing to see how TablePress could be causing such issues. The Shortcodes are evaluated as far as I can see, and if you really added that Shortcode parameter to turn off caching, the relevant JavaScript should have been added as well. The order of columns does not have an influence on this.

    To rule out any JavaScript interference, please try unchecking the “Use DataTables” checkbox on the “Edit” screen of the table.
    After that, TablePress will only serve the HTML code, and what happens after that is up to that Cart66 plugin (unfortunately, as I have never used it myself, I’m not really familiar with it 🙁 ).

    Regarding that quote that you got from them: I have no clue what they are referring to here. TablePress does not use “serialization” and I don’t know how it would interfere with “Cloud products”. It only serves HTML code for a table.

    Regards,
    Tobias

    Thread Starter Pioneer Web Design

    (@swansonphotos)

    After further review and testing, I can verify the add to cart button(s) do not work within any TablePress Table – with this exception:

    They work if the page also has any other cart button not within a TablePress Table.

    TablePress is indeed somehow not allowing the buttons to work as seen here. That (older) post does have the original table added, but not any add to cart button not within a table. I am quite puzzled now at this finding as I was sure we tested this all along the way (and have no site user feedback related to the cart buttons).

    I am also pointing Cart66 folks to this post, but think they are likely on the right track (the cause being uncertain) on the issue here.

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    thanks for this research, that’s great insight!

    Now, TablePress does not actively do anything to prevent those buttons from showing up. I can therefore only assume that Cart66’s detection of whether it should insert/load its JavaScript files on this page is affected here. This could for example happen, if this detection relies on Shortcodes as a trigger. If the TablePress caching is active (which it is by default), Shortcode handler functions are not evaluated, so that the JS files are likely not loaded when the cached output is used. To work around that, one usually has to turn off that caching in TablePress. That’s why I recommend to add that cache_table_output=false parameter to the Shortcode. Can you maybe check if that really has been added properly?
    With that parameter in place, TablePress will evaluate those Shortcode in the table, add their output to the table, and then print that to the page, in the same way as if the plain table HTML code had been written into the page.
    With that, there might be another possibility of why the JS files are not loaded: It could be possible (I don’t know), that Cart66 is running a search for its Shortcodes in the page content. As they (in this case) are “hidden” inside a table Shortcode, it will obviously not find any and therefore maybe not load its JS files (except if it does find one of its Shortcode outside of a table (and thus not “masked”).

    So, the question is: How does Cart66 embed/load its JavaScript files and how does the detection work?

    Regards,
    Tobias

    Thread Starter Pioneer Web Design

    (@swansonphotos)

    I can confirm now that this issue is not a TablePress issue. I am not surehow or when, but a setting in the Cart66 Cloud setting was changed or set back to default on update. That setting is at /wp-admin/admin.php?page=cart66 and specifically is “Product post types”. As TablePress is actually a custom post type, we need simply have tablepress_table checked. It was not. In fact, none of them were, not even page or post, yet the product loader worked on them…I will continue to discuss with Cart66 folks, but have now marked this as resolved and thank you much for looking into this for us.

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    no problem, you are very welcome! 🙂 Good to hear that this helped!

    That really sounds like a strange issue. I hope that the Cart66 developers can shed some light on this.

    Best wishes,
    Tobias

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Cart66 and TablePress’ is closed to new replies.