Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

alman

Pioneers
  • Posts

    39
  • Joined

  • Last visited

Everything posted by alman

  1. for all that use the alt products_specification.php the alt colour was added to the other tabs this corrects it look for; $specification_text = '<ul><table colspan="2" border="0" cellpadding="0" cellspacing="0" width="100%">' . and change to: $specification_text = '<ul><table colspan="2" border="0" cellpadding="0" cellspacing="0" width="100%" class="altspec">' . in products_info.php $('div.content tr:even').addClass('alt'); change to: $('table.altspec tr:even').addClass('alt'); in stylesheet.css add: table.spec{ text-align: left; } Al
  2. I found depreciated functions for php 5.3 in includes/functions/dynamenu/lib/layersmenu-common.inc.php 2 instances of $buffer = ereg_replace(chr(13), '', $buffer); replace $buffer = preg_replace('/chr(13)/', '', $buffer); find $this->tree[$cnt]['parsed_href'] = (preg_replace(' ', '', $this->tree[$cnt]['href']) == '') ? '#' : $this->prependedUrl . $this->tree[$cnt]['href']; replace with $this->tree[$cnt]['parsed_href'] = (preg_replace('/\ /', '', $this->tree[$cnt]['href']) == '') ? '#' : $this->prependedUrl . $this->tree[$cnt]['href']; hope this helps al
  3. $result = tep_db_query('select c.categories_id, cd.categories_name, c.parent_id from ' . TABLE_CATEGORIES . ' c, ' . TABLE_CATEGORIES_DESCRIPTION . ' cd where c.categories_status = 1 and c.categories_id = cd.categories_id and cd.language_id="' . (int)$languages_id .'" '.$parent_query.'order by sort_order, cd.categories_name'); this will solve your problem al
  4. check that in categories.php it should look like this where the 10 is you will have a 15 which is fine but i suspect that you have a soft in there like this 'soft', '70', '10', which will cause that this is a reference bellow

    tep_draw_textarea_ckeditor('products_description[' . $languages[$i]['id'] . ']', '70', '10...

  5. Hi guys, If you use the same specs for multiple categories and have a filter in one category but no values set in another the filter will still display so to sort this out a count per category would need to be set it would need to count the spec values in a category instead of just values in a spec group. my thoughts would be to add table categories to the $filters_query_raw syntax query strings are not my strong suit and have not been able to get it working Al
  6. it might be easier if you see what I mean http://acronsystems.com/ network cables and that did not work and 10+ is way off the mark
  7. hey guys, I may have found a possible bug I loaded in specs 0.5, 1, 1.5, 2, 3, 5, 10, 15, 20 and 30 with a suffix of M, now when I set a filter range of 2 5 10 it can not distinguish the difference between 1 and 10, 2 and 20, 3 and 30. I am sorry I do not have a solution. has anyone had this problem? Al
  8. Warning: strpos() expects parameter 1 to be string, array given in C:\xampp\htdocs\storelive\includes\classes\vendor_shipping.php on line 46 Warning: substr() expects parameter 1 to be string, array given in C:\xampp\htdocs\storelive\includes\classes\vendor_shipping.php on line 46 if ( (tep_not_null($module)) && (in_array(substr($module['id'], 0, strpos($module['id'], '_')) . '.' . substr($PHP_SELF, (strrpos($PHP_SELF, '.')+1)), $modules_array)) ) { change it to if ( (is_string($module) && (tep_not_null($module)) && (in_array(substr($module['id'], 0, strpos($module['id'], '_')) . '.' . substr($PHP_SELF, (strrpos($PHP_SELF, '.')+1)), $modules_array))) ) { and it is causing ot_shipping to through the same errors as well $module = substr($GLOBALS['shipping']['id'], 0, strpos($GLOBALS['shipping']['id'], '_')); so change it to $module = is_string($GLOBALS) && (substr($GLOBALS['shipping']['id'], 0, strpos($GLOBALS['shipping']['id'], '_'))); hope this helps Al
  9. I added it to mvs addons for convenience, compare it to the IPN you have if you have already made changes Alman
  10. hi all there has been talk for a long time on mvs and paypal ipn merger as it were in modules-payment-paypal_ipn.php find function confirmation() { and add $shipping after $order_total_modules find tep_db_perform(TABLE_ORDERS_PRODUCTS_DOWNLOAD, $sql_data_array); } } } } after add //MVS if (($total_weight > 0 ) || (SELECT_VENDOR_SHIPPING == 'true')){ $shipping_array = $shipping['vendor']; foreach ($shipping_array as $vendors_id => $shipping_data) { $vendors_query = tep_db_query("select vendors_name from " . TABLE_VENDORS . " where vendors_id = '" . (int)$vendors_id . "'" ); $vendors_name = 'Unknown'; if ($vendors = tep_db_fetch_array($vendors_query)) { $vendors_name = $vendors['vendors_name']; } $shipping_method_array = explode ('_', $shipping_data['id']); if ($shipping_method_array[0] == 'fedex1') { $shipping_method = 'Federal Express'; } elseif ($shipping_method_array[0] == 'upsxml') { $shipping_method = 'UPS'; } elseif ($shipping_method_array[0] == 'usps') { $shipping_method = 'USPS'; } else { $shipping_method = $shipping_method_array[0]; } $sql_data_array = array('orders_id' => $insert_id, 'vendors_id' => $vendors_id, 'shipping_module' => $shipping_method, 'shipping_method' => $shipping_data['title'], 'shipping_cost' => $shipping_data['cost'], 'shipping_tax' => $shipping_data['ship_tax'], 'vendors_name' => $vendors_name, 'vendor_order_sent' => 'no' ); tep_db_perform(TABLE_ORDERS_SHIPPING, $sql_data_array); } } //MVS End thats it hope this helps Al
  11. Thanks for your reply Jim I put it together with jquery as we had it loaded for tabs anyway and cleaned the code from the above. I finished it before you replied I didn't think of that as a solution, good input. I wasn't thinking outside the box. I added it as a addon for product specification link maybe It could could be added as a enhancement for the next release Thanks for the contribution Al
  12. amendment for above change to bellow $specification_text = '<ul><div id="speci"><table colspan="2" border="0" cellpadding="0" cellspacing="0" width="100%">' . "\n"; while ($specifications = tep_db_fetch_array ($specifications_query) ) { if ($specifications['specification'] != '') { $specification_text .= ''; if (SPECIFICATIONS_SHOW_NAME_PRODUCTS == 'True') { $specification_text .= '<tr><td width="21%" class="specification_bold"><li>'; $specification_text .= $specifications['specification_name'] . ': '; $specification_text .= '</li></td>'; } $specification_text .= '<td width="79%" class="specification">'; $specification_text .= $specifications['specification_prefix'] . ' '; if ($specifications['display'] == 'image' || $specifications['display'] == 'multiimage' || $specifications['enter'] == 'image' || $specifications['enter'] == 'multiimage') { tep_image (DIR_WS_IMAGES . $specifications['specification'], $specifications['specification_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT); } else { $specification_text .= $specifications['specification'] . ' '; } $specification_text .= $specifications['specification_suffix']; $specification_text .= '</td></tr>'; $specification_text .= '' . "\n"; } // if ($specifications['specification'] } // while ($specifications $specification_text .= '</table></div>'; $specification_text .= '</ul>' . "\n"; as a side point I was looking into striping each table row stated in the posts above and knew I had code for that somewhere create a file called zebra.js and paste a normal call would be as bellow but it needs to be a Div call or something because we already have a js call for the tabs I cant get this to work if some could shed some light it would be great!! <script type="text/javascript" src="js/zebra.js"></script> <script type="text/javascript"> $(document).ready(function() { stripe("#SPEC"); }); </script> // this function is needed to work around // a bug in IE related to element attributes function hasClass(obj) { var result = false; if (obj.getAttributeNode("class") != null) { result = obj.getAttributeNode("class").value; } return result; } function stripe(id) { // the flag we'll use to keep track of // whether the current row is odd or even var even = false; // if arguments are provided to specify the colours // of the even & odd rows, then use the them; // otherwise use the following defaults: var evenColor = arguments[1] ? arguments[1] : "#ffff99"; var oddColor = arguments[2] ? arguments[2] : ""; // obtain a reference to the desired table // if no such table exists, abort var table = document.getElementById(id); if (! table) { return; } // by definition, tables can have more than one tbody // element, so we'll have to get the list of child // <tbody>s var tbodies = table.getElementsByTagName("tbody"); // and iterate through them... for (var h = 0; h < tbodies.length; h++) { // find all the <tr> elements... var trs = tbodies[h].getElementsByTagName("li"); // ... and iterate through them for (var i = 0; i < trs.length; i++) { // avoid rows that have a class attribute // or backgroundColor style // if (! hasClass(trs[i]) && // ! trs[i].style.backgroundColor) { // get all the cells in this row... var tds = trs[i].getElementsByTagName("td"); // and iterate through them... for (var j = 0; j < tds.length; j++) { var mytd = tds[j]; // avoid cells that have a class attribute // or backgroundColor style // if (! hasClass(mytd) && // ! mytd.style.backgroundColor) { mytd.style.backgroundColor = even ? evenColor : oddColor; // } } } // flip from odd to even, or vice-versa even = ! even; } } // } Al
  13. hey Guys, this is just a change in the set out of the spec on product_info.php add to stylesheet.css .specification{ font-family: Tahoma, Verdana, Arial, sans-serif; color: #000000; font-size: 13px; } .specification_bold{ font-family: Tahoma, Verdana, Arial, sans-serif; color: #000000; font-size: 13px; font-weight: bold; } and I changed includes-modules-product_specification.php $specification_text = '<ul class=specification_box>' . "\n"; while ($specifications = tep_db_fetch_array ($specifications_query) ) { if ($specifications['specification'] != '') { $specification_text .= '<li>'; if (SPECIFICATIONS_SHOW_NAME_PRODUCTS == 'True') { $specification_text .= $specifications['specification_name'] . ': '; } $specification_text .= $specifications['specification_prefix'] . ' '; if ($specifications['display'] == 'image' || $specifications['display'] == 'multiimage' || $specifications['enter'] == 'image' || $specifications['enter'] == 'multiimage') { tep_image (DIR_WS_IMAGES . $specifications['specification'], $specifications['specification_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT); } else { $specification_text .= $specifications['specification'] . ' '; } $specification_text .= $specifications['specification_suffix']; $specification_text .= '</li>' . "\n"; } // if ($specifications['specification'] } // while ($specifications $specification_text .= '</ul>' . "\n"; to $specification_text = '<ul>' . "\n"; while ($specifications = tep_db_fetch_array ($specifications_query) ) { if ($specifications['specification'] != '') { $specification_text .= '<div id="speci"><table colspan="2" border="0" cellpadding="0" cellspacing="0" width="100%"><tr><span class="pageHeadingSM">'; if (SPECIFICATIONS_SHOW_NAME_PRODUCTS == 'True') { $specification_text .= '<td width="21%" class="specification_bold"><li>'; $specification_text .= $specifications['specification_name'] . ': '; $specification_text .= '</li></td>'; } $specification_text .= '<td width="79%" class="specification">'; $specification_text .= $specifications['specification_prefix'] . ' '; if ($specifications['display'] == 'image' || $specifications['display'] == 'multiimage' || $specifications['enter'] == 'image' || $specifications['enter'] == 'multiimage') { tep_image (DIR_WS_IMAGES . $specifications['specification'], $specifications['specification_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT); } else { $specification_text .= $specifications['specification'] . ' '; } $specification_text .= $specifications['specification_suffix']; $specification_text .= '</td>'; $specification_text .= '' . "\n"; } // if ($specifications['specification'] } // while ($specifications $specification_text .= '</span></tr></table></div>'; $specification_text .= '</ul>' . "\n"; Thats it hope this helps someone Al
  14. if someone uses Ultimate Images Pack by maxidvd admin categories.php find each instance unlink(DIR_FS_CATALOG_IMAGES . $HTTP_POST_VARS['products_previous_image']); with unlink(DIR_FS_CATALOG_IMAGES . DIR_FS_PRODUCTS_IMAGES . $HTTP_POST_VARS['products_previous_image']); and $products_image_med = new upload('products_image_med'); $products_image_med->set_destination(DIR_FS_CATALOG_IMAGES); if ($products_image_med->parse() && $products_image_med->save()) { $products_image_med_name = $products_image_med->filename; to look like this for each instance (15 of them) $products_image_med = new upload('products_image_med'); $products_image_med->set_destination(DIR_FS_CATALOG_IMAGES . DIR_FS_PRODUCTS_IMAGES . $categoryfile); if ($products_image_med->parse() && $products_image_med->save()) { $products_image_med_name = DIR_FS_PRODUCTS_IMAGES . $categoryfile . $products_image_med->filename; hope this helps someone Al
  15. product_info.php before </head> add <script language="JavaScript" src="includes/ajax_sc.js"></script> and also add the div statments as bellow <div id="divShoppingCard"> <td width="220" align="right" valign="middle" class="infoBoxContents"> <?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART); ?> </td></div> if you use seo urls you may need to modify the the function is general.php to like $url . $add_session_id; have not tested this yet let me now how you get on?? al
  16. what do you have in product_listing.php for buy now my product_info.php is as echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART); I added <script language="Javascript" src="includes/ajax_sc.js"></script> Ajax works and adds to cart but does not change to OK.gif when finished Al
  17. found the problem FILENAME_ADMIN_FILES was defined twice and the first one had a typo in it. user error is usually the main reason for bugs Al
  18. I do not believe the contribution to be flawed I have had it working on a few rebuilds I am having trouble with it this time round I cannot access admin_files.php from the column but if I type it into the address bar I can get it up but cannot make any changes without forbidden.php I can access and change admin_members.php no problem and have full access can anyone share any idea's on this. register globals is off If you do not have the know how, time or patience backup all your files into a zip and add your database while you are at it BEFORE you make the changes. people take time to help and put together packages from scratch with skill that alot can not do even if they had the idea, for the most part everyones efforts on the free forum are appreciated
  19. at the bottom of sitemap.class.php function hrefLink change to this if ( defined('SEO_URLS') && SEO_URLS == 'true' || defined('SEO_ENABLED') && SEO_ENABLED == 'true' ) { //if ( (SEARCH_ENGINE_FRIENDLY_URLS == 'true') ) {
  20. Has anyone had a issue where sitemapproducts.xml shows each product 8 times I am not sure if this is a problem but will make the file huge when I go live 8,000 products or so, any feed back would be apreciated can't seem to find anything that would be causing it code seems fine using seo urls if that could be making a difference Thanks in advance Al
  21. lads this bit of code in paypal_ipn.php $parameters['return'] = tep_href_link(FILENAME_CHECKOUT_PROCESS, '', 'SSL'); // $parameters['cancel_return'] = tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'); $parameters['cancel_return'] = tep_href_link(FILENAME_SHOPPING_CART, 'ipn=cancel_ipn&order='.$parameters['invoice'], 'SSL'); if you cancel the order in should go to shopping_cart and if it is processed checkout_process but in my case it is going to shopping cart each time even though the order went through successfully any pointers or ideas?
  22. hey every one, this is a intergration of mvs(multi vendor shipping) and paypal ipn v2.3.4.6 this is modified from on of the lads on the forum that did most of the work im trying to jump start this for the community as there are loads of posts on the forum everywhere for this so this is what we have so far it does'nt load the order into vendor orders and it does'nt clear the cart after processing the order through paypal which I have read may be normal I'm not sure about the email bit yet( to be tested) /includes/modules/payment/paypal_ipn.php <?php /* $Id: paypal_ipn.php,v 2.3.3.0 11/17/2007 11:15:28 alexstudio Exp $ Copyright (c) 2004 osCommerce Released under the GNU General Public License Original Authors: Harald Ponce de Leon, Mark Evans Updates by PandA.nl, Navyhost, Zoeticlight, David, gravyface, AlexStudio, windfjf and Terra v2.3 Updated by AlexStudio */ class paypal_ipn { var $code, $title, $description, $enabled, $identifier; // class constructor function paypal_ipn() { global $order; $this->code = 'paypal_ipn'; $this->title = MODULE_PAYMENT_PAYPAL_IPN_TEXT_TITLE; $this->description = MODULE_PAYMENT_PAYPAL_IPN_TEXT_DESCRIPTION; $this->sort_order = MODULE_PAYMENT_PAYPAL_IPN_SORT_ORDER; $this->enabled = ((MODULE_PAYMENT_PAYPAL_IPN_STATUS == 'True') ? true : false); $this->email_footer = MODULE_PAYMENT_PAYPAL_IPN_TEXT_EMAIL_FOOTER; $this->identifier = 'osCommerce PayPal IPN v2.3.3'; // BOF Additional show text added by AlexStudio $this->show = MODULE_PAYMENT_PAYPAL_IPN_TEXT_SELECTION; $this->last_confirm = MODULE_PAYMENT_PAYPAL_IPN_TEXT_LAST_CONFIRM; // EOF Additional show text added by AlexStudio if ((int)MODULE_PAYMENT_PAYPAL_IPN_PREPARE_ORDER_STATUS_ID > 0) { $this->order_status = MODULE_PAYMENT_PAYPAL_IPN_PREPARE_ORDER_STATUS_ID; } if (is_object($order)) $this->update_status(); if (MODULE_PAYMENT_PAYPAL_IPN_GATEWAY_SERVER == 'Live') { $this->form_action_url = 'https://www.paypal.com/cgi-bin/webscr'; } else { $this->form_action_url = 'https://www.sandbox.paypal.com/cgi-bin/webscr'; } } // class methods function update_status() { global $order; if ( ($this->enabled == true) && ((int)MODULE_PAYMENT_PAYPAL_IPN_ZONE > 0) ) { $check_flag = false; $check_query = tep_db_query("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_PAYMENT_PAYPAL_IPN_ZONE . "' and zone_country_id = '" . $order->billing['country']['id'] . "' order by zone_id"); while ($check = tep_db_fetch_array($check_query)) { if ($check['zone_id'] < 1) { $check_flag = true; break; } elseif ($check['zone_id'] == $order->billing['zone_id']) { $check_flag = true; break; } } if ($check_flag == false) { $this->enabled = false; } } } function javascript_validation() { return false; } function selection() { return array('id' => $this->code, // BOF Additional show text addedby AlexStudio 'module' => $this->show); // EOF Additional show text added by AlexStudio } function pre_confirmation_check() { return false; } function confirmation() { global $cartID, $cart_PayPal_IPN_ID, $customer_id, $languages_id, $order, $order_total_modules; // if (tep_session_is_registered('cartID')) { // PandA.nl: register_globals fix if (array_key_exists('cartID', $_SESSION)) { $insert_order = false; if (tep_session_is_registered('cart_PayPal_IPN_ID')) { $order_id = substr($cart_PayPal_IPN_ID, strpos($cart_PayPal_IPN_ID, '-')+1); $curr_check = tep_db_query("select currency from " . TABLE_ORDERS . " where orders_id = '" . (int)$order_id . "'"); $curr = tep_db_fetch_array($curr_check); //if ( ($curr['currency'] != $order->info['currency']) || ($cartID != substr($cart_PayPal_IPN_ID, 0, strlen($cartID))) ) { //$check_query = tep_db_query('select orders_id from ' . TABLE_ORDERS_STATUS_HISTORY . ' where orders_id = "' . (int)$order_id . '" limit 1'); $check_query = tep_db_query('select orders_id from ' . TABLE_ORDERS_STATUS_HISTORY . ' where orders_id = "' . (int)$order_id . '" limit 2'); //1.4 $update_order = false;//1.4 //if (tep_db_num_rows($check_query) < 1) { //tep_db_query('delete from ' . TABLE_ORDERS . ' where orders_id = "' . (int)$order_id . '"'); if (tep_db_num_rows($check_query) == 1) { //1.4 $update_order = true; //1.4 tep_db_query('delete from ' . TABLE_ORDERS_TOTAL . ' where orders_id = "' . (int)$order_id . '"'); tep_db_query('delete from ' . TABLE_ORDERS_STATUS_HISTORY . ' where orders_id = "' . (int)$order_id . '"'); tep_db_query('delete from ' . TABLE_ORDERS_PRODUCTS . ' where orders_id = "' . (int)$order_id . '"'); tep_db_query('delete from ' . TABLE_ORDERS_PRODUCTS_ATTRIBUTES . ' where orders_id = "' . (int)$order_id . '"'); tep_db_query('delete from ' . TABLE_ORDERS_PRODUCTS_DOWNLOAD . ' where orders_id = "' . (int)$order_id . '"'); } $insert_order = true; //} } else { $insert_order = true; } if ($insert_order == true) { $order_totals = array(); if (is_array($order_total_modules->modules)) { reset($order_total_modules->modules); while (list(, $value) = each($order_total_modules->modules)) { $class = substr($value, 0, strrpos($value, '.')); if ($GLOBALS[$class]->enabled) { for ($i=0, $n=sizeof($GLOBALS[$class]->output); $i<$n; $i++) { if (tep_not_null($GLOBALS[$class]->output[$i]['title']) && tep_not_null($GLOBALS[$class]->output[$i]['text'])) { $order_totals[] = array('code' => $GLOBALS[$class]->code, 'title' => $GLOBALS[$class]->output[$i]['title'], 'text' => $GLOBALS[$class]->output[$i]['text'], 'value' => $GLOBALS[$class]->output[$i]['value'], 'sort_order' => $GLOBALS[$class]->sort_order); } } } } } $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'], 'date_purchased' => 'now()', 'orders_status' => $order->info['order_status'], 'currency' => $order->info['currency'], 'currency_value' => $order->info['currency_value']); //+1.4 if ( $update_order ){ tep_db_perform(TABLE_ORDERS, $sql_data_array, 'update', 'orders_id = "' . (int)$order_id . '"'); $insert_id = (int)$order_id; } else { //-1.4 tep_db_perform(TABLE_ORDERS, $sql_data_array); $insert_id = tep_db_insert_id(); }//1.4 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); } //+1.4 $sql_data_array = array('orders_id' => $insert_id, 'orders_status_id' => $order->info['order_status'], 'date_added' => 'now()', 'customer_notified' => '0', 'comments' => $order->info['comments']); tep_db_perform(TABLE_ORDERS_STATUS_HISTORY, $sql_data_array); //MVS - added insert for new orders_shipping table $shipping_array = $shipping['vendor']; foreach ((array)$shipping_array as $vendors_id => $shipping_data) { $vendors_query = tep_db_query("select vendors_name from " . TABLE_VENDORS . " where vendors_id = '" . (int)$vendors_id . "'" ); $vendors_name = 'Unknown'; if ($vendors = tep_db_fetch_array($vendors_query)) { $vendors_name = $vendors['vendors_name']; } $shipping_method_array = explode ('_', $shipping_data['id']); if ($shipping_method_array[0] == 'fedex1') { $shipping_method = 'Federal Express'; } elseif ($shipping_method_array[0] == 'upsxml') { $shipping_method = 'UPS'; } elseif ($shipping_method_array[0] == 'usps') { $shipping_method = 'USPS'; } else { $shipping_method = $shipping_method_array[0]; } $sql_data_array = array('orders_id' => $insert_id, 'vendors_id' => $vendors_id, 'shipping_module' => $shipping_method, 'shipping_method' => $shipping_data['title'], 'shipping_cost' => $shipping_data['cost'], 'shipping_tax' => $shipping_data['ship_tax'], 'vendors_name' => $vendors_name, 'vendor_order_sent' => 'no' ); tep_db_perform(TABLE_ORDERS_SHIPPING, $sql_data_array); } //MVS End //-1.4 for ($i=0, $n=sizeof($order->products); $i<$n; $i++) { //MVS start - added 'vendors_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'], 'vendors_id' => $order->products[$i]['vendors_id'] ); //MVS end tep_db_perform(TABLE_ORDERS_PRODUCTS, $sql_data_array); $order_products_id = tep_db_insert_id(); $attributes_exist = '0'; 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); } } } } // FS start $GLOBALS['cart_PayPal_IPN_ID'] = $cartID . '-' . $insert_id; // FS stop tep_session_register('cart_PayPal_IPN_ID'); // FS start // Terra register globals fix //$_SESSION['cart_PayPal_IPN_ID'] = $cartID . '-' . $insert_id; // FS stop } } // BOF Confirmation Info added by AlexStudio $confirmation = array('title' => MODULE_PAYMENT_PAYPAL_IPN_TEXT_LAST_CONFIRM, 'fields' => array()); return $confirmation; // EOF Confirmation Info added by AlexStudio } function process_button() { global $customer_id, $order, $languages_id, $currencies, $currency, $cart_PayPal_IPN_ID, $shipping, $order_total_modules; if (MODULE_PAYMENT_PAYPAL_IPN_CURRENCY == 'Selected Currency') { $my_currency = $currency; } else { $my_currency = substr(MODULE_PAYMENT_PAYPAL_IPN_CURRENCY, 5); } if (!in_array($my_currency, array('AUD', 'CAD', 'CHF', 'CZK', 'DKK', 'EUR', 'GBP', 'HKD', 'HUF', 'JPY', 'NOK', 'NZD', 'PLN', 'SEK', 'SGD', 'USD'))) { $my_currency = 'EUR'; } // BOF Per Item mode fix by alexstudio $order_totals = array(); if (is_array($order_total_modules->modules)) { reset($order_total_modules->modules); while (list(, $value) = each($order_total_modules->modules)) { $class = substr($value, 0, strrpos($value, '.')); if ($GLOBALS[$class]->enabled) { for ($i=0, $n=sizeof($GLOBALS[$class]->output); $i<$n; $i++) { if (tep_not_null($GLOBALS[$class]->output[$i]['title']) && tep_not_null($GLOBALS[$class]->output[$i]['text'])) { $order_totals[] = array('code' => $GLOBALS[$class]->code, 'title' => $GLOBALS[$class]->output[$i]['title'], 'text' => $GLOBALS[$class]->output[$i]['text'], 'value' => $GLOBALS[$class]->output[$i]['value'], 'sort_order' => $GLOBALS[$class]->sort_order); } } } } } foreach ($order_totals as $ot) { $order_total[$ot['code']] = $ot['value']; } $subtotal = $order_total['ot_subtotal']; if (DISPLAY_PRICE_WITH_TAX == 'true') $subtotal -= $order->info['tax']; // EOF Per Item mode fix by alexstudio $parameters = array(); if ( (MODULE_PAYMENT_PAYPAL_IPN_TRANSACTION_TYPE == 'Per Item')/* && (MODULE_PAYMENT_PAYPAL_IPN_EWP_STATUS == 'False') // removed by AlexStudio*/) { $parameters['cmd'] = '_cart'; $parameters['upload'] = '1'; // Decide how many items are virtual (no shipping) $shipping_count = 0; $shipping_added = 0; $handling_added = 0; $item_tax = 0; $virtual_items = 1; for ($y=0; $y<sizeof($order->products); $y++) { if (is_array($order->products[$y]['attributes'])) { while (list($key, $value) = each($order->products[$y]['attributes'])) { $z = $key; $attributes_query = "select 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[$y]['id'] . "' and pa.options_id = '" . $order->products[$y]['attributes'][$z]['option_id'] . "' and pa.options_id = popt.products_options_id and pa.options_values_id = '" . $order->products[$y]['attributes'][$z]['value_id'] . "' and pa.options_values_id = poval.products_options_values_id"; $attributes = tep_db_query($attributes_query); $attributes_values = tep_db_fetch_array($attributes); if (tep_not_null($attributes_values['products_attributes_filename'])) $virtual_items++; } } } for ($i=0, $n=sizeof($order->products); $i<$n; $i++) { $item = $i+1; $tax_value = ($order->products[$i]['tax'] / 100) * $order->products[$i]['final_price']; $parameters['item_name_' . $item] = $order->products[$i]['name']; $parameters['item_number_' . $item] = $order->products[$i]['model']; // BOF Tax pre item fix by AlexStudio if(MOVE_TAX_TO_TOTAL_AMOUNT == 'True') $parameters['amount_' . $item] = number_format(($order->products[$i]['final_price'] + $tax_value) * $currencies->get_value($my_currency), $currencies->get_decimal_places($my_currency)); else { $parameters['amount_' . $item] = number_format($order->products[$i]['final_price'] * $currencies->get_value($my_currency), $currencies->get_decimal_places($my_currency)); $parameters['tax_' . $item] = number_format($tax_value * $currencies->get_value($my_currency), $currencies->get_decimal_places($my_currency)); } $item_tax += number_format($tax_value * $order->products[$i]['qty'] * $currencies->get_value($my_currency), $currencies->get_decimal_places($my_currency)); // EOF Tax pre item fix by AlexStudio $parameters['quantity_' . $item] = $order->products[$i]['qty']; // BOF shipping & handling fix by AlexStudio $item_has_shipping = true; // EOF shipping & handling fix by AlexStudio if (isset($order->products[$i]['attributes'])) { 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); // BOF shipping & handling fix by AlexStudio if (tep_not_null($attributes_values['products_attributes_filename'])) $item_has_shipping = false; // EOF shipping & handling fix by AlexStudio // Unfortunately PayPal only accepts two attributes per product, so the // third attribute onwards will not be shown at PayPal $parameters['on' . $j . '_' . $item] = $attributes_values['products_options_name']; $parameters['os' . $j . '_' . $item] = $attributes_values['products_options_values_name']; } } // BOF shipping & handling fix by AlexStudio $handling = $order_total['ot_loworderfee']; if ($n == 1 || $item < $n) { $parameters['handling_' . $item] = number_format($handling/$n * $currencies->get_value($my_currency), $currencies->get_decimal_places($my_currency)); $handling_added += $parameters['handling_' . $item]; } else { $parameters['handling_' . $item] = number_format($handling * $currencies->get_value($my_currency), $currencies->get_decimal_places($my_currency)) - $handling_added; } if ($item_has_shipping) { $shipping_count++; $shipping_items = $n - $virtual_items; if ($shipping_items == 1 || $shipping_count < $shipping_items) { $parameters['shipping_' . $item] = number_format(($order_total['ot_shipping']/$shipping_items) * $currencies->get_value($my_currency), $currencies->get_decimal_places($my_currency)); $shipping_added += $parameters['shipping_' . $item]; } else { $parameters['shipping_' . $item] = number_format($order_total['ot_shipping'] * $currencies->get_value($my_currency), $currencies->get_decimal_places($my_currency)) - $shipping_added; } } // EOF shipping & handling fix by AlexStudio } // BOF Tax pre item fix by AlexStudio $tax_total = number_format($order->info['tax'] * $currencies->get_value($my_currency), $currencies->get_decimal_places($my_currency)); if ($tax_total > $item_tax && DISPLAY_PRICE_WITH_TAX != 'true') { $item++; $parameters['item_name_' . $item] = 'Shipping Tax'; $parameters['amount_' . $item] = $tax_total - $item_tax; $parameters['quantity_' . $item] = 1; } // EOF Tax pre item fix by AlexStudio if(MOVE_TAX_TO_TOTAL_AMOUNT == 'True') { // BOF Tax pre item fix by AlexStudio $parameters['amount'] = number_format(($subtotal + $order->info['tax']) * $currencies->get_value($my_currency), $currencies->get_decimal_places($my_currency)); } else { // default $parameters['amount'] = number_format($subtotal * $currencies->get_value($my_currency), $currencies->get_decimal_places($my_currency)); // EOF Tax pre item fix by AlexStudio } } else { $parameters['cmd'] = '_ext-enter'; $parameters['redirect_cmd'] = '_xclick'; $parameters['item_name'] = STORE_NAME; // BOF shipping & handling fix by AlexStudio if(MOVE_TAX_TO_TOTAL_AMOUNT == 'True') { $parameters['amount'] = number_format(($subtotal + $order->info['tax']) * $currencies->get_value($my_currency), $currencies->get_decimal_places($my_currency)); } else { // default $parameters['amount'] = number_format($subtotal * $currencies->get_value($my_currency), $currencies->get_decimal_places($my_currency)); $parameters['tax'] = number_format($order->info['tax'] * $currencies->get_value($my_currency), $currencies->get_decimal_places($my_currency)); } if ($order->content_type != 'virtual') { $parameters['shipping'] = number_format($order_total['ot_shipping'] * $currencies->get_value($my_currency), $currencies->get_decimal_places($my_currency)); } $parameters['handling'] = number_format($order_total['ot_loworderfee'] * $currencies->get_value($my_currency), $currencies->get_decimal_places($my_currency)); // EOF shipping & handling fix by AlexStudio } // BOF billing address fix by AlexStudio if ($order->content_type != 'virtual') { $state_abbr = tep_get_zone_code($order->delivery['country']['id'], $order->delivery['zone_id'], $order->delivery['state']); } else { $state_abbr = tep_get_zone_code($order->billing['country']['id'], $order->billing['zone_id'], $order->billing['state']); } if (empty($state_abbr)) $state_abbr = 'none'; // EOF billing address fix by AlexStudio $parameters['business'] = MODULE_PAYMENT_PAYPAL_IPN_ID; // let's check what has been defined in the shop admin for the shipping address // BOF parameters fix by AlexStudio if ($order->content_type != 'virtual') { $parameters['address_override'] = '1'; $parameters['no_shipping'] = '2'; $parameters['night_phone_b'] = $order->customer['telephone']; $parameters['first_name'] = $order->delivery['firstname']; $parameters['last_name'] = $order->delivery['lastname']; $parameters['address1'] = $order->delivery['street_address']; $parameters['address2'] = $order->delivery['suburb']; $parameters['city'] = $order->delivery['city']; $parameters['zip'] = $order->delivery['postcode']; $parameters['state'] = $state_abbr; $parameters['country'] = $order->delivery['country']['iso_code_2']; $parameters['email'] = $order->customer['email_address']; } else { $parameters['no_shipping'] = '1'; $parameters['night_phone_b'] = $order->customer['telephone']; $parameters['first_name'] = $order->billing['firstname']; $parameters['last_name'] = $order->billing['lastname']; $parameters['address1'] = $order->billing['street_address']; $parameters['address2'] = $order->billing['suburb']; $parameters['city'] = $order->billing['city']; $parameters['zip'] = $order->billing['postcode']; $parameters['state'] = $state_abbr; $parameters['country'] = $order->billing['country']['iso_code_2']; $parameters['email'] = $order->customer['email_address']; } /******************************************************************************** ************* * Currently these are the supported charsets: * * big5, euc-jp, euc-kr, euc-tw, gb2312, hz-gb-2312, ibm-862, iso-2022-cn, iso-2022-jp, * * iso-2022-kr, iso-8859-1, iso-8859-2, iso-8859-3, iso-8859-4, iso-8859-5, iso-8859-6, * * iso-8859-7, iso-8859-8, iso-8859-9, iso-8859-13, iso-8859-15, ko18-r, shift_jis, * * utf-7, utf-8, utf-16, utf-16be, utf-16le, utf-16_platformendian, utf-16_oppositeendian, * * utf-32, utf-32be, utf-32le, utf-32_platformendian, utf-32_oppositeendian, usa-ascii, * * windows-1250, windows-1251, windows-1252, windows-1253, windows-1254, windows-1255, * * windows-1256, windows-1257, windows-1258, windows-874, windows-949, x-mac-greek, * * x-mac-turkish, x-mac-centraleurroman, x-mac-cyrillic, ebcdic-cp-us, ibm-1047 * *************************************************************************** *******************/ $parameters['charset'] = "iso-8859-2"; // Modify this line if you have problems with the character set. // EOF parameters fix by AlexStudio $parameters['currency_code'] = $my_currency; $parameters['invoice'] = substr($cart_PayPal_IPN_ID, strpos($cart_PayPal_IPN_ID, '-')+1); $parameters['custom'] = $customer_id; $parameters['no_note'] = '1'; $parameters['notify_url'] = tep_href_link('ext/modules/payment/paypal_ipn/ipn.php', 'language=' . $_SESSION['language'], 'SSL', false, false); $parameters['cbt'] = CONFIRMATION_BUTTON_TEXT; $parameters['return'] = tep_href_link(FILENAME_CHECKOUT_PROCESS, '', 'SSL'); // $parameters['cancel_return'] = tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'); $parameters['cancel_return'] = tep_href_link(FILENAME_SHOPPING_CART, 'ipn=cancel_ipn&order='.$parameters['invoice'], 'SSL'); $parameters['bn'] = $this->identifier; $parameters['lc'] = $order->customer['country']['iso_code_2']; if (tep_not_null(MODULE_PAYMENT_PAYPAL_IPN_PAGE_STYLE)) { $parameters['page_style'] = MODULE_PAYMENT_PAYPAL_IPN_PAGE_STYLE; } if (MODULE_PAYMENT_PAYPAL_IPN_EWP_STATUS == 'True') { $parameters['cert_id'] = MODULE_PAYMENT_PAYPAL_IPN_EWP_CERT_ID; $random_string = rand(100000, 999999) . '-' . $customer_id . '-'; $data = ''; reset($parameters); while (list($key, $value) = each($parameters)) { $data .= $key . '=' . $value . "\n"; } $fp = fopen(MODULE_PAYMENT_PAYPAL_IPN_EWP_WORKING_DIRECTORY . '/' . $random_string . 'data.txt', 'w'); fwrite($fp, $data); fclose($fp); unset($data); if (function_exists('openssl_pkcs7_sign') && function_exists('openssl_pkcs7_encrypt')) { openssl_pkcs7_sign(MODULE_PAYMENT_PAYPAL_IPN_EWP_WORKING_DIRECTORY . '/' . $random_string . 'data.txt', MODULE_PAYMENT_PAYPAL_IPN_EWP_WORKING_DIRECTORY . '/' . $random_string . 'signed.txt', file_get_contents(MODULE_PAYMENT_PAYPAL_IPN_EWP_PUBLIC_KEY), file_get_contents(MODULE_PAYMENT_PAYPAL_IPN_EWP_PRIVATE_KEY), array('From' => MODULE_PAYMENT_PAYPAL_IPN_ID), PKCS7_BINARY); unlink(MODULE_PAYMENT_PAYPAL_IPN_EWP_WORKING_DIRECTORY . '/' . $random_string . 'data.txt'); // remove headers from the signature $signed = file_get_contents(MODULE_PAYMENT_PAYPAL_IPN_EWP_WORKING_DIRECTORY . '/' . $random_string . 'signed.txt'); $signed = explode("\n\n", $signed); $signed = base64_decode($signed[1]); $fp = fopen(MODULE_PAYMENT_PAYPAL_IPN_EWP_WORKING_DIRECTORY . '/' . $random_string . 'signed.txt', 'w'); fwrite($fp, $signed); fclose($fp); unset($signed); openssl_pkcs7_encrypt(MODULE_PAYMENT_PAYPAL_IPN_EWP_WORKING_DIRECTORY . '/' . $random_string . 'signed.txt', MODULE_PAYMENT_PAYPAL_IPN_EWP_WORKING_DIRECTORY . '/' . $random_string . 'encrypted.txt', file_get_contents(MODULE_PAYMENT_PAYPAL_IPN_EWP_PAYPAL_KEY), array('From' => MODULE_PAYMENT_PAYPAL_IPN_ID), PKCS7_BINARY); unlink(MODULE_PAYMENT_PAYPAL_IPN_EWP_WORKING_DIRECTORY . '/' . $random_string . 'signed.txt'); // remove headers from the encrypted result $data = file_get_contents(MODULE_PAYMENT_PAYPAL_IPN_EWP_WORKING_DIRECTORY . '/' . $random_string . 'encrypted.txt'); $data = explode("\n\n", $data); $data = '-----BEGIN PKCS7-----' . "\n" . $data[1] . "\n" . '-----END PKCS7-----'; unlink(MODULE_PAYMENT_PAYPAL_IPN_EWP_WORKING_DIRECTORY . '/' . $random_string . 'encrypted.txt'); } else { exec(MODULE_PAYMENT_PAYPAL_IPN_EWP_OPENSSL . ' smime -sign -in ' . MODULE_PAYMENT_PAYPAL_IPN_EWP_WORKING_DIRECTORY . '/' . $random_string . 'data.txt -signer ' . MODULE_PAYMENT_PAYPAL_IPN_EWP_PUBLIC_KEY . ' -inkey ' . MODULE_PAYMENT_PAYPAL_IPN_EWP_PRIVATE_KEY . ' -outform der -nodetach -binary > ' . MODULE_PAYMENT_PAYPAL_IPN_EWP_WORKING_DIRECTORY . '/' . $random_string . 'signed.txt'); unlink(MODULE_PAYMENT_PAYPAL_IPN_EWP_WORKING_DIRECTORY . '/' . $random_string . 'data.txt'); exec(MODULE_PAYMENT_PAYPAL_IPN_EWP_OPENSSL . ' smime -encrypt -des3 -binary -outform pem ' . MODULE_PAYMENT_PAYPAL_IPN_EWP_PAYPAL_KEY . ' < ' . MODULE_PAYMENT_PAYPAL_IPN_EWP_WORKING_DIRECTORY . '/' . $random_string . 'signed.txt > ' . MODULE_PAYMENT_PAYPAL_IPN_EWP_WORKING_DIRECTORY . '/' . $random_string . 'encrypted.txt'); unlink(MODULE_PAYMENT_PAYPAL_IPN_EWP_WORKING_DIRECTORY . '/' . $random_string . 'signed.txt'); $fh = fopen(MODULE_PAYMENT_PAYPAL_IPN_EWP_WORKING_DIRECTORY . '/' . $random_string . 'encrypted.txt', 'rb'); $data = fread($fh, filesize(MODULE_PAYMENT_PAYPAL_IPN_EWP_WORKING_DIRECTORY . '/' . $random_string . 'encrypted.txt')); fclose($fh); unlink(MODULE_PAYMENT_PAYPAL_IPN_EWP_WORKING_DIRECTORY . '/' . $random_string . 'encrypted.txt'); } $process_button_string = tep_draw_hidden_field('cmd', '_s-xclick') . tep_draw_hidden_field('encrypted', $data); unset($data); } else { reset($parameters); while (list($key, $value) = each($parameters)) { $process_button_string .= tep_draw_hidden_field($key, $value); } } return $process_button_string; } function before_process() { global $cart; $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_session_unregister('cart_PayPal_IPN_ID'); tep_redirect(tep_href_link(FILENAME_CHECKOUT_SUCCESS, '', 'SSL')); } function after_process() { return false; } function output_error() { return false; } function check() { if (!isset($this->_check)) { $check_query = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_PAYMENT_PAYPAL_IPN_STATUS'"); $this->_check = tep_db_num_rows($check_query); } return $this->_check; } function install() { $check_query = tep_db_query("select orders_status_id from " . TABLE_ORDERS_STATUS . " where orders_status_name = 'Preparing [PayPal IPN]' limit 1"); if (tep_db_num_rows($check_query) < 1) { $status_query = tep_db_query("select max(orders_status_id) as status_id from " . TABLE_ORDERS_STATUS); $status = tep_db_fetch_array($status_query); $status_id = $status['status_id']+1; $languages = tep_get_languages(); foreach ($languages as $lang) { tep_db_query("insert into " . TABLE_ORDERS_STATUS . " (orders_status_id, language_id, orders_status_name) values ('" . $status_id . "', '" . $lang['id'] . "', 'Preparing [PayPal IPN]')"); } } else { $check = tep_db_fetch_array($check_query); $status_id = $check['orders_status_id']; } tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable PayPal IPN Module', 'MODULE_PAYMENT_PAYPAL_IPN_STATUS', 'False', 'Do you want to accept PayPal IPN payments?', '6', '1', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Gateway Server', 'MODULE_PAYMENT_PAYPAL_IPN_GATEWAY_SERVER', 'Testing', 'Use the testing (sandbox) or live gateway server for transactions?', '6', '2', 'tep_cfg_select_option(array(\'Testing\',\'Live\'), ', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort order of display.', 'MODULE_PAYMENT_PAYPAL_IPN_SORT_ORDER', '0', 'Sort order of display. Lowest is displayed first.', '6', '3', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('E-Mail Address', 'MODULE_PAYMENT_PAYPAL_IPN_ID', '', 'The e-mail address to use for the PayPal IPN service', '6', '5', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Transaction Currency', 'MODULE_PAYMENT_PAYPAL_IPN_CURRENCY', 'Selected Currency', 'The currency to use for transactions', '6', '10', 'tep_cfg_select_option(array(\'Selected Currency\',\'Only USD\',\'Only GBP\',\'Only AUD\',\'Only CAD\',\'Only CHF\',\'Only CZK\',\'Only DKK\',\'Only EUR\',\'Only HKD\',\'Only HUF\',\'Only JPY\',\'Only NOK\',\'Only NZD\',\'Only PLN\',\'Only SEK\',\'Only SGD\'), ', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('Payment Zone', 'MODULE_PAYMENT_PAYPAL_IPN_ZONE', '0', 'If a zone is selected, only enable this payment method for that zone.', '6', '11', 'tep_get_zone_class_title', 'tep_cfg_pull_down_zone_classes(', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, use_function, date_added) values ('Set Preparing Order Status', 'MODULE_PAYMENT_PAYPAL_IPN_PREPARE_ORDER_STATUS_ID', '" . $status_id . "', 'Set the status of prepared orders made with this payment module to this value', '6', '12', 'tep_cfg_pull_down_order_statuses(', 'tep_get_order_status_name', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, use_function, date_added) values ('Set PayPal Acknowledged Order Status', 'MODULE_PAYMENT_PAYPAL_IPN_ORDER_STATUS_ID', '0', 'Set the status of orders made with this payment module to this value', '6', '13', 'tep_cfg_pull_down_order_statuses(', 'tep_get_order_status_name', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, use_function, date_added) values ('Set PayPal Completed Order Status', 'MODULE_PAYMENT_PAYPAL_IPN_COMP_ORDER_STATUS_ID', '0', 'Set the status of orders which are confirmed as paid (completed) to this value', '6', '13', 'tep_cfg_pull_down_order_statuses(', 'tep_get_order_status_name', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Transaction Type', 'MODULE_PAYMENT_PAYPAL_IPN_TRANSACTION_TYPE', 'Aggregate', 'Send individual items to PayPal or aggregate all as one total item?', '6', '14', 'tep_cfg_select_option(array(\'Per Item\',\'Aggregate\'), ', now())"); // bof PandA.nl move tax to total amount tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Move tax to total amount', 'MOVE_TAX_TO_TOTAL_AMOUNT', 'True', 'Do you want to move the tax to the total amount? If true PayPal will allways show the total amount including tax. (needs Aggregate instead of Per Item to function)', '6', '15', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())"); // eof PandA.nl move tax to total amount tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Page Style', 'MODULE_PAYMENT_PAYPAL_IPN_PAGE_STYLE', '', 'The page style to use for the transaction procedure (defined at your PayPal Profile page)', '6', '20', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Debug E-Mail Address', 'MODULE_PAYMENT_PAYPAL_IPN_DEBUG_EMAIL', '', 'All parameters of an Invalid IPN notification will be sent to this email address if one is entered.', '6', '21', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('cURL Proxy server', 'MODULE_PAYMENT_PAYPAL_IPN_PROXY_SERVER', '', 'If curl transactions need to go through a proxy, type the address here starting with http://. Otherwise, leave it blank. The current GoDaddy proxy address is http://proxy.shr.secureserver.net:3128', '6', '22', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable Encrypted Web Payments', 'MODULE_PAYMENT_PAYPAL_IPN_EWP_STATUS', 'False', 'Do you want to enable Encrypted Web Payments?', '6', '30', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Your Private Key', 'MODULE_PAYMENT_PAYPAL_IPN_EWP_PRIVATE_KEY', '', 'The location of your Private Key to use for signing the data. (*.pem)', '6', '31', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Your Public Certificate', 'MODULE_PAYMENT_PAYPAL_IPN_EWP_PUBLIC_KEY', '', 'The location of your Public Certificate to use for signing the data. (*.pem)', '6', '32', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('PayPals Public Certificate', 'MODULE_PAYMENT_PAYPAL_IPN_EWP_PAYPAL_KEY', '', 'The location of the PayPal Public Certificate for encrypting the data.', '6', '33', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Your PayPal Public Certificate ID', 'MODULE_PAYMENT_PAYPAL_IPN_EWP_CERT_ID', '', 'The Certificate ID to use from your PayPal Encrypted Payment Settings Profile.', '6', '34', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Working Directory', 'MODULE_PAYMENT_PAYPAL_IPN_EWP_WORKING_DIRECTORY', '', 'The working directory to use for temporary files. (trailing slash needed)', '6', '35', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('OpenSSL Location', 'MODULE_PAYMENT_PAYPAL_IPN_EWP_OPENSSL', '/usr/bin/openssl', 'The location of the openssl binary file.', '6', '36', now())"); } function remove() { tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')"); } function keys() { // PandA.nl move tax to total amount added: ", 'MOVE_TAX_TO_TOTAL_AMOUNT'" return array('MODULE_PAYMENT_PAYPAL_IPN_STATUS', 'MODULE_PAYMENT_PAYPAL_IPN_GATEWAY_SERVER', 'MODULE_PAYMENT_PAYPAL_IPN_ID', 'MODULE_PAYMENT_PAYPAL_IPN_SORT_ORDER', 'MODULE_PAYMENT_PAYPAL_IPN_CURRENCY', 'MODULE_PAYMENT_PAYPAL_IPN_ZONE', 'MODULE_PAYMENT_PAYPAL_IPN_PREPARE_ORDER_STATUS_ID', 'MODULE_PAYMENT_PAYPAL_IPN_ORDER_STATUS_ID', 'MODULE_PAYMENT_PAYPAL_IPN_COMP_ORDER_STATUS_ID', 'MODULE_PAYMENT_PAYPAL_IPN_TRANSACTION_TYPE', 'MOVE_TAX_TO_TOTAL_AMOUNT', 'MODULE_PAYMENT_PAYPAL_IPN_PAGE_STYLE', 'MODULE_PAYMENT_PAYPAL_IPN_DEBUG_EMAIL', 'MODULE_PAYMENT_PAYPAL_IPN_PROXY_SERVER', 'MODULE_PAYMENT_PAYPAL_IPN_EWP_STATUS', 'MODULE_PAYMENT_PAYPAL_IPN_EWP_PRIVATE_KEY', 'MODULE_PAYMENT_PAYPAL_IPN_EWP_PUBLIC_KEY', 'MODULE_PAYMENT_PAYPAL_IPN_EWP_PAYPAL_KEY', 'MODULE_PAYMENT_PAYPAL_IPN_EWP_CERT_ID', 'MODULE_PAYMENT_PAYPAL_IPN_EWP_WORKING_DIRECTORY', 'MODULE_PAYMENT_PAYPAL_IPN_EWP_OPENSSL'); } } ?> /ext/modules/payment/paypal_ipn/ipn.php <?php /* $Id: paypal_ipn.php,v 2.3.0.0 10/09/2007 11:58:21 alexstudio Exp $ Copyright (c) 2004 osCommerce Released under the GNU General Public License Original Authors: Harald Ponce de Leon, Mark Evans Updates by PandA.nl, Navyhost, Zoeticlight, David, gravyface, AlexStudio, windfjf, Monika in Germany and Terra v2.3 updated by AlexStudio */ chdir('../../../../'); require('includes/application_top.php'); include(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CHECKOUT_PROCESS); // BOF configuration keys fix by AlexStudio require(DIR_WS_CLASSES . 'payment.php'); $payment_modules = new payment(paypal_ipn); // EOF configuration keys fix by AlexStudio //MVS start // load the selected shipping module if (($total_weight > 0 ) || (SELECT_VENDOR_SHIPPING == 'true')){ include(DIR_WS_CLASSES . 'vendor_shipping.php'); } elseif (($total_weight > 0 ) || (SELECT_VENDOR_SHIPPING == 'false')){ include(DIR_WS_CLASSES . 'shipping.php'); } $shipping_modules = new shipping($shipping); //MVS End $parameters = 'cmd=_notify-validate'; foreach ($_POST as $key => $value) { $parameters .= '&' . $key . '=' . urlencode(stripslashes($value)); } if (MODULE_PAYMENT_PAYPAL_IPN_GATEWAY_SERVER == 'Live') { $server = 'www.paypal.com'; } else { $server = 'www.sandbox.paypal.com'; } $fsocket = false; $curl = false; $result = false; if ( (PHP_VERSION >= 4.3) && ($fp = @fsockopen('ssl://' . $server, 443, $errno, $errstr, 30)) ) { $fsocket = true; } elseif (function_exists('curl_exec')) { $curl = true; } elseif ($fp = @fsockopen($server, 80, $errno, $errstr, 30)) { $fsocket = true; } if ($fsocket == true) { $header = 'POST /cgi-bin/webscr HTTP/1.0' . "\r\n" . 'Host: ' . $server . "\r\n" . 'Content-Type: application/x-www-form-urlencoded' . "\r\n" . 'Content-Length: ' . strlen($parameters) . "\r\n" . 'Connection: close' . "\r\n\r\n"; @fputs($fp, $header . $parameters); $string = ''; while (!@feof($fp)) { $res = @fgets($fp, 1024); $string .= $res; if ( ($res == 'VERIFIED') || ($res == 'INVALID') ) { $result = $res; break; } } @fclose($fp); } elseif ($curl == true) { $ch = curl_init(); // BOF add by AlexStudio // For the poor souls on GoDaddy and the like, set the connection to go through their proxy if (trim(MODULE_PAYMENT_PAYPAL_IPN_PROXY_SERVER) != '') { curl_setopt($ch, CURLOPT_PROXYTYPE, CURLPROXY_HTTP); curl_setopt($ch, CURLOPT_PROXY, MODULE_PAYMENT_PAYPAL_IPN_PROXY_SERVER); } // Eof add by AlexStudio curl_setopt($ch, CURLOPT_URL, 'https://' . $server . '/cgi-bin/webscr'); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $parameters); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HEADER, false); curl_setopt($ch, CURLOPT_TIMEOUT, 30); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); $result = curl_exec($ch); curl_close($ch); } if ($result == 'VERIFIED') { if (isset($_POST['invoice']) && is_numeric($_POST['invoice']) && ($_POST['invoice'] > 0)) { $order_query = tep_db_query("select currency, currency_value from " . TABLE_ORDERS . " where orders_id = '" . $_POST['invoice'] . "' and customers_id = '" . (int)$_POST['custom'] . "'"); if (tep_db_num_rows($order_query) > 0) { $order_db = tep_db_fetch_array($order_query); // let's re-create the required arrays require(DIR_WS_CLASSES . 'order.php'); $order = new order($_POST['invoice']); // let's update the order status $total_query = tep_db_query("select value from " . TABLE_ORDERS_TOTAL . " where orders_id = '" . $_POST['invoice'] . "' and class = 'ot_total' limit 1"); $total = tep_db_fetch_array($total_query); $comment_status = 'payment status: ' . $_POST['payment_status'] . ' (' . ucfirst($_POST['payer_status']) . '; ' . $currencies->format($_POST['mc_gross'], false, $_POST['mc_currency']) . ')'; if ($_POST['payment_status'] == 'Pending') { $comment_status .= '; ' . $_POST['pending_reason']; } elseif ( ($_POST['payment_status'] == 'Reversed') || ($_POST['payment_status'] == 'Refunded') ) { $comment_status .= '; ' . $_POST['reason_code']; } elseif ( ($_POST['payment_status'] == 'Completed') && (tep_not_null($_POST['address_street'])) ) { $comment_status .= ", \n" . PAYPAL_ADDRESS . ": " . $_POST['address_name'] . ", " . $_POST['address_street'] . ", " . $_POST['address_city'] . ", " . $_POST['address_zip'] . ", " . $_POST['address_state'] . ", " . $_POST['address_country'] . ", " . $_POST['address_country_code'] . ", " . $_POST['address_status']; } $order_status_id = DEFAULT_ORDERS_STATUS_ID; // modified AlexStudio's Rounding error bug fix // variances of up to 0.05 on either side (plus / minus) are ignored if ((((number_format($total['value'] * $order_db['currency_value'], $currencies->get_decimal_places($order_db['currency']))) - $_POST['mc_gross']) <= 0.05) && (((number_format($total['value'] * $order_db['currency_value'], $currencies->get_decimal_places($order_db['currency']))) - $_POST['mc_gross']) >= -0.05)) { // Terra -> modified update. If payment status is "completed" than a completed order status is chosen based on the admin settings if ( (MODULE_PAYMENT_PAYPAL_IPN_COMP_ORDER_STATUS_ID > 0) && ($_POST['payment_status'] == 'Completed') ) { $order_status_id = MODULE_PAYMENT_PAYPAL_IPN_COMP_ORDER_STATUS_ID; } elseif (MODULE_PAYMENT_PAYPAL_IPN_ORDER_STATUS_ID > 0) { $order_status_id = MODULE_PAYMENT_PAYPAL_IPN_ORDER_STATUS_ID; } } // Let's see what the PayPal payment status is and set the notification accordingly // more info: https://www.paypal.com/IntegrationCenter/ic_ipn-pdt-variable-reference.html if ( ($_POST['payment_status'] == 'Pending') || ($_POST['payment_status'] == 'Completed')) { $customer_notified = '1'; } else { $customer_notified = '0'; } tep_db_query("update " . TABLE_ORDERS . " set orders_status = '" . $order_status_id . "', last_modified = now() where orders_id = '" . $_POST['invoice'] . "'"); $sql_data_array = array('orders_id' => $_POST['invoice'], 'orders_status_id' => $order_status_id, 'date_added' => 'now()', 'customer_notified' => $customer_notified, 'comments' => 'PayPal IPN Verified [' . $comment_status . ']'); tep_db_perform(TABLE_ORDERS_STATUS_HISTORY, $sql_data_array); //MVS - added insert for new orders_shipping table $shipping_array = $shipping['vendor']; foreach ($shipping_array as $vendors_id => $shipping_data) { $vendors_query = tep_db_query("select vendors_name from " . TABLE_VENDORS . " where vendors_id = '" . (int)$vendors_id . "'" ); $vendors_name = 'Unknown'; if ($vendors = tep_db_fetch_array($vendors_query)) { $vendors_name = $vendors['vendors_name']; } $shipping_method_array = explode ('_', $shipping_data['id']); if ($shipping_method_array[0] == 'fedex1') { $shipping_method = 'Federal Express'; } elseif ($shipping_method_array[0] == 'upsxml') { $shipping_method = 'UPS'; } elseif ($shipping_method_array[0] == 'usps') { $shipping_method = 'USPS'; } else { $shipping_method = $shipping_method_array[0]; } $sql_data_array = array('orders_id' => $insert_id, 'vendors_id' => $vendors_id, 'shipping_module' => $shipping_method, 'shipping_method' => $shipping_data['title'], 'shipping_cost' => $shipping_data['cost'], 'shipping_tax' => $shipping_data['ship_tax'], 'vendors_name' => $vendors_name, 'vendor_order_sent' => 'no' ); tep_db_perform(TABLE_ORDERS_SHIPPING, $sql_data_array); } //MVS End // If the order is completed, then we want to send the order email and update the stock if ($_POST['payment_status'] == 'Completed') { // START STATUS == COMPLETED LOOP // initialized for the email confirmation $products_ordered = ''; $total_tax = 0; // let's update the stock ####################################################### for ($i=0, $n=sizeof($order->products); $i<$n; $i++) { // PRODUCT LOOP STARTS HERE // 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']) . "'"); // Let's get all the info together for the email $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; // Let's get the attributes $products_ordered_attributes = ''; if ( (isset($order->products[$i]['attributes'])) && (sizeof($order->products[$i]['attributes']) > 0) ) { for ($j=0, $n2=sizeof($order->products[$i]['attributes']); $j<$n2; $j++) { $products_ordered_attributes .= "\n\t" . $order->products[$i]['attributes'][$j]['option'] . ' ' . $order->products[$i]['attributes'][$j]['value']; } } // Let's format the products model $products_model = ''; if ( !empty($order->products[$i]['model']) ) { $products_model = ' (' . $order->products[$i]['model'] . ')'; } // Let's put all the product info together into a string //MVS begin if (SELECT_VENDOR_EMAIL_OPTION == 'false') { $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"; } } if (SELECT_VENDOR_EMAIL_OPTION == 'true') { $order_id = $insert_id; require(DIR_WS_INCLUDES . 'vendor_order_data.php'); } function vendors_email($vendors_id, $oID, $status, $vendor_order_sent) { $vendor_order_sent = false; $debug='no'; $vendor_order_sent = 'no'; $index2 = 0; //let's get the Vendors $vendor_data_query = tep_db_query("select v.vendors_id, v.vendors_name, v.vendors_email, v.vendors_contact, v.vendor_add_info, v.vendor_street, v.vendor_city, v.vendor_state, v.vendors_zipcode, v.vendor_country, v.account_number, v.vendors_status_send, os.shipping_module, os.shipping_method, os.shipping_cost, os.shipping_tax, os.vendor_order_sent from " . TABLE_VENDORS . " v, " . TABLE_ORDERS_SHIPPING . " os where v.vendors_id=os.vendors_id and v.vendors_id='" . $vendors_id . "' and os.orders_id='" . (int)$oID . "' and v.vendors_status_send='" . $status . "'"); while ($vendor_order = tep_db_fetch_array($vendor_data_query)) { $vendor_products[$index2] = array('Vid' => $vendor_order['vendors_id'], 'Vname' => $vendor_order['vendors_name'], 'Vemail' => $vendor_order['vendors_email'], 'Vcontact' => $vendor_order['vendors_contact'], 'Vaccount' => $vendor_order['account_number'], 'Vstreet' => $vendor_order['vendor_street'], 'Vcity' => $vendor_order['vendor_city'], 'Vstate' => $vendor_order['vendor_state'], 'Vzipcode' => $vendor_order['vendors_zipcode'], 'Vcountry' => $vendor_order['vendor_country'], 'Vaccount' => $vendor_order['account_number'], 'Vinstructions' => $vendor_order['vendor_add_info'], 'Vmodule' => $vendor_order['shipping_module'], 'Vmethod' => $vendor_order['shipping_method']); if ($debug == 'yes') { echo 'The vendor query: ' . $vendor_order['vendors_id'] . '<br>'; } $index = 0; $vendor_orders_products_query = tep_db_query("select o.orders_id, o.orders_products_id, o.products_model, o.products_id, o.products_quantity, o.products_name, p.vendors_id, p.vendors_prod_comments, p.vendors_prod_id, p.vendors_product_price from " . TABLE_ORDERS_PRODUCTS . " o, " . TABLE_PRODUCTS . " p where p.vendors_id='" . (int)$vendor_order['vendors_id'] . "' and o.products_id=p.products_id and o.orders_id='" . $oID . "' order by o.products_name"); while ($vendor_orders_products = tep_db_fetch_array($vendor_orders_products_query)) { $vendor_products[$index2]['vendor_orders_products'][$index] = array( 'Pqty' => $vendor_orders_products['products_quantity'], 'Pname' => $vendor_orders_products['products_name'], 'Pmodel' => $vendor_orders_products['products_model'], 'Pprice' => $vendor_orders_products['products_price'], 'Pvendor_name' => $vendor_orders_products['vendors_name'], 'Pcomments' => $vendor_orders_products['vendors_prod_comments'], 'PVprod_id' => $vendor_orders_products['vendors_prod_id'], 'PVprod_price' => $vendor_orders_products['vendors_product_price'], 'spacer' => '-'); //MVS end if ($debug == 'yes') { echo 'The products query: ' . $vendor_orders_products['products_name'] . '<br>'; } $subindex = 0; $vendor_attributes_query = tep_db_query("select products_options, products_options_values, options_values_price, price_prefix from " . TABLE_ORDERS_PRODUCTS_ATTRIBUTES . " where orders_id = '" . (int)$oID . "' and orders_products_id = '" . (int)$vendor_orders_products['orders_products_id'] . "'"); if (tep_db_num_rows($vendor_attributes_query)) { while ($vendor_attributes = tep_db_fetch_array($vendor_attributes_query)) { $vendor_products[$index2]['vendor_orders_products'][$index]['vendor_attributes'][$subindex] = array('option' => $vendor_attributes['products_options'], 'value' => $vendor_attributes['products_options_values'], 'prefix' => $vendor_attributes['price_prefix'], 'price' => $vendor_attributes['options_values_price']); $subindex++; } } $index++; } $index2++; // let's build the email // Get the delivery address $delivery_address_query = tep_db_query("select distinct delivery_company, delivery_name, delivery_street_address, delivery_city, delivery_state, delivery_postcode from " . TABLE_ORDERS . " where orders_id='" . $oID ."'"); $vendor_delivery_address_list = tep_db_fetch_array($delivery_address_query); if ($debug == 'yes') { echo 'The number of vendors: ' . sizeof($vendor_products) . '<br>'; } $email=''; for ($l=0, $m=sizeof($vendor_products); $l<$m; $l++) { $vendor_country = tep_get_country_name($vendor_products[$l]['Vcountry']); $order_number= $oID; $vendors_id=$vendor_products[$l]['Vid']; $the_email=$vendor_products[$l]['Vemail']; $the_name=$vendor_products[$l]['Vname']; $the_contact=$vendor_products[$l]['Vcontact']; $email= '<b>To: ' . $the_contact . ' <br>' . $the_name . '<br>' . $the_email . '<br>' . $vendor_products[$l]['Vstreet'] .'<br>' . $vendor_products[$l]['Vcity'] .', ' . $vendor_products[$l]['Vstate'] .' ' . $vendor_products[$l]['Vzipcode'] . ' ' . $vendor_country . '<br>' . '<br>' . EMAIL_SEPARATOR . '<br>' . 'Special Comments or Instructions: ' . $vendor_products[$l]['Vinstructions'] .'<br>' . '<br>' . EMAIL_SEPARATOR . '<br>' . 'From: ' . STORE_OWNER . '<br>' . STORE_NAME_ADDRESS . '<br>' . 'Accnt #: ' . $vendor_products[$l]['Vaccount'] . '<br>' . EMAIL_SEPARATOR . '<br>' . EMAIL_TEXT_ORDER_NUMBER . ' ' . $oID . '<br>' . EMAIL_SEPARATOR . '<br>' . '<br> Shipping Method: ' . $vendor_products[$l]['Vmodule'] . ' -- ' . $vendor_products[$l]['Vmethod'] . '<br>' . EMAIL_SEPARATOR . '<br>' . '<br>Dropship deliver to:<br>' . $vendor_delivery_address_list['delivery_company'] .'<br>' . $vendor_delivery_address_list['delivery_name'] .'<br>' . $vendor_delivery_address_list['delivery_street_address'] .'<br>' . $vendor_delivery_address_list['delivery_city'] .', ' . $vendor_delivery_address_list['delivery_state'] . ' ' . $vendor_delivery_address_list['delivery_postcode'] . '<br><br>'; $email = $email . '<table width="75%" border=1 cellspacing="0" cellpadding="3"> <tr><td>Qty:</td><td>Product Name:</td><td>Item Code/Number:</td><td>Product Model:</td><td>Per Unit Price:</td><td>Item Comments: </td></tr>'; for ($i=0, $n=sizeof($vendor_products[$l]['vendor_orders_products']); $i<$n; $i++) { $product_attribs =''; if (isset($vendor_products[$l]['vendor_orders_products'][$i]['vendor_attributes']) && (sizeof($vendor_products[$l]['vendor_orders_products'][$i]['vendor_attributes']) > 0)) { for ($j = 0, $k = sizeof($vendor_products[$l]['vendor_orders_products'][$i]['vendor_attributes']); $j < $k; $j++) { $product_attribs .= ' ' . $vendor_products[$l]['vendor_orders_products'][$i]['vendor_attributes'][$j]['option'] . ': ' . $vendor_products[$l]['vendor_orders_products'][$i]['vendor_attributes'][$j]['value'] . '<br>'; } } $email = $email . '<tr><td> ' . $vendor_products[$l]['vendor_orders_products'][$i]['Pqty'] . '</td><td> ' . $vendor_products[$l]['vendor_orders_products'][$i]['Pname'] . '<br> <i>Option<br> ' . $product_attribs . '</td><td> ' . $vendor_products[$l]['vendor_orders_products'][$i]['PVprod_id'] . '</td><td> ' . $vendor_products[$l]['vendor_orders_products'][$i]['Pmodel'] . '</td><td> ' . $vendor_products[$l]['vendor_orders_products'][$i]['PVprod_price'] . '</td><td>' . $vendor_products[$l]['vendor_orders_products'][$i]['Pcomments'] . '</b></td></tr>'; } } $email = $email . '</table><br><HR><br>'; tep_mail($the_name, $the_email, EMAIL_TEXT_ORDER_NUMBER . ' ' . $oID , $email . '<br>', STORE_NAME, STORE_OWNER_EMAIL_ADDRESS) ; $vendor_order_sent = 'yes'; tep_db_query("update " . TABLE_ORDERS_SHIPPING . " set vendor_order_sent = '" . tep_db_input($vendor_order_sent) . "' where orders_id = '" . (int)$oID . "' and vendors_id = '" . (int)$vendors_id . "'"); if ($debug == 'yes') { echo 'The $email(including headers:<br>Vendor Email Addy' . $the_email . '<br>Vendor Name' . $the_name . '<br>Vendor Contact' . $the_contact . '<br>Body--<br>' . $email . '<br>'; } } return true; } //MVS end // PRODUCT LOOP ENDS HERE ####################################################### // lets start with the email confirmation // BOF content type fix by AlexStudio $content_type = ''; $content_count = 0; // BOF order comment fix $comment_query = tep_db_query("select comments from " . TABLE_ORDERS_STATUS_HISTORY . " where orders_id = '" . $_POST['invoice'] . "'"); $comment_array = tep_db_fetch_array($comment_query); $comments = $comment_array['comments']; // EOF order comment fix if (DOWNLOAD_ENABLED == 'true') { $content_query = tep_db_query("select * from " . TABLE_ORDERS_PRODUCTS_DOWNLOAD . " where orders_id = '" . (int)$_POST['invoice'] . "'"); $content_count = tep_db_num_rows($content_query); if ($content_count > 0) { $content_type = 'virtual'; } } switch ($content_type) { case 'virtual': if ($content_count != sizeof($order->products)) $content_type = 'mixed'; break; default: $content_type = 'physical'; break; } // EOF content type fix by AlexStudio // $order variables have been changed from checkout_process to work with the variables from the function query () instead of cart () in the order class $email_order = STORE_NAME . "\n" . EMAIL_SEPARATOR . "\n" . EMAIL_TEXT_ORDER_NUMBER . ' ' . $_POST['invoice'] . "\n" . EMAIL_TEXT_INVOICE_URL . ' ' . tep_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id=' . $_POST['invoice'], 'SSL', false) . "\n" . EMAIL_TEXT_DATE_ORDERED . ' ' . strftime(DATE_FORMAT_LONG) . "\n\n"; // BOF order comment fix by AlexStudio if ($comments) { $email_order .= $comments . "\n\n"; } // EOF order comment fix by AlexStudio $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"; } // BOF content type fix by AlexStudio if ($content_type != 'virtual') { // EOF content type fix by AlexStudio $email_order .= "\n" . EMAIL_TEXT_DELIVERY_ADDRESS . "\n" . EMAIL_SEPARATOR . "\n" . tep_address_format($order->delivery['format_id'], $order->delivery, 0, '', "\n") . "\n"; } $email_order .= "\n" . EMAIL_TEXT_BILLING_ADDRESS . "\n" . EMAIL_SEPARATOR . "\n" . tep_address_format($order->billing['format_id'], $order->billing, 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"; if ($payment_class->email_footer) { $email_order .= $payment_class->email_footer . "\n\n"; } } tep_mail($order->customer['name'], $order->customer['email_address'], EMAIL_TEXT_SUBJECT, nl2br($email_order), STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS); // send emails to other people if (SEND_EXTRA_ORDER_EMAILS_TO != '') { tep_mail('', SEND_EXTRA_ORDER_EMAILS_TO, EMAIL_TEXT_SUBJECT, nl2br($email_order), STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS); } //MVS start if (SELECT_VENDOR_EMAIL_WHEN == 'Catalog' || SELECT_VENDOR_EMAIL_WHEN == 'Both') { $status=$order->info['order_status']; if (isset($status)) { $order_sent_query = tep_db_query("select vendor_order_sent, vendors_id from " . TABLE_ORDERS_SHIPPING . " where orders_id = '" . $insert_id . "'"); while ($order_sent_data = tep_db_fetch_array($order_sent_query)) { $order_sent_ckeck = $order_sent_data['vendor_order_sent']; $vendors_id = $order_sent_data['vendors_id']; // echo $order_sent_check . ' The order sent check<br>'; // echo $insert_id . 'The order number<br>'; if ($order_sent_ckeck == 'no') { $status=''; $oID=$insert_id; $vendor_order_sent = false; $status=$order->info['order_status']; vendors_email($vendors_id, $oID, $status, $vendor_order_sent); }// if order check }// while }// if isset // echo 'Email sent? ' . $vendor_order_sent . '<br>'; }// if enabled //MVS end this file is complete } // END STATUS == COMPLETED LOOP if ($_POST['payment_status'] == 'Pending') { // START STATUS == PENDING LOOP $email_order = STORE_NAME . "\n" . EMAIL_SEPARATOR . "\n" . EMAIL_TEXT_ORDER_NUMBER . ' ' . $_POST['invoice'] . "\n" . EMAIL_TEXT_INVOICE_URL . ' ' . tep_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id=' . $_POST['invoice'], 'SSL', false) . "\n" . EMAIL_TEXT_DATE_ORDERED . ' ' . strftime(DATE_FORMAT_LONG) . "\n\n" . EMAIL_SEPARATOR . "\n" . EMAIL_PAYPAL_PENDING_NOTICE . "\n\n"; tep_mail($order->customer['name'], $order->customer['email_address'], EMAIL_TEXT_SUBJECT, $email_order, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS); // send emails to other people if (SEND_EXTRA_ORDER_EMAILS_TO != '') { tep_mail('', SEND_EXTRA_ORDER_EMAILS_TO, EMAIL_TEXT_SUBJECT, $email_order, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS); } //MVS start if (SELECT_VENDOR_EMAIL_WHEN == 'Catalog' || SELECT_VENDOR_EMAIL_WHEN == 'Both') { $status=$order->info['order_status']; if (isset($status)) { $order_sent_query = tep_db_query("select vendor_order_sent, vendors_id from " . TABLE_ORDERS_SHIPPING . " where orders_id = '" . $insert_id . "'"); while ($order_sent_data = tep_db_fetch_array($order_sent_query)) { $order_sent_ckeck = $order_sent_data['vendor_order_sent']; $vendors_id = $order_sent_data['vendors_id']; // echo $order_sent_check . ' The order sent check<br>'; // echo $insert_id . 'The order number<br>'; if ($order_sent_ckeck == 'no') { $status=''; $oID=$insert_id; $vendor_order_sent = false; $status=$order->info['order_status']; vendors_email($vendors_id, $oID, $status, $vendor_order_sent); }// if order check }// while }// if isset // echo 'Email sent? ' . $vendor_order_sent . '<br>'; }// if enabled //MVS end this file is complete } // END STATUS == PENDING LOOP //emptying cart for everyone! by Monika in Germany tep_db_query("delete from " . TABLE_CUSTOMERS_BASKET . " where customers_id = '" . (int)$_POST['custom'] . "'"); tep_db_query("delete from " . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . " where customers_id = '" . (int)$_POST['custom'] . "'"); //end emptying cart for everyone } } } else { if (tep_not_null(MODULE_PAYMENT_PAYPAL_IPN_DEBUG_EMAIL)) { $email_body = '$_POST:' . "\n\n"; foreach ($_POST as $key => $value) { $email_body .= $key . '=' . $value . "\n"; } $email_body .= "\n" . '$_GET:' . "\n\n"; foreach ($_GET as $key => $value) { $email_body .= $key . '=' . $value . "\n"; } tep_mail('', MODULE_PAYMENT_PAYPAL_IPN_DEBUG_EMAIL, 'PayPal IPN Invalid Process', $email_body, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS); } if (isset($_POST['invoice']) && is_numeric($_POST['invoice']) && ($_POST['invoice'] > 0)) { $check_query = tep_db_query("select orders_id from " . TABLE_ORDERS . " where orders_id = '" . $_POST['invoice'] . "' and customers_id = '" . (int)$_POST['custom'] . "'"); if (tep_db_num_rows($check_query) > 0) { $comment_status = $_POST['payment_status']; if ($_POST['payment_status'] == 'Pending') { $comment_status .= '; ' . $_POST['pending_reason']; } elseif ( ($_POST['payment_status'] == 'Reversed') || ($_POST['payment_status'] == 'Refunded') ) { $comment_status .= '; ' . $_POST['reason_code']; } tep_db_query("update " . TABLE_ORDERS . " set orders_status = '" . ((MODULE_PAYMENT_PAYPAL_IPN_ORDER_STATUS_ID > 0) ? MODULE_PAYMENT_PAYPAL_IPN_ORDER_STATUS_ID : DEFAULT_ORDERS_STATUS_ID) . "', last_modified = now() where orders_id = '" . $_POST['invoice'] . "'"); $sql_data_array = array('orders_id' => $_POST['invoice'], 'orders_status_id' => (MODULE_PAYMENT_PAYPAL_IPN_ORDER_STATUS_ID > 0) ? MODULE_PAYMENT_PAYPAL_IPN_ORDER_STATUS_ID : DEFAULT_ORDERS_STATUS_ID, 'date_added' => 'now()', 'customer_notified' => '0', 'comments' => 'PayPal IPN Invalid [' . $comment_status . ']'); tep_db_perform(TABLE_ORDERS_STATUS_HISTORY, $sql_data_array); //MVS - added insert for new orders_shipping table $shipping_array = $shipping['vendor']; foreach ($shipping_array as $vendors_id => $shipping_data) { $vendors_query = tep_db_query("select vendors_name from " . TABLE_VENDORS . " where vendors_id = '" . (int)$vendors_id . "'" ); $vendors_name = 'Unknown'; if ($vendors = tep_db_fetch_array($vendors_query)) { $vendors_name = $vendors['vendors_name']; } $shipping_method_array = explode ('_', $shipping_data['id']); if ($shipping_method_array[0] == 'fedex1') { $shipping_method = 'Federal Express'; } elseif ($shipping_method_array[0] == 'upsxml') { $shipping_method = 'UPS'; } elseif ($shipping_method_array[0] == 'usps') { $shipping_method = 'USPS'; } else { $shipping_method = $shipping_method_array[0]; } $sql_data_array = array('orders_id' => $insert_id, 'vendors_id' => $vendors_id, 'shipping_module' => $shipping_method, 'shipping_method' => $shipping_data['title'], 'shipping_cost' => $shipping_data['cost'], 'shipping_tax' => $shipping_data['ship_tax'], 'vendors_name' => $vendors_name, 'vendor_order_sent' => 'no' ); tep_db_perform(TABLE_ORDERS_SHIPPING, $sql_data_array); } //MVS End } } } require('includes/application_bottom.php'); ?> anyone can help with this would be greatly appreciated alman
  23. Hey guys have to say great contribution I have a small problem someone might be able to help me with I get a error when I do a price filter 1054 - Unknown column 'p.products_tax_class_id' in 'on clause' select count(distinct p.products_id) as total from ((products p) left join manufacturers m using(manufacturers_id), products_description pd) left join specials s on p.products_id = s.products_id, categories c, products_to_categories p2c left join tax_rates tr on p.products_tax_class_id = tr.tax_class_id left join zones_to_geo_zones gz on tr.tax_zone_id = gz.geo_zone_id and (gz.zone_country_id is null or gz.zone_country_id = '0' or gz.zone_country_id = '222') and (gz.zone_id is null or gz.zone_id = '0' or gz.zone_id = '209') where p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '1' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and p2c.products_id = p.products_id and p2c.products_id = pd.products_id and pd.language_id = '1' and p2c.categories_id = '57' and m.manufacturers_id = '9' and (IF(s.status, s.specials_new_products_price, p.products_price) * if(gz.geo_zone_id is null, 1, 1 + (tr.tax_rate / 100) ) >= 90) and (IF(s.status, s.specials_new_products_price, p.products_price) * if(gz.geo_zone_id is null, 1, 1 + (tr.tax_rate / 100) ) <= 150) this error is for product model search 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'limit 12, 12' at line 1 select pd.products_name, p.products_image, 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(( products_description pd, products p )left join manufacturers m on p.manufacturers_id = m.manufacturers_id, products_to_categories p2c )left join specials s on p.products_id = s.products_id left join categories c on c.categories_id = p2c.categories_id where c.categories_status = '1' and p.products_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '1' and p2c.categories_id = '57' order by limit 12, 12 manufacturer filter, price , product name work but manufacturers and model do not I have enable/disable contribution installed I'm not sure it would be affecting it I followed the instruction about index.php to configure also Thanks alman ps it is the literally the last php quote <?php //} ?>
×
×
  • Create New...