Jump to content

bhbilbao

Members
  • Content count

    308
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by bhbilbao

  1. Is there a maner to add checkboxes in the product listing and the sse the selection in the recently viewed page. Some like a comparision checkboxes. There is other contribution for the same , except thats for the shoping. I have trying to integrate one comparsison contrib and im fighting with these (modding them). Product Specifications Whislist V3 (adding more columns) Recently Viewed
  2. bhbilbao

    Custom Product Builder

    In the options try: Enable Builder : Yes
  3. bhbilbao

    [Contribution] Products Specifications

    Installed and working. But I have questions: Is there a way to copy the specificatios from on product to other (or to varius products or a whole category) ?? I start working with this and I see that is a very slowly thing, inserting the specifications one by one. Also If yoy have a lot of Specifications in the product edit page the scroll down nevers end clicking them one by one. A lot of products have the same specifications except for one specification value. Example: 65 nm E2220 1 MB L2 2.4 GHz 800 MHz FSB DualCore 2 65 nm Retail Boxed 3years Socket775 No Yes No Yes Enhanced Intel SpeedStep® Technology◊ E2200 1 MB L2 2.2 GHz 800 MHz FSB DualCore 2 65 nm Retail Boxed 3years Socket775 No Yes No Yes Enhanced Intel SpeedStep® Technology◊ E2180 1 MB L2 2 GHz 800 MHz FSB DualCore 2 65 nm Retail Boxed 3years Socket775 No Yes No Yes Enhanced Intel SpeedStep® Technology◊ http://www.intel.com/products/processor/pentium_dual-core/specs.htm
  4. bhbilbao

    RMA Returns error for 2.2 MS2

    Forget last post. Returns_status_id must be the same.
  5. bhbilbao

    Custom Product Builder

    I have the same problem. I saw it working and then nothing. Can anybody say something on how to fix this??
  6. The problem was fixed. I removed the old ot_coupon for the version in this contrib, and began to work. One more question: ref: The only extra requirement is that you set the first 4 charachters to GIFT. So for example if you are creating a $10.00 Gift Voucher then you could set the product model to GIFT10. How o where can i change this condition. I want USER or CODE, not the GIFT
  7. checkout_payment.php Warning: Missing argument 1 for payment::javascript_validation(), called in /homepages/*/htdocs/checkout_payment.php on line 128 and defined in /homepages/*/htdocs/includes/classes/payment.php on line 84 The line84: // Start - CREDIT CLASS Gift Voucher Contribution // function javascript_validation() { function javascript_validation($coversAll) { //added the $coversAll to be able to pass whether or not the voucher will cover the whole //price or not. If it does, then let checkout proceed when just it is passed. ont understand this error.
  8. bhbilbao

    CCGV - PHP5.3 - mySQL 5

    Whith of the 3 contributions works with RMA Returns System.???
  9. bhbilbao

    RMA Returns error for 2.2 MS2

    Looking the database, the contrib acts in extrange maner when recors the status returns_status The first column is not autoincremented. The IDs are duplicating. This should be fine:
  10. bhbilbao

    RMA Returns error for 2.2 MS2

    Now I changed TABLE_PRODUCTS_RETURNS for TABLE_RETURNS and nothing. All works except didnt show the RMA Number. Fix for the Admin Refund Method: add: 'customer_method' => $refund_method, after: 'refund_payment_value' => $final_price,
  11. bhbilbao

    RMA Returns error for 2.2 MS2

    Please help with account_history_info.php RMA Returns + CCC + MVS All works fine if I remove the new queries and the return_number echo. My code: // JLM: BEGINS for ($i=0, $n=sizeof($order->products); $i<$n; $i++) { // EXPRESION SI ES UN CCC if ($order->products[$i]['model'] == "Custom") { //SENTENCIA CCC + DESCRIPTION echo ' <tr>' . "\n" . ' <td class="main" align="right" valign="top" width="30">' . $order->products[$i]['qty'] . 'x</td>' . "\n" . ' <td class="main" valign="top">' . $order->products[$i]['name'] . '<small><i>' . $order->products[$i]['description'] . '</small></i>'; // echo $return_link; echo $return_number; // echo $rma_number['rma_value']; // EXPRESION PARA QUE APAREZCA EL NUMERO DE TICKET O EL LINK A RMA if ($order->products[$i]['return'] == '1') { // si hay número RMA asignado // QUERIES // $rma_info_query = tep_db_query("select orders_product_id, products_returned from " . TABLE_ORDERS_PRODUCTS . " o where orders_product_id = '". (int)$HTTP_GET_VARS['orders_product_id'] . "' and products_returned = '1'"); $rma_info_query = tep_db_query("select p.returns_id, p.rma_value from " . TABLE_RETURNED_PRODUCTS . " p, " . TABLE_ORDERS_PRODUCTS . " o where o.orders_product_id = '". (int)$HTTP_GET_VARS['orders_product_id'] . "' and o.products_returned = '1'"); $rma_info = tep_db_fetch_array($rma_info_query); $rma_number = $rma_info['products_returned']; //SENTENCIA NUMERO RMA $return_number = '<b>' . TEXT_RMA . ' # <u><a href="' . tep_href_link(FILENAME_RETURNS_TRACK, 'action=returns_show&rma=' . $rma_number['rma_value'], 'NONSSL') . '">' . $rma_number['rma_value'] . '</a></u></b>'; //$return_number = $rma_number['rma_value']; // CONDICIONAL si NO hay número RMA asignado y el pedido se ha enviado y cobrado } elseif ($orders_status == '3') { // si NO hay número RMA asignado // QUERIES $rma_query_one = tep_db_query("SELECT returns_id FROM " . TABLE_RETURNS_PRODUCTS_DATA . " where products_id = '" . $order->products[$i]['id'] . "' and order_id = '" . $HTTP_GET_VARS['order_id'] . "'"); $rma_query = tep_db_fetch_array($rma_query_one); $rma_number_query = tep_db_query("SELECT rma_value FROM " . TABLE_RETURNS . " where returns_id = '" . $rma_query['returns_id'] . "'"); $rma_result = tep_db_fetch_array($rma_number_query); //SENTENCIA LINK $return_link = '<a href="' . tep_href_link(FILENAME_RETURN, 'order_id=' . $HTTP_GET_VARS['order_id'] . '&products_id=' . ($order->products[$i]['id']), 'NONSSL') . '"><b><u>' . TEXT_RETURN_PRODUCT .'</a></u></b>'; } echo $return_number; //CONDICIONAL DE LO CONTRARIO }else{ //SENTENCIA PRODUCTO + OPCIONES echo ' <tr>' . ' <td class="main" align="right" valign="top" width="30">' . $order->products[$i]['qty'] . 'x</td>' . "\n" . ' <td class="main" valign="top">' . $order->products[$i]['name']; } if ( (isset($order->products[$i]['attributes'])) && (sizeof($order->products[$i]['attributes']) > 0) ) { for ($j=0, $n2=sizeof($order->products[$i]['attributes']); $j<$n2; $j++) { echo '<br><nobr><small> <i> - ' . $order->products[$i]['attributes'][$j]['option'] . ': ' . $order->products[$i]['attributes'][$j]['value'] . '</i></small></nobr>'; } } // echo $return_link; echo $return_number; // echo $rma_number['rma_value']; // EXPRESION PARA QUE APAREZCA EL NUMERO DE TICKET O EL LINK A RMA if ($order->products[$i]['return'] == '1') { // si hay número RMA asignado // QUERIES $rma_info_query = tep_db_query("select p.returns_id, p.rma_value from " . TABLE_RETURNED_PRODUCTS . " p, " . TABLE_ORDERS_PRODUCTS . " o where o.orders_product_id = '". (int)$HTTP_GET_VARS['orders_product_id'] . "' and o.products_returned = '1'"); $rma_info = tep_db_fetch_array($rma_info_query); $rma_number = $rma_info['products_returned']; //SENTENCIA NUMERO RMA // $return_number = '<b>' . TEXT_RMA . ' # <u><a href="' . tep_href_link(FILENAME_RETURNS_TRACK, 'action=returns_show&rma=' . $rma_number['rma_value'], 'NONSSL') . '">' . $rma_number['rma_value'] . '</a></u></b>'; $return_number = $rma_number['rma_value']; // CONDICIONAL si NO hay número RMA asignado y el pedido se ha enviado y cobrado } elseif ($orders_status == '3') { // si NO hay número RMA asignado // QUERIES $rma_query_one = tep_db_query("SELECT returns_id FROM " . TABLE_RETURNS_PRODUCTS_DATA . " where products_id = '" . $order->products[$i]['id'] . "' and order_id = '" . $HTTP_GET_VARS['order_id'] . "'"); $rma_query = tep_db_fetch_array($rma_query_one); $rma_number_query = tep_db_query("SELECT rma_value FROM " . TABLE_RETURNS . " where returns_id = '" . $rma_query['returns_id'] . "'"); $rma_result = tep_db_fetch_array($rma_number_query); //SENTENCIA LINK $return_link = '<a href="' . tep_href_link(FILENAME_RETURN, 'order_id=' . $HTTP_GET_VARS['order_id'] . '&products_id=' . ($order->products[$i]['id']), 'NONSSL') . '"><b><u>' . TEXT_RETURN_PRODUCT .'</a></u></b>'; } echo $return_number; echo '</td>' . "\n"; // JLM: End RMA Returns if (sizeof($order->info['tax_groups']) > 1) { echo ' <td class="main" valign="top" align="right">' . tep_display_tax_value($order->products[$i]['tax']) . '%</td>' . "\n"; } echo ' <td class="price" align="right" valign="top">' . $currencies->format(tep_add_tax($order->products[$i]['final_price'], $order->products[$i]['tax']) * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value']) . '</td>' . "\n" . ' </tr>' . "\n"; } //MVS } ?>
  12. bhbilbao

    RMA Returns error for 2.2 MS2

    If anyone knows why Refund Method: will not change when updating it in the admin of RMA Returns please let me know, it's driving me nuts I have installed the contrib 3 times freshly and I have read this WHOLE! thread and only see one mention with NO answer I have the same problem! This line: $return_link = '<b>' . TEXT_RMA . ' # <u><a href="' . tep_href_link(FILENAME_RETURNS_TRACK, 'action=returns_show&rma=' . $rma_result['rma_value'], 'NONSSL') . '">' . $rma_result['rma_value'] . '</a></u></b>'; It not show any number (blank) after customer ask for RMA.
  13. bhbilbao

    Multi_Vendor_Shipping new thread

    Support for RMA Retuns : in catalog/includes/vendor_order_info.php look for: if ($these_products[$l]['orders_products'][$i]['attributes'][$j]['price'] != '0') echo ' (' . $these_products[$l]['orders_products'][$i]['attributes'][$j]['prefix'] . $currencies->format($these_products[$l]['orders_products'][$i]['attributes'][$j]['price'] * $these_products[$l]['orders_products'][$i]['qty'], true, $these_info['currency'], $these_info['currency_value']) . ')'; echo '</i></small></nobr>'; } } ADD AFTER: if ($order->products[$i]['return'] == '1') { $rma_query_one = tep_db_query("SELECT returns_id FROM " . TABLE_RETURNS_PRODUCTS_DATA . " where products_id = '" . $order->products[$i]['id'] . "' and order_id = '" . $HTTP_GET_VARS['order_id'] . "'"); $rma_query = tep_db_fetch_array($rma_query_one); $rma_number_query = tep_db_query("SELECT rma_value FROM " . TABLE_RETURNS . " where returns_id = '" . $rma_query['returns_id'] . "'"); $rma_result = tep_db_fetch_array($rma_number_query); $return_link = '<b>' . TEXT_RMA . ' # <u><a href="' . tep_href_link(FILENAME_RETURNS_TRACK, 'action=returns_show&rma=' . $rma_result['rma_value'], 'NONSSL') . '">' . $rma_result['rma_value'] . '</a></u></b>'; } elseif ($orders_status == '3') { // si NO hay número RMA asignado $return_link = '<a href="' . tep_href_link(FILENAME_RETURN, 'order_id=' . $HTTP_GET_VARS['order_id'] . '&products_id=' . ($order->products[$i]['id']), 'NONSSL') . '"><b><u>' . TEXT_RETURN_PRODUCT .'</a></u></b>'; } echo $return_link;
  14. bhbilbao

    RMA Returns error for 2.2 MS2

    Anybody knows what is this function for?? <td class="main" width=95%>Url<?php // echo tep_draw_input_field('link_url'); ?> If not comented appears a white box on the rma returns page.
  15. bhbilbao

    Alphabetical Search - [support]

    Help with my code. I have other filters installed. I dont know how to modify. My original code: // show the products of a specified manufacturer if (isset($HTTP_GET_VARS['manufacturers_id'])) { if (isset($HTTP_GET_VARS['filter_id']) && tep_not_null($HTTP_GET_VARS['filter_id'])) { // We are asked to show only a specific category // p.products_date_added to query for New Product Icon contribution $listing_sql = "select " . $select_column_list . " p.products_date_added, p.products_id, p.products_recent_sales, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$HTTP_GET_VARS['filter_id'] . "'" . $new_products_where . ""; } else { // We show them all // p.products_date_added to query for New Product Icon contribution $listing_sql = "select " . $select_column_list . " p.products_date_added, p.products_id, p.products_recent_sales, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "' and p.products_id = p2c.products_id " . $new_products_where . " and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'"; } } else { // show the products in a given categorie // p.products_date_added to query for New Product Icon contribution if (isset($HTTP_GET_VARS['filter_id']) && tep_not_null($HTTP_GET_VARS['filter_id'])) { // We are asked to show only specific catgeory $listing_sql = "select " . $select_column_list . " p.products_date_added, p.products_id, p.products_recent_sales, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['filter_id'] . "' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$current_category_id . "'" . $new_products_where . ""; } else { // We show them all // p.products_date_added to query for New Product Icon contribution $listing_sql = "select " . $select_column_list . " p.products_date_added, p.products_id, p.products_recent_sales, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$current_category_id . "'" . $new_products_where . ""; } } // sort order by drop down menu Code working now without filter AZ: // show the products of a specified manufacturer if (isset($HTTP_GET_VARS['manufacturers_id'])) { // Filter Category Alphabetically - begin if (isset($_GET['alpha'])) { $listing_sql = "select " . $select_column_list . " p.products_date_added, p.products_id, p.products_recent_sales, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.products_name like '" . $_GET['alpha'] . "%' and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$_SESSION['last_cat'] ."'"; } elseif(isset($HTTP_GET_VARS['filter_id']) && tep_not_null($HTTP_GET_VARS['filter_id'])) { // We are asked to show only a specific category // p.products_date_added to query for New Product Icon contribution $listing_sql = "select " . $select_column_list . " p.products_date_added, p.products_id, p.products_recent_sales, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$HTTP_GET_VARS['filter_id'] . "'" . $new_products_where . ""; } else { // We show them all // p.products_date_added to query for New Product Icon contribution $listing_sql = "select " . $select_column_list . " p.products_date_added, p.products_id, p.products_recent_sales, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "' and p.products_id = p2c.products_id " . $new_products_where . " and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'"; } } else { // show the products in a given categorie // p.products_date_added to query for New Product Icon contribution if (isset($HTTP_GET_VARS['filter_id']) && tep_not_null($HTTP_GET_VARS['filter_id'])) { // We are asked to show only specific catgeory $listing_sql = "select " . $select_column_list . " p.products_date_added, p.products_id, p.products_recent_sales, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['filter_id'] . "' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$current_category_id . "'" . $new_products_where . ""; } else { // We show them all // p.products_date_added to query for New Product Icon contribution $listing_sql = "select " . $select_column_list . " p.products_date_added, p.products_id, p.products_recent_sales, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$current_category_id . "'" . $new_products_where . ""; } } // sort order by drop down menu
  16. bhbilbao

    Multi_Vendor_Shipping new thread

    I had same problem but them started to work. I dont know exactly how it fixed. I think began to work after installing one of these contributions. 117. Send HTML Email V2_1 118. Send Admin HTML e-mails 1.5 119. Fancier_invoice 120. Email HTML Order Link 133. Complete Reviews System The archive is vendor_email_send.php i looked it and is the same as original. Look for mail.php or html_output.php
  17. bhbilbao

    Multi_Vendor_Shipping new thread

    the error has to be somewhere above that point :lol: It was in front of my face! before: 'products_tax' => $order->products[$i]['tax'], 'products_quantity' => $order->products[$i]['qty']); tep_db_perform(TABLE_ORDERS_PRODUCTS, $sql_data_array); $price_nozeroes = $order->products[$i]['final_price']; $price_nozeroes = str_replace(',', '.', $price_nozeroes); tep_db_query("update ". TABLE_ORDERS_PRODUCTS . " set final_price = " . $price_nozeroes . " where orders_id = " . $insert_id . " and products_id = " . tep_get_prid($order->products[$i]['id']) ); $order_products_id = tep_db_insert_id(); //------insert customer choosen option to order-------- $attributes_exist = '0'; $products_ordered_attributes = ''; after: 'final_price' => str_replace(',', '.', $order->products[$i]['final_price']), 'products_tax' => $order->products[$i]['tax'], 'products_quantity' => $order->products[$i]['qty']); tep_db_perform(TABLE_ORDERS_PRODUCTS, $sql_data_array); // $price_nozeroes = $order->products[$i]['final_price']; // $price_nozeroes = str_replace(',', '.', $price_nozeroes); // tep_db_query("update ". TABLE_ORDERS_PRODUCTS . " set final_price = " . $price_nozeroes . " where orders_id = " . $insert_id . " and products_id = " . tep_get_prid($order->products[$i]['id']) ); $order_products_id = tep_db_insert_id(); //------insert customer choosen option to order-------- $attributes_exist = '0'; $products_ordered_attributes = ''; Now going to work on ADMIN PDF INVOICE for MVS and then SuppliersV2 for MVS.
  18. bhbilbao

    Sort Products By Dropdown

    Get working! added to includes/languages/*/index.php define('TEXT_FILTER_ALL', 'Todos'); define('TEXT_FILTER_FROM', 'Desde'); define('TEXT_FILTER_TO', 'hasta 50€'); define('TEXT_FILTER_BY', 'ORDENAR'); define('TEXT_FILTER_AZ', 'AZ- ascendente por Nombre.'); define('TEXT_FILTER_ZA', 'ZA - descendente por Nombre.'); define('TEXT_FILTER_MINORPRICE', '< - de menor a mayor Precio.'); define('TEXT_FILTER_MAYORPRICE', '> - de mayor a menor Precio.'); define('TEXT_FILTER_BEST', 'los más vendidos.'); define('TEXT_SHOW', 'FILTRAR:'); define('TEXT_SHOW2', 'PRECIO:>'); index.php $select_column_list = ''; for ($i=0, $n=sizeof($column_list); $i<$n; $i++) { switch ($column_list[$i]) { case 'PRODUCT_LIST_MODEL': $select_column_list .= 'p.products_model, '; break; case 'PRODUCT_LIST_NAME': $select_column_list .= 'pd.products_name, '; break; case 'PRODUCT_LIST_30SALES': $select_column_list .= 'p.products_recent_sales, '; break; case 'PRODUCT_LIST_MANUFACTURER': $select_column_list .= 'm.manufacturers_name, '; break; case 'PRODUCT_LIST_QUANTITY': $select_column_list .= 'p.products_quantity, '; break; case 'PRODUCT_LIST_IMAGE': $select_column_list .= 'p.products_image, '; break; case 'PRODUCT_LIST_WEIGHT': $select_column_list .= 'p.products_weight, '; break; case 'PRODUCT_LIST_AVAILABLE': $select_column_list .= 'p.products_date_available, '; break; } } // Unless Customer logged in show products if (!tep_session_is_registered('customer_id')) { $new_products_where=" and p2c.categories_id <> '$restricted_category' "; } else { $new_products_where=''; } // show the products of a specified manufacturer if (isset($HTTP_GET_VARS['manufacturers_id'])) { if (isset($HTTP_GET_VARS['filter_id']) && tep_not_null($HTTP_GET_VARS['filter_id'])) { // We are asked to show only a specific category // p.products_date_added to query for New Product Icon contribution $listing_sql = "select " . $select_column_list . " p.products_date_added, p.products_id, p.products_recent_sales, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$HTTP_GET_VARS['filter_id'] . "'" . $new_products_where . ""; } else { // We show them all // p.products_date_added to query for New Product Icon contribution $listing_sql = "select " . $select_column_list . " p.products_date_added, p.products_id, p.products_recent_sales, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "' and p.products_id = p2c.products_id " . $new_products_where . " and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'"; } } else { // show the products in a given categorie // p.products_date_added to query for New Product Icon contribution if (isset($HTTP_GET_VARS['filter_id']) && tep_not_null($HTTP_GET_VARS['filter_id'])) { // We are asked to show only specific catgeory $listing_sql = "select " . $select_column_list . " p.products_date_added, p.products_id, p.products_recent_sales, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['filter_id'] . "' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$current_category_id . "'" . $new_products_where . ""; } else { // We show them all // p.products_date_added to query for New Product Icon contribution $listing_sql = "select " . $select_column_list . " p.products_date_added, p.products_id, p.products_recent_sales, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$current_category_id . "'" . $new_products_where . ""; } } // sort order by drop down menu if ( (!isset($HTTP_GET_VARS['sort'])) || (!ereg('^[1-8][ad]$', $HTTP_GET_VARS['sort'])) || (substr($HTTP_GET_VARS['sort'], 0, 1) > sizeof($column_list)) ) { // if ( (!isset($HTTP_GET_VARS['sortdir'])) || (!isset($HTTP_GET_VARS['sortcol'])) || (!ereg('[1-8]', $HTTP_GET_VARS['sortcol'])) || (!ereg('[ad]', $HTTP_GET_VARS['sortdir'])) || ($HTTP_GET_VARS['sortcol'] > sizeof($column_list)) ) { // sort order by drop down menu for ($i=0, $n=sizeof($column_list); $i<$n; $i++) { // if ($column_list[$i] == 'PRODUCT_LIST_NAME') { if ($column_list[$i] == 'PRODUCT_LIST_30SALES') { // sort order by drop down menu $HTTP_GET_VARS['sort'] = $i+1 . 'a'; // $HTTP_GET_VARS['sortcol'] = $i+1; $HTTP_GET_VARS['sortdir'] = 'a'; // sort order by drop down menu // $listing_sql .= " order by pd.products_name"; $listing_sql .= " order by p.products_recent_sales desc, pd.products_name desc"; break; } } } else { // sort order by drop down menu $sort_col = substr($HTTP_GET_VARS['sort'], 0 , 1); $sort_order = substr($HTTP_GET_VARS['sort'], 1); // $sort_col = $HTTP_GET_VARS['sortcol']; // $sort_order = $HTTP_GET_VARS['sortdir']; // sort order by drop down menu switch ($column_list[$sort_col-1]) { case 'PRODUCT_LIST_MODEL': $listing_sql .= " order by p.products_model " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name"; break; case 'PRODUCT_LIST_NAME': $listing_sql .= " order by pd.products_name " . ($sort_order == 'd' ? 'desc' : ''); break; case 'PRODUCT_LIST_30SALES': $listing_sql .= "order by p.products_recent_sales desc, pd.products_name desc"; break; // case 'PRODUCT_LIST_30SALES': // $listing_sql .= " order by p.products_recent_sales, pd.products_name desc " . ($sort_order == 'd' ? 'desc' : ''); // break; // case 'PRODUCT_LIST_30SALES': // $listing_sql .= " order by p.products_recent_sales " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name desc"; // break; case 'PRODUCT_LIST_MANUFACTURER': $listing_sql .= " order by m.manufacturers_name " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name"; break; case 'PRODUCT_LIST_QUANTITY': $listing_sql .= " order by p.products_quantity " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name"; break; case 'PRODUCT_LIST_IMAGE': $listing_sql .= " order by pd.products_name"; break; case 'PRODUCT_LIST_WEIGHT': $listing_sql .= " order by p.products_weight " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name"; break; case 'PRODUCT_LIST_AVAILABLE': $listing_sql .= "p.products_date_available " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name"; break; case 'PRODUCT_LIST_PRICE': $listing_sql .= " order by final_price " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name"; break; case 'PRODUCT_LIST_PRICE_EX': $listing_sql .= " order by final_price " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name"; break; } } ?> <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr > <td class="pageHeading"><?php echo HEADING_TITLE; ?></td> <?php // optional Product List Filter if (PRODUCT_LIST_FILTER < 100) { if (isset($HTTP_GET_VARS['manufacturers_id'])) { $filterlist_sql = "select distinct c.categories_id as id, cd.categories_name as name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where p.products_status = '1' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and p2c.categories_id = cd.categories_id" . $new_products_where . " and cd.language_id = '" . (int)$languages_id . "' and p.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "' order by cd.categories_name"; } else { $filterlist_sql= "select distinct m.manufacturers_id as id, m.manufacturers_name as name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_MANUFACTURERS . " m where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and p.products_id = p2c.products_id and p2c.categories_id = '" . (int)$current_category_id . "'" . $new_products_where . " order by m.manufacturers_name"; } $filterlist_query = tep_db_query($filterlist_sql); if (tep_db_num_rows($filterlist_query) < 100) { echo ' <td align="right" class="blue">' . tep_draw_form('filter', FILENAME_DEFAULT, 'get') . TEXT_SHOW . ' '; if (isset($HTTP_GET_VARS['manufacturers_id'])) { echo tep_draw_hidden_field('manufacturers_id', $HTTP_GET_VARS['manufacturers_id']); $options = array(array('id' => '', 'text' => TEXT_ALL_CATEGORIES)); } else { echo tep_draw_hidden_field('cPath', $cPath); $options = array(array('id' => '', 'text' => TEXT_ALL_MANUFACTURERS)); } // sort order by drop down menu echo tep_draw_hidden_field('sort', $HTTP_GET_VARS['sort']); // echo tep_draw_hidden_field('sortcol', $HTTP_GET_VARS['sortcol']); echo tep_draw_hidden_field('sortdir', $HTTP_GET_VARS['sortdir']); // sort order by drop down menu while ($filterlist = tep_db_fetch_array($filterlist_query)) { $options[] = array('id' => $filterlist['id'], 'text' => $filterlist['name']); } echo tep_draw_pull_down_menu('filter_id', $options, (isset($HTTP_GET_VARS['filter_id']) ? $HTTP_GET_VARS['filter_id'] : ''), 'onchange="this.form.submit()"'); echo tep_hide_session_id() . ' </form> </td>' . "\n"; } // Additional Products Sort echo ' <td align="center" class="blue">' . tep_draw_form('sort', FILENAME_DEFAULT, 'get') . TEXT_FILTER_BY . ' '; if (isset($HTTP_GET_VARS['manufacturers_id'])) { echo tep_draw_hidden_field('manufacturers_id', $HTTP_GET_VARS['manufacturers_id']); } else { echo tep_draw_hidden_field('cPath', $cPath); } $sort_list = array( '12d' => TEXT_FILTER_BEST, // '4a' => TEXT_FILTER_AZ, '4a' => TEXT_FILTER_AZ, '4d' => TEXT_FILTER_ZA, '5a' => TEXT_FILTER_MINORPRICE, '5d' => TEXT_FILTER_MAYORPRICE // '12d' => TEXT_FILTER_BEST '' ); foreach($sort_list as $id=>$text) { $sort_range[] = array('id' => $id, 'text' => $text); } echo tep_draw_pull_down_menu('sort', $sort_range, (isset($HTTP_GET_VARS['sort']) ? $HTTP_GET_VARS['sort'] : ''), 'onchange="this.form.submit()"'); echo tep_draw_hidden_field('filter_id', (isset($HTTP_GET_VARS['filter_id']) ? $HTTP_GET_VARS['filter_id'] : '')); echo tep_hide_session_id() . '</form></td>' . "\n"; // End Additional Products Sort // Get the right image for the top-right $image = DIR_WS_IMAGES . 'table_background_list.gif'; if (isset($HTTP_GET_VARS['manufacturers_id'])) { $image = tep_db_query("select manufacturers_image from " . TABLE_MANUFACTURERS . " where manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'"); $image = tep_db_fetch_array($image); $image = $image['manufacturers_image']; } elseif ($current_category_id) { $image = tep_db_query("select categories_image from " . TABLE_CATEGORIES . " where categories_id = '" . (int)$current_category_id . "'"); $image = tep_db_fetch_array($image); $image = $image['categories_image']; } // -------------- SORT BY PRICE -------------- // $filterlist_sql= "select distinct p.products_price as id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.products_id = p2c.products_id and p2c.categories_id = '" . (int)$current_category_id . "' order by p.products_price"; $categorie = $current_category_id; $filterlist_query = tep_db_query($filterlist_sql); if (tep_db_num_rows($filterlist_query) > 1) { echo ' <td align="left" class="blue">' . tep_draw_form('filter', 'advanced_search_result.php', 'get') . TEXT_SHOW2 . ' '; echo tep_draw_hidden_field('categories_id', $categorie); $options = array(array('id' => '', 'text' => TEXT_FILTER_ALL ));
  19. bhbilbao

    Sort Products By Dropdown

    In this part are the forms: <td class="pageHeading"><?php echo HEADING_TITLE; ?></td> <?php // optional Product List Filter if (PRODUCT_LIST_FILTER < 100) { if (isset($HTTP_GET_VARS['manufacturers_id'])) { $filterlist_sql = "select distinct c.categories_id as id, cd.categories_name as name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where p.products_status = '1' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and p2c.categories_id = cd.categories_id" . $new_products_where . " and cd.language_id = '" . (int)$languages_id . "' and p.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "' order by cd.categories_name"; } else { $filterlist_sql= "select distinct m.manufacturers_id as id, m.manufacturers_name as name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_MANUFACTURERS . " m where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and p.products_id = p2c.products_id and p2c.categories_id = '" . (int)$current_category_id . "'" . $new_products_where . " order by m.manufacturers_name"; } $filterlist_query = tep_db_query($filterlist_sql); if (tep_db_num_rows($filterlist_query) < 100) { echo ' <td align="right">' . tep_draw_form('filter', FILENAME_DEFAULT, 'get') . TEXT_SHOW . ' '; if (isset($HTTP_GET_VARS['manufacturers_id'])) { echo tep_draw_hidden_field('manufacturers_id', $HTTP_GET_VARS['manufacturers_id']); $options = array(array('id' => '', 'text' => TEXT_ALL_CATEGORIES)); } else { echo tep_draw_hidden_field('cPath', $cPath); $options = array(array('id' => '', 'text' => TEXT_ALL_MANUFACTURERS)); } // sort order by drop down menu // echo tep_draw_hidden_field('sort', $HTTP_GET_VARS['sort']); echo tep_draw_hidden_field('sortcol', $HTTP_GET_VARS['sortcol']); echo tep_draw_hidden_field('sortdir', $HTTP_GET_VARS['sortdir']); // sort order by drop down menu while ($filterlist = tep_db_fetch_array($filterlist_query)) { $options[] = array('id' => $filterlist['id'], 'text' => $filterlist['name']); } echo tep_draw_pull_down_menu('filter_id', $options, (isset($HTTP_GET_VARS['filter_id']) ? $HTTP_GET_VARS['filter_id'] : ''), 'onchange="this.form.submit()"'); echo tep_hide_session_id() . '</form></td>' . "\n"; } // Additional Products Sort echo '<td align="center" class="dynamicMain">' . tep_draw_form('sort', FILENAME_DEFAULT, 'get') . '<b>Sort by:</b> '; if (isset($HTTP_GET_VARS['manufacturers_id'])) { echo tep_draw_hidden_field('manufacturers_id', $HTTP_GET_VARS['manufacturers_id']); } else { echo tep_draw_hidden_field('cPath', $cPath); } $sort_list = array('12d' => 'Best Sellers', '4a' => 'Products Name A to Z', '4d' => 'Products Name Z to A', '5a' => 'Price Low to High', '5d' => 'Price High to Low'); foreach($sort_list as $id=>$text) { $sort_range[] = array('id' => $id, 'text' => $text); } echo tep_draw_pull_down_menu('sort', $sort_range, (isset($HTTP_GET_VARS['sort']) ? $HTTP_GET_VARS['sort'] : ''), 'onchange="this.form.submit()"'); echo tep_draw_hidden_field('filter_id', (isset($HTTP_GET_VARS['filter_id']) ? $HTTP_GET_VARS['filter_id'] : '')); echo '</form></td>' . "\n"; // End Additional Products Sort // Get the right image for the top-right $image = DIR_WS_IMAGES . 'table_background_list.gif'; if (isset($HTTP_GET_VARS['manufacturers_id'])) { $image = tep_db_query("select manufacturers_image from " . TABLE_MANUFACTURERS . " where manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'"); $image = tep_db_fetch_array($image); $image = $image['manufacturers_image']; } elseif ($current_category_id) { $image = tep_db_query("select categories_image from " . TABLE_CATEGORIES . " where categories_id = '" . (int)$current_category_id . "'"); $image = tep_db_fetch_array($image); $image = $image['categories_image']; }
  20. bhbilbao

    Sort Products By Dropdown

    I need help with this contribution. Works fine but... Im using other contribution (Better Product Display and Listing). That contribution dont use colums. The conjob with the Best sellers works but when I filter products AZ or Price-+ nothing happens. This is may code: // sort order by drop down menu // if ( (!isset($HTTP_GET_VARS['sort'])) || (!ereg('^[1-8][ad]$', $HTTP_GET_VARS['sort'])) || (substr($HTTP_GET_VARS['sort'], 0, 1) > sizeof($column_list)) ) { if ( (!isset($HTTP_GET_VARS['sortdir'])) || (!isset($HTTP_GET_VARS['sortcol'])) || (!ereg('[1-8]', $HTTP_GET_VARS['sortcol'])) || (!ereg('[ad]', $HTTP_GET_VARS['sortdir'])) || ($HTTP_GET_VARS['sortcol'] > sizeof($column_list)) ) { // sort order by drop down menu for ($i=0, $n=sizeof($column_list); $i<$n; $i++) { if ($column_list[$i] == 'PRODUCT_LIST_30SALES') { // sort order by drop down menu // $HTTP_GET_VARS['sort'] = $i+1 . 'a'; $HTTP_GET_VARS['sortcol'] = $i+1; $HTTP_GET_VARS['sortdir'] = 'a'; // sort order by drop down menu $listing_sql .= " order by p.products_recent_sales desc, pd.products_name desc"; break; } } } else { // sort order by drop down menu // $sort_col = substr($HTTP_GET_VARS['sort'], 0 , 1); // $sort_order = substr($HTTP_GET_VARS['sort'], 1); $sort_col = $HTTP_GET_VARS['sortcol']; $sort_order = $HTTP_GET_VARS['sortdir']; // sort order by drop down menu switch ($column_list[$sort_col-1]) { case 'PRODUCT_LIST_MODEL': $listing_sql .= " order by p.products_model " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name"; break; case 'PRODUCT_LIST_NAME': $listing_sql .= " order by pd.products_name " . ($sort_order == 'd' ? 'desc' : ''); break; // case 'PRODUCT_LIST_30SALES': // $listing_sql .= "order by p.products_recent_sales desc, pd.products_name desc"; // break; // case 'PRODUCT_LIST_30SALES': // $listing_sql .= " order by p.products_recent_sales, pd.products_name desc " . ($sort_order == 'd' ? 'desc' : ''); // break; case 'PRODUCT_LIST_30SALES': $listing_sql .= " order by p.products_recent_sales " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name desc"; break;
  21. bhbilbao

    Multi_Vendor_Shipping new thread

    I also looked in classes/oerder.php Don´t know why it doesn´t record order_product_id. With 153 contibutions installed i dont know where is the code that cause that error. Tomorrow I will start from 0 with a clean osc install.
  22. bhbilbao

    Multi_Vendor_Shipping new thread

    When replying the forum gets 500-INTERNAL SERVER ERROR. Now , my post are duplicating. ¿?
  23. bhbilbao

    Multi_Vendor_Shipping new thread

    Yes Jim. Its in checkout_process.php, exactly when clicking the checkout confirmation button. THERE IS NO RECORDS IN order_product_id COLUMN.(IN THE TABLE orders_products_atributes)! All records appear as 0[/b]. ¿? If I edit them on hand all works fine. I know isn´t problem of the MVS contrib. But i dont see nothing extrange. The code is the same as a vanilla instalation: checkout_process.php ...> $order_products_id = tep_db_insert_id(); //------insert customer choosen option to order-------- $attributes_exist = '0'; $products_ordered_attributes = ''; if (isset($order->products[$i]['attributes'])) { $attributes_exist = '1'; for ($j=0, $n2=sizeof($order->products[$i]['attributes']); $j<$n2; $j++) { if (DOWNLOAD_ENABLED == 'true') { $attributes_query = "select popt.products_options_name, poval.products_options_values_name, pa.options_values_price, pa.price_prefix, pad.products_attributes_maxdays, pad.products_attributes_maxcount , pad.products_attributes_filename from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_OPTIONS_VALUES . " poval, " . TABLE_PRODUCTS_ATTRIBUTES . " pa left join " . TABLE_PRODUCTS_ATTRIBUTES_DOWNLOAD . " pad on pa.products_attributes_id=pad.products_attributes_id where pa.products_id = '" . $order->products[$i]['id'] . "' and pa.options_id = '" . $order->products[$i]['attributes'][$j]['option_id'] . "' and pa.options_id = popt.products_options_id and pa.options_values_id = '" . $order->products[$i]['attributes'][$j]['value_id'] . "' and pa.options_values_id = poval.products_options_values_id and popt.language_id = '" . $languages_id . "' and poval.language_id = '" . $languages_id . "'"; $attributes = tep_db_query($attributes_query); } else { $attributes = tep_db_query("select popt.products_options_name, poval.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_OPTIONS_VALUES . " poval, " . TABLE_PRODUCTS_ATTRIBUTES . " pa where pa.products_id = '" . $order->products[$i]['id'] . "' and pa.options_id = '" . $order->products[$i]['attributes'][$j]['option_id'] . "' and pa.options_id = popt.products_options_id and pa.options_values_id = '" . $order->products[$i]['attributes'][$j]['value_id'] . "' and pa.options_values_id = poval.products_options_values_id and popt.language_id = '" . $languages_id . "' and poval.language_id = '" . $languages_id . "'"); } $attributes_values = tep_db_fetch_array($attributes); $sql_data_array = array('orders_id' => $insert_id, 'orders_products_id' => $order_products_id, 'products_options' => $attributes_values['products_options_name'], 'products_options_values' => $attributes_values['products_options_values_name'], 'options_values_price' => $attributes_values['options_values_price'], 'price_prefix' => $attributes_values['price_prefix']); tep_db_perform(TABLE_ORDERS_PRODUCTS_ATTRIBUTES, $sql_data_array); if ((DOWNLOAD_ENABLED == 'true') && isset($attributes_values['products_attributes_filename']) && tep_not_null($attributes_values['products_attributes_filename'])) { $sql_data_array = array('orders_id' => $insert_id, 'orders_products_id' => $order_products_id, 'orders_products_filename' => $attributes_values['products_attributes_filename'], 'download_maxdays' => $attributes_values['products_attributes_maxdays'], 'download_count' => $attributes_values['products_attributes_maxcount']); tep_db_perform(TABLE_ORDERS_PRODUCTS_DOWNLOAD, $sql_data_array); } $products_ordered_attributes .= "\n\t" . $attributes_values['products_options_name'] . ' ' . $attributes_values['products_options_values_name']; } } //------insert customer choosen option eof ---- //BEGIN SEND HTML MAIL// also looked in: includes/application_top.php nothing. includes/general.php // Return a product ID with attributes function tep_get_uprid($prid, $params) { if (is_numeric($prid)) { $uprid = $prid; if (is_array($params) && (sizeof($params) > 0)) { $attributes_check = true; $attributes_ids = ''; reset($params); while (list($option, $value) = each($params)) { if (is_numeric($option) && is_numeric($value)) { $attributes_ids .= '{' . (int)$option . '}' . (int)$value; } else { $attributes_check = false; break; } } if ($attributes_check == true) { $uprid .= $attributes_ids; } } } else { $uprid = tep_get_prid($prid); if (is_numeric($uprid)) { if (strpos($prid, '{') !== false) { $attributes_check = true; $attributes_ids = ''; // Return a product ID from a product ID with attributes function tep_get_prid($uprid) { $pieces = explode('{', $uprid); if (is_numeric($pieces[0])) { return $pieces[0]; } else { return false; } } //// // Check if product has attributes function tep_has_product_attributes($products_id) { $attributes_query = tep_db_query("select count(*) as count from " . TABLE_PRODUCTS_ATTRIBUTES . " where products_id = '" . (int)$products_id . "'"); $attributes = tep_db_fetch_array($attributes_query); if ($attributes['count'] > 0) { return true; } else { return false; } }
  24. bhbilbao

    Multi_Vendor_Shipping new thread

    Yes Jim. Its in checkout_process.php, exactly when clicking the checkout confirmation button. THERE IS NO RECORDS IN order_product_id COLUMN.(IN THE TABLE orders_products_atributes)! All records appear as 0[/b]. ¿? If I edit them on hand all works fine. I know isn´t problem of the MVS contrib. But i dont see nothing extrange. The code is the same as a vanilla instalation: checkout_process.php ...> $order_products_id = tep_db_insert_id(); //------insert customer choosen option to order-------- $attributes_exist = '0'; $products_ordered_attributes = ''; if (isset($order->products[$i]['attributes'])) { $attributes_exist = '1'; for ($j=0, $n2=sizeof($order->products[$i]['attributes']); $j<$n2; $j++) { if (DOWNLOAD_ENABLED == 'true') { $attributes_query = "select popt.products_options_name, poval.products_options_values_name, pa.options_values_price, pa.price_prefix, pad.products_attributes_maxdays, pad.products_attributes_maxcount , pad.products_attributes_filename from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_OPTIONS_VALUES . " poval, " . TABLE_PRODUCTS_ATTRIBUTES . " pa left join " . TABLE_PRODUCTS_ATTRIBUTES_DOWNLOAD . " pad on pa.products_attributes_id=pad.products_attributes_id where pa.products_id = '" . $order->products[$i]['id'] . "' and pa.options_id = '" . $order->products[$i]['attributes'][$j]['option_id'] . "' and pa.options_id = popt.products_options_id and pa.options_values_id = '" . $order->products[$i]['attributes'][$j]['value_id'] . "' and pa.options_values_id = poval.products_options_values_id and popt.language_id = '" . $languages_id . "' and poval.language_id = '" . $languages_id . "'"; $attributes = tep_db_query($attributes_query); } else { $attributes = tep_db_query("select popt.products_options_name, poval.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_OPTIONS_VALUES . " poval, " . TABLE_PRODUCTS_ATTRIBUTES . " pa where pa.products_id = '" . $order->products[$i]['id'] . "' and pa.options_id = '" . $order->products[$i]['attributes'][$j]['option_id'] . "' and pa.options_id = popt.products_options_id and pa.options_values_id = '" . $order->products[$i]['attributes'][$j]['value_id'] . "' and pa.options_values_id = poval.products_options_values_id and popt.language_id = '" . $languages_id . "' and poval.language_id = '" . $languages_id . "'"); } $attributes_values = tep_db_fetch_array($attributes); $sql_data_array = array('orders_id' => $insert_id, 'orders_products_id' => $order_products_id, 'products_options' => $attributes_values['products_options_name'], 'products_options_values' => $attributes_values['products_options_values_name'], 'options_values_price' => $attributes_values['options_values_price'], 'price_prefix' => $attributes_values['price_prefix']); tep_db_perform(TABLE_ORDERS_PRODUCTS_ATTRIBUTES, $sql_data_array); if ((DOWNLOAD_ENABLED == 'true') && isset($attributes_values['products_attributes_filename']) && tep_not_null($attributes_values['products_attributes_filename'])) { $sql_data_array = array('orders_id' => $insert_id, 'orders_products_id' => $order_products_id, 'orders_products_filename' => $attributes_values['products_attributes_filename'], 'download_maxdays' => $attributes_values['products_attributes_maxdays'], 'download_count' => $attributes_values['products_attributes_maxcount']); tep_db_perform(TABLE_ORDERS_PRODUCTS_DOWNLOAD, $sql_data_array); } $products_ordered_attributes .= "\n\t" . $attributes_values['products_options_name'] . ' ' . $attributes_values['products_options_values_name']; } } //------insert customer choosen option eof ---- //BEGIN SEND HTML MAIL// also looked in: includes/application_top.php nothing. includes/general.php // Return a product ID with attributes function tep_get_uprid($prid, $params) { if (is_numeric($prid)) { $uprid = $prid; if (is_array($params) && (sizeof($params) > 0)) { $attributes_check = true; $attributes_ids = ''; reset($params); while (list($option, $value) = each($params)) { if (is_numeric($option) && is_numeric($value)) { $attributes_ids .= '{' . (int)$option . '}' . (int)$value; } else { $attributes_check = false; break; } } if ($attributes_check == true) { $uprid .= $attributes_ids; } } } else { $uprid = tep_get_prid($prid); if (is_numeric($uprid)) { if (strpos($prid, '{') !== false) { $attributes_check = true; $attributes_ids = ''; // Return a product ID from a product ID with attributes function tep_get_prid($uprid) { $pieces = explode('{', $uprid); if (is_numeric($pieces[0])) { return $pieces[0]; } else { return false; } } //// // Check if product has attributes function tep_has_product_attributes($products_id) { $attributes_query = tep_db_query("select count(*) as count from " . TABLE_PRODUCTS_ATTRIBUTES . " where products_id = '" . (int)$products_id . "'"); $attributes = tep_db_fetch_array($attributes_query); if ($attributes['count'] > 0) { return true; } else { return false; } }
  25. bhbilbao

    Multi_Vendor_Shipping new thread

    Yes Jim. Its in checkout_process.php, exactly when clicking the checkout confirmation button. THERE IS NO RECORDS IN order_product_id COLUMN.(IN THE TABLE orders_products_atributes)! All records appear as 0[/b]. ¿? If I edit them on hand all works fine. I know isn´t problem of the MVS contrib. But i dont see nothing extrange. The code is the same as a vanilla instalation: checkout_process.php ...> $order_products_id = tep_db_insert_id(); //------insert customer choosen option to order-------- $attributes_exist = '0'; $products_ordered_attributes = ''; if (isset($order->products[$i]['attributes'])) { $attributes_exist = '1'; for ($j=0, $n2=sizeof($order->products[$i]['attributes']); $j<$n2; $j++) { if (DOWNLOAD_ENABLED == 'true') { $attributes_query = "select popt.products_options_name, poval.products_options_values_name, pa.options_values_price, pa.price_prefix, pad.products_attributes_maxdays, pad.products_attributes_maxcount , pad.products_attributes_filename from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_OPTIONS_VALUES . " poval, " . TABLE_PRODUCTS_ATTRIBUTES . " pa left join " . TABLE_PRODUCTS_ATTRIBUTES_DOWNLOAD . " pad on pa.products_attributes_id=pad.products_attributes_id where pa.products_id = '" . $order->products[$i]['id'] . "' and pa.options_id = '" . $order->products[$i]['attributes'][$j]['option_id'] . "' and pa.options_id = popt.products_options_id and pa.options_values_id = '" . $order->products[$i]['attributes'][$j]['value_id'] . "' and pa.options_values_id = poval.products_options_values_id and popt.language_id = '" . $languages_id . "' and poval.language_id = '" . $languages_id . "'"; $attributes = tep_db_query($attributes_query); } else { $attributes = tep_db_query("select popt.products_options_name, poval.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_OPTIONS_VALUES . " poval, " . TABLE_PRODUCTS_ATTRIBUTES . " pa where pa.products_id = '" . $order->products[$i]['id'] . "' and pa.options_id = '" . $order->products[$i]['attributes'][$j]['option_id'] . "' and pa.options_id = popt.products_options_id and pa.options_values_id = '" . $order->products[$i]['attributes'][$j]['value_id'] . "' and pa.options_values_id = poval.products_options_values_id and popt.language_id = '" . $languages_id . "' and poval.language_id = '" . $languages_id . "'"); } $attributes_values = tep_db_fetch_array($attributes); $sql_data_array = array('orders_id' => $insert_id, 'orders_products_id' => $order_products_id, 'products_options' => $attributes_values['products_options_name'], 'products_options_values' => $attributes_values['products_options_values_name'], 'options_values_price' => $attributes_values['options_values_price'], 'price_prefix' => $attributes_values['price_prefix']); tep_db_perform(TABLE_ORDERS_PRODUCTS_ATTRIBUTES, $sql_data_array); if ((DOWNLOAD_ENABLED == 'true') && isset($attributes_values['products_attributes_filename']) && tep_not_null($attributes_values['products_attributes_filename'])) { $sql_data_array = array('orders_id' => $insert_id, 'orders_products_id' => $order_products_id, 'orders_products_filename' => $attributes_values['products_attributes_filename'], 'download_maxdays' => $attributes_values['products_attributes_maxdays'], 'download_count' => $attributes_values['products_attributes_maxcount']); tep_db_perform(TABLE_ORDERS_PRODUCTS_DOWNLOAD, $sql_data_array); } $products_ordered_attributes .= "\n\t" . $attributes_values['products_options_name'] . ' ' . $attributes_values['products_options_values_name']; } } //------insert customer choosen option eof ---- //BEGIN SEND HTML MAIL// also looked in: includes/application_top.php nothing. includes/general.php // Return a product ID with attributes function tep_get_uprid($prid, $params) { if (is_numeric($prid)) { $uprid = $prid; if (is_array($params) && (sizeof($params) > 0)) { $attributes_check = true; $attributes_ids = ''; reset($params); while (list($option, $value) = each($params)) { if (is_numeric($option) && is_numeric($value)) { $attributes_ids .= '{' . (int)$option . '}' . (int)$value; } else { $attributes_check = false; break; } } if ($attributes_check == true) { $uprid .= $attributes_ids; } } } else { $uprid = tep_get_prid($prid); if (is_numeric($uprid)) { if (strpos($prid, '{') !== false) { $attributes_check = true; $attributes_ids = ''; // Return a product ID from a product ID with attributes function tep_get_prid($uprid) { $pieces = explode('{', $uprid); if (is_numeric($pieces[0])) { return $pieces[0]; } else { return false; } } //// // Check if product has attributes function tep_has_product_attributes($products_id) { $attributes_query = tep_db_query("select count(*) as count from " . TABLE_PRODUCTS_ATTRIBUTES . " where products_id = '" . (int)$products_id . "'"); $attributes = tep_db_fetch_array($attributes_query); if ($attributes['count'] > 0) { return true; } else { return false; } }
×