taitaiji Posted November 10, 2011 Share Posted November 10, 2011 Hello there, My big and maybe simple problem: I can't find the Track Stock check box!? There is no such option... QtPro Options appear everywhere in my Admin, just not in Attributes, where most needed. Please help! What am I overlooking? Thank you* I narrowed it down to the product_attributes.php Where there is a warning in the instruction reg. the echo's The Problem seems to be echo ' $inputs = ''; for ($i = 0, $n = sizeof($languages); $i < $n; $i ++) { $inputs .= $languages[$i]['code'] . ': <input type="text" name="option_name[' . $languages[$i]['id'] . ']" size="20"> <br>'; } ?> <td align="center" class="smallText"> <?php echo $next_id; ?> </td> <td class="smallText"><?php echo $inputs; ?></td> <?php //++++ QT Pro: Begin Changed code ?> <td align="center" ><input type=checkbox name=track_stock></td> <td align="left" class="smallText"> <?php echo tep_image_submit('button_insert.gif', IMAGE_INSERT); ?> </td> <?php //++++ QT Pro: End Changed Code echo ' Any ideas on what's wrong here? Quote Link to comment Share on other sites More sharing options...
taitaiji Posted November 10, 2011 Share Posted November 10, 2011 Hi All, I found the root cause of the error - "unexpected T_CONSTANT_ENCAPSED_STRING, expecting ',' or ';' error?" on line 290. Its solution is mentioned in the file - Manual_for_2.3.1.html, which has the step by step instructions. A bit of clarity is required, though. For manual step 11.3, the section that mentions : Find: <!-- options //--> to <!-- options eof //--> Change all between to: In the code given to be replaced, there are 4 unfinished "echo" statements (with no code immediately following the '). The statements are just displayed as follows: echo ' The instruction in the manual states to add the code from your existing "admin/products_attributes.php" file to complete each of the corresponding echo statements. In my case, I was using the vanilla products_attributes.php which came default with the OSC 2.3.1 install. I have replaced the echo statements accordingly and the code works! If you simply copy the code from step 11.3 into notepad, the unfinished echo ' statements are on Line 119, 138, 175, & 190. The complete code for step 11.3 which worked for me is given below: ----------------------------------------- <!-- options //--> <?php if ($action == 'delete_product_option') { // delete product option $options = tep_db_query("select products_options_id, products_options_name from " . TABLE_PRODUCTS_OPTIONS . " where products_options_id = '" . (int)$HTTP_GET_VARS['option_id'] . "' and language_id = '" . (int)$languages_id . "'"); $options_values = tep_db_fetch_array($options); ?> <tr> <td class="pageHeading"> <?php echo $options_values['products_options_name']; ?> </td> </tr> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td colspan="3"><?php echo tep_black_line(); ?></td> </tr> <?php $products = tep_db_query("select p.products_id, pd.products_name, pov.products_options_values_name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov, " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_DESCRIPTION . " pd where pd.products_id = p.products_id and pov.language_id = '" . (int)$languages_id . "' and pd.language_id = '" . (int)$languages_id . "' and pa.products_id = p.products_id and pa.options_id='" . (int)$HTTP_GET_VARS['option_id'] . "' and pov.products_options_values_id = pa.options_values_id order by pd.products_name"); if (tep_db_num_rows($products)) { ?> <tr class="dataTableHeadingRow"> <td class="dataTableHeadingContent" align="center"> <?php echo TABLE_HEADING_ID; ?> </td> <td class="dataTableHeadingContent"> <?php echo TABLE_HEADING_PRODUCT; ?> </td> <td class="dataTableHeadingContent"> <?php echo TABLE_HEADING_OPT_VALUE; ?> </td> </tr> <tr> <td colspan="3"><?php echo tep_black_line(); ?></td> </tr> <?php $rows = 0; while ($products_values = tep_db_fetch_array($products)) { $rows++; ?> <tr class="<?php echo (floor($rows/2) == ($rows/2) ? 'attributes-even' : 'attributes-odd'); ?>"> <td align="center" class="smallText"> <?php echo $products_values['products_id']; ?> </td> <td class="smallText"> <?php echo $products_values['products_name']; ?> </td> <td class="smallText"> <?php echo $products_values['products_options_values_name']; ?> </td> </tr> <?php } ?> <tr> <td colspan="3"><?php echo tep_black_line(); ?></td> </tr> <tr> <td colspan="3" class="main"><br><?php echo TEXT_WARNING_OF_DELETE; ?></td> </tr> <tr> <td align="right" colspan="3" class="main"><br><?php echo '<a href="' . tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, $page_info, 'NONSSL') . '">'; ?><?php echo tep_image_button('button_cancel.gif', ' cancel '); ?></a> </td> </tr> <?php } else { ?> <tr> <td class="main" colspan="3"><br><?php echo TEXT_OK_TO_DELETE; ?></td> </tr> <tr> <td class="main" align="right" colspan="3"><br><?php echo '<a href="' . tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, 'action=delete_option&option_id=' . $HTTP_GET_VARS['option_id'] . '&' . $page_info, 'NONSSL') . '">'; ?><?php echo tep_image_button('button_delete.gif', ' delete '); ?></a> <?php echo '<a href="' . tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, $page_info, 'NONSSL') . '">'; ?><?php echo tep_image_button('button_cancel.gif', ' cancel '); ?></a> </td> </tr> <?php } ?> </table></td> </tr> <?php } else { ?> <tr> <td colspan="3" class="pageHeading"> <?php echo HEADING_TITLE_OPT; ?> </td> </tr> <tr> <td colspan="3" class="smallText" align="right"> <?php $options = "select * from " . TABLE_PRODUCTS_OPTIONS . " where language_id = '" . (int)$languages_id . "' order by products_options_id"; $options_split = new splitPageResults($option_page, MAX_ROW_LISTS_OPTIONS, $options, $options_query_numrows); echo $options_split->display_links($options_query_numrows, MAX_ROW_LISTS_OPTIONS, MAX_DISPLAY_PAGE_LINKS, $option_page, 'value_page=' . $value_page . '&attribute_page=' . $attribute_page, 'option_page'); ?> </td> </tr> <tr> <?php //++++ QT Pro: Begin Changed code ?> <td colspan="4"><?php echo tep_black_line(); ?></td> <?php //++++ QT Pro: End Changed Code ?> </tr> <tr class="dataTableHeadingRow"> <td class="dataTableHeadingContent"> <?php echo TABLE_HEADING_ID; ?> </td> <td class="dataTableHeadingContent"> <?php echo TABLE_HEADING_OPT_NAME; ?> </td> <?php //++++ QT Pro: Begin Changed code ?> <td class="dataTableHeadingContent"> <?php echo TABLE_HEADING_TRACK_STOCK; ?> </td> <?php //++++ QT Pro: End Changed Code ?> <td class="dataTableHeadingContent" align="center"> <?php echo TABLE_HEADING_ACTION; ?> </td> </tr> <tr> <?php //++++ QT Pro: Begin Changed code ?> <td colspan="4"><?php echo tep_black_line(); ?></td> <?php //++++ QT Pro: End Changed Code ?> </tr> <?php $next_id = 1; $rows = 0; $options = tep_db_query($options); while ($options_values = tep_db_fetch_array($options)) { $rows++; ?> <tr class="<?php echo (floor($rows/2) == ($rows/2) ? 'attributes-even' : 'attributes-odd'); ?>"> <?php if (($action == 'update_option') && ($HTTP_GET_VARS['option_id'] == $options_values['products_options_id'])) { echo '<form name="option" action="' . tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, 'action=update_option_name&' . $page_info, 'NONSSL') . '" method="post">'; $inputs = ''; for ($i = 0, $n = sizeof($languages); $i < $n; $i ++) { $option_name = tep_db_query("select products_options_name from " . TABLE_PRODUCTS_OPTIONS . " where products_options_id = '" . $options_values['products_options_id'] . "' and language_id = '" . $languages[$i]['id'] . "'"); $option_name = tep_db_fetch_array($option_name); $inputs .= $languages[$i]['code'] . ': <input type="text" name="option_name[' . $languages[$i]['id'] . ']" size="20" value="' . $option_name['products_options_name'] . '"> <br>'; } ?> <td align="center" class="smallText"> <?php echo $options_values['products_options_id']; ?><input type="hidden" name="option_id" value="<?php echo $options_values['products_options_id']; ?>"> </td> <td class="smallText"><?php echo $inputs; ?></td> <?php //++++ QT Pro: Begin Changed code ?> <td align="center" class="smallText"><input type=checkbox name=track_stock <?php echo $options_values['products_options_track_stock']?"checked":""; ?>></td> <?php //++++ QT Pro: End Changed Code ?> <td align="center" class="smallText"> <?php echo tep_image_submit('button_update.gif', IMAGE_UPDATE); ?> <?php echo '<a href="' . tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, $page_info, 'NONSSL') . '">'; ?><?php echo tep_image_button('button_cancel.gif', IMAGE_CANCEL); ?></a> </td> <?php echo '</form>' . "\n"; } else { ?> <td align="center" class="smallText"> <?php echo $options_values["products_options_id"]; ?> </td> <td class="smallText"> <?php echo $options_values["products_options_name"]; ?> </td> <?php //++++ QT Pro: Begin Changed code ?> <td align="center" class="smallText"> <?php echo $options_values['products_options_track_stock']?"Yes":"No"; ?></td> <?php //++++ QT Pro: End Changed Code ?> <td align="center" class="smallText"> <?php echo '<a href="' . tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, 'action=update_option&option_id=' . $options_values['products_options_id'] . '&' . $page_info, 'NONSSL') . '">'; ?><?php echo tep_image_button('button_edit.gif', IMAGE_UPDATE); ?></a> <?php echo '<a href="' . tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, 'action=delete_product_option&option_id=' . $options_values['products_options_id'] . '&' . $page_info, 'NONSSL') , '">'; ?><?php echo tep_image_button('button_delete.gif', IMAGE_DELETE); ?></a> </td> <?php } ?> </tr> <?php $max_options_id_query = tep_db_query("select max(products_options_id) + 1 as next_id from " . TABLE_PRODUCTS_OPTIONS); $max_options_id_values = tep_db_fetch_array($max_options_id_query); $next_id = $max_options_id_values['next_id']; } ?> <tr> <?php //++++ QT Pro: Begin Changed code ?> <td colspan="4"><?php echo tep_black_line(); ?></td> <?php //++++ QT Pro: End Changed Code ?> </tr> <?php if ($action != 'update_option') { ?> <tr class="<?php echo (floor($rows/2) == ($rows/2) ? 'attributes-even' : 'attributes-odd'); ?>"> <?php echo '<form name="options" action="' . tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, 'action=add_product_options&' . $page_info, 'NONSSL') . '" method="post"><input type="hidden" name="products_options_id" value="' . $next_id . '">'; $inputs = ''; for ($i = 0, $n = sizeof($languages); $i < $n; $i ++) { $inputs .= $languages[$i]['code'] . ': <input type="text" name="option_name[' . $languages[$i]['id'] . ']" size="20"> <br>'; } ?> <td align="center" class="smallText"> <?php echo $next_id; ?> </td> <td class="smallText"><?php echo $inputs; ?></td> <?php //++++ QT Pro: Begin Changed code ?> <td align="center" ><input type=checkbox name=track_stock></td> <td align="left" class="smallText"> <?php echo tep_image_submit('button_insert.gif', IMAGE_INSERT); ?> </td> <?php //++++ QT Pro: End Changed Code echo '</form>' ?> </tr> <tr> <?php //++++ QT Pro: Begin Changed code ?> <td colspan="4"><?php echo tep_black_line(); ?></td> <?php //++++ QT Pro: End Changed Code ?> </tr> <?php } } ?> </table></td> <!-- options eof //--> -------------------------------- Hope that helps solve your error too! Good luck. SagarJ Thanx! works fine! Strange enough I can't seem to find the checkbock for Stock Tracking though!? Any ideas on that? Quote Link to comment Share on other sites More sharing options...
taitaiji Posted November 10, 2011 Share Posted November 10, 2011 Missing check box for choosing stock tracking! I can't enable the stock tracking. I am totally stuck, any helping ideas? Thnx Quote Link to comment Share on other sites More sharing options...
taitaiji Posted November 10, 2011 Share Posted November 10, 2011 Missing check box for choosing stock tracking! I can't enable the stock tracking. I am totally stuck, any helping ideas? Thnx all clear! redid everything - solved... sorry for multiple posts Quote Link to comment Share on other sites More sharing options...
VolkerTrotte Posted December 1, 2011 Share Posted December 1, 2011 Hello there, i've one product in three sizes. qtpro works quite good. but when I change the number of products (in shopping cart) of size 1 over the number I've in stock of size 1, there is no error report - so a customer has the option to buy more products of size 1 than in stock. He also has the option to buy an article which ist out of stock (using multiple dropdowns) - there is no error reporting at all. Has anybody an idea how to solve these problems? Quote Link to comment Share on other sites More sharing options...
Huroman Posted December 5, 2011 Share Posted December 5, 2011 Hello there, i've one product in three sizes. qtpro works quite good. but when I change the number of products (in shopping cart) of size 1 over the number I've in stock of size 1, there is no error report - so a customer has the option to buy more products of size 1 than in stock. He also has the option to buy an article which ist out of stock (using multiple dropdowns) - there is no error reporting at all. Has anybody an idea how to solve these problems? Same issue here. Any idea? Quote Link to comment Share on other sites More sharing options...
Huroman Posted December 6, 2011 Share Posted December 6, 2011 Ok, at last. After many hours in this, at last i could achieve it. This is really simple, you have to add the same "checkout_process.php" code (QTPro, obviously) to your payment system, for eg.: I'm using "CIC Cybermut" (French bank), the contribution uses "cmcic_response.php" who has a duplicate code from checkout_process, one for "testing" and another for "production". In my case, i had to add the code twice, taking care about the break lines and spaces. I guess it could be the same with another payment systems. The store is here: http://jesuisjedanse.com/catalog Saludos. Quote Link to comment Share on other sites More sharing options...
ripnu Posted December 13, 2011 Share Posted December 13, 2011 (edited) Ok so i busted my chops trying to get this working and the only issue I came across which doesn't seem to be listed anywhere is the functionality within Paypal module. But I think Huroman pretty much explained the answer. For my situation, I use OSC 2.3.1 and a few other additions as well as QTPro to update stock quantities of different sizes of clothing. This all worked great for "Cash on Delivery" method. (I didnt test any other). It would subtract the stock bought and set items to "Out of Stock" if there was no more stock. Anyway, It worked just as was stated except when I used PayPal Standard 1.0 module. When I used that it would not update the stock level attributes, but it did update the "total stock level" which caused my OScommerce Admin site to spit out an error that QTP Doctor had detected my stock levels were "sick" and to update them. I had configured Paypal (in my paypal account settings) to use Auto Return once the customer has paid for something, thus, returning them to my website and completing the checkout process and hence forwading the IPN information. (the Auto Return url is your full domain/catalog/checkout_process.php file) So everything seemed to be correct except that it would not deduct the individual stock attribute items by the amount that was purchased. Ok i shall end my story with the fix I applied to this file: catalog/includes/modules/payment/paypal_standard.php Just replace the following code: // 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']) . "'"); With this code: //++++ QT Pro: Begin Changed code $products_stock_attributes=null; if (STOCK_LIMITED == 'true') { $products_attributes = $order->products[$i]['attributes']; // if (DOWNLOAD_ENABLED == 'true') { //++++ QT Pro: End Changed Code $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 //++++ QT Pro: Begin Changed code // $products_attributes = $order->products[$i]['attributes']; //++++ QT Pro: End Changed Code 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); $actual_stock_bought = $order->products[$i]['qty']; $download_selected = false; if ((DOWNLOAD_ENABLED == 'true') && isset($stock_values['products_attributes_filename']) && tep_not_null($stock_values['products_attributes_filename'])) { $download_selected = true; $products_stock_attributes='$$DOWNLOAD$$'; } // If not downloadable and attributes present, adjust attribute stock if (!$download_selected && is_array($products_attributes)) { $all_nonstocked = true; $products_stock_attributes_array = array(); foreach ($products_attributes as $attribute) { if ($attribute['track_stock'] == 1) { $products_stock_attributes_array[] = $attribute['option_id'] . "-" . $attribute['value_id']; $all_nonstocked = false; } } if ($all_nonstocked) { $actual_stock_bought = $order->products[$i]['qty']; } else { asort($products_stock_attributes_array, SORT_NUMERIC); $products_stock_attributes = implode(",", $products_stock_attributes_array); $attributes_stock_query = tep_db_query("select products_stock_quantity from " . TABLE_PRODUCTS_STOCK . " where products_stock_attributes = '$products_stock_attributes' AND products_id = '" . tep_get_prid($order->products[$i]['id']) . "'"); if (tep_db_num_rows($attributes_stock_query) > 0) { $attributes_stock_values = tep_db_fetch_array($attributes_stock_query); $attributes_stock_left = $attributes_stock_values['products_stock_quantity'] - $order->products[$i]['qty']; tep_db_query("update " . TABLE_PRODUCTS_STOCK . " set products_stock_quantity = '" . $attributes_stock_left . "' where products_stock_attributes = '$products_stock_attributes' AND products_id = '" . tep_get_prid($order->products[$i]['id']) . "'"); $actual_stock_bought = ($attributes_stock_left < 1) ? $attributes_stock_values['products_stock_quantity'] : $order->products[$i]['qty']; } else { $attributes_stock_left = 0 - $order->products[$i]['qty']; tep_db_query("insert into " . TABLE_PRODUCTS_STOCK . " (products_id, products_stock_attributes, products_stock_quantity) values ('" . tep_get_prid($order->products[$i]['id']) . "', '" . $products_stock_attributes . "', '" . $attributes_stock_left . "')"); $actual_stock_bought = 0; } } } // $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_selected) { $actual_stock_bought = $order->products[$i]['qty']; $stock_left = $stock_values['products_quantity'] - $actual_stock_bought; tep_db_query("UPDATE " . TABLE_PRODUCTS . " SET products_quantity = products_quantity - '" . $actual_stock_bought . "' WHERE products_id = '" . tep_get_prid($order->products[$i]['id']) . "'"); //++++ QT Pro: End Changed Code Edited December 13, 2011 by ripnu Quote Link to comment Share on other sites More sharing options...
ripnu Posted December 13, 2011 Share Posted December 13, 2011 Ps, you will notice the new code that you replace it with is from the "Checkout_Process.php" file. Quote Link to comment Share on other sites More sharing options...
madgasman Posted December 15, 2011 Share Posted December 15, 2011 If you find after adding about code, you get an error. I need to add had to add a } after the last line to make it work... Regards Terry Quote Link to comment Share on other sites More sharing options...
Iwant2Lrn Posted December 19, 2011 Share Posted December 19, 2011 Anyone know how I can export the low stock report to excel? Quote Link to comment Share on other sites More sharing options...
kristiyantanev Posted January 24, 2012 Share Posted January 24, 2012 (edited) I have a OSCommerce 2.3.1 and try to install QTPro but, have a one problem... when i purchase some product with enabled option and this option have a one or two qty script didn't remove a qty(subtract) from "products_stock" database and after purchase have an error in admin panel. (attached picture). I enable all needed options for the plugin. In Options > Tracking... In Stock > Check stock level True Someone can help me? Thanks in advice! <?php /* $Id: checkout_process.php 1750 2007-12-21 05:20:28Z hpdl $ adapted for Separate Pricing Per Customer 2006/09/09 (attribute prices for groups, hide attributes from groups) osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2007 osCommerce Released under the GNU General Public License */ include('includes/application_top.php'); // if the customer is not logged on, redirect them to the login page if (!tep_session_is_registered('customer_id')) { $navigation->set_snapshot(array('mode' => 'SSL', 'page' => FILENAME_CHECKOUT_PAYMENT)); tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL')); } // if there is nothing in the customers cart, redirect them to the shopping cart page if ($cart->count_contents() < 1) { tep_redirect(tep_href_link(FILENAME_SHOPPING_CART)); } // if no shipping method has been selected, redirect the customer to the shipping method selection page if (!tep_session_is_registered('shipping') || !tep_session_is_registered('sendto')) { tep_redirect(tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL')); } if ( (tep_not_null(MODULE_PAYMENT_INSTALLED)) && (!tep_session_is_registered('payment')) ) { tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL')); } // avoid hack attempts during the checkout procedure by checking the internal cartID if (isset($cart->cartID) && tep_session_is_registered('cartID')) { if ($cart->cartID != $cartID) { tep_redirect(tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL')); } } include(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CHECKOUT_PROCESS); // load selected payment module require(DIR_WS_CLASSES . 'payment.php'); $payment_modules = new payment($payment); // load the selected shipping module require(DIR_WS_CLASSES . 'shipping.php'); $shipping_modules = new shipping($shipping); require(DIR_WS_CLASSES . 'order.php'); $order = new order; // Stock Check $any_out_of_stock = false; if (STOCK_CHECK == 'true') { for ($i=0, $n=sizeof($order->products); $i<$n; $i++) { if (tep_check_stock($order->products[$i]['id'], $order->products[$i]['qty'])) { $any_out_of_stock = true; } } // Out of Stock if ( (STOCK_ALLOW_CHECKOUT != 'true') && ($any_out_of_stock == true) ) { tep_redirect(tep_href_link(FILENAME_SHOPPING_CART)); } } $payment_modules->update_status(); if ( ( is_array($payment_modules->modules) && (sizeof($payment_modules->modules) > 1) && !is_object($$payment) ) || (is_object($$payment) && ($$payment->enabled == false)) ) { tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode(ERROR_NO_PAYMENT_MODULE_SELECTED), 'SSL')); } require(DIR_WS_CLASSES . 'order_total.php'); $order_total_modules = new order_total; $order_totals = $order_total_modules->process(); // load the before_process function from the payment modules $payment_modules->before_process(); $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' => trim($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']); tep_db_perform(TABLE_ORDERS, $sql_data_array); $insert_id = tep_db_insert_id(); for ($i=0, $n=sizeof($order_totals); $i<$n; $i++) { $sql_data_array = array('orders_id' => $insert_id, 'title' => $order_totals[$i]['title'], 'text' => $order_totals[$i]['text'], 'value' => $order_totals[$i]['value'], 'class' => $order_totals[$i]['code'], 'sort_order' => $order_totals[$i]['sort_order']); tep_db_perform(TABLE_ORDERS_TOTAL, $sql_data_array); } $customer_notification = (SEND_EMAILS == 'true') ? '1' : '0'; $sql_data_array = array('orders_id' => $insert_id, 'orders_status_id' => $order->info['order_status'], 'date_added' => 'now()', 'customer_notified' => $customer_notification, 'comments' => $order->info['comments']); tep_db_perform(TABLE_ORDERS_STATUS_HISTORY, $sql_data_array); // initialized for the email confirmation $products_ordered = ''; $subtotal = 0; $total_tax = 0; for ($i=0, $n=sizeof($order->products); $i<$n; $i++) { //++++ QT Pro: Begin Changed code $products_stock_attributes=null; if (STOCK_LIMITED == 'true') { $products_attributes = $order->products[$i]['attributes']; // if (DOWNLOAD_ENABLED == 'true') { //++++ QT Pro: End Changed Code $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 //++++ QT Pro: Begin Changed code // $products_attributes = $order->products[$i]['attributes']; //++++ QT Pro: End Changed Code 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); $actual_stock_bought = $order->products[$i]['qty']; $download_selected = false; if ((DOWNLOAD_ENABLED == 'true') && isset($stock_values['products_attributes_filename']) && tep_not_null($stock_values['products_attributes_filename'])) { $download_selected = true; $products_stock_attributes='$$DOWNLOAD$$'; } // If not downloadable and attributes present, adjust attribute stock if (!$download_selected && is_array($products_attributes)) { $all_nonstocked = true; $products_stock_attributes_array = array(); foreach ($products_attributes as $attribute) { if ($attribute['track_stock'] == 1) { $products_stock_attributes_array[] = $attribute['option_id'] . "-" . $attribute['value_id']; $all_nonstocked = false; } } if ($all_nonstocked) { $actual_stock_bought = $order->products[$i]['qty']; } else { asort($products_stock_attributes_array, SORT_NUMERIC); $products_stock_attributes = implode(",", $products_stock_attributes_array); $attributes_stock_query = tep_db_query("select products_stock_quantity from " . TABLE_PRODUCTS_STOCK . " where products_stock_attributes = '$products_stock_attributes' AND products_id = '" . tep_get_prid($order->products[$i]['id']) . "'"); if (tep_db_num_rows($attributes_stock_query) > 0) { tep_db_query("INSERT INTO ttt VALUES ('po-golqmo ot nula')"); $attributes_stock_values = tep_db_fetch_array($attributes_stock_query); $attributes_stock_left = $attributes_stock_values['products_stock_quantity'] - $order->products[$i]['qty']; tep_db_query("update " . TABLE_PRODUCTS_STOCK . " set products_stock_quantity = '" . $attributes_stock_left . "' where products_stock_attributes = '$products_stock_attributes' AND products_id = '" . tep_get_prid($order->products[$i]['id']) . "'"); $actual_stock_bought = ($attributes_stock_left < 1) ? $attributes_stock_values['products_stock_quantity'] : $order->products[$i]['qty']; } else { $attributes_stock_left = 0 - $order->products[$i]['qty']; tep_db_query("insert into " . TABLE_PRODUCTS_STOCK . " (products_id, products_stock_attributes, products_stock_quantity) values ('" . tep_get_prid($order->products[$i]['id']) . "', '" . $products_stock_attributes . "', '" . $attributes_stock_left . "')"); $actual_stock_bought = 0; } } } // $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_selected) { $actual_stock_bought = $order->products[$i]['qty']; $stock_left = $stock_values['products_quantity'] - $actual_stock_bought; tep_db_query("UPDATE " . TABLE_PRODUCTS . " SET products_quantity = products_quantity - '" . $actual_stock_bought . "' WHERE products_id = '" . tep_get_prid($order->products[$i]['id']) . "'"); //++++ QT Pro: End Changed Code 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']) . "'"); //++++ QT Pro: Begin Changed code if (!isset($products_stock_attributes)) $products_stock_attributes=null; $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'], 'products_stock_attributes' => $products_stock_attributes); //++++ QT Pro: End Changed Code tep_db_perform(TABLE_ORDERS_PRODUCTS, $sql_data_array); $order_products_id = tep_db_insert_id(); //------insert customer choosen option to order-------- $attributes_exist = '0'; $products_ordered_attributes = ''; if (isset($order->products[$i]['attributes'])) { $attributes_exist = '1'; for ($j=0, $n2=sizeof($order->products[$i]['attributes']); $j<$n2; $j++) { if (DOWNLOAD_ENABLED == 'true') { $attributes_query = "select popt.products_options_name, poval.products_options_values_name, pa.options_values_price, pa.price_prefix, pad.products_attributes_maxdays, pad.products_attributes_maxcount , pad.products_attributes_filename from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_OPTIONS_VALUES . " poval, " . TABLE_PRODUCTS_ATTRIBUTES . " pa left join " . TABLE_PRODUCTS_ATTRIBUTES_DOWNLOAD . " pad on pa.products_attributes_id=pad.products_attributes_id where pa.products_id = '" . $order->products[$i]['id'] . "' and pa.options_id = '" . $order->products[$i]['attributes'][$j]['option_id'] . "' and pa.options_id = popt.products_options_id and pa.options_values_id = '" . $order->products[$i]['attributes'][$j]['value_id'] . "' and pa.options_values_id = poval.products_options_values_id and popt.language_id = '" . $languages_id . "' and poval.language_id = '" . $languages_id . "'"; $attributes = tep_db_query($attributes_query); } else { $attributes = tep_db_query("select popt.products_options_name, poval.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_OPTIONS_VALUES . " poval, " . TABLE_PRODUCTS_ATTRIBUTES . " pa where pa.products_id = '" . $order->products[$i]['id'] . "' and pa.options_id = '" . $order->products[$i]['attributes'][$j]['option_id'] . "' and pa.options_id = popt.products_options_id and pa.options_values_id = '" . $order->products[$i]['attributes'][$j]['value_id'] . "' and pa.options_values_id = poval.products_options_values_id and popt.language_id = '" . $languages_id . "' and poval.language_id = '" . $languages_id . "'"); } $attributes_values = tep_db_fetch_array($attributes); // BOF Separate Pricing Per Customer attribute_groups mod if (isset($_SESSION['sppc_customer_group_id']) && $_SESSION['sppc_customer_group_id'] != '0') { $attributes_group_query = tep_db_query("select pag.options_values_price, pag.price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " pa left join " . TABLE_PRODUCTS_ATTRIBUTES_GROUPS . " pag using(products_attributes_id) where pa.products_id = '" . tep_get_prid($order->products[$i]['id']) . "' and pa.options_id = '" . $order->products[$i]['attributes'][$j]['option_id'] . "' and pa.options_values_id = '" . $order->products[$i]['attributes'][$j]['value_id'] . "' and pag.customers_group_id = '" . (int)$_SESSION['sppc_customer_group_id'] . "'"); if ($attributes_group = tep_db_fetch_array($attributes_group_query)) { $attributes_values['options_values_price'] = $attributes_group['options_values_price']; $attributes_values['price_prefix'] = $attributes_group['price_prefix']; } } // EOF Separate Pricing Per Customer attribute_groups mod $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 ---- $total_weight += ($order->products[$i]['qty'] * $order->products[$i]['weight']); $total_tax += tep_calculate_tax($total_products_price, $products_tax) * $order->products[$i]['qty']; $total_cost += $total_products_price; $products_ordered .= $order->products[$i]['qty'] . ' x ' . $order->products[$i]['name'] . ' (' . $order->products[$i]['model'] . ') = ' . $currencies->display_price($order->products[$i]['final_price'], $order->products[$i]['tax'], $order->products[$i]['qty']) . $products_ordered_attributes . "\n"; } // Discount Code 2.3 - start if (MODULE_ORDER_TOTAL_DISCOUNT_STATUS == 'true') { if (!empty($discount)) { $discount_codes_query = tep_db_query("select discount_codes_id from " . TABLE_DISCOUNT_CODES . " where discount_codes = '" . tep_db_input($sess_discount_code) . "'"); $discount_codes = tep_db_fetch_array($discount_codes_query); tep_db_perform(TABLE_CUSTOMERS_TO_DISCOUNT_CODES, array('customers_id' => $customer_id, 'discount_codes_id' => $discount_codes['discount_codes_id'])); tep_db_query("update " . TABLE_DISCOUNT_CODES . " set number_of_orders = number_of_orders + 1 where discount_codes_id = '" . (int)$discount_codes['discount_codes_id'] . "'"); tep_session_unregister('sess_discount_code'); } } // Discount Code 2.3 - end // lets start with the email confirmation $email_order = STORE_NAME . "\n" . EMAIL_SEPARATOR . "\n" . EMAIL_TEXT_ORDER_NUMBER . ' ' . $insert_id . "\n" . EMAIL_TEXT_INVOICE_URL . ' ' . tep_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id=' . $insert_id, 'SSL', false) . "\n" . EMAIL_TEXT_DATE_ORDERED . ' ' . strftime(DATE_FORMAT_LONG) . "\n\n"; if ($order->info['comments']) { $email_order .= tep_db_output($order->info['comments']) . "\n\n"; } $email_order .= EMAIL_TEXT_PRODUCTS . "\n" . EMAIL_SEPARATOR . "\n" . $products_ordered . EMAIL_SEPARATOR . "\n"; for ($i=0, $n=sizeof($order_totals); $i<$n; $i++) { $email_order .= strip_tags($order_totals[$i]['title']) . ' ' . strip_tags($order_totals[$i]['text']) . "\n"; } if ($order->content_type != 'virtual') { $email_order .= "\n" . EMAIL_TEXT_DELIVERY_ADDRESS . "\n" . EMAIL_SEPARATOR . "\n" . tep_address_label($customer_id, $sendto, 0, '', "\n") . "\n"; } $email_order .= "\n" . EMAIL_TEXT_BILLING_ADDRESS . "\n" . EMAIL_SEPARATOR . "\n" . tep_address_label($customer_id, $billto, 0, '', "\n") . "\n\n"; if (is_object($$payment)) { $email_order .= EMAIL_TEXT_PAYMENT_METHOD . "\n" . EMAIL_SEPARATOR . "\n"; $payment_class = $$payment; $email_order .= $order->info['payment_method'] . "\n\n"; if ($payment_class->email_footer) { $email_order .= $payment_class->email_footer . "\n\n"; } } tep_mail($order->customer['firstname'] . ' ' . $order->customer['lastname'], $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); } // load the after_process function from the payment modules $payment_modules->after_process(); $cart->reset(true); // unregister session variables used during checkout tep_session_unregister('sendto'); tep_session_unregister('billto'); tep_session_unregister('shipping'); tep_session_unregister('payment'); tep_session_unregister('comments'); tep_redirect(tep_href_link(FILENAME_CHECKOUT_SUCCESS, '', 'SSL')); require(DIR_WS_INCLUDES . 'application_bottom.php'); ?> Edited January 24, 2012 by kristiyantanev Quote Link to comment Share on other sites More sharing options...
DougieMac Posted January 28, 2012 Share Posted January 28, 2012 (edited) Ihave oscommerce v2.3.1 and have installed QT Pro. However when I go to do "REMEMBER: You must activate attribute tracking here: admin -> catalog -> product attributes ->" I get the following Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ',' or ';' in /home/....../public_html/catalog/myadmindir/products_attributes.php on line 284 the code in products_attributes.php around the area of line 284, with the BOLD section i believe to be line 284 is... <?php if (($action == 'update_option') && ($HTTP_GET_VARS['option_id'] == $options_values['products_options_id'])) { echo ' $inputs = ''; for ($i = 0, $n = sizeof($languages); $i < $n; $i ++) { $option_name = tep_db_query("select products_options_name from " . TABLE_PRODUCTS_OPTIONS . " where products_options_id = '" . $options_values['products_options_id'] . "' and language_id = '" . $languages[$i]['id'] . "'"); $option_name = tep_db_fetch_array($option_name); $inputs .= $languages[$i]['code'] . ': <input type="text" name="option_name[' . $languages[$i]['id'] . ']" size="20" value="' . $option_name['products_options_name'] . '"> <br>'; } ?> <td align="center" class="smallText"> <?php echo $options_values['products_options_id']; ?><input type="hidden" name="option_id" value="<?php echo $options_values['products_options_id']; ?>"> </td> <td class="smallText"><?php echo $inputs; ?></td> <?php Can anyone see what the problem is? Thanks in advance Edited January 28, 2012 by DougieMac Quote Link to comment Share on other sites More sharing options...
DougieMac Posted January 28, 2012 Share Posted January 28, 2012 Have went for a complete rebuild from scratch, so the previous post can be ignored Quote Link to comment Share on other sites More sharing options...
Draconous Posted January 29, 2012 Share Posted January 29, 2012 Where folder do you install this into? Quote Link to comment Share on other sites More sharing options...
Draconous Posted February 3, 2012 Share Posted February 3, 2012 If anyone knows how to solve this issue your help is appreciated. - Warning: require(includes/classes/shopping_cart.php) [function.require]: failed to open stream: No such file or directory in /home/content/123345/12345/html/includes/application_top.php on line 124[/b] [b]Fatal error: require() [function.require]: Failed opening required 'includes/classes/shopping_cart.php' (include_path='.:/usr/local/php5/lib/php') in /home/content/12345/12345/html/includes/application_top.php on line 124 Quote Link to comment Share on other sites More sharing options...
Draconous Posted February 3, 2012 Share Posted February 3, 2012 Where folder do you install this into? Disregard! Quote Link to comment Share on other sites More sharing options...
linux4ever Posted March 11, 2012 Share Posted March 11, 2012 Hi guys. I have oscommerce v2.3.1 and have installed QT Pro. Everything works fine, but I have a problem. When in product attributes add a new product with the attributes, Qtprodoctor shows this message: Warning: There are 1 sick products in the database. Please visit the QTPro doctor. It´s ok But what happens when you delete or update a product from the page of product attributes? The products_stock table does not make any changes and the product is shown in Table. For example. I have 1 product like this Shirt Color= Blue Shirt Size= Small If I remove size attribute, in the table "Currently on stock:" of produc_info page shows a product with the size attribute How can solve this problem? Thanks in advance. Sorry for my english :wacko: Quote Link to comment Share on other sites More sharing options...
grellk Posted March 11, 2012 Share Posted March 11, 2012 (edited) Hi all, My product is made up of 3 components: Connector, Lever, and Adjuster each with their own part number and inventory. The customer orders a product and picks Connector A1, Lever B3, and Adjuster C8 from drop down lists. Can QTP be made to track each individual component? The way I understand it, currently it would track stock on a single part A1B3C8. Any help would be appreciated. Edited March 11, 2012 by grellk Quote Link to comment Share on other sites More sharing options...
grellk Posted March 11, 2012 Share Posted March 11, 2012 And another question but apparently I can no longer edit my initial post. Is there a way to automatically set the quantity of attribute components? In my example they will always be a qty of 1...how do I do this? Quote Link to comment Share on other sites More sharing options...
grellk Posted March 12, 2012 Share Posted March 12, 2012 (edited) I apologize for my ignorance, I am still very much learning this as I go. I now know the proper question to ask so please disregard the 2 previous posts. My issue is thus: I am running QTPro as well as the Master Products contribution. I have a master product that has two slave products, each with two attributes which are tracking stock. Attribute 1----Slave product 1-----Master Product Attribute 2---/ / Attribute 3----Slave product 2----/ Attribute 4---/ When the sale completes, the master product quantity is removed from stock but no stock adjustments are made for either slave products or their attributes. I have tested this with a clean install and just the Master Product addon and the slave products remove from inventory fine so the issue must lie with the two contribs playing nicely together. So the big question: What do I need to do to get the stock adjustments to work for the attributes and slave products? Any thoughts would be appreciated. I know just enough PHP to muddle my way through the easiest issues but this is beyond my skills. If someone could even tell me which files are likely the culprit I can at least start my diagnosis. Thanks in advance! Edited March 12, 2012 by grellk Quote Link to comment Share on other sites More sharing options...
Eszaraxe Posted March 26, 2012 Share Posted March 26, 2012 I would like to have different product numbers on different attributes, every size have it's own product number, have anybody done this. I guess I have to add a product number field to every attribute, but since QTPro is a quite complex add-on I would like to get some hints before I start, unless somebody already have done this and would like to share? Quote osCommerce 2.3.1 - QTPro 4.6.1 - Ultimate SEO URL's 5 Pro r205 - Discount Code 3.1 - Column listing with smart columns - Products Sort and some more Link to comment Share on other sites More sharing options...
onenewyork Posted March 28, 2012 Share Posted March 28, 2012 Does QTPro change the model # on the invoice or package slip or anything like that? I read the manual but after reading it I was not sure if it does; there is anything there that shows me it does. I want to make sure the sku appears on the invoice when a product gets bought, Quote Link to comment Share on other sites More sharing options...
Eszaraxe Posted April 3, 2012 Share Posted April 3, 2012 I want/need to have product_model for every attribute, is there anybody who have implemented this function in QTPro so I don't have to do it also? I am gpoing to start this now and I might need some input. My plan is to add a column named attribute_model in the table products_attributes so it is connected to products_attributes_id, which is PRIMARY in that table. After that I will add a field on the page for products attributes so I can enter a model number. For me there is no need to show the customers the model number so I don't have to implement it in the shop. I need to have it my order export form where I export all orders that will be shipped during the day so I guess it's enough to implement it there. Have I done it too simple, have I forgotten something important? All input is gladly accepted, please PM me if you have any input here you want to share. Quote osCommerce 2.3.1 - QTPro 4.6.1 - Ultimate SEO URL's 5 Pro r205 - Discount Code 3.1 - Column listing with smart columns - Products Sort and some more Link to comment Share on other sites More sharing options...
railroadguy Posted April 20, 2012 Share Posted April 20, 2012 I have install this on a new cart as well as a customer cart. Both 2.2 RC2 Same problem as many others. It will subtract the total but not the product options. Track Stock is checked. I have read through all the pages here and it seems like some people have this working and others do not. Is there a fix that the people who have it working did? Is there a single php file that should control this and I can look at? The database is fine it's just not subtracting the options. Any help would be appreciated. Thanks, Dan Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.