vikkic Posted December 24, 2002 Posted December 24, 2002 I want to have two levels of pricing - wholesale and retail. I don't need quantity discounts and will assign customers after they create an account to the wholesale group (with all customers being retail as default). My wholesale price isn't a percentage and all products aren't available at a wholesale level. I see Graduated prices / Staffelpreise AND Seperate Pricing Per Customer. Anyone? Is there another I'm missing and is anyone using either of these? Pros/cons? Work for my situation? Vikki
Guest Posted December 27, 2002 Posted December 27, 2002 This contribution might be what you are looking for.... http://www.oscommerce.com/community/contributions,716 Its called... Seperate Pricing Per Customer. The contribution states... This mod alllows the site owner to assign customers to seperate groups and then give different pricing per product for each group. I believe there are other contributions that may do what you are looking for. You should browse around and take a look. I hope this help you out. -R
ocularmagic Posted December 27, 2002 Posted December 27, 2002 Yes, the seperate pricing per customer mod should work for you. A user of it also modified it to use it specifically for wholesale and retail customers only. He modified it so that when a wholesale user logs in, it shows their updated prices, but if a price for a product has not been given a wholesale price, it shows "No wholesale price" or something to that effect. I'm going to be putting out another release of it soon as I forgot to modify a couple of files like what's new and new products to show the updated prices. No other "major" bugs that I'm aware of though. Good luck. If every member of this board donated $1 to the dev team, that would be over $11,000.00. Don't you think this cart is worth at least a $1????
Guest Posted January 15, 2003 Posted January 15, 2003 Since I have been testing site before I go live, I created a couple of customers that I now need to delete. When I go to confirm that I want to delete the customer, I get the following error: 1054 - Unknown column 'customer_id' in 'where clause' select customers_group_id from customers where customer_id = '4' [TEP STOP] Does anyone have any idea how to fix this? Also, James, has the "Wholesale Price Not Available" been built into the latest update or can you provide any help or idea on how to initiate it? Thanks!!!
ocularmagic Posted January 15, 2003 Posted January 15, 2003 No, it has not been built into the latest release. The way it works now is that if the query doesn't find another price it just puts back the retail price. So pretty much wherever you see a query for a customers price, then and else statement you would change what would be the retail price to "Price not available." So AFTER the code changes it would look something like this. if ( $customer_group['customers_group_id'] != 0) { if ($customer_group_price = tep_db_fetch_array($customer_group_price_query)) { $products_price = $currencies->display_price($customer_group_price['customers_group_price'], tep_get_tax_rate($new_products['tax_class_id'])); } else { $products_price = 'Price not available'; } } If every member of this board donated $1 to the dev team, that would be over $11,000.00. Don't you think this cart is worth at least a $1????
Guest Posted January 15, 2003 Posted January 15, 2003 Thanks for the help! Anyone else on the customer deletion error that I am getting?
ocularmagic Posted January 15, 2003 Posted January 15, 2003 Sorry, I forgot to mention the error part. It looks to me like it's saying that you don't have a customer_id field in the customers table inside the database. Not sure if this is my fault or not but it should be customers_id and not customer_id in that query. I think that should fix it. If every member of this board donated $1 to the dev team, that would be over $11,000.00. Don't you think this cart is worth at least a $1????
Guest Posted January 18, 2003 Posted January 18, 2003 James, You have been so helpful :P ...You were right..I needed to changed "customer" to "customers" in that query.. Regarding the "Pricing not available," I cannot not figure out how to work into code...I read your suggestion, but have tried several different ways without success.....I will post a query below...Could you be so kind as to show me how to work it in? and all of the places that I would need to add this would be the same as where I have added you Price Mod Code in it? Thanks again! :roll: global $customer_id; $customer_group_query = tep_db_query("select customers_group_id from " . TABLE_CUSTOMERS . " where customers_id = '" . $customer_id . "'"); $customer_group = tep_db_fetch_array($customer_group_query); $customer_group_price_query = tep_db_query("select customers_group_price from " . TABLE_PRODUCTS_GROUPS . " where products_id = '" . $HTTP_GET_VARS['products_id'] . "' and customers_group_id = '" . $customer_group['customers_group_id'] . "'"); if ( $customer_group['customers_group_id'] != 0) { if ($customer_group_price = tep_db_fetch_array($customer_group_price_query)) { $products_price = $currencies->display_price($customer_group_price['customers_group_price'], tep_get_tax_rate($product_info_values['products_tax_class_id'])); } else { $products_price = $currencies->display_price($product_info_values['products_price'], tep_get_tax_rate($product_info_values['products_tax_class_id'])); } } else { $products_price = $currencies->display_price($product_info_values['products_price'], tep_get_tax_rate($product_info_values['products_tax_class_id'])); } }
ocularmagic Posted January 20, 2003 Posted January 20, 2003 Hey Sean, what file is this code from? It looks like there is an extra else statement in it? I may be wrong though. If every member of this board donated $1 to the dev team, that would be over $11,000.00. Don't you think this cart is worth at least a $1????
Guest Posted January 21, 2003 Posted January 21, 2003 James, Yeah.....I wonder if I just copied that one part in there twice...I dunno...I am amazed that I have gotten this far for being a 6 month old newbie... global $customer_id; $customer_group_query = tep_db_query("select customers_group_id from " . TABLE_CUSTOMERS . " where customers_id = '" . $customer_id . "'"); $customer_group = tep_db_fetch_array($customer_group_query); $customer_group_price_query = tep_db_query("select customers_group_price from " . TABLE_PRODUCTS_GROUPS . " where products_id = '" . $HTTP_GET_VARS['products_id'] . "' and customers_group_id = '" . $customer_group['customers_group_id'] . "'"); if ( $customer_group['customers_group_id'] != 0) { if ($customer_group_price = tep_db_fetch_array($customer_group_price_query)) { $products_price = $currencies->display_price($customer_group_price['customers_group_price'], tep_get_tax_rate($product_info_values['products_tax_class_id'])); } else { $products_price = $currencies->display_price($product_info_values['products_price'], tep_get_tax_rate($product_info_values['products_tax_class_id'])); } } else { $products_price = $currencies->display_price($product_info_values['products_price'], tep_get_tax_rate($product_info_values['products_tax_class_id'])); } }
ocularmagic Posted January 21, 2003 Posted January 21, 2003 Maybe these comments will help a little. global $customer_id; $customer_group_query = tep_db_query("select customers_group_id from " . TABLE_CUSTOMERS . " where customers_id = '" . $customer_id . "'"); $customer_group = tep_db_fetch_array($customer_group_query); $customer_group_price_query = tep_db_query("select customers_group_price from " . TABLE_PRODUCTS_GROUPS . " where products_id = '" . $HTTP_GET_VARS['products_id'] . "' and customers_group_id = '" . $customer_group['customers_group_id'] . "'"); // this checks to see if the customers group id is NOT equal to zero // if it is NOT equal to zero then it moves on to the next if statement if ( $customer_group['customers_group_id'] != 0) { // this next if checks to see if there is a group price for that // particular customer. If there is, it dispalys the price by calling // the $currencies->display_price function with the group price. if ($customer_group_price = tep_db_fetch_array($customer_group_price_query)) { $products_price = $currencies->display_price($customer_group_price['customers_group_price'], tep_get_tax_rate($product_info_values['products_tax_class_id'])); // If there is NOT a group price, it just displays the Retail price. // If you want something other than the retail price, you would // put it in the else statement below. } else { // Existing code ///////////////////////// $products_price = $currencies->display_price($product_info_values['products_price'], tep_get_tax_rate($product_info_values['products_tax_class_id'])); //////////////////////////////////////////// // could change it to /////// $products_price = 'Price not Available'; //////////////////////////////// } } Now that is untested but it should give you an idea of what's happening. Hope it helps. If every member of this board donated $1 to the dev team, that would be over $11,000.00. Don't you think this cart is worth at least a $1????
Recommended Posts
Archived
This topic is now archived and is closed to further replies.