mark27uk3 Posted March 4, 2006 Share Posted March 4, 2006 Hi Jan, Thanks, they were two really obvious things (must get my eyes tested) Mark Quote Lifes a bitch, then you marry one, then you die! Link to comment Share on other sites More sharing options...
John-Peter Posted March 6, 2006 Share Posted March 6, 2006 Does anyone know if Easypopulate will works if you are using SPPC, Hide prices.., Price breaks.., Show price list, and specials by category installed? I have many other mods as well but the SPPC mods have some heavy hacking involved that I don't want to break. I guess I am finding out that the order in which you add you mods will become extremely important as you add more and more. I should have added EP before adding all the incredibly useful SPPC suite mods!!! Any help would be greatly appreciated! Easypopulate work very fine witth SPPC. You just have to modify a little the contribution Easypopulate to be compatible with SPPC 4.1.1 - Check this link for the details. Quote John -------------------- osCommerce 2.3.4 Bootstrap Edge Link to comment Share on other sites More sharing options...
pirosaint Posted March 6, 2006 Share Posted March 6, 2006 Hi everyone...!!! im nacho and i was trying to do thing work beacuse it just what i need and, after do all the steps i have this two error on my store now.. on the mysql query : // Error SQL query: ALTER TABLE `customers` ADD `customers_group_name` CHAR( 27 ) DEFAULT 'Retail' NOT NULL , ADD `customers_group_id` INT( 11 ) DEFAULT '0' NOT NULL ; MySQL said: Documentation #1060 - Duplicate column name 'customers_group_name' // and also on the store when you press over any product: // select customers_group_price from TABLE_PRODUCTS_GROUPS where products_id = '595' and customers_group_id = '' [TEP STOP] // any of you have any i dea about tthis??? im not that good with sql... but i think that something is repeating here or something.. thge site is this: http://www.lightguy.com well thanks very much to all of you nacho Quote Link to comment Share on other sites More sharing options...
Jan Zonjee Posted March 7, 2006 Share Posted March 7, 2006 nacho, ALTER TABLE `customers` ADD `customers_group_name` CHAR( 27 ) DEFAULT 'Retail' NOT NULL ,ADD `customers_group_id` INT( 11 ) DEFAULT '0' NOT NULL ; MySQL said: Documentation #1060 - Duplicate column name 'customers_group_name' You already must have done it once, if you want to do it a second time MySQL will complain like this. So that worked ;)select customers_group_price from TABLE_PRODUCTS_GROUPS where products_id = '595' and customers_group_id = '' I guess you found out by now that you need to add the define for TABLE_PRODUCTS_GROUPS to includes/database_tables.php because I don't see the error on your site (anymore?). Quote Link to comment Share on other sites More sharing options...
JEWbacca Posted March 8, 2006 Share Posted March 8, 2006 In regards to Jan's solution for Custodian (Henry Smith) about Minimum Order located at http://www.oscommerce.com/forums/index.php?s=&...ndpost&p=800164 I have one slight amendment: Change: <?php // minimum order total if ($cart->show_total() < MIN_ORDER_AMOUNT) { ?> <tr> <td class="stockWarning" align="center"><br><?php echo sprintf(TEXT_ORDER_UNDER_MIN_AMOUNT, $currencies->format(MIN_ORDER_AMOUNT)); ?></td> </tr> <?php } ?> <tr> To this: <?php // minimum order total if ($cart->show_total() < MIN_ORDER_AMOUNT) { ?> <tr> <td class="stockWarning" align="center"><br><B> <?php if ($_SESSION['sppc_customer_group_id'] == '0' || !isset($_SESSION['sppc_customer_group_id'])) { echo ' '; } else if ($_SESSION['sppc_customer_group_id'] == '1') { echo sprintf(TEXT_ORDER_UNDER_MIN_AMOUNT, $currencies->format(MIN_ORDER_AMOUNT)); ?> </B></td> </tr> <?php } } ?> <tr> Make sure you backup and test this.... The reason you must do this is that the message defined under 'EXT_ORDER_UNDER_MIN_AMOUNT' will show for those members of ALL GROUPS and not just members of the groups which the minimum order applies to. Quote Link to comment Share on other sites More sharing options...
sophina Posted March 9, 2006 Share Posted March 9, 2006 HI I were install "SPPC" ,and "Specials_Module". The file named "product_specials.php" in "Specials_Module" were not show the right price. Please help me. The "product_specials.php" code just as below: <?php /* $Id: product_specials.php,v 1.0 2005/11/11 00:00:00 holforty Exp $ Designed for: osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2005 Todd Holforty - mtholforty@surfalot.com Released under the GNU General Public License */ ?> <!-- product_specials //--> <?php // are we viewing a specific product? ($product_info['products_id'] is set if we are) if (tep_not_null($product_info['products_id'])) { $the_products_catagory_query = tep_db_query("select products_id, categories_id from " . TABLE_PRODUCTS_TO_CATEGORIES . " where products_id = '" . $product_info['products_id'] . "'" . " order by products_id,categories_id"); $the_products_catagory = tep_db_fetch_array($the_products_catagory_query); $product_category_id = $the_products_catagory['categories_id']; } if ( (LIMIT_PRODUCT_SPECIALS_SCOPE=='true') && !empty($new_products_category_id) ) { /// We are in category depth $product_specials_query = tep_db_query("select distinct p.products_id, pd.products_name, p.products_price, p.products_tax_class_id, p.products_image, s.specials_new_products_price from products p, products_description pd, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c, specials s where p.products_status='1' and p.products_id=s.products_id and p.products_id=pd.products_id and pd.language_id='".(int)$languages_id."' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and s.status='1' and c.parent_id = '" . (int)$new_products_category_id . "' order by rand() limit ".MAX_DISPLAY_PRODUCT_SPECIALS); } else if ( (LIMIT_PRODUCT_SPECIALS_SCOPE=='true') && !empty($product_category_id) ) { // products info page $product_specials_query = tep_db_query("select distinct p.products_id, pd.products_name, p.products_price, p.products_tax_class_id, p.products_image, s.specials_new_products_price from products p, products_description pd, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c, specials s where p.products_status='1' and p.products_id=s.products_id and p.products_id=pd.products_id and pd.language_id='".(int)$languages_id."' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and s.status='1' and c.categories_id = '" . (int)$product_category_id . "' order by rand() limit ".MAX_DISPLAY_PRODUCT_SPECIALS); } else { // default $product_specials_query = tep_db_query("select p.products_id, pd.products_name, p.products_price, p.products_tax_class_id, p.products_image, s.specials_new_products_price from products p, products_description pd, specials s where p.products_status='1' and p.products_id=s.products_id and p.products_id=pd.products_id and pd.language_id='".(int)$languages_id."' and s.status='1' order by rand() limit ".MAX_DISPLAY_PRODUCT_SPECIALS); } if (tep_db_num_rows($product_specials_query)>0) { $info_box_contents = array(); $info_box_contents[] = array('text' => '<a href="'.tep_href_link(FILENAME_SPECIALS).'">'.TABLE_HEADING_PRODUCT_SPECIALS.'</a>' ); new infoBoxHeading($info_box_contents,false,false, tep_href_link(FILENAME_SPECIALS)); $row = 0; $col = 0; $info_box_contents = array(); while ($product_specials = tep_db_fetch_array($product_specials_query)) { $products_price = (tep_not_null($product_specials['specials_new_products_price'])?'<s>'.$currencies->display_price($product_specials['products_price'], tep_get_tax_rate($product_specials['products_tax_class_id'])).'</s> ':'').'<span class="productSpecialPrice">' . $currencies->display_price($product_specials['specials_new_products_price'], tep_get_tax_rate($product_specials['products_tax_class_id'])).'</span>'; $info_box_contents[$row][$col] = array('align' => 'center', 'params' => 'class="smallText" width="33%" valign="top"', 'text' => '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $product_specials['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $product_specials['products_image'], $product_specials['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $product_specials['products_id']) . '">' . $product_specials['products_name'] . '</a><br>' . $products_price ); $col ++; if ($col > PRODUCT_SPECIALS_DISPLAY_COLUMNS-1) { $col = 0; $row ++; } } new contentBox($info_box_contents); } ?> <!-- product_specials_eof //--> How can I do? Thanks!! Sophina Quote Link to comment Share on other sites More sharing options...
Roaddoctor Posted March 9, 2006 Share Posted March 9, 2006 I have just read all 107 pages OMG :D I have SPPC 4.11 and SPPC Price break 102 my store I am vey happy with the contribution, and have 1 glitch With a 'Special' assigned to the retail price of an item... Then, when logged in and assigned any customer category other than retail (default), such as wholesale or dsitributor, the buyer still sees the retail 'special' price in red below the normal wholesale price. The retail special price is higher than the wholesale regular price so this looks really goofy. (ie a special price higher than a normal price) Did that make any sense? :) this issue has been brought up repeatedly, but I could never find a concise solutuion. From what I read, version 4.11 should not have this bug any help appreciated and I can post code as requested. Thank you Dave Quote -Dave Link to comment Share on other sites More sharing options...
Roaddoctor Posted March 9, 2006 Share Posted March 9, 2006 I forgot to mention that his is in reference to the What's New box in column left. I have it renamed to Featured Items. If you enter the products_new.php page the prices are correct. The glitch is just in the box when the items with retails specials assigned appear. Thanks again Quote -Dave Link to comment Share on other sites More sharing options...
steelwidow Posted March 9, 2006 Share Posted March 9, 2006 Okay... I've installed and all is good, created my groups (in my case it's retail and wholesale) added a product and all is working great. BUT.... I don't want to have to manually edit customers to say they're wholesale. Like if they fill in the tax id number, I want it automatic that they are wholesale and they see those prices. If they don't fill it in then it's autoamatic retail and they see the retail prices. Can this be done? Thanks in advance and I'm sorry if this has been covered already... Quote Link to comment Share on other sites More sharing options...
Iwant2Lrn Posted March 10, 2006 Share Posted March 10, 2006 Easypopulate work very fine witth SPPC. You just have to modify a little the contribution Easypopulate to be compatible with SPPC 4.1.1 - Check this link for the details. Yeah, I think I have added to much to get EP to work at this point. I need to add the Quantity for Product Attributes Mod and making that work with EP is beyong my level right now. I appreciate the help though. I got another delima! I needed to add Individual Product Shipping Prices - v1.0 and I totally forgot that SPPC is taken over some/all of my pricing. I really need some help figuring out where I need to add code to priceformatter.php (I think) to get this to work. The original osc code had queries in catalog/includes/classes/shopping_cart.php like: /* $products_query = tep_db_query("select p.products_id, pd.products_name, p.products_model, p.products_image, p.products_price, p.products_weight, p.products_tax_class_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = '" . (int)$products_id . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'"); where this mod needs to add: $product_query = tep_db_query("select products_id, products_price, products_ship_price, products_ship_price_two, products_tax_class_id, products_weight from " . TABLE_PRODUCTS . " where products_id = '" . (int)$products_id . "'"); I don't know enough about the priceformatter.php to add the queries in. I am having some other hangups but this might get me started. Any ideas??????? Any help would be greatly appreciated! Quote Link to comment Share on other sites More sharing options...
Guest Posted March 11, 2006 Share Posted March 11, 2006 umm how do you install both of these i isntalles SPPC then am tryign to install SPL for SPPC and the edits require the same thigns to be edited like the first one Open the file catalog/product_info.php Find the following lines between line 81 and 105 starting with : $product_info_query = tep_db_query("select p.products_id, ends just before: if (tep_not_null($product_info['products_model'])) } ) is whats in the file i would need to overwrite the modifications done by the SPPC $product_info_query = tep_db_query("select p.products_id, pd.products_name, pd.products_description, p.products_model, p.products_quantity, p.products_image, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'"); $product_info = tep_db_fetch_array($product_info_query); tep_db_query("update " . TABLE_PRODUCTS_DESCRIPTION . " set products_viewed = products_viewed+1 where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and language_id = '" . (int)$languages_id . "'"); if ($new_price = tep_get_products_special_price($product_info['products_id'])) { // BOF Separate Price per Customer $scustomer_group_price_query = tep_db_query("select customers_group_price from " . TABLE_PRODUCTS_GROUPS . " where products_id = '" . (int)$HTTP_GET_VARS['products_id']. "' and customers_group_id = '" . $customer_group_id . "'"); if ($scustomer_group_price = tep_db_fetch_array($scustomer_group_price_query)) { $product_info['products_price']= $scustomer_group_price['customers_group_price']; } // EOF Separate Price per Customer $products_price = '<s>' . $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) . '</s> <span class="productSpecialPrice">' . $currencies->display_price($new_price, tep_get_tax_rate($product_info['products_tax_class_id'])) . '</span>'; } else { // BOF Separate Price per Customer $scustomer_group_price_query = tep_db_query("select customers_group_price from " . TABLE_PRODUCTS_GROUPS . " where products_id = '" . (int)$HTTP_GET_VARS['products_id']. "' and customers_group_id = '" . $customer_group_id . "'"); if ($scustomer_group_price = tep_db_fetch_array($scustomer_group_price_query)) { $product_info['products_price']= $scustomer_group_price['customers_group_price']; } // EOF Separate Price per Customer $products_price = $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])); } if (tep_not_null($product_info['products_model'])) { Quote Link to comment Share on other sites More sharing options...
John-Peter Posted March 11, 2006 Share Posted March 11, 2006 umm how do you install both of these i isntalles SPPC then am tryign to install SPL for SPPC and the edits require the same thigns to be edited like the first one Open the file catalog/product_info.php Find the following lines between line 81 and 105 starting with : $product_info_query = tep_db_query("select p.products_id, ends just before: if (tep_not_null($product_info['products_model'])) } ) is whats in the file i would need to overwrite the modifications done by the SPPC $product_info_query = tep_db_query("select p.products_id, pd.products_name, pd.products_description, p.products_model, p.products_quantity, p.products_image, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'"); $product_info = tep_db_fetch_array($product_info_query); tep_db_query("update " . TABLE_PRODUCTS_DESCRIPTION . " set products_viewed = products_viewed+1 where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and language_id = '" . (int)$languages_id . "'"); if ($new_price = tep_get_products_special_price($product_info['products_id'])) { // BOF Separate Price per Customer $scustomer_group_price_query = tep_db_query("select customers_group_price from " . TABLE_PRODUCTS_GROUPS . " where products_id = '" . (int)$HTTP_GET_VARS['products_id']. "' and customers_group_id = '" . $customer_group_id . "'"); if ($scustomer_group_price = tep_db_fetch_array($scustomer_group_price_query)) { $product_info['products_price']= $scustomer_group_price['customers_group_price']; } // EOF Separate Price per Customer $products_price = '<s>' . $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) . '</s> <span class="productSpecialPrice">' . $currencies->display_price($new_price, tep_get_tax_rate($product_info['products_tax_class_id'])) . '</span>'; } else { // BOF Separate Price per Customer $scustomer_group_price_query = tep_db_query("select customers_group_price from " . TABLE_PRODUCTS_GROUPS . " where products_id = '" . (int)$HTTP_GET_VARS['products_id']. "' and customers_group_id = '" . $customer_group_id . "'"); if ($scustomer_group_price = tep_db_fetch_array($scustomer_group_price_query)) { $product_info['products_price']= $scustomer_group_price['customers_group_price']; } // EOF Separate Price per Customer $products_price = $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])); } if (tep_not_null($product_info['products_model'])) { I assume you talked about Show price list ? Be more explicite if you want to be helped, please. What you need ? Quote John -------------------- osCommerce 2.3.4 Bootstrap Edge Link to comment Share on other sites More sharing options...
Iwant2Lrn Posted March 12, 2006 Share Posted March 12, 2006 I assume you talked about Show price list ? Be more explicite if you want to be helped, please. What you need ? Jean/JanZ Do you think all you could help me out with post #2135? I am trying to be very careful when it comes to modifing any of the SPPC related code because I can't afford to have it break. I would like to add that mod I mentione above in though. Quote Link to comment Share on other sites More sharing options...
Guest Posted March 12, 2006 Share Posted March 12, 2006 think i got ti sorted now thanks Quote Link to comment Share on other sites More sharing options...
Jan Zonjee Posted March 12, 2006 Share Posted March 12, 2006 How can I do? Haven't tried it so there might be some small mistakes in it but this is how I would do it: <!-- product_specials //--> <?php // BOF Separate Pricing Per Customer // global variable (session) $sppc_customer_group_id -> local variable customer_group_id if(!tep_session_is_registered('sppc_customer_group_id')) { $customer_group_id = '0'; } else { $customer_group_id = $sppc_customer_group_id; } // EOF Separate Pricing Per Customer // are we viewing a specific product? ($product_info['products_id'] is set if we are) if (tep_not_null($product_info['products_id'])) { $the_products_catagory_query = tep_db_query("select products_id, categories_id from " . TABLE_PRODUCTS_TO_CATEGORIES . " where products_id = '" . $product_info['products_id'] . "'" . " order by products_id,categories_id"); $the_products_catagory = tep_db_fetch_array($the_products_catagory_query); $product_category_id = $the_products_catagory['categories_id']; } // BOF Separate Pricing Per Customer, make sure only specials for the customer group are chosen // we will deal with the products_price for the group after that if ( (LIMIT_PRODUCT_SPECIALS_SCOPE=='true') && !empty($new_products_category_id) ) { /// We are in category depth $product_specials_query = tep_db_query("select distinct p.products_id, pd.products_name, p.products_price, p.products_tax_class_id, p.products_image, s.specials_new_products_price from products p, products_description pd, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c, specials s where p.products_status='1' and p.products_id=s.products_id and p.products_id=pd.products_id and pd.language_id='".(int)$languages_id."' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and s.status='1' and s.customers_group_id = '" . $customer_group_id . "' and c.parent_id = '" . (int)$new_products_category_id . "' order by rand() limit ".MAX_DISPLAY_PRODUCT_SPECIALS); } else if ( (LIMIT_PRODUCT_SPECIALS_SCOPE=='true') && !empty($product_category_id) ) { // products info page $product_specials_query = tep_db_query("select distinct p.products_id, pd.products_name, p.products_price, p.products_tax_class_id, p.products_image, s.specials_new_products_price from products p, products_description pd, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c, specials s where p.products_status='1' and p.products_id=s.products_id and p.products_id=pd.products_id and pd.language_id='".(int)$languages_id."' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and s.status='1' and s.customers_group_id = '" . $customer_group_id . "' and c.categories_id = '" . (int)$product_category_id . "' order by rand() limit ".MAX_DISPLAY_PRODUCT_SPECIALS); } else { // default $product_specials_query = tep_db_query("select p.products_id, pd.products_name, p.products_price, p.products_tax_class_id, p.products_image, s.specials_new_products_price from products p, products_description pd, specials s where p.products_status='1' and p.products_id=s.products_id and p.products_id=pd.products_id and pd.language_id='".(int)$languages_id."' and s.status='1' and s.customers_group_id = '" . $customer_group_id . "' order by rand() limit ".MAX_DISPLAY_PRODUCT_SPECIALS); } $no_of_product_specials = tep_db_num_rows($product_specials_query); if ($no_of_product_specials > 0) { while ($_product_specials = tep_db_fetch_array($product_specials_query)) { $product_specials[] = $_product_specials; $list_of_prdct_ids[] = $_product_specials['products_id']; } $select_list_of_prdct_ids = "products_id = '".$list_of_prdct_ids[0]."' "; if ($no_of_product_specials > 1) { for ($n = 1; $n < count($list_of_prdct_ids); $n++) { $select_list_of_prdct_ids .= "or products_id = '".$list_of_prdct_ids[$n]."' "; } } // get all customers_group_prices for products with the particular customer_group_id // however not necessary for customer_group_id = 0 if ($customer_group_id != '0') { $pg_query = tep_db_query("select pg.products_id, customers_group_price as price from " . TABLE_PRODUCTS_GROUPS . " pg where (".$select_list_of_prdct_ids.") and pg.customers_group_id = '".$customer_group_id."'"); while ($pg_array = tep_db_fetch_array($pg_query)) { $new_prices[] = array ('products_id' => $pg_array['products_id'], 'products_price' => $pg_array['price']); } for ($x = 0; $x < $no_of_product_specials; $x++) { // replace products prices with those from customers_group table if(!empty($new_prices)) { for ($i = 0; $i < count($new_prices); $i++) { if( $product_specials[$x]['products_id'] == $new_prices[$i]['products_id'] ) { $product_specials[$x]['products_price'] = $new_prices[$i]['products_price']; } } } // end if(!empty($new_prices) } // end for ($x = 0; $x < $no_of_product_specials; $x++) } // end if ($customer_group_id != '0') $info_box_contents = array(); $info_box_contents[] = array('text' => '<a href="'.tep_href_link(FILENAME_SPECIALS).'">'.TABLE_HEADING_PRODUCT_SPECIALS.'</a>' ); new infoBoxHeading($info_box_contents,false,false, tep_href_link(FILENAME_SPECIALS)); $row = 0; $col = 0; $info_box_contents = array(); // while ($product_specials = tep_db_fetch_array($product_specials_query)) { for ($x = 0; $x < $no_of_product_specials; $x++) { $products_price = (tep_not_null($product_specials[$x]['specials_new_products_price'])?'<s>'.$currencies->display_price($product_specials[$x]['products_price'], tep_get_tax_rate($product_specials[$x]['products_tax_class_id'])).'</s>??':'').'<span class="productSpecialPrice">' . $currencies->display_price($product_specials[$x]['specials_new_products_price'], tep_get_tax_rate($product_specials[$x]['products_tax_class_id'])).'</span>'; $info_box_contents[$row][$col] = array('align' => 'center', 'params' => 'class="smallText" width="33%" valign="top"', 'text' => '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $product_specials[$x]['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $product_specials[$x]['products_image'], $product_specials[$x]['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $product_specials[$x]['products_id']) . '">' . $product_specials[$x]['products_name'] . '</a><br>' . $products_price ); // EOF Separate Pricing Per Customer $col ++; if ($col > PRODUCT_SPECIALS_DISPLAY_COLUMNS-1) { $col = 0; $row ++; } } new contentBox($info_box_contents); } ?> <!-- product_specials_eof //--> Quote Link to comment Share on other sites More sharing options...
Jan Zonjee Posted March 12, 2006 Share Posted March 12, 2006 With a 'Special' assigned to the retail price of an item...Then, when logged in and assigned any customer category other than retail (default), such as wholesale or dsitributor, the buyer still sees the retail 'special' price in red below the normal wholesale price. The retail special price is higher than the wholesale regular price so this looks really goofy. (ie a special price higher than a normal price) Did that make any sense? :) this issue has been brought up repeatedly, but I could never find a concise solutuion. From what I read, version 4.11 should not have this bug I don't recall having that come up, but the first 35 pages or so is from the old versions, so perhaps that is why. The what's new box is in the SPPC package and it gets the special price with the function tep_get_products_special_price. This function is in includes/general.php around line 106 and takes into account the customer group so what you see is not "normal". Quote Link to comment Share on other sites More sharing options...
Jan Zonjee Posted March 12, 2006 Share Posted March 12, 2006 I don't want to have to manually edit customers to say they're wholesale. Like if they fill in the tax id number, I want it automatic that they are wholesale and they see those prices. Personally, I wouldn't be that trusting :D If they don't fill it in then it's autoamatic retail and they see the retail prices. It is pretty similar to the post 2125 above. Where the alert is set (around line 192) you will need to add the new customers_group_id like: if ( ACCOUNT_COMPANY == 'true' && tep_not_null($company_tax_id) ) { $sql_data_array['customers_group_ra'] = '1'; $sql_data_array['customers_group_id'] = '1'; // or 2, 3 whatever } but when recreating the session (around line 236) you will have to add some code to set the customer group specific session variables normally set in login.php: // BOF Separate Pricing per Customer tep_session_register('sppc_customer_group_id'); tep_session_register('sppc_customer_group_show_tax'); tep_session_register('sppc_customer_group_tax_exempt'); // EOF Separate Pricing per Customer Quote Link to comment Share on other sites More sharing options...
Jan Zonjee Posted March 12, 2006 Share Posted March 12, 2006 $product_query = tep_db_query("select products_id, products_price, products_ship_price, products_ship_price_two, products_tax_class_id, products_weight from " . TABLE_PRODUCTS . " where products_id = '" . (int)$products_id . "'"); I don't know enough about the priceformatter.php to add the queries in. I am having some other hangups but this might get me started. Any ideas??????? Possibly, you may only need to add those two fields to the sql in the function loadProduct (around line 220). Otherwise you will have to add it to the sql in product_info.php too (which generates the info that loadProductSppc is getting [starts around line 180]). Quote Link to comment Share on other sites More sharing options...
Guest Posted March 12, 2006 Share Posted March 12, 2006 Possibly, you may only need to add those two fields to the sql in the function loadProduct (around line 220). Otherwise you will have to add it to the sql in product_info.php too (which generates the info that loadProductSppc is getting [starts around line 180]). I am getting the following when i get to the shopping cart and try to adjust the quantity? Warning: Illegal offset type in /home/xxx/public_html/catalognew/includes/classes/shopping_cart.php on line 165 Fatal error: Unsupported operand types in /home/xxx/public_html/catalognew/includes/application_top.php on line 360 I am running pwa, sppc, price breaks shopping_cart line 165 in bold } function remove($products_id) { [b]global $customer_id; [/b] unset($this->contents[$products_id]); // remove from database if ($customer_id) { tep_db_query("delete from " . TABLE_CUSTOMERS_BASKET . " where customers_id = '" . (int)$customer_id . "' and products_id = '" . tep_db_input($products_id) . "'"); tep_db_query("delete from " . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . " where customers_id = '" . (int)$customer_id . "' and products_id = '" . tep_db_input($products_id) . "'"); } } Quote Link to comment Share on other sites More sharing options...
Iwant2Lrn Posted March 13, 2006 Share Posted March 13, 2006 Possibly, you may only need to add those two fields to the sql in the function loadProduct (around line 220). Otherwise you will have to add it to the sql in product_info.php too (which generates the info that loadProductSppc is getting [starts around line 180]). JanZ, You saved me again! I will let you know how it all comes out when it get it all running. If it stays straight forward I think it might be good to make a contribution for this to work with SPPC. Thanks again!!!! :thumbsup: Quote Link to comment Share on other sites More sharing options...
Guest Posted March 13, 2006 Share Posted March 13, 2006 ok im usign this to have retail and whoelsale so it will show both prices is there a way that when everyone registeres they automatically go in the wholesale group Quote Link to comment Share on other sites More sharing options...
Guest Posted March 13, 2006 Share Posted March 13, 2006 My Problem has been fixed Quote Link to comment Share on other sites More sharing options...
sophina Posted March 13, 2006 Share Posted March 13, 2006 Dear Janz Thank you for your reply. With your help, the problem solved. Thank you very very much!! Quote Link to comment Share on other sites More sharing options...
Guest Posted March 13, 2006 Share Posted March 13, 2006 I am getting the following when i get to the shopping cart and try to adjust the quantity? Warning: Illegal offset type in /home/xxx/public_html/catalognew/includes/classes/shopping_cart.php on line 165 Fatal error: Unsupported operand types in /home/xxx/public_html/catalognew/includes/application_top.php on line 360 I am running pwa, sppc, price breaks shopping_cart line 165 in bold } function remove($products_id) { [b]global $customer_id; [/b] unset($this->contents[$products_id]); // remove from database if ($customer_id) { tep_db_query("delete from " . TABLE_CUSTOMERS_BASKET . " where customers_id = '" . (int)$customer_id . "' and products_id = '" . tep_db_input($products_id) . "'"); tep_db_query("delete from " . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . " where customers_id = '" . (int)$customer_id . "' and products_id = '" . tep_db_input($products_id) . "'"); } } Ugghhh I decided to try out the shopping cart file provided in the standard contrib , that also provide the same error even though the files are different presumably its not this file thats causing the problem then? Quote Link to comment Share on other sites More sharing options...
Jan Zonjee Posted March 13, 2006 Share Posted March 13, 2006 Ugghhh I decided to try out the shopping cart file provided in the standard contrib , that also provide the same error even though the files are different presumably its not this file thats causing the problem then? That error can occur when products_id is not a variable but an array. Check the HTML of the page or do a: echo '<pre>Post variables:<br />'; print_r($_POST); echo '</pre>'; on the page (I think that will work). Perhaps it will give a clue about what products_id is: variable (as it should) or an array. 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.