Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Peace2u

Pioneers
  • Posts

    13
  • Joined

  • Last visited

Profile Information

  • Real Name
    Fabien
  • Gender
    Male
  • Location
    Netherlands

Recent Profile Visitors

1,879 profile views

Peace2u's Achievements

  1. Hi Jim, The values are saved correctly. But i think it could be a problem when several people are inserting at the same time and than the solution as used in the categories_insert.php with the cases would be better.... Kind greetings, Fabien
  2. @kymation I had the same problem when you insert new product, the product meta description and meta keywords won't appear. But they only appear when you edit a product. I think there is a problem is the last version of the file products_insert.php, the file starts with: $products_id = 0; // Default in case no product is set $products_id = ( int )$pInfo->products_id; if( $products_id > 0 ) { When a new product is added $pInfo->products_id will be null and the page wil not go through the if statement, and will not show any fields. I have made a modification that works (maybe some one could make it better ;-), search: $products_id = 0; // Default in case no product is set $products_id = ( int )$pInfo->products_id; if( $products_id > 0 ) { Replace with: $products_id = 0; // Default in case no product is set $products_id = ( int )$pInfo->products_id; //FvD 20-6-2015 get new product_id if ( (int)$pInfo->products_id == 0 ) { $product_last_query = tep_db_query("select products_id from " . TABLE_PRODUCTS . " order by products_id desc limit 1"); $product_last = tep_db_fetch_array($product_last_query); $products_id = $product_last[products_id] + 1; } if( $products_id > 0 ) { I hope this helps and maybe some one knows a better solution, kind greetings, Fabien
  3. Hi All, I need some help, I have os 2.3.4 running and installed this modification. It shows the customers online but generates these errors: Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: Access denied for user ''@'localhost' (using password: NO) in /home/....../httpdocs/admin/whos_online.php on line 182 Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: A link to the server could not be established in /home/....../httpdocs/admin/whos_online.php on line 182 Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: Access denied for user ''@'localhost' (using password: NO) in /home/...../admin/whos_online.php on line 183 ..... I have tested the key bij creating and entering the entire url in a brwoser and the site returns XML information. When i insert print statements in the ipinfodb.class.php file, it looks like the code stops after this line ( i have put a print behind this line and does not show). $response = @@new SimpleXMLElement($xml); Does any one have a idea what the cause could be??? Thanks in advance, Fabien
  4. Dear all, I just have installed this addon and in the Admin I can't see the Ultimate SEO at module section or the configuration settings. I checked the forum, checked all files and changes, checked all files in the package...... no solution..... - OSC version 2.3.4 - MySQL 5.5.36 - PHP Version: 5.3.28 Could some one please give me some hints or help me to fix this? Kind greetings
  5. Hi Jim, Got the page orders_per_vendor working, there where problems in my installation with: _GET and _POST The _GET function works when the values are set via a href link and the _POST works when a pull down is used. After adding both for $vendors_id and &status the filters work (probably a dirty solution....) . $vendors_id = 1; if (isset ($_POST['vendors_id'])) { $vendors_id = (int) $_POST['vendors_id']; } if (isset ($_GET['vendors_id'])) { $vendors_id = (int) $_GET['vendors_id']; } $line_filter = 'desc'; if (isset ($_GET['line']) && $_GET['line'] == 'asc') { $line_filter = $_GET['line']; } $sort_by_filter = 'orders_id'; if (isset ($_GET['by']) && $_GET['by'] != '') { switch ($_GET['by']) { case 'date': $sort_by_filter = 'date_purchased'; break; case 'customer': $sort_by_filter = 'customers_id'; break; case 'status': $sort_by_filter = 'status'; break; case 'sent': $sort_by_filter = 'sent'; break; default: $sort_by_filter = 'orders_id'; break; } } $status = ''; if (isset ($_POST['status']) && $_POST['status'] != '') { $status = $_POST['status']; $status = preg_replace("(\r\n|\n|\r)", '', $status); // Remove CR &/ LF $status = preg_replace("/[^A-Za-z0-9]/i", '', $status); // strip everthing except alphanumerics } if (isset ($_GET['status']) && $_GET['status'] != '') { $status = $_GET['status']; $status = preg_replace("(\r\n|\n|\r)", '', $status); // Remove CR &/ LF $status = preg_replace("/[^A-Za-z0-9]/i", '', $status); // strip everthing except alphanumerics } $sent = ''; if (isset ($_GET['sent']) && ($_GET['sent'] == 'yes' || $_GET['sent'] == 'no') ) { $sent = $_GET['sent']; } Setting vars at the section for the Mail filter Added . '&status=' . $status to: <td class="main" align="left"><?php echo 'Filter by email sent: <a href="' . tep_href_link(FILENAME_ORDERS_VENDORS, '&vendors_id=' . $vendors_id . '&line=' . $line_filter . '&status=' . $status . '&sent=yes') . '"><b>YES</a></b> <a href="' . tep_href_link(FILENAME_ORDERS_VENDORS, '&vendors_id=' . $vendors_id . '&line=' . $line_filter . '&status=' . $status . '&sent=no') . '"><b>NO</a></b>'; ?></td> Setting vars at the section for Ascending en desending Added & before vendors_id=' . $vendors_id <?php if ($line_filter == 'asc') { if ($status > 0) { ?> <td class="main" align="right"><?php echo 'Change to <a href="' . tep_href_link (FILENAME_ORDERS_VENDORS, '&vendors_id=' . $vendors_id . '&line=desc' . '&sent=' . $sent . '&status=' . $status) . '"><b>DESCENDING</a></b> order'; ?></td> <?php } else { ?> <td class="main" align="right"><?php echo 'Change to <a href="' . tep_href_link (FILENAME_ORDERS_VENDORS, '&vendors_id=' . $vendors_id . '&line=desc' . '&sent=' . $sent) . '"><b>DESCENDING</a></b> order'; ?></td> <?php } Setting vars at the section for status Added sent var to section below <td class="main" align="right"><?php echo tep_draw_form('status_report', FILENAME_ORDERS_VENDORS . '?&vendors_id=' . $vendors_id . '?&sent=' . $sent) . HEADING_TITLE_STATUS . ' '; ?><?php echo tep_draw_pull_down_menu('status', $orders_statuses, '','onChange="this.form.submit()";');?></form></td> Problem with Isset Changed the code: if (isset ($status)) { To: if ($status > 0) { Thanks for your help and if there is a better solution possible I will be glad to hear this (finding the hick-up is one, learning the best solution the other). Hope this helps some one else, on with the next page! Kind greetings, Fabien
  6. Hi Jim, In the previous post the output showed that there where seven rows of data (that made me sure I was modding the right query ;-). -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- I ran the SQL statement on my DB: select distinct orders_id, vendor_order_sent from " . TABLE_ORDERS_SHIPPING . " where vendors_id='" . $vendors_id . "' group by orders_id " . $line_filter . "" -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Result is seven rows: orders_id vendor_order_sent 33 no 32 yes 31 no 28 yes 27 no 26 yes 25 no -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Can it have something to do that during the creation I had a SQL error by creating this table (due to the SQL version)? I searched the forum and found that you have to replace TYPE to ENGINE and it worked and works for the rest of MVS. CREATE TABLE `orders_shipping` ( `orders_shipping_id` int(11) NOT NULL auto_increment, `orders_id` int(11) NOT NULL default '0', `vendors_id` int(11) NOT NULL default '1', `shipping_module` varchar(16) NOT NULL default '', `shipping_method` varchar(128) NOT NULL default '', `shipping_cost` decimal(15,4) NOT NULL default '0.000', `shipping_tax` decimal(15,4) NOT NULL default '0.000', `vendors_name` varchar(64) NOT NULL default '', `vendor_order_sent` varchar(3) NOT NULL default 'no', PRIMARY KEY (`orders_shipping_id`) ) ENGINE=MyISAM AUTO_INCREMENT=0 ; -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Database information table orders_shipping Type Collation Attributes Empty Default Extra Action 1 orders_shipping_id int(11) No No AUTO_INCREMENT 2 orders_id int(11) No 0 3 vendors_id int(11) No 1 4 shipping_module varchar(16) utf8_unicode_ci No 5 shipping_method varchar(128) utf8_unicode_ci No 6 shipping_cost decimal(15,4) No 0.0000 7 shipping_tax decimal(15,4) No 0.0000 8 vendors_name varchar(64) utf8_unicode_ci No 9 vendor_order_sent varchar(3) utf8_unicode_ci No no Thanks Jim I am learning each day! P.s. on my live shop which runs osc 2.2 and SQL 5.x this page doesn't work as well (I guess after my provider upgraded to SQL an PHP 5+) Kind greetings, Fabien
  7. Hi Jim, Thanks for your fast reaction!! I will make sure no duplicate code is in the installation. I did what you asked and still no results but some more information. The first string returns 7 rows and I have checked the DB, with all vendors it displays the correct number of rows. I have added a &$test var to see what happens and the code strands on the while statement (between the $test vars). -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Here is the relevant code. -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- // $index1 = 0; if ($sent == 'yes') { $vendors_orders_data_query = tep_db_query ("select distinct orders_id, vendor_order_sent from " . TABLE_ORDERS_SHIPPING . " where vendors_id='" . $vendors_id . "' and vendor_order_sent='yes' group by orders_id " . $line_filter . ""); } elseif ($sent == 'no') { $vendors_orders_data_query = tep_db_query ("select distinct orders_id, vendor_order_sent from " . TABLE_ORDERS_SHIPPING . " where vendors_id='" . $vendors_id . "' and vendor_order_sent='no' group by orders_id " . $line_filter . ""); } else { $vendors_orders_data_query_raw = "select distinct orders_id, vendor_order_sent from " . TABLE_ORDERS_SHIPPING . " where vendors_id='" . $vendors_id . "' group by orders_id " . $line_filter . ""; $vendors_orders_data_query = tep_db_query($vendors_orders_data_query_raw); } $test = 0; while ($vendors_orders_data = tep_db_fetch_array ($vendors_orders_data_query)) { $test = $test++; if (isset ($status)) { $orders_query = tep_db_query ("select distinct o.customers_id, o.orders_id, o.customers_name, o.payment_method, o.date_purchased, o.last_modified, o.currency, o.currency_value, s.orders_status_name, ot.text as order_total from (" . TABLE_ORDERS . " o) left join " . TABLE_ORDERS_TOTAL . " ot on (o.orders_id = ot.orders_id), " . TABLE_ORDERS_STATUS . " s where o.orders_status = '" . $status . "' and o.orders_status = s.orders_status_id and s.language_id = '" . $languages_id . "' and ot.class = 'ot_total' and o.orders_id = '" . $vendors_orders_data['orders_id'] . "' order by o." . $sort_by_filter . " ASC"); } else { $orders_query = tep_db_query ("select distinct o.customers_id, o.orders_id, o.customers_name, o.payment_method, o.date_purchased, o.last_modified, o.currency, o.currency_value, s.orders_status_name, ot.text as order_total from (" . TABLE_ORDERS . " o) left join " . TABLE_ORDERS_TOTAL . " ot on (o.orders_id = ot.orders_id), " . TABLE_ORDERS_STATUS . " s where o.orders_status = s.orders_status_id and s.language_id = '" . $languages_id . "' and ot.class = 'ot_total' and o.orders_id = '" . $vendors_orders_data['orders_id'] . "' order by o." . $sort_by_filter . " ASC"); } while ($vendors_orders = tep_db_fetch_array ($orders_query) ) { $date_purchased = $vendors_orders['date_purchased']; -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Code to view the vars: -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- print '<pre>'; print '$test = ' . ($test) . '<br>'; print '$vendors_id = ' . ($vendors_id) . '<br>'; print '$sent = ' . ($sent) . '<br>'; print '$line_filter = ' . ($line_filter) . '<br>'; print '$status = ' . ($status) . '<br>'; print '$sort_by_filter = ' . ($sort_by_filter) . '<br>'; print '$languages_id = ' . ($languages_id) . '<br>'; print '$vendors_orders_data_query_raw = '; print_r ($vendors_orders_data_query_raw); print '<br>'; print '$vendors_orders_data_query = '; print_r ($vendors_orders_data_query); print '<br>'; print '$vendors_orders_data = '; print_r ($vendors_orders_data); print '<br>'; print '$vendors_orders = '; print_r ($vendors_orders); print '<br>'; print '</pre>'; exit; -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Result on the page: -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- $test = 0 $vendors_id = 6 $sent = $line_filter = desc $status = $sort_by_filter = orders_id $languages_id = 2 $vendors_orders_data_query_raw = select distinct orders_id, vendor_order_sent from orders_shipping where vendors_id='6' group by orders_id desc $vendors_orders_data_query = mysqli_result Object ( [current_field] => 0 [field_count] => 2 [lengths] => [num_rows] => 7 [type] => 0 ) $vendors_orders_data = $vendors_orders = I hope this make sense?? Kind greetings, Fabien
  8. Dear Jim, New post, other issue with the orders_by_vendors.php, tried and searched really a lot but with no results (still learning I guess....) Problem description / information: - There is no data displayed per vendor. - When the filters are clicked the values for the filters are not set and selected vendor_ID is set to 0. - OSC version 2.3.4 - MySQL 5.5.36 - PHP Version: 5.3.28 What I have done till now (besides Google a lot): - Tried the file in your link (rar file). - Changed all to _GET and _POST, no result for both. - Added code below in application_top: $HTTP_GET_VARS = $_GET; $HTTP_POST_VARS = $_POST; $HTTP_ENV_VARS = $_ENV; $HTTP_SERVER_VARS = $_SERVER; $HTTP_COOKIE_VARS = $_COOKIE; $_REQUEST = array_merge($_GET, $_POST, $_COOKIE); - Added code below at the end of the file: print '<pre>'; print '$vendors_id = ' . ($vendors_id) . '<br>'; print '$sent = ' . ($sent) . '<br>'; print '$line_filter = ' . ($line_filter) . '<br>'; print '$status = ' . ($status) . '<br>'; print '$sort_by_filter = ' . ($sort_by_filter) . '<br>'; print '$languages_id = ' . ($languages_id) . '<br>'; print '$vendors_orders_data_query = '; print_r ($vendors_orders_data_query); print '<br>'; print '$vendors_orders_data = '; print_r ($vendors_orders_data); print '<br>'; print '$vendors_orders = '; print_r ($vendors_orders); print '<br>'; print '</pre>'; exit; The result is displayed below when I select a vendor (on opening vendor_id = 0). When I click a filter the vendor_id is set to 0 again. $vendors_id = 1 $sent = $line_filter = desc $status = $sort_by_filter = orders_id $languages_id = 2 $vendors_orders_data_query = mysqli_result Object ( [current_field] => 0 [field_count] => 2 [lengths] => [num_rows] => 7 [type] => 0 ) $vendors_orders_data = $vendors_orders = Hope you / someone can help me with some directions where to search further (it will probably be the solution for the other problems). Kind Greetings, Fabien
  9. Hi Jim, I found some other posts from you where you explain how to display the data from the variables, tnx!! With this I looked at the problem with the PDF invoice and packingslip and found out that the string $order from class\order.php returns data. The problem is that when $orders_shipping_id = is not null the string returns in a different format and nothing is displayed in de PDF.... The solution I made (there are probably better solutions...) was adding two data query's (with and without vendor ID) to the pdf_packingslip.php and one to pdf_invoice.php. if ($vID > '0'){ // specific packingslip when there is a vendor ID. $index = 0; $order_packslip_query = tep_db_query ("select vendors_id, orders_products_id, products_name, products_model, products_price, products_tax, products_quantity, final_price from " . TABLE_ORDERS_PRODUCTS . " where orders_id = '" . (int) $oID . "' and vendors_id = '" . (int) $vID . "'"); while ($order_packslip_data = tep_db_fetch_array( $order_packslip_query) ) { $packslip_products[$index] = array ( 'qty' => $order_packslip_data['products_quantity'], 'name' => $order_packslip_data['products_name'], 'model' => $order_packslip_data['products_model'], 'tax' => $order_packslip_data['products_tax'], 'price' => $order_packslip_data['products_price'], 'final_price' => $order_packslip_data['final_price'] ); $subindex = 0; $packslip_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) $order_packslip_data['orders_products_id'] . "'"); if (tep_db_num_rows ($packslip_attributes_query)) { while ($packslip_attributes = tep_db_fetch_array ($packslip_attributes_query) ) { $packslip_products[$index]['packslip_attributes'][$subindex] = array ( 'option' => $packslip_attributes['products_options'], 'value' => $packslip_attributes['products_options_values'], 'prefix' => $packslip_attributes['price_prefix'], 'price' => $packslip_attributes['options_values_price'] ); $subindex++; } } $index++; } } else { // general packingslip when there is no vendor ID. $index = 0; $order_packslip_query = tep_db_query ("select vendors_id, orders_products_id, products_name, products_model, products_price, products_tax, products_quantity, final_price from " . TABLE_ORDERS_PRODUCTS . " where orders_id = '" . (int) $oID . "'"); while ($order_packslip_data = tep_db_fetch_array( $order_packslip_query) ) { $packslip_products[$index] = array ( 'qty' => $order_packslip_data['products_quantity'], 'name' => $order_packslip_data['products_name'], 'model' => $order_packslip_data['products_model'], 'tax' => $order_packslip_data['products_tax'], 'price' => $order_packslip_data['products_price'], 'final_price' => $order_packslip_data['final_price'] ); $subindex = 0; $packslip_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) $order_packslip_data['orders_products_id'] . "'"); if (tep_db_num_rows ($packslip_attributes_query)) { while ($packslip_attributes = tep_db_fetch_array ($packslip_attributes_query) ) { $packslip_products[$index]['packslip_attributes'][$subindex] = array ( 'option' => $packslip_attributes['products_options'], 'value' => $packslip_attributes['products_options_values'], 'prefix' => $packslip_attributes['price_prefix'], 'price' => $packslip_attributes['options_values_price'] ); $subindex++; } } $index++; } } Of course I had to change the names of the vars in the rest of the file. Kind greetings, Fabien
  10. Dear Jim, ill try to compare with the alfa code and will report the results. I ran in to another problem with the PDF Packingslip module and got it fixed with a workaround. And hope to learn if there is a better solution. There is probably a underlying problem (php 5 and SQL 5) with declaring variables (and maybe the solution for my other problems). Description, in the pdf_packingslip module there was no product content displayed in the table with orders that where created with the MVS module. After implementing all the SQL code (from the order class) in the file it worked like a charm. But it was a dirty solution and don't want to solve it with a workaround. I found that it had to be something with the file: catalog\admin\includes\classes\order.php And found out that the code standed on: if (tep_not_null($this->orders_shipping_id)) { After changing the code below it still doen't work (maybe not needed and will be glad to hear this). ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- Code in MVS pack: ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- class order { var $info, $totals, $products, $customer, $delivery; function order($order_id) { $this->info = array (); $this->totals = array (); $this->products = array (); $this->customer = array (); $this->delivery = array (); $this->query($order_id); ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- Changed code in ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- //FvD 11-10-2014 MVS $shipping added class order { var $info, $totals, $products, $customer, $delivery, $shipping; function order($order_id) { $this->info = array(); $this->totals = array(); $this->products = array(); $this->customer = array(); $this->delivery = array(); //FvD 11-10-2014 MVS shipping added $this->shipping = array(); $this->query($order_id); I hope to learn if there is a proper solution for the problems with the variables and the underlying problem. Kind greetings, Fabien
  11. Dear Jim, Thanks for the response on the other tread and will as asked continue on this one. No I have installed the official version from: http://addons.oscommerce.com/info/4129. This because in the documentation of the link above there is mentioned this is an Alfa version do not use on live store ;-) I ran in quite a bit of error messages and solved a lot of them, is there a good way on sharing them so you can use it (for .e.g. a new package)? Kind greetings, Fabien
  12. Dear reader, I am a new poster on this forum (and still learning to code), so forgive me when I missed something or made mistake ;-) The first one was that I posted this on the OS 2.2. topic.... sorry. We have a shop in an old version of OSC and in this shop the MVS module is working like a charm, and is really a great module. Since the last weeks I have been trying to implement this module in the latest OSC 2.3.4. (MySQL 5.5.36 and PHP Version: 5.3.28. I have come quite far thanks to all great post on this topic and forum. But I am stuck and running mad on a few things I can't get working: 1. Account history info (account_history_info.php) Has no error messages but is not displaying the vendor specific information (order with two vendors). Checked the DB and all data is there…. Doesn’t go through the statement if (tep_not_null ($orders_shipping_id)) { Has probably something to do with this code: $orders_shipping_id = ''; $check_new_vendor_data_query = tep_db_query ("select orders_shipping_id, orders_id, ……. 2. Orders by vendor Displays no data, no error messages is not working in the old site as well, probably PHP or SQL 5 problem…. 3. Move products between vendors When I click the “update” button the screen refreshes with no errors but noting is changed in the Database. @ Jim, I have documented all errors and changes until now to get it working, so if I can help in return…. Working functionality without errors until now (in English, Dutch and German partially): Backend - Changed SQL script to update the DB - Menu item Vendors - Vendor manager - Vendor Shipping modules - Products reports - Orders (sends vendor mails, not fancy yet) Front - Checkout Shipping - Checkout Payment - Checkout Confirmation - Checkout Process (vendor mails not working jet). - … Kind greetings, Fabien
  13. Dear reader, I am a new poster on this forum (and still learning to code), so forgive me when I missed something or made mistake ;-) We have a shop in an old version of OSC and in this shop the MVS module is working like a charm, and is really a great module. Since the last weeks I have been trying to implement this module in the latest OSC 2.3.4. (MySQL 5.5.36 and PHP Version: 5.3.28. I have come quite far thanks to all great post on this topic and forum. But I am stuck and running mad on a few things I can't get working: 1. Account history info (account_history_info.php) Has no error messages but is not displaying the vendor specific information (order with two vendors). Checked the DB and all data is there…. Doesn’t go through the statement if (tep_not_null ($orders_shipping_id)) { Has probably something to do with this code: $orders_shipping_id = ''; $check_new_vendor_data_query = tep_db_query ("select orders_shipping_id, orders_id, ……. 2. Orders by vendor Displays no data, no error messages is not working in the old site as well, probably PHP or SQL 5 problem…. 3. Move products between vendors When I click the “update” button the screen refreshes with no errors but noting is changed in the Database. @ Jim, I have documented all errors and changes until now to get it working, so if I can help in return to get a 2.3.4. package…. Working functionality without errors until now (in English, Dutch and German partially): Backend - Changed SQL script to update the DB - Menu item Vendors - Vendor manager - Vendor Shipping modules - Products reports - Orders (sends vendor mails, not fancy yet) Front - Checkout Shipping - Checkout Payment - Checkout Confirmation - Checkout Process (vendor mails not working jet). - …
×
×
  • Create New...