matt.bateman
Forum Replies Created
-
Forum: Plugins
In reply to: [WooCommerce] Display custom field data in Cart and Checkoutecho 'Delivery after ', get_post_meta($_product->id, $key=expected_stock_date, $single=true) ;
Works! Leaving this here in case somebody else needs it in future.
Forum: Plugins
In reply to: [WooCommerce] Display custom field data in Cart and CheckoutQuick update in case anyone has a hint. In the cart.php I’ve found the line which deals with the Backorder Notification. Here is the text as it appears:
if ( $_product->backorders_require_notification() && $_product->is_on_backorder( $cart_item['quantity'] ) ) echo '<p class="backorder_notification">' . __( 'Available on backorder', 'woocommerce' ) . '</p>';
I’ve supplanted the last line for the following:
echo 'Delivery after ', get_post_meta($post_id=get_queried_object_id(), $key=expected_stock_date, $single=true) ;
Which doesn’t work. The intent is something along the lines of “Delivery after 13/06/2014”. The “Delivery After ” text displays but the array comes back as blank. I’ve tried a few variations but I can’t get the cart to pull the custom data from each product. I can use methods like $_product->get_title(), so I know there’s a way to do this. Also if I replace the post id property with just a vanilla post ID, the code works as expected. So I’m just after a method to grab the contents of that custom field. I’m so close but I’m still so far.
For clemency in case anybody else comes across this problem. Set the plugin to update “_price” as well as “_regular_price” and the error is fixed.
Forum: Plugins
In reply to: [WooCommerce] Display Weight in dashboard product viewHi, thanks for replying but that’s not really a solution for the problem I’m having. I see how that would help but ideally I’d want a fix to be able to select Weight in WP’s Screen Options.
Thanks for the help, it’s appreciated.
Forum: Plugins
In reply to: [WC - APG Free Shipping] Hide other shipment costs except pick upIs this possible by modifying the code snippet above? It looks like this is going to be a useful feature in future versions of the plugin.
Forum: Plugins
In reply to: [WC - APG Free Shipping] Hide other shipment costs except pick upIs there any way to achieve this goal? I tried implementing an edited snippet but I don’t know enough about php to implement it – I just broke the site instead.
Forum: Plugins
In reply to: [WC - APG Free Shipping] Hide other shipment costs except pick upI have the actual (not “Free”) version and I don’t see the option to hide other shipping costs.
Forum: Plugins
In reply to: [WC - APG Free Shipping] Hide other shipment costs except pick upI would like to keep this open too as I have a similar problem.
I offer Free Postage for UK orders over £50. (The shop is based in UK)
If the customer’s postcode is in Scotland, we cannot offer Free Postage.
So if the customer enters a Scottish postcode, the APG plugin displays the cost. This all works as expected.I would however like the Checkout to hide “Free Postage” and “Flat Rate” shipping (which are activated as the customer is in the UK), leaving only the APG Shipping price as the only option.
Was there once an option to hide other shipping costs?