Jump to content

vvhorus

Members
  • Content count

    7
  • Joined

  • Last visited

Profile Information

  • Real Name
    Victor Velez
  1. vvhorus

    [Contribution] Purchase Order V2.3

    I guess editing all the files would help, wouldn't it? :D I skipped checkout_process.php completely. The math issue is fixed. That also fixed the PO number in the invoice/orders page. I guess I'll use the code from the invoice to add the PO number to the packing slip. Excellent contribution! :thumbsup: :thumbsup:
  2. vvhorus

    [Contribution] Purchase Order V2.3

    I'm also having the same issue. The module is not doing the math automatically. Anyone has found a solution to this issue? Also, is there a way to put the PO number in the orders page, the invoice and the packing slip? Thanks!
  3. vvhorus

    NEW! Complete Order Editing Tool!

    Hi: Never mind my last post. I figured it out. :D In case someone else has this same issue, here's what I did. In your edit_orders.php file around line 17: find this: require('includes/application_top.php'); add this line of code below that: require(DIR_WS_FUNCTIONS . 'cc_crypt.php'); Thanks for an excellent contribution!
  4. vvhorus

    NEW! Complete Order Editing Tool!

    Hi! I have a question: On my site, I installed the Encrypting Credit Card via php:mcrypt() contribution a few weeks ago, which is working fine. Now, after I installed the order editor, I get this error message when I try to edit an order: Fatal error: Call to undefined function: cc_decrypt() in /home/~mydomain~/admin/includes/classes/order.php on line 35 Here's my order.php file: <?php /* $Id: order.php,v 1.7 2003/06/20 16:23:08 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ class order { var $info, $totals, $products, $customer, $delivery; function order($order_id) { $this->info = array(); $this->totals = array(); $this->products = array(); $this->customer = array(); $this->delivery = array(); $this->query($order_id); } function query($order_id) { $order_query = tep_db_query("select * from " . TABLE_ORDERS . " where orders_id = '" . (int)$order_id . "'"); $order = tep_db_fetch_array($order_query); // See if we need to decrypt - if it's already been zapped or deleted then no decrypt $cc_number_decrypt = $order['cc_number']; if(tep_not_null($cc_number_decrypt)) { if(strncmp("xxxxxxxxxxxx", $cc_number_decrypt, 12)) { $cc_number_decrypt = cc_decrypt(base64_decode($order['cc_number']), CCKEY); } } else { $cc_number_decrypt = ''; } $totals_query = tep_db_query("select * from " . TABLE_ORDERS_TOTAL . " where orders_id = '" . (int)$order_id . "' order by sort_order"); while ($totals = tep_db_fetch_array($totals_query)) { $this->totals[] = array( 'title' => $totals['title'], 'text' => $totals['text'], 'class' => $totals['class'], 'value' => $totals['value'], 'sort_order' => $totals['sort_order'], 'orders_total_id' => $totals['orders_total_id']); } $this->info = array('currency' => $order['currency'], 'currency_value' => $order['currency_value'], 'payment_method' => $order['payment_method'], 'cc_type' => $order['cc_type'], 'cc_owner' => $order['cc_owner'], // 'cc_number' => $order['cc_number'], 'cc_number' => $cc_number_decrypt, 'cc_expires' => $order['cc_expires'], 'shipping_tax' => $order['shipping_tax'], 'date_purchased' => $order['date_purchased'], 'orders_status' => $order['orders_status'], 'last_modified' => $order['last_modified']); $this->customer = array('name' => $order['customers_name'], 'company' => $order['customers_company'], 'street_address' => $order['customers_street_address'], 'suburb' => $order['customers_suburb'], 'city' => $order['customers_city'], 'postcode' => $order['customers_postcode'], 'state' => $order['customers_state'], 'country' => $order['customers_country'], 'format_id' => $order['customers_address_format_id'], 'telephone' => $order['customers_telephone'], 'email_address' => $order['customers_email_address']); $this->delivery = array('name' => $order['delivery_name'], 'company' => $order['delivery_company'], 'street_address' => $order['delivery_street_address'], 'suburb' => $order['delivery_suburb'], 'city' => $order['delivery_city'], 'postcode' => $order['delivery_postcode'], 'state' => $order['delivery_state'], 'country' => $order['delivery_country'], 'format_id' => $order['delivery_address_format_id']); $this->billing = array('name' => $order['billing_name'], 'company' => $order['billing_company'], 'street_address' => $order['billing_street_address'], 'suburb' => $order['billing_suburb'], 'city' => $order['billing_city'], 'postcode' => $order['billing_postcode'], 'state' => $order['billing_state'], 'country' => $order['billing_country'], 'format_id' => $order['billing_address_format_id']); $countryid = tep_get_country_id($this->delivery["country"]); $zoneid = tep_get_zone_id($countryid, $this->delivery["state"]); $index = 0; $orders_products_query = tep_db_query(" SELECT op.orders_products_id, op.products_name, op.products_model, op.products_price, op.products_tax, op.products_quantity, op.final_price, p.products_tax_class_id, p.products_weight FROM " . TABLE_ORDERS_PRODUCTS . " op LEFT JOIN " . TABLE_PRODUCTS . " p ON op.products_id = p.products_id WHERE orders_id = '" . (int)$order_id . "'"); while ($orders_products = tep_db_fetch_array($orders_products_query)) { $this->products[$index] = array('qty' => $orders_products['products_quantity'], 'name' => $orders_products['products_name'], 'model' => $orders_products['products_model'], 'tax' => $orders_products['products_tax'], 'tax_description' => tep_get_tax_description($orders_products['products_tax_class_id'], $countryid, $zoneid), 'price' => $orders_products['products_price'], 'final_price' => $orders_products['final_price'], 'weight' => $orders_products['products_weight'], 'orders_products_id' => $orders_products['orders_products_id']); $subindex = 0; $attributes_query = tep_db_query("select * from " . TABLE_ORDERS_PRODUCTS_ATTRIBUTES . " where orders_id = '" . (int)$order_id . "' and orders_products_id = '" . (int)$orders_products['orders_products_id'] . "'"); if (tep_db_num_rows($attributes_query)) { while ($attributes = tep_db_fetch_array($attributes_query)) { $this->products[$index]['attributes'][$subindex] = array('option' => $attributes['products_options'], 'value' => $attributes['products_options_values'], 'prefix' => $attributes['price_prefix'], 'price' => $attributes['options_values_price'], 'orders_products_attributes_id' => $attributes['orders_products_attributes_id']); $subindex++; } } $index++; } } } ?> I've had pretty good success customizing my site, but I'm no php coder, so any help would be appreciated. Thanks!
×