Skip to content

Instantly share code, notes, and snippets.

@bunnywong
Created March 15, 2015 19:48
Show Gist options
  • Save bunnywong/0b314b2423a08b54cd55 to your computer and use it in GitHub Desktop.
Save bunnywong/0b314b2423a08b54cd55 to your computer and use it in GitHub Desktop.
Get reward
SELECT op.product_id, op.name, op.quantity, op.reward
FROM oc_order_product op, oc_product_reward pr, `oc_order` o
WHERE op.product_id = pr.product_id
AND o.customer_group_id = pr.customer_group_id
AND o.order_id = op.order_id
AND o.order_id = '1415'
AND points > 0
AND o.customer_id > 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment