Jan Zonjee Posted March 29, 2005 Share Posted March 29, 2005 I would say, try this, but no guaranties since I haven't installed this contribution so I can't test the 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 // BOF Separate Pricing Per Customer if ($status_product_prices_table == true) { $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, tmp_pp.products_price, p.products_tax_class_id, IF(tmp_pp.status, tmp_pp.specials_new_products_price, NULL) as specials_new_products_price, IF(tmp_pp.status, tmp_pp.specials_new_products_price, tmp_pp.products_price) as final_price from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd left join " . $product_prices_table . " as tmp_pp using(products_id), " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c left join " . TABLE_CATEGORIES . " c on p2c.categories_id = c.categories_id where c.categories_status = '1' and 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'] . "'"; } else { // either retail or no need to get correct special prices $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c left join " . TABLE_SPECIALS_RETAIL_PRICES . " s on p.products_id = s.products_id left join " . TABLE_CATEGORIES . " c on p2c.categories_id = c.categories_id where c.categories_status = '1' and 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'] . "'"; } // end else { // either retail... // EOF Separate Pricing Per Customer } else { // We show them all // BOF Separate Pricing Per Customer if ($status_product_prices_table == true) { $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, tmp_pp.products_price, p.products_tax_class_id, IF(tmp_pp.status, tmp_pp.specials_new_products_price, NULL) as specials_new_products_price, IF(tmp_pp.status, tmp_pp.specials_new_products_price, tmp_pp.products_price) as final_price from " . TABLE_PRODUCTS . " p left join " . $product_prices_table . " as tmp_pp using(products_id), " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m left join " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c on p.products_id = p2c.products_id left join " . TABLE_CATEGORIES . " c on p2c.categories_id = c.categories_id where c.categories_status = '1' and p.products_status = '1' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'"; } else { // either retail or no need to get correct special prices $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m left join " . TABLE_SPECIALS_RETAIL_PRICES . " s on p.products_id = s.products_id left join " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c on p.products_id = p2c.products_id left join " . TABLE_CATEGORIES . " c on p2c.categories_id = c.categories_id where c.categories_status = '1' and p.products_status = '1' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'"; } // end else { // either retail... // EOF Separate Pricing Per Customer } } else { // show the products in a given categorie if (isset($HTTP_GET_VARS['filter_id']) && tep_not_null($HTTP_GET_VARS['filter_id'])) { // We are asked to show only specific catgeory; // BOF Separate Pricing Per Customer if ($status_product_prices_table == true) { $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, tmp_pp.products_price, p.products_tax_class_id, IF(tmp_pp.status, tmp_pp.specials_new_products_price, NULL) as specials_new_products_price, IF(tmp_pp.status, tmp_pp.specials_new_products_price, tmp_pp.products_price) as final_price from " . TABLE_PRODUCTS . " p left join " . $product_prices_table . " as tmp_pp using(products_id), " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c left join " . TABLE_CATEGORIES . " c on c.categories_id = p2c.categories_id where c.categories_status = '1' and 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 . "'"; } else { // either retail or no need to get correct special prices $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c left join " . TABLE_SPECIALS_RETAIL_PRICES . " s using(products_id) left join " . TABLE_CATEGORIES . " c on c.categories_id = p2c.categories_id where c.categories_status = '1' and 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 . "'"; } // end else { // either retail... // EOF Separate Pricing Per Customer } else { // We show them all // BOF Separate Pricing Per Customer if ($status_product_prices_table == true) { $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, tmp_pp.products_price, p.products_tax_class_id, IF(tmp_pp.status, tmp_pp.specials_new_products_price, NULL) as specials_new_products_price, IF(tmp_pp.status, tmp_pp.specials_new_products_price, tmp_pp.products_price) as final_price from " . TABLE_PRODUCTS_DESCRIPTION . " pd left join " . $product_prices_table . " as tmp_pp using(products_id), " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c left join " . TABLE_CATEGORIES . " c on c.categories_id = p2c.categories_id where c.categories_status = '1' and p.products_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$current_category_id . "'"; } else { // either retail or no need to get correct special prices $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c left join " . TABLE_SPECIALS_RETAIL_PRICES . " s on p.products_id = s.products_id left join " . TABLE_CATEGORIES . " c on c.categories_id = p2c.categories_id where c.categories_status = '1' and p.products_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$current_category_id . "'"; } // end else { // either retail... // EOF Separate Pricing per Customer Quote Link to comment Share on other sites More sharing options...
Jan Zonjee Posted March 29, 2005 Share Posted March 29, 2005 Howard, I now need to figure out my problem with multiple conditions... Is our hope that someone here can give insight on how to do this? I know I won't have much time for this in the next months. So hopefully there is someone else who can take a look at it. Quote Link to comment Share on other sites More sharing options...
Guest Posted March 29, 2005 Share Posted March 29, 2005 Ok, I feel like a total tool! I've read through the file & other instructions, but I can't seem to find out where the "admin" can log into to test the functionality. As well, how do I activate someone as a wholesale client if I have manually inputed the information Thanks! Quote Link to comment Share on other sites More sharing options...
JEWbacca Posted March 30, 2005 Share Posted March 30, 2005 Ok, I feel like a total tool! I've read through the file & other instructions, but I can't seem to find out where the "admin" can log into to test the functionality. As well, how do I activate someone as a wholesale client if I have manually inputed the information Thanks! <{POST_SNAPBACK}> To login as a user group, you must first create an account. Just register at the site using an email of your choice. From there, follow these directions ----> http://www.askmarvin.ca/temp/login.htm To change ANY customer to a group of your choice, you must first create the group and then go into 'customers' tab and then the customers option (within that tab) in the admin panel and select what user group they are apart of. http://www.askmarvin.ca/temp/pricing_groups.htm Good Luck. Nate Quote Link to comment Share on other sites More sharing options...
Marvin Miller Posted March 30, 2005 Share Posted March 30, 2005 I'm glad someone is making use of those docs :D You can Overview Right from The Start Here. Quote Best & Thanks;Marvin----------------------osCommerce 2.3.3.4 Link to comment Share on other sites More sharing options...
Guest Posted March 30, 2005 Share Posted March 30, 2005 Awesome... That works for me! Thanks for that Nate! Now if I could only figure out these other errors! Fatal error: Call to undefined function: get_content_type() in /mnt/web_g/d47/s36/b01f2394/www/store/nfoscomm/catalog/includes/classes/order.php on line 175 I've looked everywhere, did some file comparitions & stuff like that, but I can't seem to find the error anywhere.... I will also include the order.php file.... function cart() { global $customer_id, $sendto, $billto, $cart, $languages_id, $currency, $currencies, $shipping, $payment; $this->content_type = $cart->get_content_type(); $customer_address_query = tep_db_query("select c.customers_firstname, c.customers_lastname, c.customers_telephone, c.customers_email_address, ab.entry_company, ab.entry_street_address, ab.entry_suburb, ab.entry_postcode, ab.entry_city, ab.entry_zone_id, z.zone_name, co.countries_id, co.countries_name, co.countries_iso_code_2, co.countries_iso_code_3, co.address_format_id, ab.entry_state from " . TABLE_CUSTOMERS . " c, " . TABLE_ADDRESS_BOOK . " ab left join " . TABLE_ZONES . " z on (ab.entry_zone_id = z.zone_id) left join " . TABLE_COUNTRIES . " co on (ab.entry_country_id = co.countries_id) where c.customers_id = '" . (int)$customer_id . "' and ab.customers_id = '" . (int)$customer_id . "' and c.customers_default_address_id = ab.address_book_id"); Now these are the lines 172 to 177.... I hope someone can help me out.... I know that I'm going to get an error in the shopping_cart.php file as well, but I can't make it there again! I really got to learn php..... Quote Link to comment Share on other sites More sharing options...
netstep Posted March 30, 2005 Share Posted March 30, 2005 Janz -- RE: #751 Jan, Thank you SO much for your effort and help. I gave it a shot and received an error. I'm not afraid of work, but maybe you would point me in the right direction. The error below ONLY occurs after customer group member login. Retail customer login does not trigger it. Which query lines do I need to pick at to figure this out? 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'as products_price, p.products_tax_class_id, p.products_image, s.specials_new_pro' at line 1 select p.products_id, pd.products_name, IF(pg.customers_group_price IS NOT NULL,pg.customers_group_price, p.products_price as products_price, p.products_tax_class_id, p.products_image, s.specials_new_products_price from products p, products_description pd, specials s, categories c, products_to_categories p2c LEFT JOIN products_groups pg using (products_id, customers_group_id) where p.products_status = '1' and c.categories_status='1' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and p.products_status = '1' and p.products_id = s.products_id and pd.products_id = s.products_id and pd.language_id = '1' and s.status = '1' and s.customers_group_id= '1' order by s.specials_date_added desc limit 10 Quote Sam M. - Seattle Link to comment Share on other sites More sharing options...
shop007 Posted March 30, 2005 Share Posted March 30, 2005 After 4 hours I think I got it working somehow! Also, you are correct on your using your different syntax. Here's another question, if I add a contrib and add sql info to the database and I remove the contrib and leave the sql info in the database, will this cause problems? Lastly, Any suggestions what I do with products that have different conditions/prices? Thanks Howard, Just try to follow the directions in that contribution. In the two files that are in the zip you obviously don't need to change anything anymore, but in the others you do (and set the price for retail customers to 0.00 of course). You might need to use a slightly different syntax e.g. instead of $products_new['products_price'] you might need $products_new[$x]['products_price']. Use whatever is used in the SPPC version. Example from hide_price_if_$0 contribution: ? ? ? ?//$products_price = $currencies->display_price($products_new['products_price'], tep_get_tax_rate($products_new['products_tax_class_id'])); ? ? ? ?// Start "Hide Price if $0" edit 1 of 2 (uncomment above line if removing this contribution) $products_price = (($products_new['products_price'] > 0) ? $currencies->display_price($products_new['products_price'], tep_get_tax_rate($products_new['products_tax_class_id'])) : ''); // End "Hide Price if $0" edit 1 of 2 <{POST_SNAPBACK}> Quote Link to comment Share on other sites More sharing options...
Jan Zonjee Posted March 30, 2005 Share Posted March 30, 2005 I gave it a shot and received an error. I'm not afraid of work, but maybe you would point me in the right direction. Which query lines do I need to pick at to figure this out? Looks like code from boxes/specials.php to me, you are missing a ")": } else { // $sppc_customer_group_id is in the session variables, so must be set $random_product = tep_random_select("select p.products_id, pd.products_name, IF(pg.customers_group_price IS NOT NULL,pg.customers_group_price, p.products_price) as products_price, p.products_tax_class_id, Quote Link to comment Share on other sites More sharing options...
Guest Posted March 30, 2005 Share Posted March 30, 2005 Hi, This looks like a fantastic contribution and am looking forward to getting it to work. I've installed it, and the basics are there, but my catalog/index.php has gone screwy (ie the product name isn't showing, it seems a column of the table has disappeared) and I just can't find what's wrong. Has anyone any ideas which bit of code isn't happy... Quote Link to comment Share on other sites More sharing options...
Jan Zonjee Posted March 30, 2005 Share Posted March 30, 2005 Has anyone any ideas which bit of code isn't happy...Looks like you got a very special includes/modules/product_listing.php there. I suppose the results after a search don't look very good either. Quote Link to comment Share on other sites More sharing options...
Guest Posted March 30, 2005 Share Posted March 30, 2005 Thanks for the comments Jan. Luckily there is no search facility on this site, so that's nothing to worry about. Your pointer to the product_listing.php helped me locate it - thanks very much. Quote Link to comment Share on other sites More sharing options...
netstep Posted March 30, 2005 Share Posted March 30, 2005 Jan, ...I should have realized the problem was in my specials box. I messed with it some but it's still kinda messed up. ...is there a way to get you $$ in appreciation for your help? I'm new to open source stuff...I'm not used to not being screwed by programmers every time I need some help. It's wonderful. :D I'm missing something. How do I merge the two below? I included my merging attempt and the error code. Separate pricing per customer Contribution-716: catalog/includes/boxes/specials.php Line 27 }else{ $random_product = tep_random_select("select p.products_id, pd.products_name, IF(pg.customers_group_price IS NOT NULL,pg.customers_group_price, p.products_price) as products_price, p.products_tax_class_id, p.products_image, s.specials_new_products_price from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_SPECIALS . " s LEFT JOIN " . TABLE_PRODUCTS_GROUPS . " pg using (products_id, customers_group_id) where p.products_status = '1' and p.products_id = s.products_id and pd.products_id = s.products_id and pd.language_id = '" . (int)$languages_id . "' and s.status = '1' and s.customers_group_id= '".$customer_group_id."' order by s.specials_date_added desc limit " . MAX_RANDOM_SELECT_SPECIALS); Enable/Disable categories Contribution-326: catalog/includes/boxes/specials.php Line 14 if ($random_product = tep_random_select("select p.products_id, pd.products_name, p.products_price, p.products_tax_class_id, p.products_image, s.specials_new_products_price from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_SPECIALS . " s, " . TABLE_CATEGORIES . " c, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where c.categories_status='1' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and p.products_status = '1' and p.products_id = s.products_id and pd.products_id = s.products_id and pd.language_id = '" . (int)$languages_id . "' and s.status = '1' order by s.specials_date_added desc limit " . MAX_RANDOM_SELECT_SPECIALS)) { My feeble attempt to merge the two $random_product = tep_random_select("select p.products_id, pd.products_name, IF(pg.customers_group_price IS NOT NULL,pg.customers_group_price, p.products_price) as products_price, p.products_tax_class_id, p.products_image, s.specials_new_products_price from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_SPECIALS . " s, " . TABLE_CATEGORIES . " c, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c LEFT JOIN " . TABLE_PRODUCTS_GROUPS . " pg using (products_id, pg.customers_group_id) where p.products_status = '1' and c.categories_status='1' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and p.products_status = '1' and p.products_id = s.products_id and pd.products_id = s.products_id and pd.language_id = '" . (int)$languages_id . "' and s.status = '1' and s.customers_group_id= '".$customer_group_id."' order by s.specials_date_added desc limit " . MAX_RANDOM_SELECT_SPECIALS); The error code reminding me I'm an idiot and need to improve my skills... 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.customers_group_id) where p.products_status = '1' and c.categories_status='1' a' at line 1 select p.products_id, pd.products_name, IF(pg.customers_group_price IS NOT NULL,pg.customers_group_price, p.products_price) as products_price, p.products_tax_class_id, p.products_image, s.specials_new_products_price from products p, products_description pd, specials s, categories c, products_to_categories p2c LEFT JOIN products_groups pg using (products_id, pg.customers_group_id) where p.products_status = '1' and c.categories_status='1' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and p.products_status = '1' and p.products_id = s.products_id and pd.products_id = s.products_id and pd.language_id = '1' and s.status = '1' and s.customers_group_id= '2' order by s.specials_date_added desc limit 10 Quote Sam M. - Seattle Link to comment Share on other sites More sharing options...
Jan Zonjee Posted March 30, 2005 Share Posted March 30, 2005 I'm missing something. How do I merge the two below? I think this might work better (you can't left join products_groups with p2c on those conditions because there is no customer_group_id in that table). $random_product = tep_random_select("select p.products_id, pd.products_name, IF(pg.customers_group_price IS NOT NULL,pg.customers_group_price, p.products_price) ?as products_price, p.products_tax_class_id, p.products_image, s.specials_new_products_price from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_SPECIALS . " s LEFT JOIN " . TABLE_PRODUCTS_GROUPS . " pg using (products_id, pg.customers_group_id), " . TABLE_CATEGORIES . " c, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and c.categories_status='1' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and p.products_status = '1' and p.products_id = s.products_id and pd.products_id = s.products_id and pd.language_id = '" . (int)$languages_id . "' and s.status = '1' and s.customers_group_id= '".$customer_group_id."' order by s.specials_date_added desc limit " . MAX_RANDOM_SELECT_SPECIALS); The error code reminding me I'm an idiot and need to improve my skills... I wouldn't say that. SQL is a black magic craft in itself and I won't say I master it. Learning about PHP and MySQL is certainly not a waste of time when you want to customize something like osC... Quote Link to comment Share on other sites More sharing options...
Jan Zonjee Posted March 30, 2005 Share Posted March 30, 2005 Howard, Here's another question, if I add a contrib and add sql info to the database and I remove the contrib and leave the sql info in the database, will this cause problems? Probably not, but the tables in question become larger and your site likely a little bit slower. Lastly, Any suggestions what I do with products that have different conditions/prices? Safest bet would be to add them all as separate products... Quote Link to comment Share on other sites More sharing options...
shop007 Posted March 31, 2005 Share Posted March 31, 2005 Jan, Your contrib is really great.. however, we really need someone to have a contrib that allows the different price groups to have attributes! I am having so much problems with products that are in different conditions and having the same product listed 2-4 times with only the condition being different doesn't look so good on the screen. It would be sooooooooo much better to have the product listed once and then for that price group (dealer) to show the price for condition: Excellent, Good, Fair etc. Safest bet would be to add them all as separate products... <{POST_SNAPBACK}> Quote Link to comment Share on other sites More sharing options...
shop007 Posted March 31, 2005 Share Posted March 31, 2005 Jan, Hers's a good one... In my shop I want the Price break level 1 price to show. ie: My 1 price is $89.87 My 2 or more price is $79.87. However with your mod it auto calculates the correct price is which is great but I also want it to show the $79.87 price so that customers know that if they order 2 the price is $79.87 ea. I would assume a mod would have to be made somehow to collect the price break level field and the qty field into the output display. How and where would this be done? Thanks Quote Link to comment Share on other sites More sharing options...
Jan Zonjee Posted March 31, 2005 Share Posted March 31, 2005 (edited) I would assume a mod would have to be made somehow to collect the price break level field and the qty field into the output display. How and where would this be done? See the Quantity Price Breaks for Separate Pricing Per Customer contribution. Oh, and there is a bug in there: search in the admin/categories.php for ", ," (comma space comma) and replace it with one comma. Edited March 31, 2005 by JanZ Quote Link to comment Share on other sites More sharing options...
netstep Posted March 31, 2005 Share Posted March 31, 2005 Jan, I'm excited about php/mySQL. I'm already doing things I thought way out of reach a year ago. Unfortunately I'm nearing burn-out on this project. You almost nailed the query. There was an error = "unexpected "." so I ran the query in phpMyadmin. It spit back the following details, but... I saw an uneven number of quotes in the query, but when comparing the merged code and original SPPC code...I couldn't see the problem. Would you be willing to glance at it 1 more time? ERROR: Unclosed quote @ 862STR: " SQL: select p.products_id, pd.products_name, IF(pg.customers_group_price IS NOT NULL,pg.customers_group_price, p.products_price) as products_price, p.products_tax_class_id, p.products_image, s.specials_new_products_price from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_SPECIALS . " s LEFT JOIN " . TABLE_PRODUCTS_GROUPS . " pg using (products_id, pg.customers_group_id), " . TABLE_CATEGORIES . " c, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and c.categories_status='1' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and p.products_status = '1' and p.products_id = s.products_id and pd.products_id = s.products_id and pd.language_id = '" . (int)$languages_id . "' and s.status = '1' and s.customers_group_id= '".$customer_group_id."' order by s.specials_date_added desc limit " . MAX_RANDOM_SELECT_SPECIALS Quote Sam M. - Seattle Link to comment Share on other sites More sharing options...
Jan Zonjee Posted March 31, 2005 Share Posted March 31, 2005 I'm pretty sure the extra quote is needed here: desc limit " . MAX_RANDOM_SELECT_SPECIALS); To be on the safe side better change it to: desc limit " . MAX_RANDOM_SELECT_SPECIALS . " "); Quote Link to comment Share on other sites More sharing options...
royalfunk Posted March 31, 2005 Share Posted March 31, 2005 In this newest version, can a user who created an account, but has not been approved yet, check out placing an order in the system? Thanks! -Aaron Quote Link to comment Share on other sites More sharing options...
Jan Zonjee Posted March 31, 2005 Share Posted March 31, 2005 can a user who created an account, but has not been approved yet, check out placing an order in the system? Sure, as a retail customer with retail prices. Quote Link to comment Share on other sites More sharing options...
royalfunk Posted March 31, 2005 Share Posted March 31, 2005 Sure, as a retail customer with retail prices. <{POST_SNAPBACK}> Ew... I would like to change that for our store. We don't want unapproved customers placing orders. How can I make it so a user who is not approved cannot place an order? Thanks, Aaron Quote Link to comment Share on other sites More sharing options...
JEWbacca Posted March 31, 2005 Share Posted March 31, 2005 Ew...I would like to change that for our store. We don't want unapproved customers placing orders. How can I make it so a user who is not approved cannot place an order? Thanks, Aaron <{POST_SNAPBACK}> Aaron, There are a few different' contributions out there that would work. Here is one http://www.oscommerce.com/community/contributions,1339 Quote Link to comment Share on other sites More sharing options...
mat123slade Posted March 31, 2005 Share Posted March 31, 2005 Another speed problem... I'm currently running a new Sales Site (postcards, currently about 3200 postcards and will be going up to somewhere close to 40000. Since I have installed SPPC in it's latest release, everything seams to be running slowly, pages taking ever so long to load. Could there be a specific reason for this (or connection with sppc), I don't know where to start looking for the problem... Maybe you can point me out something to do, here check what I mean about the speed : www.postoldcards.com/new/ I'd be gratefull if you have some idea... Thanx and congratulations, I have SPPC running on a (approx) 700 products site and it all runs really smoothly, also finaly managed to integrate it with BTS... thanx to some community help. 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.