• Resolved Degas

    (@degas)


    We’re just setting up a shop selling physical goods as well as occasional events tickets, where the tickets need to be zero cost shipping.

    I thought this would be accomplished by setting the tickets as Virtual products and using the Premium Shipping plugin on the Item Rate basis, but this only differentiate between Simple and Downloadable items and so charges shipping on any mixed amount of Simple and Virtual items. (Virtual items by themselves are fine, but pick up shipping as soon as combined with Simple).

    One way is to set the tickets as Downloadable items, but I’d much prefer instead to refine the Premium Shipping Total minus Downloadable sum that derives the total number of items to charge shipping for. Is there an equivalent of $cart_dl_count to count the number of items in the cart that belong to a particular product category (ie Tickets)?

    Thanks in advance for any heads up

    https://wordpress.org/plugins/jigoshop/

Viewing 2 replies - 1 through 2 (of 2 total)
  • megawebmaster

    (@megawebmaster)

    Sorry, currently there is no such function. I can only advise to create your own query (using WPDB preferably) and count them.

    It would be something like:

    SELECT COUNT(p.id) FROM $wpdb->posts p
    LEFT JOIN $wpdb->term_relationship tr ON p.ID = tr.object_id
    LEFT JOIN $wpdb->term_taxonomy tt ON tr.term_taxonomy_id = tt.term_taxonomy_id
    LEFT JOIN $wpdb->terms t ON tt.term_id = t.term_id
    WHERE tt.taxonomy = 'product_cat' AND t.name = 'Tickets'

    Please test if it returns results you desire. Moreover – you need to filter these with products in cart of course.

    Thread Starter Degas

    (@degas)

    Thanks for this, will see how we go

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Shipping – free and chargeable items combined’ is closed to new replies.