Hello
Could you please visit >Setup Fields>Product Order Items and use field “Order item metadata” ?
Thanks, Alex
Hi, thanks for the reply. I’ve got those options in there and they do work, however, I need to merge them into one field, not 3 separate fields.
Each order will only have one of the fields filled, so there will not be any mixed information.
For example order 1 will have information in ‘potatoextras’, order 2 will have info filled for ‘fridayextras’ etc.
How can I merge them on the output??
Thanks
Hello
please, use this way https://docs.algolplus.com/algol_order_export/add-calculated-field-for-product/
function should use code like
return $item->get_meta("potatoextras") . $item->get_meta("fridayextras") . $item->get_meta("sandwichextras");
-
This reply was modified 4 years, 6 months ago by
algol.plus.
Brilliant that works perfectly, thanks very much!
One more question. I’ve got a custom field for ‘Collection Date’ which is different from the order date. The collection date field shows in the ‘Item Metadata’ section, and it shows the exact dates when I select ‘=’, but how can I show all orders for ‘today’? Or ‘tomorrow’?
I’ve tried {today} but did not work.
https://fxrestaurant.com/wp-content/uploads/2021/10/Screenshot-2021-10-04-at-11.58.06.png
Cheers
please, type tag {tomorrow} and add PHP code to build correct filter in backend.
more
https://docs.algolplus.com/algol_order_export/export-orders-based-on-delivery-date/
Thanks for the quick reply. I still can’t get it to work – https://fxrestaurant.com/wp-content/uploads/2021/10/Screenshot-2021-10-04-at-12.43.09.png
I’m using this plugin if that helps? https://www.themehigh.com/product/woocommerce-extra-product-options/
I’m able to add the field to the report and export the content correctly, as well as filter by a single date.
Thanks
1. Please, run phpMyAdmin and review records in table wp_order_itemmeta
Set filter meta_key = collection_date
2. Adjust format in code.
But dd/mm/yy is wrong mask in any case
more https://www.php.net/manual/en/datetime.format.php
Hi,
This is the content of my Misc settings currently:
add_filter('woe_settings_validate_defaults', function ($settings) {
$settings = json_encode($settings);
$tomorrow = date("d/m/y", strtotime("+1 day", current_time( 'timestamp' ) ));
$settings = str_replace( '{tomorrow}', $tomorrow, $settings);
$settings = json_decode($settings, true);
return $settings;
} );
The key for the collection date is definitely ‘collection_date’, and I’ve changed the date format to ‘d/m/y’ which should be correct. This is the PHPmyadmin screenshot which shows the matching formats – https://fxrestaurant.com/wp-content/uploads/2021/10/Screenshot-2021-10-04-at-14.09.29.png
It just shows as ‘No results’ when I preview it.
Any ideas? Thanks very much
Amazing thank you so much!