• Resolved wp1605982g2n

    (@wp1605982g2n)


    Hello,

    I have added the shortcode [adp_product_bulk_rules_table] to run after_add_to_cart_form, but I’d like to create some conditions if the table does not exist for specific product.

    So, I have tried
    $dyn_price = do_shortcode("[adp_product_bulk_rules_table]");
    if (!empty($dyn_price)) {

    but it looks that your shortcode never returns empty since it always echoes
    <span class="wdp_bulk_table_content" data-available-ids="' . json_encode( $available_products_ids ) . '"></span>

    Any suggestion how to solve this? Thank you.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author algol.plus

    (@algolplus)

    Hello

    please, submit ticket to helpdesk.
    we’ll provide beta for tests.

    thanks, Alex

    Plugin Author algol.plus

    (@algolplus)

    This bug was fixed in version 2.2.0

    Hello,

    I wonder if you could take another look at this because I think the resolution you implemented for this ticket has caused a problem for us. In our case we using your plugin with a Variable product and the base product has no bulk prices only the variations have bulk prices. Because of that when the page is first loaded “wdp_bulk_table_content” now doesn’t exist in the dom and so when the variation is selected on the frontend the javascript doesn’t execute the ajax to fetch the table for the variation.

    frontend.js (lines 7 to 13):

    		if (typeof jQuery('.wdp_bulk_table_content').attr('data-available-ids') !== 'undefined') {
    			available_ids = JSON.parse(jQuery('.wdp_bulk_table_content').attr('data-available-ids'));
    		}
    
    		if ( available_ids.indexOf( parseInt( product_id ) ) === -1 ) {
    			return;
    		}
    

    Please let me know if you’d like any more information.

    Plugin Author algol.plus

    (@algolplus)

    Could you reply to previous ticket in helpdesk ?

    we’ll check the problem tomorrow

    Plugin Author algol.plus

    (@algolplus)

    We’ve fixed bug. please, contact us to get beta for tests.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Shortcode displaying even if empty’ is closed to new replies.