MzBeanz Posted February 6, 2005 Share Posted February 6, 2005 I installed this just fine but I have a problem when I assigned a group discoutn to a customer the items I have on special are marked as follows and I do not know why... the line through $3.19 and the price as $3.25 but the sale price is $3.25... what is it doing? thanks! product name $3.19 $3.25 Quote Link to comment Share on other sites More sharing options...
MzBeanz Posted February 6, 2005 Share Posted February 6, 2005 please disregard my last post I just realized I have not applied the updated version from CGD Discounts ? total b2b ... I am not sure how to do htis as I do not see how to modify the files I already have the CGD installed and other modu;les as well... how do I upgrade? thanks Quote Link to comment Share on other sites More sharing options...
MzBeanz Posted February 7, 2005 Share Posted February 7, 2005 well it took a while but I figured out how to update the sql, but I did something wrong when I modified catalog/product_info.php i think as the catalog in admin does not reflect the tax I have to charge and on the product info page the price shows $7.75 for everything which is the tax rate?? ANy ideas how to fix this?? are there more files I m ay have messed up thanks so much this store is live and I am in a pickle! Quote Link to comment Share on other sites More sharing options...
MzBeanz Posted February 7, 2005 Share Posted February 7, 2005 Thank you so much for responding so quickly! I went through and did each file but I ran into a few problems. It seems to work correctly with the exception of the following in the admin center when I am m editing each catalog item it does not reflect the tax I have it set for. the net and gross price are the same when I view new products via catalog/products_new.php the price shown is $7.75 for all items which is the local tax rate. When I remove someone from the groups list it still gives them the discount Any idea what files I messed up? thanks again so much this module is awesome! Quote Link to comment Share on other sites More sharing options...
darkangel Posted February 8, 2005 Share Posted February 8, 2005 Hello people, I hope this is the right thread to post this: Well, I am using B2B Suite and I wanted to install the contribution for Call for Price. I don't actually know which one is good but if someone can recommend that would work well with that contribution. Has anyone insterted the code correctly to work with B2B? Quote Link to comment Share on other sites More sharing options...
JeffT Posted February 8, 2005 Share Posted February 8, 2005 Hello people, I hope this is the right thread to post this: Well, I am using B2B Suite and I wanted to install the contribution for Call for Price. I don't actually know which one is good but if someone can recommend that would work well with that contribution. Has anyone insterted the code correctly to work with B2B? <{POST_SNAPBACK}> Hey Darkangel, I havn't used the Call for Price mod but I thought I might share some words of wisdom. I've hijacked a few mods, some custom made and contributions, into the B2B mod. You just have to make sure you review the basic logic above and below the code you are inserting, especially if there is any interaction with the B2B. Review and understand the logic of the code you are inserting; this way you can look at the general logic of the page you are modifying to see if there are any conflicts. As always, backup each file before you edit it in case you want to "roll back" your work. Quote Link to comment Share on other sites More sharing options...
darkangel Posted February 8, 2005 Share Posted February 8, 2005 Hey Jeff, Thanks for your quick reply... I will see it that works, but sometimes mixing the contributions takes time... If anyone care to share other toughts ... would be helpful! ;) Quote Link to comment Share on other sites More sharing options...
darkangel Posted February 10, 2005 Share Posted February 10, 2005 Ok I have gotten the contribution to work, not fully but almost... I am having conflicts though! The b2b code and the call for price code seem to conflict, they do work, but doesn't show the right price for the costumer in the new products nor in the product info. Can anyone help with this: This is the code that I am having trouble with: // BOF: WebMakers.com Added: FREE-CALL FOR PRICE-COMING SOON ETC. v3.0 $my_products_name = $product_info_values['products_name']; $my_products_price = $product_info_values['products_price']; $my_specials_new_products_price = tep_get_products_special_price($product_info_values['products_id']); $my_products_quantity = tep_get_products_stock($product_info_values['products_id']); // EOF: WebMakers.com Added: FREE-CALL FOR PRICE-COMING SOON ETC. v3.0 if ($new_price = tep_get_products_special_price($product_info['products_id'])) { //***** START OF B2BSUITE MODIFICATION 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); $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['customers_group_id'] . "'"); if ($scustomer_group_price = tep_db_fetch_array($scustomer_group_price_query)) $product_info['products_price']= $scustomer_group_price['customers_group_price']; $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 { //$products_price = $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])); 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 = ""; $products_price = $currencies->display_price($customer_group_price['customers_group_price'], tep_get_tax_rate($product_info['products_tax_class_id'])); } else { $products_price = $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])); } } else { $products_price = $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])); } //***** END OF B2BSUITE MODIFICATION Can someone combine this? Has anyone gotten both this contribution together? I greatly appreciate it! Quote Link to comment Share on other sites More sharing options...
Dusan Posted February 10, 2005 Share Posted February 10, 2005 Dear all please provide your experience if it is possible to install the Total B2B in the CREloaded distribution of OSC Thanks for your answer <{POST_SNAPBACK}> Dear All from me, as well :wub: What about adding this great code into good old MS1?? If someone actually did that I would really like to buy him/her a big can of beer or something... Just curious if such thing is possible?!? Thank you for any kind of comments! My name is Dusan and I can fly anywhere :ph34r: Quote Link to comment Share on other sites More sharing options...
MzBeanz Posted February 15, 2005 Share Posted February 15, 2005 Do I understand correctly that if I have the old CGDiscountSpecials already installed, all I need to do to use/upgrade to Total B2B is alter each of the files in the B2B contribution? Replacing the //CGDiscounts with //Total B2B? Thanks Quote Link to comment Share on other sites More sharing options...
poisontheused Posted February 16, 2005 Share Posted February 16, 2005 For anyone that experiences the problem some mentioned above about all there prices displaying 0. Please ensure that in the Admin under localization > currencies, you have your chosen currency set to default. I had no currency set to default.. changed my dollar to default and all has been fixed. Quote Link to comment Share on other sites More sharing options...
sicanada Posted February 16, 2005 Share Posted February 16, 2005 Hello; I have read through all the posts for currencies.php the has an error for line 72. I am a newbie with Oscommerce and as well I am trying to use the featured_products contribution. Any sugesstions. thanks http://shop.siservices.com :-" Quote Link to comment Share on other sites More sharing options...
hozone Posted February 16, 2005 Author Share Posted February 16, 2005 @ sicanada check that EVERY call to display_price has 4 paramenter passed (the first meust be the products id) Quote osCommerce Italia support: http://www.oscommerceitalia.com Link to comment Share on other sites More sharing options...
John Holmes Posted February 22, 2005 Share Posted February 22, 2005 hozone. Could you work on maybe adding another feature. Say for instance I have these products" Product A Product B I require customers to purcahse a case of Product A which is 12 I require customers to purchase a case of Product B which is 48 Now right now I have listed the individual prices of Product A and Product B. Can you add a feature to where you can make it a requirement to purcahse 12 and 48 for each product rather than having to show the price for 12 and mark each product in it's description of "This price is for a case of 12" because if they see the price for a case, they may not like it rather than seeing the price of one initially. I know there is a contribution that forces a customer to purcahse a minimum amount but that is only for all products. It allows you to set a minimum quanitty across the board but I need something that allows you to set a minimum quanitity for each individual product. thanks in advance. Quote Link to comment Share on other sites More sharing options...
sicanada Posted February 22, 2005 Share Posted February 22, 2005 @ sicanada check that EVERY call to display_price has 4 paramenter passed (the first meust be the products id) <{POST_SNAPBACK}> In which file? Hozone. thanks Quote Link to comment Share on other sites More sharing options...
sicanada Posted February 22, 2005 Share Posted February 22, 2005 @ sicanada check that EVERY call to display_price has 4 paramenter passed (the first meust be the products id) <{POST_SNAPBACK}> THIS IS MY CODE. function display_price($products_id, $products_price, $products_tax, $quantity = 1) { global $customer_id; $query_price_to_guest = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " WHERE configuration_key = 'ALLOW_GUEST_TO_SEE_PRICES'"); $query_price_to_guest_result = tep_db_fetch_array($query_price_to_guest); if (($query_price_to_guest_result['configuration_value']=='true') && !(tep_session_is_registered('customer_id'))) { $query_guest_discount = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " WHERE configuration_key = 'GUEST_DISCOUNT'"); $query_guest_discount_result = tep_db_fetch_array($query_guest_discount); $customer_discount = $query_guest_discount_result['configuration_value']; if ($customer_discount >= 0) { $products_price = $products_price + $products_price * abs($customer_discount) / 100; } else { $products_price = $products_price - $products_price * abs($customer_discount) / 100; } return $this->format(tep_add_tax($products_price, $products_tax) * $quantity); } elseif (tep_session_is_registered('customer_id')) { $query_A = tep_db_query("select m.manudiscount_discount from " . TABLE_MANUDISCOUNT . " m, " . TABLE_PRODUCTS . " p where m.manudiscount_groups_id = 0 and m.manudiscount_customers_id = '" . $customer_id . "' and p.products_id = '" . $products_id . "' and p.manufacturers_id = m.manudiscount_manufacturers_id"); $query_B = tep_db_query("select m.manudiscount_discount from " . TABLE_CUSTOMERS . " c, " . TABLE_MANUDISCOUNT . " m, " . TABLE_PRODUCTS . " p where m.manudiscount_groups_id = c.customers_groups_id and m.manudiscount_customers_id = 0 and c.customers_id = '" . $customer_id . "' and p.products_id = '" . $products_id . "' and p.manufacturers_id = m.manudiscount_manufacturers_id"); $query_C = tep_db_query("select m.manudiscount_discount from " . TABLE_MANUDISCOUNT . " m, " . TABLE_PRODUCTS . " p where m.manudiscount_groups_id = 0 and m.manudiscount_customers_id = 0 and p.products_id = '" . $products_id . "' and p.manufacturers_id = m.manudiscount_manufacturers_id"); if ($query_result = tep_db_fetch_array($query_A)) { $customer_discount = $query_result['manudiscount_discount']; } else if ($query_result = tep_db_fetch_array($query_B)) { $customer_discount = $query_result['manudiscount_discount']; } else if ($query_result = tep_db_fetch_array($query_C)) { $customer_discount = $query_result['manudiscount_discount']; } else { $query = tep_db_query("select g.customers_groups_discount from " . TABLE_CUSTOMERS_GROUPS . " g inner join " . TABLE_CUSTOMERS . " c on g.customers_groups_id = c.customers_groups_id and c.customers_id = '" . $customer_id . "'"); $query_result = tep_db_fetch_array($query); $customers_groups_discount = $query_result['customers_groups_discount']; $query = tep_db_query("select customers_discount from " . TABLE_CUSTOMERS . " where customers_id = '" . $customer_id . "'"); $query_result = tep_db_fetch_array($query); $customer_discount = $query_result['customers_discount']; $customer_discount = $customer_discount + $customers_groups_discount; } if ($customer_discount >= 0) { $products_price = $products_price + $products_price * abs($customer_discount) / 100; } else { $products_price = $products_price - $products_price * abs($customer_discount) / 100; } return $this->format(tep_add_tax($products_price, $products_tax) * $quantity); } else { return PRICES_LOGGED_IN_TEXT; } } function display_price_nodiscount($products_price, $products_tax, $quantity = 1) { global $customer_id; $query_price_to_guest = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " WHERE configuration_key = 'ALLOW_GUEST_TO_SEE_PRICES'"); $query_price_to_guest_result = tep_db_fetch_array($query_price_to_guest); if ((($query_price_to_guest_result['configuration_value']=='true') && !(tep_session_is_registered('customer_id'))) || ((tep_session_is_registered('customer_id')))) { return $this->format(tep_add_tax($products_price, $products_tax) * $quantity); } else { return PRICES_LOGGED_IN_TEXT; } } //TotalB2B end Quote Link to comment Share on other sites More sharing options...
goutbouyo Posted March 9, 2005 Share Posted March 9, 2005 Hello, I have installed B2B and hide_products but I have this error in the admin part when I edit the product : Warning: Invalid argument supplied for foreach() in c:\web\easyphp1-8\www\catalog\admin\categories.php on line 558 It's near "Select groups to hide" Quote Link to comment Share on other sites More sharing options...
hozone Posted March 9, 2005 Author Share Posted March 9, 2005 Hello, I have installed B2B and hide_products but I have this error in the admin part when I edit the product : Warning: Invalid argument supplied for foreach() in c:\web\easyphp1-8\www\catalog\admin\categories.php on line 558 It's near "Select groups to hide" <{POST_SNAPBACK}> line 558 of admin/categories.php <td class="main"><?php echo TEXT_PRODUCTS_TAX_CLASS; ?></td> doesn't have foreach( ... :blink: Quote osCommerce Italia support: http://www.oscommerceitalia.com Link to comment Share on other sites More sharing options...
goutbouyo Posted March 9, 2005 Share Posted March 9, 2005 <?php // ---BOF--Hide product from groups ------------------------------------// ?> <tr align="top"><td><? echo TEXT_HIDE_PRODUCTS_FROM_GROUP; ?></td> <td class="dataTableContent"> <table border="0" cellpadding="0" cellspacing="0"> <?php #Check which groups should be hidden if ($product_id != NULL){ $product_hide_from_group_query = tep_db_query("select products_hide_from_groups from ".TABLE_PRODUCTS." where products_id =".$HTTP_GET_VARS['pID']); $hide_these_products = tep_db_fetch_array($product_hide_from_group_query); $hide = explode(',',$hide_these_products['products_hide_from_groups']); } $customers_groups_query = tep_db_query("select distinct customers_groups_id, customers_groups_name from " . TABLE_CUSTOMERS_GROUPS . " where customers_groups_id != '" . 0 . "' order by customers_groups_id"); $i=1; while ($customers_groups = tep_db_fetch_array($customers_groups_query)) { foreach($hide as $h){ if($h == $customers_groups['customers_groups_id']){ $check_hidden = true; break; }else{ $check_hidden = false; } } #print the checkbox field echo '<tr class="dataTableContent"><td>'. ($i).'. '. tep_draw_checkbox_field( 'hide[' . ($i++) . ']', $customers_groups['customers_groups_id'] , $check_hidden) . ' ' . $customers_groups['customers_groups_name'].'</td></tr>'; }#End of while ?> </table> </td></tr> <?php //---EOF--Hide product from groups -----------------------------------// ?> Quote Link to comment Share on other sites More sharing options...
goutbouyo Posted March 9, 2005 Share Posted March 9, 2005 Nobody can help me ??? Quote Link to comment Share on other sites More sharing options...
Jan Zonjee Posted March 9, 2005 Share Posted March 9, 2005 Nobody can help me ???Perhaps you expect too much... This part looks suspicious: ? ? ? #Check which groups should be hidden ? ? ? ? ?if ($product_id != NULL){ Can you try: ? ? ? #Check which groups should be hidden if (isset($HTTP_GET_VARS['pID']) && empty($HTTP_POST_VARS)) { You get the error because $hide is not an array. You can check that by adding some echo's: ? ? ? ? $hide_these_products = tep_db_fetch_array($product_hide_from_group_query); ?$hide = explode(',',$hide_these_products['products_hide_from_groups']); ?} echo '<h3>Hide is: '; echo $hide; echo '</h3>'; ? ? ? ? $customers_groups_query = tep_db_query("select distinct customers_groups_id, customers_groups_name from " . TABLE_CUSTOMERS_GROUPS . " where customers_groups_id != '" . 0 . "' order by customers_groups_id"); If you just see "Hide is:" then $hide is NULL, so not an array. Quote Link to comment Share on other sites More sharing options...
goutbouyo Posted March 10, 2005 Share Posted March 10, 2005 Thanks it's good now !!! But I have another problem ... The function whose hide the products doesn't work, I think it's that : //--BOF hide products from group--- $group_id = tep_get_customer_groups_id($customer_id); $listing_sql .= " and find_in_set('".$group_id."', products_hide_from_groups) = 0 "; //--EOF hide products from group--- Can you help me please ? Quote Link to comment Share on other sites More sharing options...
Jan Zonjee Posted March 10, 2005 Share Posted March 10, 2005 The function whose hide the products doesn't workAre you sure the field in the database is getting filled (check with phpMyAdmin)? I'm suspicious about this: 'hide[' . ($i++) . ']', I have a feeling this doesn't work and that it should be something like: ? ? ?tep_draw_checkbox_field( ? 'hide['. $i. ']', ? $customers_groups['customers_groups_id'] , ? $check_hidden) . ' ' ? . $customers_groups['customers_groups_name'].'</td></tr>'; $i++; ? ? ? ? }#End of while Better do a "view source" in the admin section if you see those checkboxes. The source code should read something like name="hide[1]" and not something like name="hide[(1)]" which I'm afraid it does. Quote Link to comment Share on other sites More sharing options...
goutbouyo Posted March 10, 2005 Share Posted March 10, 2005 You're right : the field products_hide_from_groups isn't getting filled. But if I put a valor myself, it's doesnt work no longer ... Another question : With the B2B contribution (without hide price), is it normal that in the products' list and in the what's new box the price are 0 or a number like 325 for a product whose cost 50??? Quote Link to comment Share on other sites More sharing options...
Jan Zonjee Posted March 10, 2005 Share Posted March 10, 2005 But if I put a valor myself, it's doesnt work no longer ... Sure you put it in as:No value: @ One value: @,2 Two values: @,2,1 etcetera? Another question : With the B2B contribution (without hide price), is it normal that in the products' list and in the what's new box the price are 0 or a number like 325 for a product whose cost 50??? Never installed B2B, but I think you already know that it doesn't sound like it should be. 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.