Forum Replies Created

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • in reply to: WooCommerce front end tutorial not working #12014
    mcgregormedia
    Participant

    @ben – I’ve got WPUF working sweet at the moment. I’ve even rolled a forked and modified Per Product Shipping into it where it’s one cost for the first item and a different cost for each additional item rather than a flat cost for each item. (requires one line changed in WCV core though). I’d love to move to WCV Pro but I’ve got that much customisation in the install now it’s just not possible.


    @dfaldin
    – If you’re having to update a product in the dashboard for it to display on the frontend, you’re missing a meta_key somewhere.

    I believe your second point is the default for WC though.

    in reply to: Vendor"s Product doesn't show on shop page. #5456
    mcgregormedia
    Participant

    Haha, it was very early this morning when I wrote that!

    The total_sales meta key is added via the wpuf_add_post_after_insert action – it’s only triggered when adding a product, not editing.

    But yeah. WPUF sucks.

    in reply to: Vendor"s Product doesn't show on shop page. #5442
    mcgregormedia
    Participant

    I’ve also just had this issue of products not appearing in vendors’ shops and solved it by adding the total_sales meta key with value ‘0’ as a hidden field in the WPUF form.

    in reply to: WooCommerce front end tutorial not working #4346
    mcgregormedia
    Participant

    Evening all – Saturday’s nearly over here in the UK!

    I’ve edited the gist I posted above. I found that the previous version will cause a sale price to not display on the frontend. The value of _price must equal either _regular_price or _sale_price. You can set _regular_price and _sale_price easily with your WPUF form but I added a ternary to the function to ensure that if _sale_price is not empty, _price will equal it. Or if it is, _price will equal _regular_price.

    in reply to: WooCommerce front end tutorial not working #3453
    mcgregormedia
    Participant

    Another issue we found with adding products using WPUF is that you have to specify both _price and _regular_price metakeys for the product’s price to display on the frontend and backend.

    We rolled both of these into one function:
    https://gist.github.com/mcgregormedia/651504f88d51379e4138

    in reply to: Per Product Shipping and WP User Frontend Pro #3280
    mcgregormedia
    Participant

    Hi Jamie,

    I can see that the function that actually updates/inserts into the database is pretty much identical to the original plugin function. This is what I’ve tried to do to, but keeping it as close to the original as possible, using the nested foreach loops.

    I actually solved the problem this morning – it turns out that $post_id wasn’t being passed properly and that’s why the update failed (it’s always the littlest things). But now I’m tempted to do it your way… *rubs chin*

    Many thanks
    Andy

    in reply to: Per Product Shipping and WP User Frontend Pro #3263
    mcgregormedia
    Participant

    Hi Ben, the form itself isn’t the problem – it’s adding form fields with exactly the same attributes as the standard PPS code. The issue is in my code that hooks into the wpuf_add_post_after_insert and wpuf_edit_post_after_update actions.

    Hi Jamie, that sounds pretty much like what I’m trying to do so it would be great if you could post that – I could then compare with what I have and see where I’m going wrong. Presumably you’re using nested foreach loops?

    Andy

    in reply to: removing admin toolbar from vednors #2931
    mcgregormedia
    Participant

    Just add the following line to your theme’s functions.php:

    add_filter( 'show_admin_bar','__return_false' );

Viewing 8 posts - 1 through 8 (of 8 total)