Skip to content

Instantly share code, notes, and snippets.

View JosephLeedy's full-sized avatar
😀

Joseph Leedy JosephLeedy

😀
View GitHub Profile

Keybase proof

I hereby claim:

  • I am josephleedy on github.
  • I am josephleedy (https://keybase.io/josephleedy) on keybase.
  • I have a public key ASD3B3sUSZ8YMhkpLFZUYp7Dg5UcKRRzUGJd1dF_0hpy5Qo

To claim this, I am signing this object:

@JosephLeedy
JosephLeedy / report-custom-fees-by-order-date.sql
Created April 23, 2025 15:43
Generate a report of Custom Fees charged by order date
SELECT
DATE(so.created_at) AS 'Order Date',
fee.title AS 'Fee',
SUM(fee.base_value) AS 'Base Total Amount',
SUM(fee.value) AS 'Total Amount'
FROM custom_order_fees AS cof
JOIN JSON_TABLE(
cof.custom_fees,
'$' COLUMNS (
NESTED PATH '$.*' COLUMNS (
@JosephLeedy
JosephLeedy / generate-custom-fees-report.php
Last active April 23, 2025 17:52
Script to generate a Custom Order Fees report
<?php
/** @noinspection ALL */
use Magento\Framework\App\Bootstrap;
use Magento\Framework\App\Http;
use Magento\Framework\App\ResourceConnection;
use Magento\Framework\App\State;
require_once '/var/www/html/app/bootstrap.php';