AJ33 Posted March 20, 2007 Share Posted March 20, 2007 Hi, I searched through this topic but can't seem to find my problem, which is that my customer group prices are showing up on the cart and checkout pages, but not on the index page (like after you click on a category and it shows a list of products in that category) - instead it just shows the regular price. I have compared my index file to the one that came in the install package, and the code is the same (except for a change I put in to do with page heading). I can't figure out why the price is showing correctly on cart but not index. :-P I hope someone here can help. I downloaded version 4.15, and then added all the bug fixes that followed. I also had to fix one bug myself, in index.php: there was a '$listing_sql =' line that had " p" where it should have been " p, ", and it caused a server error when you tried to sort by price. Quote Link to comment Share on other sites More sharing options...
Jan Zonjee Posted March 20, 2007 Share Posted March 20, 2007 my customer group prices are showing up on the cart and checkout pages, but not on the index page Can you try the code for setting the customer group id as in the first post on this page instead of the: global $customer_group_id; if(!isset($customer_group_id)) { $customer_group_id = '0'; } Also in includes/modules/product_listing.php (which is responsible for displaying the lists with products on index.php). Quote Link to comment Share on other sites More sharing options...
Jan Zonjee Posted March 20, 2007 Share Posted March 20, 2007 I have installed version 4.1.5 with SPPC attribute modEverything runs well. But when I selected a category as a customer in the "index.php" page, I got an error. It said that " Table 'osc_test_c.specials_retail_prices' doesn't exist ". If it is not there now, use your site not logged-in and sort by price in index.php. Probably not needed any more (table is added and updated automatically), but just in case. Quote Link to comment Share on other sites More sharing options...
TracyS Posted March 20, 2007 Share Posted March 20, 2007 Perhaps those products are in more than one category? Try: $products_new_query_raw = "select distinct p.products_id, pd.products_name, p.products_image, p.products_price, p.products_master, p.products_master_status, etcetera Well - that looked like it would be a perfect solution - but when I simply add the word distinct to the query I get this error: 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 total from products p left join manufacturers m on (p.manufacturers_id = ' at line 1 select count(distinct *) as total from products p left join manufacturers m on (p.manufacturers_id = m.manufacturers_id), products_description pd left join products_to_categories p2c using(products_id) left join categories c using(categories_id) where p.products_master_status = '1' and p.products_id = pd.products_id and pd.language_id = '1' and find_in_set('0', products_hide_from_groups) = 0 and find_in_set('0', categories_hide_from_groups) = 0 [TEP STOP] New Products :huh: Quote ~Tracy Link to comment Share on other sites More sharing options...
Jan Zonjee Posted March 20, 2007 Share Posted March 20, 2007 Well - that looked like it would be a perfect solution - but when I simply add the word distinct to the query I get this error: 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 total from products p left join manufacturers m on (p.manufacturers_id = ' at line 1 select count(distinct *) as total from products p left join manufacturers m on (p.manufacturers_id = m.manufacturers_id), products_description pd left join products_to_categories p2c using(products_id) left join categories c using(categories_id) where p.products_master_status = '1' and p.products_id = pd.products_id and pd.language_id = '1' and find_in_set('0', products_hide_from_groups) = 0 and find_in_set('0', categories_hide_from_groups) = 0 Try changing the next line ($products_new_split) to: $products_new_split = new splitPageResults($products_new_query_raw, MAX_DISPLAY_PRODUCTS_NEW, 'p.products_id'); Quote Link to comment Share on other sites More sharing options...
TracyS Posted March 20, 2007 Share Posted March 20, 2007 Try changing the next line ($products_new_split) to: $products_new_split = new splitPageResults($products_new_query_raw, MAX_DISPLAY_PRODUCTS_NEW, 'p.products_id'); Hot Diggity!! IT WORKED! :D Thank You!! :thumbsup: Quote ~Tracy Link to comment Share on other sites More sharing options...
AJ33 Posted March 21, 2007 Share Posted March 21, 2007 Can you try the code for setting the customer group id as in the first post on this page instead of the: global $customer_group_id; if(!isset($customer_group_id)) { $customer_group_id = '0'; } Also in includes/modules/product_listing.php (which is responsible for displaying the lists with products on index.php). That worked, Jan, thank you so very much! (I only had to do it in /index.php, not product_listing) AJ Quote Link to comment Share on other sites More sharing options...
Guest Posted March 21, 2007 Share Posted March 21, 2007 All, I uploaded a new version of Seperate Pricing Per Customer.Some bug fixes I found when installing on my new copy of 2.2MS2 and a MAJOR OPTIONAL improvement -- I needed the functionality of having special prices for each group. I think all the code is good -- I have spent the day testing. If you find something doesn't work on your install, or perhaps I missed something, let me know. (email: scott AT everson D0T ws) Here are the notes: Updated by Scott Everson (scott AT everson DOT ws), 08/02/2003 Bug fixes: -Added in mod to products_new.php (so correct price displayed in new products list) -Adjusted location of mod in modules/product_listing.php -Changed $product_info_values[] to $product_info[] in product_info.php mod. My 2.2MS2 used the $product_info[] array. Improvements: -Added option mod to support special prices per group. This means that you can create a special price for your 'Retail' group and only customers in that group will see the special price. Create a special price for your 'Wholesale' group and only customers in that group will see the special price. Special prices will not default.. meaning if there is no special price for 'Wholesale' but there is one for 'Retail' your wholesale customer will NOT BE SHOWN the retail special price. More info: When you add special prices, you will see the prices for each group next to the product title. It a price/group is missing, it is because a special price for that prodcut/group already exists. If the product is missing, it is because there is already a special price for all groups. I am willing to offer support for this MOD and version 2.2MS2. Quote Link to comment Share on other sites More sharing options...
Guest Posted March 21, 2007 Share Posted March 21, 2007 Hi Scott, The main reason for trying osCommerce was your contibution - which I think is brilliant. However, because it relies on "Regiter Globals" it brought the entire thing down, We are not allowed to use to use this approach as it poses a major security threat. You should modify your contribution to overcome this limitation - just the same as another contributor has done with Ver 2.2 of osCommerce. I have overcome some of the limitations of another freeware cart that does not rely on registering globals by installing multiple times to separate data files by using a constant prefix for the tables (thus grouping retail and wholesale separately). Naturaly, that meant duplication of much of the data stored withi my database. Hopefully, the release of Ver 3 will incorporate your contribution, and I note that it is being coded to run on the latest versions of MySQL and of PHP without having to prejudice security. Regards peter_of_stirling Quote Link to comment Share on other sites More sharing options...
TracyS Posted March 21, 2007 Share Posted March 21, 2007 We are getting ready to go live, hopefully Friday 3/23, and I need people to help test and make sure everything looks like it is working properly on the site. If anyone has a chance to visit http://mmherbs.dreamhosters.com any feedback would be greatly appreciated. I am still working on the content, and there will be more images added over time - but if all seems functional we want to get this baby live :thumbsup: You can PM me with feedback if you'd rather not post it here :D Thank You!!! Quote ~Tracy Link to comment Share on other sites More sharing options...
katiallo Posted March 22, 2007 Share Posted March 22, 2007 I just installed your contribution. When I'm clicking on a product I get the following: 1146 - Table 'hotling3_ecom.TABLE_PRODUCTS_GROUPS' doesn't exist select customers_group_price from TABLE_PRODUCTS_GROUPS where products_id = '330' and customers_group_id = '0' [TEP STOP] can you please help me to correct it? Thank you Quote Link to comment Share on other sites More sharing options...
Guest Posted March 22, 2007 Share Posted March 22, 2007 Hi Tracy, It looks good! :) Does it work on OSC 2.2 or the new test version osc 3.03a? Regards, peter_of_stirling Quote Link to comment Share on other sites More sharing options...
katiallo Posted March 22, 2007 Share Posted March 22, 2007 I just installed your contribution. When I'm clicking on a product I get the following: 1146 - Table 'hotling3_ecom.TABLE_PRODUCTS_GROUPS' doesn't exist select customers_group_price from TABLE_PRODUCTS_GROUPS where products_id = '330' and customers_group_id = '0' [TEP STOP] can you please help me to correct it? Thank you My site is live and I have hard time correcting this problem: 1146 - Table 'hotling3_ecom.TABLE_PRODUCTS_GROUPS' doesn't exist select customers_group_price from TABLE_PRODUCTS_GROUPS where products_id = '330' and customers_group_id = '0' [TEP STOP] The table exists in my database. Can someone help me with this? Quote Link to comment Share on other sites More sharing options...
Jan Zonjee Posted March 22, 2007 Share Posted March 22, 2007 The table exists in my database. But is it's define was not added to: includes/database_tables.php as per the instructions. And of course you should have a copy of your shop on your computer to experiment with contributions before you add the changes to your shop... Quote Link to comment Share on other sites More sharing options...
TracyS Posted March 22, 2007 Share Posted March 22, 2007 (edited) Hi Tracy, It looks good! :) Does it work on OSC 2.2 or the new test version osc 3.03a? Regards, peter_of_stirling Thank you :blush: I'm running 2.2 ms2 - 060817 Edited March 22, 2007 by TracyS Quote ~Tracy Link to comment Share on other sites More sharing options...
TracyS Posted March 23, 2007 Share Posted March 23, 2007 Hi guys, Could someone take a quick look at this post in the site optimization thread: http://www.oscommerce.com/forums/index.php?s=&...t&p=1047999 And see if it looks like it needs any edits for the Hide Products or Categories from Customer Groups contribution ? Thank you!! :thumbsup: Quote ~Tracy Link to comment Share on other sites More sharing options...
Jan Zonjee Posted March 23, 2007 Share Posted March 23, 2007 Could someone take a quick look at this post in the site optimization thread: http://www.oscommerce.com/forums/index.php?s=&...t&p=1047999 And see if it looks like it needs any edits for the Hide Products or Categories from Customer Groups contribution Looks good to me. The "hiding part" is already in the query above it. Quote Link to comment Share on other sites More sharing options...
TracyS Posted March 23, 2007 Share Posted March 23, 2007 We are getting ready to go live, hopefully Friday 3/23, and I need people to help test and make sure everything looks like it is working properly on the site. If anyone has a chance to visit http://mmherbs.dreamhosters.com any feedback would be greatly appreciated. I am still working on the content, and there will be more images added over time - but if all seems functional we want to get this baby live :thumbsup: You can PM me with feedback if you'd rather not post it here :D Thank You!!! Ok - I put in for the DNS change so the old link will no longer work. The site will be at http://www.mountainmeadowherbs.com within the next 24-48 hours. Quote ~Tracy Link to comment Share on other sites More sharing options...
Guest Posted March 26, 2007 Share Posted March 26, 2007 Hi JanZ I have needed to add attrib sort v1.2 so we can specify the attribute sort order (they were getting in an awful mess without this added). On the first insert it defaults to 0 and won't input a value until we go back and use the edit option, then the correct order is added. With SPPC and SPPC Attributes installed is there some sort of conflict to resolve on the insert button? Many thanks Katie Quote Link to comment Share on other sites More sharing options...
Jan Zonjee Posted March 26, 2007 Share Posted March 26, 2007 I have needed to add attrib sort v1.2 so we can specify the attribute sort order (they were getting in an awful mess without this added). On the first insert it defaults to 0 and won't input a value until we go back and use the edit option, then the correct order is added. With SPPC and SPPC Attributes installed is there some sort of conflict to resolve on the insert button? I'm not familiar with attrib sort but the insert query has been changed for SPPC attributes (SPPC standard doesn't do anything with attributes). The changes were instead of using '' for the id field (auto increment in the table) I used NULL because MySQL likes that better. For the hide stuff I added the standard value of the field: @. That area of code is clearly marked (line 63 in admin/products_attributes under case: 'add_product_attributes':). I suppose you need to add your field for the sort order in there too? Make sure you arrange the values in the query in the correct order (the same order as they appear in the table, in the standard table the hide field is last; check it with phpMyAdmin). Just guessing here :) Quote Link to comment Share on other sites More sharing options...
Guest Posted March 26, 2007 Share Posted March 26, 2007 Quote Link to comment Share on other sites More sharing options...
Guest Posted March 26, 2007 Share Posted March 26, 2007 Quote Link to comment Share on other sites More sharing options...
Guest Posted March 27, 2007 Share Posted March 27, 2007 I'm not familiar with attrib sort but the insert query has been changed for SPPC attributes (SPPC standard doesn't do anything with attributes). The changes were instead of using '' for the id field (auto increment in the table) I used NULL because MySQL likes that better. For the hide stuff I added the standard value of the field: @. That area of code is clearly marked (line 63 in admin/products_attributes under case: 'add_product_attributes':). I suppose you need to add your field for the sort order in there too? Make sure you arrange the values in the query in the correct order (the same order as they appear in the table, in the standard table the hide field is last; check it with phpMyAdmin). Just guessing here :) Hi JanZ, Exactly that problem, I had left the "@" for hide_from_groups last in the order on the insert query. :blush: Thank you again. Katie :thumbsup: Quote Link to comment Share on other sites More sharing options...
katiallo Posted March 28, 2007 Share Posted March 28, 2007 Hello; I installed separate_price_415 and hide_products_and_categories_v201. I'm getting some errors and was wondering if anyone can help. First I got an SQL error: FAILED! - ALTER TABLE customers ADD customers_group_id smallint UNSIGNED NOT NULL default '0', ADD customers_group_ra enum('0','1') NOT NULL, ADD customers_payment_allowed varchar(255) NOT NULL default '', ADD customers_shipment_allowed varchar(255) NOT NULL default '' . I can't loggin the continue button is missing. . I can't create an account, I'm getting an error: 1054 - Unknown column 'customers_group_ra' in 'field list' . On admin side in customers I get this error: 1054 - Unknown column 'c.customers_group_ra' in 'field list' select c.customers_id, c.customers_lastname, c.customers_firstname, c.customers_email_address, c.customers_group_id, c.customers_group_ra, a.entry_country_id, a.entry_company, cg.customers_group_name from customers c left join address_book a on c.customers_id = a.customers_id and c.customers_default_address_id = a.address_book_id left join customers_groups cg on c.customers_group_id = cg.customers_group_id order by c.customers_id DESC limit 0, 5 . On admin side in Configuration/customers/details this warning: Warning: call_user_func(tep_cfg_get_customer_group) [function.call-user-func]: First argument is expected to be a valid callback in /home/xxxxxx/public_html/admin/includes/functions/general.php on line 1315 . Catalog/categories on my editing page (no idea if it supposes to look like that) at the bottom of everything has the catalog/categories page and the following error: Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/xxxxxx/public_html/admin/includes/functions/database.php on line 99 Thank you all. GREAT CONTRIBUTION Quote Link to comment Share on other sites More sharing options...
Jan Zonjee Posted March 28, 2007 Share Posted March 28, 2007 First I got an SQL error: FAILED! - ALTER TABLE customers ADD customers_group_id smallint UNSIGNED NOT NULL default '0', ADD customers_group_ra enum('0','1') NOT NULL, ADD customers_payment_allowed varchar(255) NOT NULL default '', ADD customers_shipment_allowed varchar(255) NOT NULL default '' Interesting :'( It looks like the first one (customer_group_id) was added to the table because that field is earlier in the query where you get the error Unknown column 'customers_group_ra'. Perhaps that field was already in there... Those fields need to be added to that table one way or another. You can do several things. A. Manually add those fields to that table using phpMyAdmin B. Splitting up that query and see which one fails with an error and then we can see why. So start with (check that customer_group_id is already there): ALTER TABLE customers ADD customers_group_ra enum('0','1') NOT NULL; Then: ALTER TABLE customers ADD customers_payment_allowed varchar(255) NOT NULL default ''; etcetera. . I can't loggin the continue button is missing. Perhaps because of the error. First get rid of the errors by adding those fields.All the other errors are a results of those missing fields, nothing to get scared off. 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.