RACANIERD Posted June 6, 2006 Share Posted June 6, 2006 Hello, HELP!!! HELP!!! HELP!!! HELP!!!! I've a question : i've added a new field in attribute stock in admin part (stock.php) named products_ref in the table products_stock from the database. it adds a single reference to products options, that functions as for the quantities attributes without deduct. But, the problem is how to put the reference in cart? I'm sure you can help me, because i'm a big noob!! Thanks! PS : sorry for my english, i'm french Quote Link to comment Share on other sites More sharing options...
Guest Posted June 7, 2006 Share Posted June 7, 2006 Successfully installed QTPro and it works great. I am 90% done with installing the Sort Option Values Module 1.0 contribution (enables you to manage the sort order of the product option values) but I am having problem displaying the order in product_info.php I am a PHP/MySQL newb so bear with me. I'm trying to merge the following code from QTPro: $products_attributes_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "'"); With the code from the sort contribution: $products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pa.options_id = '" . (int)$products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . (int)$languages_id . "' order by pov.products_options_values_sortorder, pov.products_options_values_id"); If anyone has had any luck, please post.. I have spent about 2 hours trying to figure it out with no luck Quote Link to comment Share on other sites More sharing options...
macmizer Posted June 8, 2006 Share Posted June 8, 2006 I am having an issue with the QT Pro and a CRE Loaded 6.15 shop. I have everything working. Just one issue. Up until yesterday the pulldowns on the product page were not working. I went back and tracked down the file that was supposed to have the code in it to draw those pulldowns. What I found was the following..... on the following file product_info_new.tpl.php (this used to be called product_info.tpl.php) I get the following error on my cart: Fatal error: Cannot redeclare class pad_sequenced_dropdowns in /home/httpd/vhosts/robbieknowles.com/httpdocs/includes/classes/pad_sequenced_dropdowns.php on line 56 The entire page shows but right in the middle of the page there is this error. Actually it is closer to the top header in the middle of the page. I checked pad_sequenced_dropdowns.php on line 56 and this is what I see on line 56: class pad_sequenced_dropdowns extends pad_multiple_dropdowns { That entire section around line 56 looks like this: */ require_once(DIR_WS_CLASSES . 'pad_multiple_dropdowns.php'); class pad_sequenced_dropdowns extends pad_multiple_dropdowns { /* I did not attach a copy of the product_info_new.tpl.php and the pad_sequenced_dropdowns.php is the one that comes with the contribution I did not make any changes to this pad_sequenced_dropdowns.php file. To see the page in the cart check out this url: http://www.robbieknowles.com/corona-extra-...lors-p-152.html If a certificate window pops up just click yes. This is a demo site as I am working on someones code. Any thoughts? Rob. Quote Link to comment Share on other sites More sharing options...
Guest Posted June 10, 2006 Share Posted June 10, 2006 i only have 2 contribs installed in a new store. QTPro4.25 and RegisterGlobals1.4. Store worked after install of register globals, but not after qtpro. all i get is, "Unable to connect to database server!" i tried searching this topc and didnt find anyone else with a similar issue. Quote Link to comment Share on other sites More sharing options...
chooch Posted June 10, 2006 Share Posted June 10, 2006 (edited) I am having an issue with the QT Pro and a CRE Loaded 6.15 shop. I have everything working. Just one issue. Up until yesterday the pulldowns on the product page were not working. I went back and tracked down the file that was supposed to have the code in it to draw those pulldowns. What I found was the following..... on the following file product_info_new.tpl.php (this used to be called product_info.tpl.php) I get the following error on my cart: Fatal error: Cannot redeclare class pad_sequenced_dropdowns in /home/httpd/vhosts/robbieknowles.com/httpdocs/includes/classes/pad_sequenced_dropdowns.php on line 56 The entire page shows but right in the middle of the page there is this error. Actually it is closer to the top header in the middle of the page. I checked pad_sequenced_dropdowns.php on line 56 and this is what I see on line 56: class pad_sequenced_dropdowns extends pad_multiple_dropdowns { That entire section around line 56 looks like this: */ require_once(DIR_WS_CLASSES . 'pad_multiple_dropdowns.php'); class pad_sequenced_dropdowns extends pad_multiple_dropdowns { /* I did not attach a copy of the product_info_new.tpl.php and the pad_sequenced_dropdowns.php is the one that comes with the contribution I did not make any changes to this pad_sequenced_dropdowns.php file. To see the page in the cart check out this url: http://www.robbieknowles.com/corona-extra-...lors-p-152.html If a certificate window pops up just click yes. This is a demo site as I am working on someones code. Any thoughts? Rob. Have you tried posting on the creloaded forum - maybe you'll have better luck there as this is for oscommerce only Edited June 10, 2006 by chooch Quote Upon receiving fixes and advice, too many people don't bother to post updates informing the forum of how it went. Until of course they need help again on other issues and they come running back! Why receive the information you require in good faith for free, only to then have the attitude to ignore the people who gave it to you? There's no harm in saying, 'Thanks, it worked'. On the contrary, it creates a better atmosphere. CHOOCH Link to comment Share on other sites More sharing options...
macmizer Posted June 10, 2006 Share Posted June 10, 2006 Have you tried posting on the creloaded forum - maybe you'll have better luck there as this is for oscommerce only Actually I did not post there as I did not find many posts at all about QT Pro there. I will do so anyway. I figured even though it is QT Pro with CRE that this is a typical type of coding issue. Just have not found an answer yet. Thanks. Quote Link to comment Share on other sites More sharing options...
Guest Posted June 10, 2006 Share Posted June 10, 2006 anybody got some insights into this, please. Quote Link to comment Share on other sites More sharing options...
Guest Posted June 11, 2006 Share Posted June 11, 2006 nevermind Quote Link to comment Share on other sites More sharing options...
iMarc Posted June 12, 2006 Share Posted June 12, 2006 :thumbsup: Cool trogette , you see, we're allready two persons, only if the rest knew, lets first get crowded! I think I'm gonna send messages to members like us. by the way please let me know if the ajax contribution got evolved in our direction.Bora Hello people! I have the same problem with the Easy Populate + QTPro stock control. I would like to join the people that is asking for something better that combines easy product upload + great stock control. My site will also have T-Shirts with its different sizes and colors, and this would definetly be good for us. If somebody finds a solution please tell us how you do it, or otherwise join us to ask for this feature in next releases of the current Easy Populate and QTPro. Of course I will inform you I find out how to do it. Thank you! Quote Link to comment Share on other sites More sharing options...
Guest Posted June 17, 2006 Share Posted June 17, 2006 Hello people! I have the same problem with the Easy Populate + QTPro stock control. I would like to join the people that is asking for something better that combines easy product upload + great stock control. My site will also have T-Shirts with its different sizes and colors, and this would definetly be good for us. If somebody finds a solution please tell us how you do it, or otherwise join us to ask for this feature in next releases of the current Easy Populate and QTPro. Of course I will inform you I find out how to do it. Thank you! Hi iMarc, I've got EasyPopulate and QTPro working for one option (size) with stock control for both uploads and downloads. Two options doesn't work e.g. size and colour. My client's site sells shoes so they get around this restriction by adding different colour options as different products. I can post my easypopulate.php file if you want it - though it's been heavily modded (SPPC, hide products for SPPC, Multiple images, and of course... QTPro). Hope your work goes well. Regards Rhys Quote Link to comment Share on other sites More sharing options...
vmtent Posted June 26, 2006 Share Posted June 26, 2006 After installing QTPro 4.25, clicking on "My Account" or "Checkout" gives me the following error: Warning: Cannot modify header information - headers already sent by (output started at /Library/WebServer/Documents/catalog/includes/application_top.php:548) in /Library/WebServer/Documents/catalog/includes/functions/general.php on line 57 I have found that the QTPro modified file "application_top.php" is causing this error, because if I re-install my previous "application_top.php" file I can access "My Account" & "Checkout" with no problems. I used kdiff3 to compare the files, and the only differences are the QTPro mods. There are only two lines added at the bottom for my extra images contribution (which are also on my previous file). Here is the QTPro modified file. Any help would be greatly appreciated! <?php/* QT Pro Version 4.0 modifications Copyright © 2004 Ralph Day Released under the GNU General Public License Based on prior works released under the GNU General Public License: QT Pro prior versions Ralph Day, October 2004 Tom Wojcik aka TomThumb 2004/07/03 based on work by Michael Coffman aka coffman FREEZEHELL - 08/11/2003 [email protected] Copyright © 2003 IBWO Joseph Shain, January 2003 osCommerce MS2 Copyright © 2003 osCommerce Modifications made: 11/2004 - Change add_product section to break out individual attributes from combined attributes when using single dropdown or radioset attribute display. ******************************************************************************** *********** $Id: application_top.php,v 1.280 2003/07/12 09:38:07 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2003 osCommerce Released under the GNU General Public License */ // start the timer for the page parse time log define('PAGE_PARSE_START_TIME', microtime()); // set the level of error reporting error_reporting(E_ALL & ~E_NOTICE); // check if register_globals is enabled. // since this is a temporary measure this message is hardcoded. The requirement will be removed before 2.2 is finalized. if (function_exists('ini_get')) { ini_get('register_globals') or exit('FATAL ERROR: register_globals is disabled in php.ini, please enable it!'); } // Set the local configuration parameters - mainly for developers if (file_exists('includes/local/configure.php')) include('includes/local/configure.php'); // include server parameters require('includes/configure.php'); if (strlen(DB_SERVER) < 1) { if (is_dir('install')) { header('Location: install/index.php'); } } // define the project version define('PROJECT_VERSION', 'osCommerce 2.2-MS2'); // set the type of request (secure or not) $request_type = (getenv('HTTPS') == 'on') ? 'SSL' : 'NONSSL'; // set php_self in the local scope if (!isset($PHP_SELF)) $PHP_SELF = $HTTP_SERVER_VARS['PHP_SELF']; if ($request_type == 'NONSSL') { define('DIR_WS_CATALOG', DIR_WS_HTTP_CATALOG); } else { define('DIR_WS_CATALOG', DIR_WS_HTTPS_CATALOG); } // include the list of project filenames require(DIR_WS_INCLUDES . 'filenames.php'); // include the list of project database tables require(DIR_WS_INCLUDES . 'database_tables.php'); // customization for the design layout define('BOX_WIDTH', 125); // how wide the boxes should be in pixels (default: 125) // include the database functions require(DIR_WS_FUNCTIONS . 'database.php'); // make a connection to the database... now tep_db_connect() or die('Unable to connect to database server!'); // set the application parameters $configuration_query = tep_db_query('select configuration_key as cfgKey, configuration_value as cfgValue from ' . TABLE_CONFIGURATION); while ($configuration = tep_db_fetch_array($configuration_query)) { define($configuration['cfgKey'], $configuration['cfgValue']); } // if gzip_compression is enabled, start to buffer the output if ( (GZIP_COMPRESSION == 'true') && ($ext_zlib_loaded = extension_loaded('zlib')) && (PHP_VERSION >= '4') ) { if (($ini_zlib_output_compression = (int)ini_get('zlib.output_compression')) < 1) { if (PHP_VERSION >= '4.0.4') { ob_start('ob_gzhandler'); } else { include(DIR_WS_FUNCTIONS . 'gzip_compression.php'); ob_start(); ob_implicit_flush(); } } else { ini_set('zlib.output_compression_level', GZIP_LEVEL); } } // set the HTTP GET parameters manually if search_engine_friendly_urls is enabled if (SEARCH_ENGINE_FRIENDLY_URLS == 'true') { if (strlen(getenv('PATH_INFO')) > 1) { $GET_array = array(); $PHP_SELF = str_replace(getenv('PATH_INFO'), '', $PHP_SELF); $vars = explode('/', substr(getenv('PATH_INFO'), 1)); for ($i=0, $n=sizeof($vars); $i<$n; $i++) { if (strpos($vars[$i], '[]')) { $GET_array[substr($vars[$i], 0, -2)][] = $vars[$i+1]; } else { $HTTP_GET_VARS[$vars[$i]] = $vars[$i+1]; } $i++; } if (sizeof($GET_array) > 0) { while (list($key, $value) = each($GET_array)) { $HTTP_GET_VARS[$key] = $value; } } } } // define general functions used application-wide require(DIR_WS_FUNCTIONS . 'general.php'); require(DIR_WS_FUNCTIONS . 'html_output.php'); // set the cookie domain $cookie_domain = (($request_type == 'NONSSL') ? HTTP_COOKIE_DOMAIN : HTTPS_COOKIE_DOMAIN); $cookie_path = (($request_type == 'NONSSL') ? HTTP_COOKIE_PATH : HTTPS_COOKIE_PATH); // include cache functions if enabled if (USE_CACHE == 'true') include(DIR_WS_FUNCTIONS . 'cache.php'); // include shopping cart class require(DIR_WS_CLASSES . 'shopping_cart.php'); // include navigation history class require(DIR_WS_CLASSES . 'navigation_history.php'); // some code to solve compatibility issues require(DIR_WS_FUNCTIONS . 'compatibility.php'); // check if sessions are supported, otherwise use the php3 compatible session class if (!function_exists('session_start')) { define('PHP_SESSION_NAME', 'osCsid'); define('PHP_SESSION_PATH', $cookie_path); define('PHP_SESSION_DOMAIN', $cookie_domain); define('PHP_SESSION_SAVE_PATH', SESSION_WRITE_DIRECTORY); include(DIR_WS_CLASSES . 'sessions.php'); } // define how the session functions will be used require(DIR_WS_FUNCTIONS . 'sessions.php'); // set the session name and save path tep_session_name('osCsid'); tep_session_save_path(SESSION_WRITE_DIRECTORY); // set the session cookie parameters if (function_exists('session_set_cookie_params')) { session_set_cookie_params(0, $cookie_path, $cookie_domain); } elseif (function_exists('ini_set')) { ini_set('session.cookie_lifetime', '0'); ini_set('session.cookie_path', $cookie_path); ini_set('session.cookie_domain', $cookie_domain); } // set the session ID if it exists if (isset($HTTP_POST_VARS[tep_session_name()])) { tep_session_id($HTTP_POST_VARS[tep_session_name()]); } elseif ( ($request_type == 'SSL') && isset($HTTP_GET_VARS[tep_session_name()]) ) { tep_session_id($HTTP_GET_VARS[tep_session_name()]); } // start the session $session_started = false; if (SESSION_FORCE_COOKIE_USE == 'True') { tep_setcookie('cookie_test', 'please_accept_for_session', time()+60*60*24*30, $cookie_path, $cookie_domain); if (isset($HTTP_COOKIE_VARS['cookie_test'])) { tep_session_start(); $session_started = true; } } elseif (SESSION_BLOCK_SPIDERS == 'True') { $user_agent = strtolower(getenv('HTTP_USER_AGENT')); $spider_flag = false; if (tep_not_null($user_agent)) { $spiders = file(DIR_WS_INCLUDES . 'spiders.txt'); for ($i=0, $n=sizeof($spiders); $i<$n; $i++) { if (tep_not_null($spiders[$i])) { if (is_integer(strpos($user_agent, trim($spiders[$i])))) { $spider_flag = true; break; } } } } if ($spider_flag == false) { tep_session_start(); $session_started = true; } } else { tep_session_start(); $session_started = true; } // set SID once, even if empty $SID = (defined('SID') ? SID : ''); // verify the ssl_session_id if the feature is enabled if ( ($request_type == 'SSL') && (SESSION_CHECK_SSL_SESSION_ID == 'True') && (ENABLE_SSL == true) && ($session_started == true) ) { $ssl_session_id = getenv('SSL_SESSION_ID'); if (!tep_session_is_registered('SSL_SESSION_ID')) { $SESSION_SSL_ID = $ssl_session_id; tep_session_register('SESSION_SSL_ID'); } if ($SESSION_SSL_ID != $ssl_session_id) { tep_session_destroy(); tep_redirect(tep_href_link(FILENAME_SSL_CHECK)); } } // verify the browser user agent if the feature is enabled if (SESSION_CHECK_USER_AGENT == 'True') { $http_user_agent = getenv('HTTP_USER_AGENT'); if (!tep_session_is_registered('SESSION_USER_AGENT')) { $SESSION_USER_AGENT = $http_user_agent; tep_session_register('SESSION_USER_AGENT'); } if ($SESSION_USER_AGENT != $http_user_agent) { tep_session_destroy(); tep_redirect(tep_href_link(FILENAME_LOGIN)); } } // verify the IP address if the feature is enabled if (SESSION_CHECK_IP_ADDRESS == 'True') { $ip_address = tep_get_ip_address(); if (!tep_session_is_registered('SESSION_IP_ADDRESS')) { $SESSION_IP_ADDRESS = $ip_address; tep_session_register('SESSION_IP_ADDRESS'); } if ($SESSION_IP_ADDRESS != $ip_address) { tep_session_destroy(); tep_redirect(tep_href_link(FILENAME_LOGIN)); } } // create the shopping cart & fix the cart if necesary if (tep_session_is_registered('cart') && is_object($cart)) { if (PHP_VERSION < 4) { $broken_cart = $cart; $cart = new shoppingCart; $cart->unserialize($broken_cart); } } else { tep_session_register('cart'); $cart = new shoppingCart; } // include currencies class and create an instance require(DIR_WS_CLASSES . 'currencies.php'); $currencies = new currencies(); // include the mail classes require(DIR_WS_CLASSES . 'mime.php'); require(DIR_WS_CLASSES . 'email.php'); // set the language if (!tep_session_is_registered('language') || isset($HTTP_GET_VARS['language'])) { if (!tep_session_is_registered('language')) { tep_session_register('language'); tep_session_register('languages_id'); } include(DIR_WS_CLASSES . 'language.php'); $lng = new language(); if (isset($HTTP_GET_VARS['language']) && tep_not_null($HTTP_GET_VARS['language'])) { $lng->set_language($HTTP_GET_VARS['language']); } else { $lng->get_browser_language(); } $language = $lng->language['directory']; $languages_id = $lng->language['id']; } // include the language translations require(DIR_WS_LANGUAGES . $language . '.php'); // currency if (!tep_session_is_registered('currency') || isset($HTTP_GET_VARS['currency']) || ( (USE_DEFAULT_LANGUAGE_CURRENCY == 'true') && (LANGUAGE_CURRENCY != $currency) ) ) { if (!tep_session_is_registered('currency')) tep_session_register('currency'); if (isset($HTTP_GET_VARS['currency'])) { if (!$currency = tep_currency_exists($HTTP_GET_VARS['currency'])) $currency = (USE_DEFAULT_LANGUAGE_CURRENCY == 'true') ? LANGUAGE_CURRENCY : DEFAULT_CURRENCY; } else { $currency = (USE_DEFAULT_LANGUAGE_CURRENCY == 'true') ? LANGUAGE_CURRENCY : DEFAULT_CURRENCY; } } // navigation history if (tep_session_is_registered('navigation')) { if (PHP_VERSION < 4) { $broken_navigation = $navigation; $navigation = new navigationHistory; $navigation->unserialize($broken_navigation); } } else { tep_session_register('navigation'); $navigation = new navigationHistory; } $navigation->add_current_page(); // Shopping cart actions if (isset($HTTP_GET_VARS['action'])) { // redirect the customer to a friendly cookie-must-be-enabled page if cookies are disabled if ($session_started == false) { tep_redirect(tep_href_link(FILENAME_COOKIE_USAGE)); } if (DISPLAY_CART == 'true') { $goto = FILENAME_SHOPPING_CART; $parameters = array('action', 'cPath', 'products_id', 'pid'); } else { $goto = basename($PHP_SELF); if ($HTTP_GET_VARS['action'] == 'buy_now') { $parameters = array('action', 'pid', 'products_id'); } else { $parameters = array('action', 'pid'); } } switch ($HTTP_GET_VARS['action']) { // customer wants to update the product quantity in their shopping cart case 'update_product' : for ($i=0, $n=sizeof($HTTP_POST_VARS['products_id']); $i<$n; $i++) { if (in_array($HTTP_POST_VARS['products_id'][$i], (is_array($HTTP_POST_VARS['cart_delete']) ? $HTTP_POST_VARS['cart_delete'] : array()))) { $cart->remove($HTTP_POST_VARS['products_id'][$i]); } else { if (PHP_VERSION < 4) { // if PHP3, make correction for lack of multidimensional array. reset($HTTP_POST_VARS); while (list($key, $value) = each($HTTP_POST_VARS)) { if (is_array($value)) { while (list($key2, $value2) = each($value)) { if (ereg ("(.*)\]\[(.*)", $key2, $var)) { $id2[$var[1]][$var[2]] = $value2; } } } } $attributes = ($id2[$HTTP_POST_VARS['products_id'][$i]]) ? $id2[$HTTP_POST_VARS['products_id'][$i]] : ''; } else { $attributes = ($HTTP_POST_VARS['id'][$HTTP_POST_VARS['products_id'][$i]]) ? $HTTP_POST_VARS['id'][$HTTP_POST_VARS['products_id'][$i]] : ''; } $cart->add_cart($HTTP_POST_VARS['products_id'][$i], $HTTP_POST_VARS['cart_quantity'][$i], $attributes, false); } } tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters))); break; // customer adds a product from the products page case 'add_product' : if (isset($HTTP_POST_VARS['products_id']) && is_numeric($HTTP_POST_VARS['products_id']) && ($HTTP_POST_VARS['products_id']==(int)$HTTP_POST_VARS['products_id'])) { //++++ QT Pro: Begin Changed code $attributes=array(); if (isset($HTTP_POST_VARS['attrcomb']) && (preg_match("/^\d{1,10}-\d{1,10}(,\d{1,10}-\d{1,10})*$/",$HTTP_POST_VARS['attrcomb']))) { $attrlist=explode(',',$HTTP_POST_VARS['attrcomb']); foreach ($attrlist as $attr) { list($oid, $oval)=explode('-',$attr); if (is_numeric($oid) && $oid==(int)$oid && is_numeric($oval) && $oval==(int)$oval) $attributes[$oid]=$oval; } } if (isset($HTTP_POST_VARS['id']) && is_array($HTTP_POST_VARS['id'])) { foreach ($HTTP_POST_VARS['id'] as $key=>$val) { if (is_numeric($key) && $key==(int)$key && is_numeric($val) && $val==(int)$val) $attributes=$attributes + $HTTP_POST_VARS['id']; } } $cart->add_cart($HTTP_POST_VARS['products_id'], $cart->get_quantity(tep_get_uprid($HTTP_POST_VARS['products_id'], $attributes))+1, $attributes); //++++ QT Pro: End Changed Code } tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters))); break; // performed by the 'buy now' button in product listings and review page case 'buy_now' : if (isset($HTTP_GET_VARS['products_id'])) { if (tep_has_product_attributes($HTTP_GET_VARS['products_id'])) { tep_redirect(tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $HTTP_GET_VARS['products_id'])); } else { $cart->add_cart($HTTP_GET_VARS['products_id'], $cart->get_quantity($HTTP_GET_VARS['products_id'])+1); } } tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters))); break; case 'notify' : if (tep_session_is_registered('customer_id')) { if (isset($HTTP_GET_VARS['products_id'])) { $notify = $HTTP_GET_VARS['products_id']; } elseif (isset($HTTP_GET_VARS['notify'])) { $notify = $HTTP_GET_VARS['notify']; } elseif (isset($HTTP_POST_VARS['notify'])) { $notify = $HTTP_POST_VARS['notify']; } else { tep_redirect(tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action', 'notify')))); } if (!is_array($notify)) $notify = array($notify); for ($i=0, $n=sizeof($notify); $i<$n; $i++) { $check_query = tep_db_query("select count(*) as count from " . TABLE_PRODUCTS_NOTIFICATIONS . " where products_id = '" . $notify[$i] . "' and customers_id = '" . $customer_id . "'"); $check = tep_db_fetch_array($check_query); if ($check['count'] < 1) { tep_db_query("insert into " . TABLE_PRODUCTS_NOTIFICATIONS . " (products_id, customers_id, date_added) values ('" . $notify[$i] . "', '" . $customer_id . "', now())"); } } tep_redirect(tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action', 'notify')))); } else { $navigation->set_snapshot(); tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL')); } break; case 'notify_remove' : if (tep_session_is_registered('customer_id') && isset($HTTP_GET_VARS['products_id'])) { $check_query = tep_db_query("select count(*) as count from " . TABLE_PRODUCTS_NOTIFICATIONS . " where products_id = '" . $HTTP_GET_VARS['products_id'] . "' and customers_id = '" . $customer_id . "'"); $check = tep_db_fetch_array($check_query); if ($check['count'] > 0) { tep_db_query("delete from " . TABLE_PRODUCTS_NOTIFICATIONS . " where products_id = '" . $HTTP_GET_VARS['products_id'] . "' and customers_id = '" . $customer_id . "'"); } tep_redirect(tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')))); } else { $navigation->set_snapshot(); tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL')); } break; case 'cust_order' : if (tep_session_is_registered('customer_id') && isset($HTTP_GET_VARS['pid'])) { if (tep_has_product_attributes($HTTP_GET_VARS['pid'])) { tep_redirect(tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $HTTP_GET_VARS['pid'])); } else { $cart->add_cart($HTTP_GET_VARS['pid'], $cart->get_quantity($HTTP_GET_VARS['pid'])+1); } } tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters))); break; } } // include the who's online functions require(DIR_WS_FUNCTIONS . 'whos_online.php'); tep_update_whos_online(); // include the password crypto functions require(DIR_WS_FUNCTIONS . 'password_funcs.php'); // include validation functions (right now only email address) require(DIR_WS_FUNCTIONS . 'validations.php'); // split-page-results require(DIR_WS_CLASSES . 'split_page_results.php'); // infobox require(DIR_WS_CLASSES . 'boxes.php'); // auto activate and expire banners require(DIR_WS_FUNCTIONS . 'banner.php'); tep_activate_banners(); tep_expire_banners(); // auto expire special products require(DIR_WS_FUNCTIONS . 'specials.php'); tep_expire_specials(); // calculate category path if (isset($HTTP_GET_VARS['cPath'])) { $cPath = $HTTP_GET_VARS['cPath']; } elseif (isset($HTTP_GET_VARS['products_id']) && !isset($HTTP_GET_VARS['manufacturers_id'])) { $cPath = tep_get_product_path($HTTP_GET_VARS['products_id']); } else { $cPath = ''; } if (tep_not_null($cPath)) { $cPath_array = tep_parse_category_path($cPath); $cPath = implode('_', $cPath_array); $current_category_id = $cPath_array[(sizeof($cPath_array)-1)]; } else { $current_category_id = 0; } // include the breadcrumb class and start the breadcrumb trail require(DIR_WS_CLASSES . 'breadcrumb.php'); $breadcrumb = new breadcrumb; $breadcrumb->add(HEADER_TITLE_TOP, HTTP_SERVER); $breadcrumb->add(HEADER_TITLE_CATALOG, tep_href_link(FILENAME_DEFAULT)); // add category names or the manufacturer name to the breadcrumb trail if (isset($cPath_array)) { for ($i=0, $n=sizeof($cPath_array); $i<$n; $i++) { $categories_query = tep_db_query("select categories_name from " . TABLE_CATEGORIES_DESCRIPTION . " where categories_id = '" . (int)$cPath_array[$i] . "' and language_id = '" . (int)$languages_id . "'"); if (tep_db_num_rows($categories_query) > 0) { $categories = tep_db_fetch_array($categories_query); $breadcrumb->add($categories['categories_name'], tep_href_link(FILENAME_DEFAULT, 'cPath=' . implode('_', array_slice($cPath_array, 0, ($i+1))))); } else { break; } } } elseif (isset($HTTP_GET_VARS['manufacturers_id'])) { $manufacturers_query = tep_db_query("select manufacturers_name from " . TABLE_MANUFACTURERS . " where manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'"); if (tep_db_num_rows($manufacturers_query)) { $manufacturers = tep_db_fetch_array($manufacturers_query); $breadcrumb->add($manufacturers['manufacturers_name'], tep_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id'])); } } // add the products model to the breadcrumb trail if (isset($HTTP_GET_VARS['products_id'])) { $model_query = tep_db_query("select products_model from " . TABLE_PRODUCTS . " where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "'"); if (tep_db_num_rows($model_query)) { $model = tep_db_fetch_array($model_query); $breadcrumb->add($model['products_model'], tep_href_link(FILENAME_PRODUCT_INFO, 'cPath=' . $cPath . '&products_id=' . $HTTP_GET_VARS['products_id'])); } } // initialize the message stack for output messages require(DIR_WS_CLASSES . 'message_stack.php'); $messageStack = new messageStack; // set which precautions should be checked define('WARN_INSTALL_EXISTENCE', 'true'); define('WARN_CONFIG_WRITEABLE', 'true'); define('WARN_SESSION_DIRECTORY_NOT_WRITEABLE', 'true'); define('WARN_SESSION_AUTO_START', 'true'); define('WARN_DOWNLOAD_DIRECTORY_NOT_READABLE', 'true'); define('FILENAME_POPUP_EXTRA_IMAGES', 'popup_extra_images.php'); //Added for Extra Images Contribution define('TABLE_PRODUCTS_EXTRA_IMAGES', 'products_extra_images'); //Added for Extra Images Contribution ?> Quote Link to comment Share on other sites More sharing options...
northerndreamer Posted July 1, 2006 Share Posted July 1, 2006 We use the QT Pro - Low Stock report to help us reorder stock and think it's great! We would like to somehow include the model number of our products next to the product name in our Low Stock Report. Can this be possible? Quote Link to comment Share on other sites More sharing options...
Fredrik.r Posted July 5, 2006 Share Posted July 5, 2006 (edited) Need som help, a shop is about to open NOW and there are problems with getting the product attributes to show in basket, admin and email confirmation. Which characters are actually allowed in product attributes? The site I'm building has attributes like "L - to fit chest 20 1/4 -21 inches". Isn't it ok with "-" and "/"? Thanks!! Edited July 5, 2006 by Fredrik.r Quote Link to comment Share on other sites More sharing options...
Fredrik.r Posted July 6, 2006 Share Posted July 6, 2006 (edited) Important issue with QTPro; When updating to osCommerce 051113 their is an issue with "Adding Non-Existing Products To Cart" which includes this code change in includes/classes/shopping_cart.php; if ($this->in_cart($products_id)) { $this->update_quantity($products_id, $qty, $attributes); } else { $this->contents[$products_id] = array('qty' => $qty); should be changed to if ($this->in_cart($products_id_string)) { $this->update_quantity($products_id_string, $qty, $attributes); } else { $this->contents[$products_id_string] = array('qty' => $qty); When doing this attributes are no longer passed t o shopping cart, checkout process, orders in admin and order confirmation email when using QTPro. Could I just use the old code above or should I not update according to the topic "Adding Non-Existing Products To Cart" at all (remove all code that belongs to this bug fix)? Edited July 6, 2006 by Fredrik.r Quote Link to comment Share on other sites More sharing options...
trogette Posted July 10, 2006 Share Posted July 10, 2006 Thanks for this Fredrik it's a clue about something I'm looking at atm. I can't remember if I applied that update to my shop or not and I don't want to go looking right now as I'm trying to concentrate on the problem at hand, iykwim, but my real shop works alright in this respect while my local server development shop doesn't. *however* on that one I'm in the middle of integrating the new version of Master Products. But I've noticed that selected options aren't showing up on products that *don't* use the Master Products display system which makes me wornder if it's something to do with that change. Meanwhile... Does anyone currently following this thread have experience of building pad_ files? I'm thinking I need to make one to go on the slave products listings when I have options on slaves. If anyone here can give me any pointers to the logic and construction I'd be really grateful, and I'd be more grateful if anyone's done that already! Quote Link to comment Share on other sites More sharing options...
Guest Posted July 10, 2006 Share Posted July 10, 2006 I've had QT Pro 4.25 installed for a little while now, and it works fine except for one small point. I don't have any way to modify stock levels of existing product/attribute combinations in stock.php. I can add new ones, but there's no way to modify. So when the stock goes below 0, and then is replenished, the only I've been able to "restock" it is to go into phpMyAdmin and change the product_stock table directly. Should this be working, or is it a change I'll have to make manually? And if so, has anyone already done this that could possibly share some code? No sense in reinventing the wheel... Thanks! Quote Link to comment Share on other sites More sharing options...
Terra Posted July 10, 2006 Share Posted July 10, 2006 I've had QT Pro 4.25 installed for a little while now, and it works fine except for one small point. I don't have any way to modify stock levels of existing product/attribute combinations in stock.php. I can add new ones, but there's no way to modify. So when the stock goes below 0, and then is replenished, the only I've been able to "restock" it is to go into phpMyAdmin and change the product_stock table directly. Works okay on my install - I have a stock button next to the product under "catalog" and when clicking it, I get to a page where I can upload new stock. If the contrib is installed correctly, you should be okay. all the best, Terra Quote My code for combining PayPal IPN with ** QTPro 4.25 ** osC Affiliate ** CCGV(trad) and how to solve the invoice already paid error General info: Allow customer to delete order comment ** FTP Programs & Text Editors ** Amending order email ** Link to comment Share on other sites More sharing options...
sdrio Posted July 12, 2006 Share Posted July 12, 2006 Eek, what a gigantic thread. I've got to admit, I'm confused now. I think the QTpro addon is what I need, but there are about 30 versions of it in the download area - could someone help me work out which one I need? I have a shop I'm developing, it will sell items of clothing - teeshirts, shorts etc. I'll list each colour as a separate product, but each product will be in various sizes. I've already configured that to work from the customer end, using the standard OsCommerce files, but as everyone else here is doing, I want to assign stock levels for each size, rather than just the item itself. So far so good, I hope. Is there a particular version that will do that, and hopefully not add a lot of stuff I don't need? I'd rather use an older, stable release if it's easier to use - I'm no whizz at all this, so the simpler the installation the better - not that I don't appreciate the work people have done to develop this! Thanks, version is 2.2 btw. Quote Link to comment Share on other sites More sharing options...
Guest Posted July 20, 2006 Share Posted July 20, 2006 Hi Northerndreamer, If you haven't already done this: We use the QT Pro - Low Stock report to help us reorder stock and think it's great! We would like to somehow include the model number of our products next to the product name in our Low Stock Report. Can this be possible? This is the code change I made from line 94 of the admin/stats_low_stock_attrib.php file: $products_query_raw = "select p.products_id, p.products_model, pd.products_name, p.products_quantity,p.products_price, l.name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_LANGUAGES . " l where p.products_id = pd.products_id and p.products_id = pd.products_id and l.languages_id = pd.language_id and pd.language_id = '" . (int)$languages_id . "' order by p.products_model ASC"; I added p.products_model to the first line of the db query and changed the order by to p.product_model instead of the product name. Then made changes from line 112 of the same file to include the model number - I also changed the text size on the product name: <td class="formAreaTitle"><?php echo '<a href="' . tep_href_link(FILENAME_STOCK, 'product_id=' . $products['products_id']) . '"><strong style="font-size:14px;">' . $products['products_name'] . '</a> - ' . $products['products_model'] . '</strong>'; ?> </td> Hope this helps someone. Regards Rhys Quote Link to comment Share on other sites More sharing options...
mabanman Posted July 21, 2006 Share Posted July 21, 2006 Hi, Im a newbie trying to install QTPro without access to PHPmyadmin on our host server. So Ive tried to copy over each original relevant file individually and get this message on browsing. ... Fatal error: Cannot redeclare tep_set_banner_status() (previously declared in ..../catalog/includes/functions/general.php:735) in ..../catalog/includes/functions/banner.php on line 15 Could some kind person point me in the right direction ?? With Many thanks ATTACHMENT :- general.php:735 section reads as.... // Sets the status of a banner function tep_set_banner_status($banners_id, $status) { if ($status == '1') { return tep_db_query("update " . TABLE_BANNERS . " set status = '1', expires_impressions = NULL, expires_date = NULL, date_status_change = NULL where banners_id = '" . $banners_id . "'"); } elseif ($status == '0') { return tep_db_query("update " . TABLE_BANNERS . " set status = '0', date_status_change = now() where banners_id = '" . $banners_id . "'"); } else { return -1; } } //// banner.php on line 15 section reads as .... // Sets the status of a banner function tep_set_banner_status($banners_id, $status) { if ($status == '1') { return tep_db_query("update " . TABLE_BANNERS . " set status = '1', date_status_change = now(), date_scheduled = NULL where banners_id = '" . (int)$banners_id . "'"); } elseif ($status == '0') { return tep_db_query("update " . TABLE_BANNERS . " set status = '0', date_status_change = now() where banners_id = '" . (int)$banners_id . "'"); } else { return -1; } } Quote Link to comment Share on other sites More sharing options...
Guest Posted July 21, 2006 Share Posted July 21, 2006 Works okay on my install - I have a stock button next to the product under "catalog" and when clicking it, I get to a page where I can upload new stock. If the contrib is installed correctly, you should be okay. all the best, Terra Is it possible you (or someone else for whom this works) could post a screenshot of what they see when they click the stock button, so I can see what I'm missing? Thanks! Quote Link to comment Share on other sites More sharing options...
Buesi Posted July 21, 2006 Share Posted July 21, 2006 When I add the stock levels for a product and say 3 attributes have zero and 1 attribute has 1 item in stock, when I go back to the product it has suddenly been turned to inactive! What can I do so that the product remains active even if only 1 item is left? Thanks! Quote Thanx, Buesi Link to comment Share on other sites More sharing options...
trogette Posted July 22, 2006 Share Posted July 22, 2006 set allow checkout to 'true' in the admin section for stock Quote Link to comment Share on other sites More sharing options...
Buesi Posted July 24, 2006 Share Posted July 24, 2006 set allow checkout to 'true' in the admin section for stock Great! Thanks for that - I hadn't realised that the contribution would take care of so much in the frontend that you can leave the allow checkout setting at "true". This really is a good contribution! Quote Thanx, Buesi Link to comment Share on other sites More sharing options...
Lil Paws Posted July 25, 2006 Share Posted July 25, 2006 I just installed the QTPro v4.2 contribution - I updated the product attributes with the stock info for one of my products - went to my site/store to see the results and now when I click on the "More Info" button, the product description no longer appears. Here is the URL to the Product: http://www.lilhouseofpaws.com/index2.php?cPath=65_80 When you click on "More Info" button you'll see how there is nothing about the product. Before I installed the contrib, the info was appearing ok. Am I missing something on the admin control panel or somewhere else? Any help would be greatly appreciated! Thanks! 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.
Note: Your post will require moderator approval before it will be visible.