• Resolved ameraz

    (@ameraz)


    WP 3.5.2
    Cart66 1.5.1

    I would like to incorporate some shortcodes to my template like so:

    $wholesale = get_post_meta($post->ID, 'item_mayoreo', true);
    $item = get_post_meta($post->ID, 'item', true);
    
    echo do_shortcode('[hide_from level="Wholesale"]');
    	echo do_shortcode('[add_to_cart item="'.$item.'"]');
    echo do_shortcode('[/hide_from]');
    
    echo do_shortcode('[show_to level="Wholesale"]');
    	echo do_shortcode('[add_to_cart item="'.$wholesale.'"]');
    echo do_shortcode('[/show_to]');

    this doesn’t work!! … obviuosly …

    I bought a license some years ago so now I don’t have access to the premium support… It would be nice to find someone with the same kind of problem…

    I couldn’t find any reference documents of Cart66 Template Tags or something like so…

    https://www.ads-software.com/plugins/cart66-lite/

Viewing 1 replies (of 1 total)
  • Thread Starter ameraz

    (@ameraz)

    damn!! i hate when this happens… some minutes later!!!

    it should be like this:

    $wholesale = get_post_meta($post->ID, 'item_mayoreo', true);
    $item = get_post_meta($post->ID, 'item', true);
    
    echo do_shortcode('[hide_from level="Wholesale"]'.'[add_to_cart item="'.$item.'"]'.'[/hide_from]');
    echo do_shortcode('[show_to level="Wholesale"]'.'[add_to_cart item="'.$wholesale.'"]'.'[/show_to]');
Viewing 1 replies (of 1 total)
  • The topic ‘Shortcode as Template Tag’ is closed to new replies.