OK, I need some help, and I am not sure if this is the correct spot.
I have upgraded to v1.5.
I am doing a re-write for purchase orders, which is essential for my clients store.
everything up to this point is working fine until i try to view the order in admin.
I have traced my error to the order class in admin.
I have successfully added a new column in zen_orders however under function query, when I insert the purchase_order_number. It just crashes the view/edit order.
original
Code:
function query($order_id) {
global $db;
$order = $db->Execute("select cc_cvv, customers_name, customers_company, customers_street_address,
customers_suburb, customers_city, customers_postcode, customers_id,
customers_state, customers_country, customers_telephone,
customers_email_address, customers_address_format_id, delivery_name,
delivery_company, delivery_street_address, delivery_suburb,
delivery_city, delivery_postcode, delivery_state, delivery_country,
delivery_address_format_id, billing_name, billing_company,
billing_street_address, billing_suburb, billing_city, billing_postcode,
billing_state, billing_country, billing_address_format_id,
coupon_code, payment_method, payment_module_code, shipping_method, shipping_module_code,
cc_type, cc_owner, cc_number, cc_expires, currency,
currency_value, date_purchased, orders_status, last_modified,
order_total, order_tax, ip_address
from " . TABLE_ORDERS . "
where orders_id = '" . (int)$order_id . "'");
after i insert purchase order
Code:
function query($order_id) {
global $db;
$order = $db->Execute("select cc_cvv, customers_name, customers_company, customers_street_address,
customers_suburb, customers_city, customers_postcode, customers_id,
customers_state, customers_country, customers_telephone,
customers_email_address, customers_address_format_id, delivery_name,
delivery_company, delivery_street_address, delivery_suburb,
delivery_city, delivery_postcode, delivery_state, delivery_country,
delivery_address_format_id, billing_name, billing_company,
billing_street_address, billing_suburb, billing_city, billing_postcode,
billing_state, billing_country, billing_address_format_id,
coupon_code, payment_method, payment_module_code, shipping_method, shipping_module_code,
cc_type, cc_owner, cc_number, cc_expires, currency,
currency_value, date_purchased, orders_status, last_modified,
order_total, order_tax, ip_address, purchase_order_number
from " . TABLE_ORDERS . "
where orders_id = '" . (int)$order_id . "'");
i get "WARNING: An Error occurred, please refresh the page and try again." when I try to look at the order in admin.
Help what am I doing wrong or missing.
Thanks
Bookmarks