Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

fatmcgav

Members
  • Content count

    171
  • Joined

  • Last visited

Everything posted by fatmcgav

  1. fatmcgav

    [Contribution] Additional Images Module

    I'm having some issues getting this installed. When i try to run additional_images_configure.php it just dumps me back to the login screen. I login and try and run it again, and it dumps me back to the login screen, and so on and so forth... I've managed to manually create the tables, but i cant get the config values sorted out. Could you let me know what could be causing it to cycle the login window, or alternatively just provide me with the sql for the configuration_group and configuration_key entries. Any info appreciated. Cheers Gavin
  2. fatmcgav

    [Contribution] Additional Images Module

    I'd be very interested in this aswell. I've had a quick look at the code, but got that friday feeling so cant quite get my head round it. Any ideas on where to start to get lightbox working with this mod? Cheers Gavin
  3. fatmcgav

    Product of the Week

    Hey there, I've been working on modifying Featured Products 1.5.4 so that the user can specify a single product to be featured in the Index page, as a Product of the Week sort of thing. I've managed to edit the sql query in the featured prods module to query for the index column, which i've added to the featured table in my db. I've also added another set of status buttons in featured.php so that it's possible to toggle which one is the POW from the featured products page in admin. However, i'm having some problems getting the sql query to edit the db correct. Basically, all i've done is coppied the status change stuff, and changed the relavent fields and links... The DB query function tep_set_featured_index($featured_id, $index) { if ($index == '1') { return tep_db_query("update " . TABLE_FEATURED . " set index = '1', expires_date = NULL, date_status_change = NULL, where featured_id = '" . $featured_id . "'"); } elseif ($index == '0') { return tep_db_query("update " . TABLE_FEATURED . " set index = '0', date_status_change = now() where featured_id = '" . $featured_id . "'"); } else { return -1; } } The setindex case case 'setindex': tep_set_featured_index($HTTP_GET_VARS['id'], $HTTP_GET_VARS['flag']); tep_redirect(tep_href_link(FILENAME_FEATURED, '', 'NONSSL')); break; The Index buttons <?php if ($featured['index'] == '1') { echo tep_image(DIR_WS_IMAGES . 'icon_status_green.gif', IMAGE_ICON_STATUS_GREEN, 10, 10) . ' <a href="' . tep_href_link(FILENAME_FEATURED, 'action=setindex&flag=0&id=' . $featured['featured_id'], 'NONSSL') . '">' . tep_image(DIR_WS_IMAGES . 'icon_status_red_light.gif', IMAGE_ICON_STATUS_RED_LIGHT, 10, 10) . '</a>'; } else { echo '<a href="' . tep_href_link(FILENAME_FEATURED, 'action=setindex&flag=1&id=' . $featured['featured_id'], 'NONSSL') . '">' . tep_image(DIR_WS_IMAGES . 'icon_status_green_light.gif', IMAGE_ICON_STATUS_GREEN_LIGHT, 10, 10) . '</a> ' . tep_image(DIR_WS_IMAGES . 'icon_status_red.gif', IMAGE_ICON_STATUS_RED, 10, 10); } ?> If i click on either the green of the red buttons to toggle the POW, it gives me a 1064 mysql error with my code - however i cant see where it is, as the code is identical to the status update query, apart from changin a different field. Any ideas on what might be causing this? Cheers Fatmcgav
  4. Hey there, I just tentatively installed send_order_html_email_v5.4 - owing to the french install instructions. However, on testing i've discovered that it's causing an error in checkout_process.php Line 466 being the final line in the file. I know it's long, but i thought the only way to solve this is to be able to see the code - so here it is: <?php /* $Id: checkout_process.php,v 1.128 2003/05/28 18:00:29 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ include('includes/application_top.php'); // if the customer is not logged on, redirect them to the login page if (!tep_session_is_registered('customer_id')) { $navigation->set_snapshot(array('mode' => 'SSL', 'page' => FILENAME_CHECKOUT_PAYMENT)); tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL')); } if (!tep_session_is_registered('sendto')) { tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL')); } if ( (tep_not_null(MODULE_PAYMENT_INSTALLED)) && (!tep_session_is_registered('payment')) ) { tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL')); } // avoid hack attempts during the checkout procedure by checking the internal cartID if (isset($cart->cartID) && tep_session_is_registered('cartID')) { if ($cart->cartID != $cartID) { tep_redirect(tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL')); } } include(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CHECKOUT_PROCESS); // load selected payment module require(DIR_WS_CLASSES . 'payment.php'); $payment_modules = new payment($payment); // load the selected shipping module require(DIR_WS_CLASSES . 'shipping.php'); $shipping_modules = new shipping($shipping); require(DIR_WS_CLASSES . 'order.php'); $order = new order; // load the before_process function from the payment modules $payment_modules->before_process(); require(DIR_WS_CLASSES . 'order_total.php'); $order_total_modules = new order_total; $order_totals = $order_total_modules->process(); // BMC CC Mod Start if ( strtolower(CC_ENC) == 'true' ) { $key = changeme; $plain_data = $order->info['cc_number']; $order->info['cc_number'] = changedatain($plain_data,$key); } // BMC CC Mod End $sql_data_array = array('customers_id' => $customer_id, 'customers_name' => $order->customer['firstname'] . ' ' . $order->customer['lastname'], 'customers_company' => $order->customer['company'], 'customers_street_address' => $order->customer['street_address'], 'customers_suburb' => $order->customer['suburb'], 'customers_city' => $order->customer['city'], 'customers_postcode' => $order->customer['postcode'], 'customers_state' => $order->customer['state'], 'customers_country' => $order->customer['country']['title'], 'customers_telephone' => $order->customer['telephone'], 'customers_email_address' => $order->customer['email_address'], 'customers_address_format_id' => $order->customer['format_id'], 'delivery_name' => $order->delivery['firstname'] . ' ' . $order->delivery['lastname'], 'delivery_company' => $order->delivery['company'], 'delivery_street_address' => $order->delivery['street_address'], 'delivery_suburb' => $order->delivery['suburb'], 'delivery_city' => $order->delivery['city'], 'delivery_postcode' => $order->delivery['postcode'], 'delivery_state' => $order->delivery['state'], 'delivery_country' => $order->delivery['country']['title'], 'delivery_address_format_id' => $order->delivery['format_id'], 'billing_name' => $order->billing['firstname'] . ' ' . $order->billing['lastname'], 'billing_company' => $order->billing['company'], 'billing_street_address' => $order->billing['street_address'], 'billing_suburb' => $order->billing['suburb'], 'billing_city' => $order->billing['city'], 'billing_postcode' => $order->billing['postcode'], 'billing_state' => $order->billing['state'], 'billing_country' => $order->billing['country']['title'], 'billing_address_format_id' => $order->billing['format_id'], 'payment_method' => $order->info['payment_method'], 'cc_type' => $order->info['cc_type'], 'cc_owner' => $order->info['cc_owner'], 'cc_number' => $order->info['cc_number'], 'cc_expires' => $order->info['cc_expires'], // BMC CC Mod Start 'cc_start' => $order->info['cc_start'], 'cc_cvv' => $order->info['cc_cvv'], 'cc_issue' => $order->info['cc_issue'], // BMC CC Mod End 'date_purchased' => 'now()', 'orders_status' => $order->info['order_status'], 'currency' => $order->info['currency'], 'currency_value' => $order->info['currency_value']); tep_db_perform(TABLE_ORDERS, $sql_data_array); $insert_id = tep_db_insert_id(); for ($i=0, $n=sizeof($order_totals); $i<$n; $i++) { $sql_data_array = array('orders_id' => $insert_id, 'title' => $order_totals[$i]['title'], 'text' => $order_totals[$i]['text'], 'value' => $order_totals[$i]['value'], 'class' => $order_totals[$i]['code'], 'sort_order' => $order_totals[$i]['sort_order']); tep_db_perform(TABLE_ORDERS_TOTAL, $sql_data_array); } $customer_notification = (SEND_EMAILS == 'true') ? '1' : '0'; $sql_data_array = array('orders_id' => $insert_id, 'orders_status_id' => $order->info['order_status'], 'date_added' => 'now()', 'customer_notified' => $customer_notification, 'comments' => $order->info['comments']); tep_db_perform(TABLE_ORDERS_STATUS_HISTORY, $sql_data_array); // initialized for the email confirmation $products_ordered = ''; $subtotal = 0; $total_tax = 0; for ($i=0, $n=sizeof($order->products); $i<$n; $i++) { // Stock Update - Joao Correia if (STOCK_LIMITED == 'true') { if (DOWNLOAD_ENABLED == 'true') { $stock_query_raw = "SELECT products_quantity, pad.products_attributes_filename FROM " . TABLE_PRODUCTS . " p LEFT JOIN " . TABLE_PRODUCTS_ATTRIBUTES . " pa ON p.products_id=pa.products_id LEFT JOIN " . TABLE_PRODUCTS_ATTRIBUTES_DOWNLOAD . " pad ON pa.products_attributes_id=pad.products_attributes_id WHERE p.products_id = '" . tep_get_prid($order->products[$i]['id']) . "'"; // Will work with only one option for downloadable products // otherwise, we have to build the query dynamically with a loop $products_attributes = $order->products[$i]['attributes']; if (is_array($products_attributes)) { $stock_query_raw .= " AND pa.options_id = '" . $products_attributes[0]['option_id'] . "' AND pa.options_values_id = '" . $products_attributes[0]['value_id'] . "'"; } $stock_query = tep_db_query($stock_query_raw); } else { $stock_query = tep_db_query("select products_quantity from " . TABLE_PRODUCTS . " where products_id = '" . tep_get_prid($order->products[$i]['id']) . "'"); } if (tep_db_num_rows($stock_query) > 0) { $stock_values = tep_db_fetch_array($stock_query); // do not decrement quantities if products_attributes_filename exists if ((DOWNLOAD_ENABLED != 'true') || (!$stock_values['products_attributes_filename'])) { $stock_left = $stock_values['products_quantity'] - $order->products[$i]['qty']; } else { $stock_left = $stock_values['products_quantity']; } tep_db_query("update " . TABLE_PRODUCTS . " set products_quantity = '" . $stock_left . "' where products_id = '" . tep_get_prid($order->products[$i]['id']) . "'"); if ( ($stock_left < 1) && (STOCK_ALLOW_CHECKOUT == 'false') ) { tep_db_query("update " . TABLE_PRODUCTS . " set products_status = '0' where products_id = '" . tep_get_prid($order->products[$i]['id']) . "'"); } } } // Update products_ordered (for bestsellers list) tep_db_query("update " . TABLE_PRODUCTS . " set products_ordered = products_ordered + " . sprintf('%d', $order->products[$i]['qty']) . " where products_id = '" . tep_get_prid($order->products[$i]['id']) . "'"); $sql_data_array = array('orders_id' => $insert_id, 'products_id' => tep_get_prid($order->products[$i]['id']), 'products_model' => $order->products[$i]['model'], 'products_name' => $order->products[$i]['name'], 'products_price' => $order->products[$i]['price'], 'final_price' => $order->products[$i]['final_price'], 'products_tax' => $order->products[$i]['tax'], 'products_quantity' => $order->products[$i]['qty']); tep_db_perform(TABLE_ORDERS_PRODUCTS, $sql_data_array); $order_products_id = tep_db_insert_id(); //------insert customer choosen option to order-------- $attributes_exist = '0'; $products_ordered_attributes = ''; if (isset($order->products[$i]['attributes'])) { $attributes_exist = '1'; for ($j=0, $n2=sizeof($order->products[$i]['attributes']); $j<$n2; $j++) { if (DOWNLOAD_ENABLED == 'true') { $attributes_query = "select popt.products_options_name, poval.products_options_values_name, pa.options_values_price, pa.price_prefix, pad.products_attributes_maxdays, pad.products_attributes_maxcount , pad.products_attributes_filename from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_OPTIONS_VALUES . " poval, " . TABLE_PRODUCTS_ATTRIBUTES . " pa left join " . TABLE_PRODUCTS_ATTRIBUTES_DOWNLOAD . " pad on pa.products_attributes_id=pad.products_attributes_id where pa.products_id = '" . $order->products[$i]['id'] . "' and pa.options_id = '" . $order->products[$i]['attributes'][$j]['option_id'] . "' and pa.options_id = popt.products_options_id and pa.options_values_id = '" . $order->products[$i]['attributes'][$j]['value_id'] . "' and pa.options_values_id = poval.products_options_values_id and popt.language_id = '" . $languages_id . "' and poval.language_id = '" . $languages_id . "'"; $attributes = tep_db_query($attributes_query); } else { $attributes = tep_db_query("select popt.products_options_name, poval.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_OPTIONS_VALUES . " poval, " . TABLE_PRODUCTS_ATTRIBUTES . " pa where pa.products_id = '" . $order->products[$i]['id'] . "' and pa.options_id = '" . $order->products[$i]['attributes'][$j]['option_id'] . "' and pa.options_id = popt.products_options_id and pa.options_values_id = '" . $order->products[$i]['attributes'][$j]['value_id'] . "' and pa.options_values_id = poval.products_options_values_id and popt.language_id = '" . $languages_id . "' and poval.language_id = '" . $languages_id . "'"); } $attributes_values = tep_db_fetch_array($attributes); $sql_data_array = array('orders_id' => $insert_id, 'orders_products_id' => $order_products_id, 'products_options' => $attributes_values['products_options_name'], 'products_options_values' => $attributes_values['products_options_values_name'], 'options_values_price' => $attributes_values['options_values_price'], 'price_prefix' => $attributes_values['price_prefix']); tep_db_perform(TABLE_ORDERS_PRODUCTS_ATTRIBUTES, $sql_data_array); if ((DOWNLOAD_ENABLED == 'true') && isset($attributes_values['products_attributes_filename']) && tep_not_null($attributes_values['products_attributes_filename'])) { $sql_data_array = array('orders_id' => $insert_id, 'orders_products_id' => $order_products_id, 'orders_products_filename' => $attributes_values['products_attributes_filename'], 'download_maxdays' => $attributes_values['products_attributes_maxdays'], 'download_count' => $attributes_values['products_attributes_maxcount']); tep_db_perform(TABLE_ORDERS_PRODUCTS_DOWNLOAD, $sql_data_array); } // $products_ordered_attributes .= "\n\t" . $attributes_values['products_options_name'] . ' ' . $attributes_values['products_options_values_name']; $products_ordered_attributes .= "<br>". $attributes_values['products_options_name'] . ' ' . $attributes_values['products_options_values_name']; } } //------insert customer choosen option eof ---- // ################ Added Send Order HTML Mail ################## $total_weight += ($order->products[$i]['qty'] * $order->products[$i]['weight']); $total_tax += tep_calculate_tax($total_products_price, $products_tax) * $order->products[$i]['qty']; $total_cost += $total_products_price; // $products_ordered .= $order->products[$i]['qty'] . ' x ' . $order->products[$i]['name'] . ' (' . $order->products[$i]['model'] . ') = ' . $currencies->display_price($order->products[$i]['final_price'], $order->products[$i]['tax'], $order->products[$i]['qty']) . $products_ordered_attributes . "\n"; $products_ordered .= $order->products[$i]['qty'] . ' x ' . $order->products[$i]['name'] . ' (' . $order->products[$i]['model'] . ') = ' . $currencies->display_price($order->products[$i]['final_price'], $order->products[$i]['tax'], $order->products[$i]['qty']) . $products_ordered_attributes . '<br>'; // $products_quantity .= nl2br($order->products[$i]['qty'] . "\n\n\n"); $products_quantity .= nl2br($order->products[$i]['qty']) . '<br><br>'; for ($l=0; $l<sizeof($order->products[$i]['attributes']); $l++) { $products_quantity .= '<br>'; } // $products_name .= nl2br("" . $order->products[$i]['name'] . $products_ordered_attributes ."\n\n\n"); $products_name .= nl2br("" . $order->products[$i]['name'] . $products_ordered_attributes) . '<br><br>'; if (!tep_not_null($order->products[$i]['model'])) { $products_model .= ''.EMAIL_NO_MODEL.''; // Added for ($l=0; $l<sizeof($order->products[$i]['attributes']); $l++) { $products_model .= '<br>'; } } else // $products_model .= nl2br($order->products[$i]['model'] . "\n\n\n"); $products_model .= nl2br($order->products[$i]['model']) . '<br><br>'; // Added for ($l=0; $l<sizeof($order->products[$i]['attributes']); $l++) { $products_model .= '<br>'; } // $products_price .= nl2br($currencies->format($order->products[$i]['final_price'] * $order->products[$i]['qty']) . "\n\n\n"); $products_price .= nl2br($currencies->format($order->products[$i]['final_price'] * $order->products[$i]['qty'])) . '<br><br>'; // Added for ($l=0; $l<sizeof($order->products[$i]['attributes']); $l++) { $products_price .= '<br>'; } } for ($i=0; $i<sizeof($order_totals); $i++) { $Vartaxe .= strip_tags($order_totals[$i]['title']) . ' ' . strip_tags($order_totals[$i]['text']) . "\n"; } if ($order->content_type != 'virtual') { $Varaddress .= tep_address_label($customer_id, $sendto, 0, '', "\n"); } // HTML Email Add $Varlogo = ''.VARLOGO.''; $Vartable1 = ''.VARTABLE1.''; $Vartext1 = ' <b>' . EMAIL_TEXT_DEAR . ' ' . $order->customer['firstname'] . ' ' . $order->customer['lastname'] .' </b><br><br> '; $VarTotal= ''.TOTAL.''; $Vardetail = ''.DETAIL .''; $Varhttp = ''.VARHTTP.''; $Varstyle = ''.VARSTYLE.''; $varmessage = ' ' . MESSAGE_SOCIETY . STORE_NAME . ' '; $varcategory = ' ' . CATEGORY_CONTACT . ' '; $varuser = ' ' . EMAIL_TEXT_USER . ': ' . $order->customer['email_address'] . ' '; // $varip = ' ' . CATEGORY_ADDRESS_IP . $ip . ' '; $varcomments = ' ' . EMAIL_COMMENTS . ' '; $varinfocomments = ' ' . $order->info['comments'] . ' '; $vardatecommande = ' ' . EMAIL_TEXT_DATE_ORDERED . ' : ' . strftime(DATE_FORMAT_LONG) . '<br>'; $Vartext2 = ' ' . EMAIL_TEXT_ORDER_NUMBER . ' ' . $insert_id . '<br>' . EMAIL_TEXT_INVOICE_URL . ': <a href="' . HTTP_SERVER . DIR_WS_CATALOG . 'account_history_info.php?order_id=' . $insert_id .'"><font size="-2">' . HTTP_SERVER . DIR_WS_CATALOG . 'account_history_info.php?order_id=' . $insert_id . '</font></a> ' . $email_total .' <br>'; $varimage = '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . 'account_history_info.php?order_id=' . $insert_id .'">'.IMG.'</a> '; $Vartable2 = ''.VARTABLE2.''; $varproducts = ' ' . EMAIL_TEXT_PRODUCTS . ' '; $varmodel = ' ' . EMAIL_TEXT_PRODUCTS_MODEL . ' '; $varqty = ' ' . EMAIL_TEXT_PRODUCTS_QTY . ' '; $vartotal = ' ' . EMAIL_TEXT_TOTAL . ' '; $varbilling = ' ' . EMAIL_TEXT_BILLING_ADDRESS . ' '; $vardelivery = ' ' . EMAIL_TEXT_DELIVERY_ADDRESS . ' '; $varpaymethod = ' ' . EMAIL_TEXT_PAYMENT_METHOD . ' '; $Varmailfooter1 = '' . EMAIL_TEXT_FOOTER . ' '; $Varmailfooter2 = '' . EMAIL_TEXT_FOOTERR . ' '; require(DIR_WS_MODULES . 'email/html_checkout_process.php'); $email_order = $html_email_order; //EOA ??? // lets start with the email confirmation // DDB - 041103 - Add test for PWA : no display of invoice URL if PWA customer if (!tep_session_is_registered('noaccount')) { if (EMAIL_USE_HTML == 'true') { $email_order; } else { $email_order = STORE_NAME . "\n" . EMAIL_SEPARATOR . "\n" . EMAIL_TEXT_ORDER_NUMBER . ' ' . $insert_id . "\n" . EMAIL_TEXT_INVOICE_URL . ' ' . tep_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id=' . $insert_id, 'SSL', false) . "\n" . EMAIL_TEXT_DATE_ORDERED . ' ' . strftime(DATE_FORMAT_LONG) . "\n\n"; /* if ($order->info['comments']) { $email_order .= tep_db_output($order->info['comments']) . "\n\n"; $email_order .= EMAIL_TEXT_PRODUCTS . "\n" . EMAIL_SEPARATOR . "\n" . $products_ordered . EMAIL_SEPARATOR . "\n"; } else { $email_order .= STORE_NAME . "\n" . EMAIL_SEPARATOR . "\n" . EMAIL_TEXT_ORDER_NUMBER . ' ' . $insert_id . "\n" . EMAIL_TEXT_DATE_ORDERED . ' ' . strftime(DATE_FORMAT_LONG) . "\n\n"; */ if ($order->info['comments']) { $email_order .= tep_db_output($order->info['comments']) . "\n\n"; } $email_order .= EMAIL_TEXT_PRODUCTS . "\n" . EMAIL_SEPARATOR . "\n" . $products_ordered . EMAIL_SEPARATOR . "\n"; for ($i=0, $n=sizeof($order_totals); $i<$n; $i++) { $email_order .= strip_tags($order_totals[$i]['title']) . ' ' . strip_tags($order_totals[$i]['text']) . "\n"; } if ($order->content_type != 'virtual') { $email_order .= "\n" . EMAIL_TEXT_DELIVERY_ADDRESS . "\n" . EMAIL_SEPARATOR . "\n" . tep_address_label($customer_id, $sendto, 0, '', "\n") . "\n"; } $email_order .= "\n" . EMAIL_TEXT_BILLING_ADDRESS . "\n" . EMAIL_SEPARATOR . "\n" . tep_address_label($customer_id, $billto, 0, '', "\n") . "\n\n"; if (is_object($$payment)) { $email_order .= EMAIL_TEXT_PAYMENT_METHOD . "\n" . EMAIL_SEPARATOR . "\n"; $payment_class = $$payment; $email_order .= $payment_class->title . "\n\n\n\n\n"; if ($payment_class->email_footer) { $email_order .= $payment_class->email_footer . "\n\n"; } } $email_order .= "\n" . EMAIL_TEXT_FOOTER . "\n" . HTTP_SERVER . DIR_WS_CATALOG . "\n" . EMAIL_TEXT_FOOTERR . "\n"; } tep_mail($order->customer['firstname'] . ' ' . $order->customer['lastname'], $order->customer['email_address'], EMAIL_TEXT_SUBJECT, $email_order, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS); // $email_order=ereg_replace("[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/]","<a href=\"\\0\">\\0</a>", $email_order); // send emails to other people if (SEND_EXTRA_ORDER_EMAILS_TO != '') { $email_order = $html_email_order; if (EMAIL_USE_HTML == 'true') { $email_order; } else { $email_order = STORE_NAME . "\n" . EMAIL_SEPARATOR . "\n" . EMAIL_TEXT_ORDER_NUMBER . ' ' . $insert_id . "\n" . EMAIL_TEXT_INVOICE_URL . ' ' . tep_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id=' . $insert_id, 'SSL', false) . "\n" . EMAIL_TEXT_DATE_ORDERED . ' ' . strftime(DATE_FORMAT_LONG) . "\n\n"; if ($order->info['comments']) { + $email_order .= tep_db_output($order->info['comments']) . "\n\n"; } $email_order .= EMAIL_TEXT_PRODUCTS . "\n" . EMAIL_SEPARATOR . "\n" . $products_ordered . EMAIL_SEPARATOR . "\n"; for ($i=0; $i<sizeof($order_totals); $i++) { $email_order .= strip_tags($order_totals[$i]['title']) . ' ' . strip_tags($order_totals[$i]['text']) . "\n"; } if ($order->content_type != 'virtual') { $email_order .= "\n" . EMAIL_TEXT_DELIVERY_ADDRESS . "\n" . EMAIL_SEPARATOR . "\n" . tep_address_label($customer_id, $sendto, 0, '', "\n") . "\n"; } $email_order .= "\n" . EMAIL_TEXT_BILLING_ADDRESS . "\n" . EMAIL_SEPARATOR . "\n" . tep_address_label($customer_id, $billto, 0, '', "\n") . "\n\n"; if (is_object($$payment)) { $email_order .= EMAIL_TEXT_PAYMENT_METHOD . "\n" . EMAIL_SEPARATOR . "\n"; echo ' <br>'; $payment_class = $$payment; $email_order .= $payment_class->title . "\n\n\n\n\n"; if ($payment_class->email_footer) { $email_order .= $payment_class->email_footer . "\n\n"; } } $email_order .= "\n" . EMAIL_TEXT_FOOTER . "\n" . HTTP_SERVER . DIR_WS_CATALOG . "\n" . EMAIL_TEXT_FOOTERR . "\n"; } tep_mail('', SEND_EXTRA_ORDER_EMAILS_TO, EMAIL_TEXT_SUBJECT, $email_order, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS); // $email_order=ereg_replace("[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/]","<a href=\"\\0\">\\0</a>", $email_order); } // ##############" End Added send Order Html mail################# // load the after_process function from the payment modules $payment_modules->after_process(); $cart->reset(true); // unregister session variables used during checkout tep_session_unregister('sendto'); tep_session_unregister('billto'); tep_session_unregister('shipping'); tep_session_unregister('payment'); tep_session_unregister('comments'); tep_redirect(tep_href_link(FILENAME_CHECKOUT_SUCCESS, '', 'SSL')); require(DIR_WS_INCLUDES . 'application_bottom.php'); ?> The Send Order Html mail additions are fairly clearly marked. Any ideas on what might be causing this? Appologies again for the extremely long post. Cheers Fatmcgav
  5. fatmcgav

    cDynamic Meta Tags

    hi there, I've just uploded v1.5 of cDynamic Meta-tags and installed v1.1 of osC Advanced Cache Class by Chemo, hoping to use it to cache the meta-tag results in the db. However, when i set $cache_type = 1, the site gives me teh following error: The area around line 57 is: # Create paths and cache names $meta_cache_file=$meta_cache_filename.'_'.$meta_cache_param.$cache_language.$cache_currency.".meta-cache"; $meta_cache_file_full = $meta_cache_files_path.$meta_cache_file; ################################################################################ ############# # Check to see what type of cache if any and run with it... $cache_type == 1 ? $meta_cache_code = $cache->get_cache($meta_cache_file) : NULL; if ($meta_cache_code){ echo $meta_cache_code; }else if ($cache_type == 2 && file_exists($meta_cache_file_full)) { echo base64_decode(gzinflate(file_get_contents($meta_cache_file_full))); }else{ ob_start(); # Page Parameters I've double checked, uninstalled and reinstalled the db, and re-uploaded the neccessary files twice, and i still cant get it to work. Any ideas on wat might be causing the problem? Cheers Fatmcgav
  6. fatmcgav

    Article Manager v1.0

    Anybody got any ideas on how i'd go about doing this??? Cheers Fatmcgav
  7. fatmcgav

    Article Manager v1.0

    hey there, i've had a quick look and i cant see a solution for wat i'm lookin for, so i thought i'd ask. I'm wanting to modify the page so that it displays the article sub-categories on the categories page. eg: http://www.imperialdomination.co.uk/tech-t-2.html I want it to show the two Sub-category names on the page... Any ideas how i'd go about it? Cheers Fatmcgav
  8. fatmcgav

    Homepage update

    Anybody got a demo store with this installed that i can have a look at? Cheers Fatmcgav
  9. fatmcgav

    Fancier Invoice & Packingslip v1.0

    Hey Pop, Any chance u would be able to add to this wonderful contrib so that the HTML email templates are used for order update emails, registration emails and newsletters? It's just i feel it dosent look that professional or consistent having a HTML email for the order conf email, and not for the order updates... If not, any chance somebody else could do it, or point me in the right direction? Cheers Fatmcgav
  10. fatmcgav

    Product of the Week

    Somebody out there must know how to fix this problem, PLEASE. I'm completely at a wits end with this one. Somebody, PLEASE...
  11. fatmcgav

    Product of the Week

    K, i'm getting this SQL error now if i try to disable a product: And This one if i try to enable a product: The corresponding section in featured.php is: function tep_set_featured_index($featured_id, $index) { if ($index == '1') { return tep_db_query("update " . TABLE_FEATURED . " set index = '1', expires_date = NULL, date_status_change = NULL, where featured_id = '" . $featured_id . "'"); } elseif ($index == '0') { return tep_db_query("update " . TABLE_FEATURED . " set index = '0', date_status_change = now() where featured_id = '" . $featured_id . "'"); } else { return -1; } } Any ideas ppl? Cheers Fatmcgav
  12. fatmcgav

    Featured 1.5

    Hey, If someone could have a look at my thread Here it would be greatly appreicated. Cheers Fatmcgav
  13. fatmcgav

    Product of the Week

    Somebody must know what the problem is.... Cheers Fatmcgav
  14. fatmcgav

    Product of the Week

    Anybody???? Cheers Fatmcgav
  15. All sorted :D:D I noticed some sql queries on the main links.php page, so i just commented a line out, and reshuffled a couple of fields, and it now seems to work fine. Cheers Fatmcgav
  16. If only it was that simple. As far as i can tell, the columns are created from a sql query, and i cant remove the description field, as it removes both the column and the description itself... Code taken from modules/links_listing.php switch ($column_list[$col]) { case 'LINK_LIST_TITLE': $lc_align = ''; if (LINKS_TITLES_AS_LINKS == 'True') $lc_text = $listing['links_title']; else $lc_text = '<a href="' . tep_get_links_url($listing['links_id']) . '" target="_' . $openMode . '">' . $listing['links_title'] . '</a><br>' . $listing['links_description']; break; case 'LINK_LIST_URL': $lc_align = ''; $lc_text = '<a href="' . tep_get_links_url($listing['links_id']) . '" target="_' . $openMode . '">' . $listing['links_url'] . '</a>'; break; case 'LINK_LIST_IMAGE': $lc_align = 'center'; if (tep_not_null($listing['links_image_url'])) { $lc_text = '<a href="' . tep_get_links_url($listing['links_id']) . '" target="_' . $openMode . '">' . tep_links_image($listing['links_image_url'], $listing['links_title'], LINKS_IMAGE_WIDTH, LINKS_IMAGE_HEIGHT) . '</a>'; } else { $lc_text = '<a href="' . tep_get_links_url($listing['links_id']) . '" target="_' . $openMode . '">' . tep_image(DIR_WS_IMAGES . 'pixel_trans.gif', $listing['links_title'], LINKS_IMAGE_WIDTH, LINKS_IMAGE_HEIGHT, 'style="border: 3px double black"') . '</a>'; } break; case 'LINK_LIST_COUNT': $lc_align = ''; $lc_text = $listing['links_clicked']; break; } The change i made is moving $listing['links_description'] from it's own case to the title case, but i still cant seem to remove the descritpion column... Any ideas ppl? Cheers Fatmcgav
  17. Hey there, I had a quick q about modifying the links listing page. What i'm trying to do, is have the link image in one column, with the title in another, and underneath that is the description. This is a very simple image of wat i mean: ANy ideas on if this is possible? I've tried a couple of changes, and i've been able to get the description under the title, but it repeats in what was the Title and the Description colums... here ANy ideas on what code changes i'd need to make to do this? Cheers Fatmcgav
  18. fatmcgav

    Newsletter & Subscribtion for MS2

    To solve this one, open catalog/admin/includes/languages/english.php, and search for this line: define('HEADING_TITLE','Newsletter'); and just delete it. That should solve that problem for u. hth fatmcgav
  19. fatmcgav

    Fancier Invoice & Packingslip v1.0

    Anychance u could point me in right direction??? Cheers Fatmcgav
  20. Hmm,i duno if this is something i've done, or a contrib bug, but when i generate a new sitemap, it appears to be duplicating all the categorie URL's - one in the re-written format and one in the cpath=? format. Like this Just wondering if anybody else was having this problem, or if it was just me :D Cheers Fatmcgav
  21. Hey Bobby, if ure still looking for someone to test ure new release, i'd be more than happy to do it for u - i've got a site in the works atm - www.surferswarehouse.co.uk - and one of the biggest bug-bairs is that the infopages arent covered by ure SEO urls - but yeh, if ure in need of someone to test, drop me a pm and i'd be more than happy to help. Cheers Fatmcgav
  22. Hey there, I've got All Products in Menu without Additional File installed on my site, and i've just been trying to install Enable & Disable Categories The install has worked fine on for my products categories, but when it comes to the All Prods cat, the sql isnt working. Code 1: The Original // We Show Them All listing query - $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where p.products_status = '1' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'"; Code 2: The SQL code that works for All Prods - if ($cPath == 64) // all products cpath = 64 no categories apply {$listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where p.products_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "'"; } else // select on categories {$listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where p.products_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$current_category_id . "'"; } As u can see, this now uses a If Else Statement to link between the all prods cat and the standard cat... Code 3: The Enable Disable Products SQL Query - $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id left join " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c on p.products_id = p2c.products_id left join " . TABLE_CATEGORIES . " c on p2c.categories_id = c.categories_id where c.categories_status = '1' and p.products_status = '1' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'"; Now, i've managed to combine Code 3 with Code 2 for the categories that show specific products - I simply replaced the second query for specific cats with Code 3. However, i've been unable to work out what changes I need to make to the query in order to make Code 2 (all prods cat) work... Code 4: The current SQL Statement in INdex.php for // We show them all // We show them all if ($cPath == 21) // all products cpath = 64 no categories apply {$listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id left join " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c on p.products_id = p2c.products_id left join " . TABLE_CATEGORIES . " c on p2c.categories_id where c.categories_status = '1' and p.products_status = '1' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'"; } else // select on categories {$listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id left join " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c on p.products_id = p2c.products_id left join " . TABLE_CATEGORIES . " c on p2c.categories_id = c.categories_id where c.categories_status = '1' and p.products_status = '1' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'"; } Any ideas on how i need to re-write the All Products query to show only Enabled Cats prods, or rewrite the Enable/Disable query to show All Prods??? Cheers Fatmcgav - Appologies for the long-winded post, just thought i'd give as much info as i could to make everything easier in the long run...
  23. fatmcgav

    Fancier Invoice & Packingslip v1.0

    My question still stands... is it possible to use the HTML emails on Order Updates??? Cheers Fatmcgav
  24. fatmcgav

    ### POINTS AND REWARDS MODULE V1.00 ###

    WTF, where did that come from - that's on a totally unrelated line... I only quoted that code as a user asked for it, and yes, it's possible the config_id might be different, but the user in question replied and said that it worked fine... and if it didnt, i appologies, but i also included instructions on how to change it. Anyhow, i dont see the point in this slaggin match - the only reason i responded in the first place is that u were'nt aware that the redemptions.php file in ure uploaded zip was broken... which I now see u have noticed and corrected. I see no point in trying to 'score points' off each other, so lets just leave it at this... And YES, for ure information, I am happy with the changes I made to MY DB!!!
  25. fatmcgav

    ### POINTS AND REWARDS MODULE V1.00 ###

    And in reply to ure above post and pm: ----------------------------------------------------------------------------------------- Chill dude :D :D The uploaded file contains the same files as the original download, apart from the changed redemptions.php and install - the original dload didnt contain the screenshots either - not the contrib install one anyway - the full one off ure site did, but not the one on the OSCom Site - all that contained was the install instructions, the new files and the sql. Even the latest one u've uploaded doesnt contain the screenshots... So the file I uploaded WAS complete in as much as it contained the sames files as i dloaded - nuthin more, nuthin less. So i think U need to upload the complete file before U have a go at ME. Also, for ure information, the latest one u uploaded contains the version of redemption.php which is missing code - if u dont believe me, i just dloaded and tested it, and it caused exactly the same error as before - try it for ureself if u dont believe me. I'm glad u've taken account of the install file mods though ;) Cheers again dude, and I hope u see what i've been saying all along that the wrong file redemptions.php is in the zip u uploaded. Peace out dude. :thumbsup: Fatmcgav BTW: I'm not American either :) And i dont like being told i'm wrong when i'm not <_< >_<
×