Grinse Posted February 16, 2008 Share Posted February 16, 2008 Oh, perfect. Thank you! In my file the following was missing: <td class="dataTableHeadingContent" align="center"> <?php echo TABLE_HEADING_HIDDEN; ?> </td> But now everything works fine! Quote Link to comment Share on other sites More sharing options...
paq1200 Posted February 16, 2008 Share Posted February 16, 2008 how do i update the prices for the different price groups? I thiink it will have to be done through phpmyadmin but I am not sure how to do it. my different price groups are: retail wholesale = 40% of cost cost actual = -5% of cost thanks in advance Mike Quote Link to comment Share on other sites More sharing options...
Jan Zonjee Posted February 16, 2008 Share Posted February 16, 2008 What's the easiest way to associate the customers_group_id with the appropriate customers_group_name? I know that you need to grab the customers_group_id first but I always seem to fall down when it comes to associating the _id with the _name. There are lots of places in both the catalog and admin where I'd like to also include the customer's group name but I can never seem to get past showing the _id. You would need to a query of the table customers_groups (select customer_group_name from customers_groups where customer_group_id = '" . $customer_group_id . "') etcetera. If you want to show it on the catalog side it might be better to do that query on login and make it a session variable. For the admin it is probably the easiest to look at how it was done in admin/orders.php (joining customers with customers_group on customer group id to get to the customer group name in customers_groups) around line 362 and further. Quote Link to comment Share on other sites More sharing options...
1Putts Posted February 16, 2008 Share Posted February 16, 2008 You would need to a query of the table customers_groups (select customer_group_name from customers_groups where customer_group_id = '" . $customer_group_id . "') etcetera. If you want to show it on the catalog side it might be better to do that query on login and make it a session variable.For the admin it is probably the easiest to look at how it was done in admin/orders.php (joining customers with customers_group on customer group id to get to the customer group name in customers_groups) around line 362 and further. I've looked at both admin/orders.php and admin/customers.php but I think it's confusing me even further. My problem is I don't quite get how the query selects the data from each table (where multiple tables are concerned) and puts them all together. Here's where I'm at right now but it's still not right. It's listing each customer repeatedly depending on how many different customer groups there are. I know I need to join something somewhere but I don't know where. <?php $customers_query = tep_db_query("select c.customers_id, c.customers_lastname, c.customers_firstname, c.customers_group_id, cg.customers_group_name, ci.customers_info_date_account_created from " . TABLE_CUSTOMERS . " c, " . TABLE_CUSTOMERS_GROUPS . " cg, " . TABLE_CUSTOMERS_INFO . " ci where c.customers_id = ci.customers_info_id order by ci.customers_info_date_account_created desc limit 6"); while ($customers = tep_db_fetch_array($customers_query)) { echo ' <tr class="dataTableRow">' . ' <td class="dataTableContent"><a href="' . tep_href_link(FILENAME_CUSTOMERS, 'cID=' . (int)$customers['customers_id'] . '&action=edit') . '">' . tep_output_string_protected($customers['customers_firstname'] . ' ' . $customers['customers_lastname']) . '</td>' . ' <td class="dataTableContent">' . $customers['customers_group_name'] . '</td>' . ' <td class="dataTableContent">' . $customers['customers_info_date_account_created'] . '</td>' . ' </tr>'; } ?> Quote Link to comment Share on other sites More sharing options...
Jan Zonjee Posted February 16, 2008 Share Posted February 16, 2008 Here's where I'm at right now but it's still not right. It's listing each customer repeatedly depending on how many different customer groups there are. I know I need to join something somewhere but I don't know where. $customers_query = tep_db_query("select c.customers_id, c.customers_lastname, c.customers_firstname, c.customers_group_id, cg.customers_group_name, ci.customers_info_date_account_created from " . TABLE_CUSTOMERS . " c, " . TABLE_CUSTOMERS_GROUPS . " cg, " . TABLE_CUSTOMERS_INFO . " ci where c.customers_id = ci.customers_info_id and c.customers_group_id = cg.customers_group_id order by ci.customers_info_date_account_created desc limit 6"); Quote Link to comment Share on other sites More sharing options...
1Putts Posted February 16, 2008 Share Posted February 16, 2008 (edited) Ah, I see how it works now. I was so close yet so far. Many thanks. BTW, you may be interested in this since I'm trying to add a bunch of stuff that makes OsC2.2 R2 work a bit better with SPPC. In this case, it's just adding the Customer Groups in the main Admin index page where it shows recent customers and recent orders (catalog/admin/includes/modules/index/customers.php). Edited February 16, 2008 by 1Putts Quote Link to comment Share on other sites More sharing options...
Jan Zonjee Posted February 17, 2008 Share Posted February 17, 2008 In this case, it's just adding the Customer Groups in the main Admin index page where it shows recent customers and recent orders (catalog/admin/includes/modules/index/customers.php). I haven't looked at that. I have so many things going on that SPPC is just one of them... Quote Link to comment Share on other sites More sharing options...
slopface Posted February 18, 2008 Share Posted February 18, 2008 Hi Folks, Ive got a problem with the specials scroll contib that list the specials the number of times that a product is created of specials for different customer groups. Any help? Thanks in advance, Apache Quote Link to comment Share on other sites More sharing options...
Jan Zonjee Posted February 18, 2008 Share Posted February 18, 2008 Ive got a problem with the specials scroll contib that list the specials the number of times that a product is created of specials for different customer groups. You will have to add customer_group_id to the selection of specials. Quote Link to comment Share on other sites More sharing options...
apache2 Posted February 18, 2008 Share Posted February 18, 2008 You will have to add customer_group_id to the selection of specials. Hi Jan, I think I've done that but it does not work :'( I found out how to do it in the the standard specials, but not for the scrolling specials in the right column :angry: I do not know what files to edit... I have a specials_scroll.php in both ../modules/ and in ../boxes/ Could you give some kind of hint to what to change? I think I need to insert this peace of code and then change the select as well? // BOF Separate Pricing Per Customer if(!tep_session_is_registered('sppc_customer_group_id')) { $customer_group_id = '0'; } else { $customer_group_id = $sppc_customer_group_id; } ../BOXES/ <?php /* osCommerce, Open Source E-Commerce Solutions [url="http://www.oscommerce.com"]http://www.oscommerce.com[/url] Copyright © 2003 osCommerce Released under the GNU General Public License */ $rp_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 " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_SPECIALS . " s 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' order by s.specials_date_added desc"); if (tep_db_num_rows($rp_query)) { ?> <!-- specials //--> <tr> <td> <?php $info_box_contents = array(); $info_box_contents[] = array('text' => BOX_HEADING_SPECIALS); new infoBoxHeading($info_box_contents, false, false, tep_href_link(FILENAME_SPECIALS)); while ($random_product = tep_db_fetch_array($rp_query)) { $rp .= '<center><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $random_product["products_id"]) . '">' . tep_image(DIR_WS_IMAGES . $random_product['products_image'], $random_product['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $random_product['products_id']) . '">' . $random_product['products_name'] . '</a><br><s>' . $currencies->display_price($random_product['products_price'], tep_get_tax_rate($random_product['products_tax_class_id'])) . '</s><br><span class="productSpecialPrice">' . $currencies->display_price($random_product['specials_new_products_price'], tep_get_tax_rate($random_product['products_tax_class_id'])); $rp .= "</SPAN><BR /><br>"; } $info_box_contents = array(); $info_box_contents[] = array('align' => 'center', 'text' => '<MARQUEE behavior= "scroll" align= "center" direction= "up" height="160" scrollamount= "2" scrolldelay= "20" onmouseover=\'this.stop()\' onmouseout=\'this.start()\'>'.$rp.'</span></MARQUEE>'); new infoBox($info_box_contents); ?> </td> </tr> <!-- specials_eof //--> <?php } ?> ../MODULES/ <?php /* osCommerce, Open Source E-Commerce Solutions [url="http://www.oscommerce.com"]http://www.oscommerce.com[/url] Copyright © 2003 osCommerce Released under the GNU General Public License */ $rp_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 " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_SPECIALS . " s 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' order by s.specials_date_added desc"); if (tep_db_num_rows($rp_query)) {?> <!-- specials //--> <tr> <td><?php $info_box_contents = array(); $info_box_contents[] = array('text' => BOX_HEADING_SPECIALS); new infoBoxHeading($info_box_contents, false, false, tep_href_link(FILENAME_SPECIALS)); while ($random_product = tep_db_fetch_array($rp_query)) { $rp .= '<center><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $random_product["products_id"]) . '">' . tep_image(DIR_WS_IMAGES . $random_product['products_image'], $random_product['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $random_product['products_id']) . '">' . $random_product['products_name'] . '</a><br><s>' . $currencies->display_price($random_product['products_price'], tep_get_tax_rate($random_product['products_tax_class_id'])) . '</s><br><span class="productSpecialPrice">' . $currencies->display_price($random_product['specials_new_products_price'], tep_get_tax_rate($random_product['products_tax_class_id'])); $rp .= "</SPAN><BR /><br>"; } $info_box_contents = array(); $info_box_contents[] = array('align' => 'center', 'text' => '<MARQUEE behavior= "scroll" align= "center" direction= "up" height="160" scrollamount= "2" scrolldelay= "20" onmouseover=\'this.stop()\' onmouseout=\'this.start()\'>'.$rp.'</span></MARQUEE>'); new infoBox($info_box_contents);?> </td> </tr> <!-- specials_eof //--> <?php }?> Quote Link to comment Share on other sites More sharing options...
apache2 Posted February 19, 2008 Share Posted February 19, 2008 You will have to add customer_group_id to the selection of specials. Hi Jan, I found out how to solve the problem. THnaks for your hint.... /Apache Quote Link to comment Share on other sites More sharing options...
Measha06 Posted February 20, 2008 Share Posted February 20, 2008 I have manually added Separate pricing to my site www.naturesnaturalbeauty.com and all seems to be working quite well until shipping is trying to be added to an order placed. The instructions say:- Line 21 [22] **REPLACE** $this->modules = explode(';', MODULE_SHIPPING_INSTALLED); **WITH** // BOF Separate Pricing Per Customer, next line original code // $this->modules = explode(';', MODULE_SHIPPING_INSTALLED); global $customer_id; if (isset($_SESSION['sppc_customer_group_id']) && $_SESSION['sppc_customer_group_id'] != '0') { $customer_group_id = $_SESSION['sppc_customer_group_id']; } else { $customer_group_id = '0'; } $customer_shipment_query = tep_db_query("select IF(c.customers_shipment_allowed <> '', c.customers_shipment_allowed, cg.group_shipment_allowed) as shipment_allowed from " . TABLE_CUSTOMERS . " c, " . TABLE_CUSTOMERS_GROUPS . " cg where c.customers_id = '" . $customer_id . "' and cg.customers_group_id = '" . $customer_group_id . "'"); if ($customer_shipment = tep_db_fetch_array($customer_shipment_query) ) { if (tep_not_null($customer_shipment['shipment_allowed']) ) { $temp_shipment_array = explode(';', $customer_shipment['shipment_allowed']); $installed_modules = explode(';', MODULE_SHIPPING_INSTALLED); for ($n = 0; $n < sizeof($installed_modules) ; $n++) { // check to see if a shipping module is not de-installed if ( in_array($installed_modules[$n], $temp_shipment_array ) ) { $shipment_array[] = $installed_modules[$n]; } } // end for loop $this->modules = $shipment_array; } else { $this->modules = explode(';', MODULE_SHIPPING_INSTALLED); } } else { // default $this->modules = explode(';', MODULE_SHIPPING_INSTALLED); } // EOF Separate Pricing Per Customer I have done this and end up with this:- // BOF Separate Pricing Per Customer, next line original code // $this->modules = explode(';', MODULE_SHIPPING_INSTALLED); global $customer_id; if (isset($_SESSION['sppc_customer_group_id']) && $_SESSION['sppc_customer_group_id'] != '0') { $customer_group_id = $_SESSION['sppc_customer_group_id']; } else { $customer_group_id = '0'; } $customer_shipment_query = tep_db_query("select IF(c.customers_shipment_allowed <> '', c.customers_shipment_allowed, cg.group_shipment_allowed) as shipment_allowed from " . TABLE_CUSTOMERS . " c, " . TABLE_CUSTOMERS_GROUPS . " cg where c.customers_id = '" . $customer_id . "' and cg.customers_group_id = '" . $customer_group_id . "'"); if ($customer_shipment = tep_db_fetch_array($customer_shipment_query) ) { if (tep_not_null($customer_shipment['shipment_allowed']) ) { $temp_shipment_array = explode(';', $customer_shipment['shipment_allowed']); $installed_modules = explode(';', MODULE_SHIPPING_INSTALLED); for ($n = 0; $n < sizeof($installed_modules); $n++) { // check to see if a shipping module is not de-installed if ( in_array($installed_modules[$n], $temp_shipment_array ) ) { $shipment_array[] = $installed_modules[$n]; } } // end for loop $this->modules = $shipment_array; } else { $this->modules = explode(';', MODULE_SHIPPING_INSTALLED); } } else { // default $this->modules = explode(';', MODULE_SHIPPING_INSTALLED); } // EOF Separate Pricing Per Customer on one line number 22 Now when I try a dummy order and I get to https://www.naturesnaturalbeauty.com/catalo...ut_shipping.php I end up with this error message:- Warning: reset() [function.reset]: Passed variable is not an array or object in /home/yxgblfan/public_html/catalog/includes/classes/shipping.php on line 28 Warning: Variable passed to each() is not an array or object in /home/yxgblfan/public_html/catalog/includes/classes/shipping.php on line 29 Warning: Cannot modify header information - headers already sent by (output started at /home/yxgblfan/public_html/catalog/includes/classes/shipping.php:28) in /home/yxgblfan/public_html/catalog/includes/functions/general.php on line 34 Lines 28 and 29 of includes/classes/shipping.php are:- reset($this->modules); while (list(, $value) = each($this->modules)) { Can you please tell me what needs rectifying as this error prevents anybody from completin a purchase. Hoping for a speedy solution. regards Liz Quote Liz A very appreciative member still attempting to climb the steep learning curve! Link to comment Share on other sites More sharing options...
fraserdp Posted February 21, 2008 Share Posted February 21, 2008 I have a question, I installed SPPC and everything seems to be working except for a couple things. In product info page, the group price is shown, but when you look at the price in the shopping cart it shows the retail price. I dont know if this is something I missed in the shopping cart class? And another small thing, When someone signs up it doesnt show the little red light showing that they need to be edited. Thanks for any help Matthew Quote Link to comment Share on other sites More sharing options...
pedgette Posted February 21, 2008 Share Posted February 21, 2008 Thanks for the great contribution, it's great for the new store I'm putting together. I have been able to do test purchases and everything works fine so far except one small thing. With the wholesale account I have setup, when I go to a category the price shows retail. When I click on the product I then see the wholesale price. When it's in my cart or in the what's new info box it also shows the correct wholesale price. I couldn't pin point why this is happening. I thought it would be in the catalog/index.php file but I've rewrote and double checked the code in there twice without any luck. If anyone could point me into the right direction that would be great. Thanks. Quote Link to comment Share on other sites More sharing options...
Jan Zonjee Posted February 21, 2008 Share Posted February 21, 2008 Can you please tell me what needs rectifying as this error prevents anybody from completin a purchase. Try putting the code back with instructions on a per line base. Seems like something went double wrong: forgetting to add the edited file and the instructions. All line breaks seem to have been gone in what you post. // BOF Separate Pricing Per Customer, next line original code // $this->modules = explode(';', MODULE_SHIPPING_INSTALLED); global $customer_id; if (isset($_SESSION['sppc_customer_group_id']) && $_SESSION['sppc_customer_group_id'] != '0') { $customer_group_id = $_SESSION['sppc_customer_group_id']; } else { $customer_group_id = '0'; } $customer_shipment_query = tep_db_query("select IF(c.customers_shipment_allowed <> '', c.customers_shipment_allowed, cg.group_shipment_allowed) as shipment_allowed from " . TABLE_CUSTOMERS . " c, " . TABLE_CUSTOMERS_GROUPS . " cg where c.customers_id = '" . $customer_id . "' and cg.customers_group_id = '" . $customer_group_id . "'"); if ($customer_shipment = tep_db_fetch_array($customer_shipment_query) ) { if (tep_not_null($customer_shipment['shipment_allowed']) ) { $temp_shipment_array = explode(';', $customer_shipment['shipment_allowed']); $installed_modules = explode(';', MODULE_SHIPPING_INSTALLED); for ($n = 0; $n < sizeof($installed_modules); $n++) { // check to see if a shipping module is not de-installed if ( in_array($installed_modules[$n], $temp_shipment_array ) ) { $shipment_array[] = $installed_modules[$n]; } } // end for loop $this->modules = $shipment_array; } else { $this->modules = explode(';', MODULE_SHIPPING_INSTALLED); } } else { // default $this->modules = explode(';', MODULE_SHIPPING_INSTALLED); } // EOF Separate Pricing Per Customer Quote Link to comment Share on other sites More sharing options...
Jan Zonjee Posted February 21, 2008 Share Posted February 21, 2008 when I go to a category the price shows retail. That is not done by index.php but the product listing module that is "included" on index.php (usually includes/modules/products_listing.php). Quote Link to comment Share on other sites More sharing options...
Jan Zonjee Posted February 21, 2008 Share Posted February 21, 2008 In product info page, the group price is shown, but when you look at the price in the shopping cart it shows the retail price.I dont know if this is something I missed in the shopping cart class? That is the most likely place. And another small thing,When someone signs up it doesnt show the little red light showing that they need to be edited. It only shows when someone entered a tax account number but you can use a few more scenario's. See the comments in the code around line 209 in create_account.php. Quote Link to comment Share on other sites More sharing options...
pedgette Posted February 21, 2008 Share Posted February 21, 2008 Jan Zonjee - Thanks, I'm not sure how I passed that part over in the install notes. Quote Link to comment Share on other sites More sharing options...
fraserdp Posted February 22, 2008 Share Posted February 22, 2008 Ok I will look at the shopping cart class more. I have CP module so I probobly missed something, also It might be a lower version of OSC. @ the red light thing I know it only shows up with the tax number , thats what i tried. Quote Link to comment Share on other sites More sharing options...
Guest Posted February 28, 2008 Share Posted February 28, 2008 (edited) Try putting the code back with instructions on a per line base. Seems like something went double wrong: forgetting to add the edited file and the instructions. All line breaks seem to have been gone in what you post. <?php /* $Id: shipping.php,v 1.23 2003/06/29 11:22:05 hpdl Exp $ adapted for Separate Pricing Per Customer v4.2 2007/06/23 osCommerce, Open Source E-Commerce Solutions [url="http://www.oscommerce.com"]http://www.oscommerce.com[/url] Copyright © 2003 osCommerce Released under the GNU General Public License */ class shipping { var $modules; // class constructor function shipping($module = '') { global $language, $PHP_SELF; if (defined('MODULE_SHIPPING_INSTALLED') && tep_not_null(MODULE_SHIPPING_INSTALLED)) { // BOF Separate Pricing Per Customer, next line original code // $this->modules = explode(';', MODULE_SHIPPING_INSTALLED); global $customer_id; if (isset($_SESSION['sppc_customer_group_id']) && $_SESSION['sppc_customer_group_id'] != '0') { $customer_group_id = $_SESSION['sppc_customer_group_id']; } else { $customer_group_id = '0'; } $customer_shipment_query = tep_db_query("select IF(c.customers_shipment_allowed <> '', c.customers_shipment_allowed, cg.group_shipment_allowed) as shipment_allowed from " . TABLE_CUSTOMERS . " c, " . TABLE_CUSTOMERS_GROUPS . " cg where c.customers_id = '" . $customer_id . "' and cg.customers_group_id = '" . $customer_group_id . "'"); if ($customer_shipment = tep_db_fetch_array($customer_shipment_query) ) { if (tep_not_null($customer_shipment['shipment_allowed']) ) { $temp_shipment_array = explode(';', $customer_shipment['shipment_allowed']); $installed_modules = explode(';', MODULE_SHIPPING_INSTALLED); for ($n = 0; $n < sizeof($installed_modules); $n++) { // check to see if a shipping module is not de-installed if ( in_array($installed_modules[$n], $temp_shipment_array ) ) { $shipment_array[] = $installed_modules[$n]; } } // end for loop $this->modules = $shipment_array; } else { $this->modules = explode(';', MODULE_SHIPPING_INSTALLED); } } else { // default $this->modules = explode(';', MODULE_SHIPPING_INSTALLED); } // EOF Separate Pricing Per Customer $include_modules = array(); if ( (tep_not_null($module)) && (in_array(substr($module['id'], 0, strpos($module['id'], '_')) . '.' . substr($PHP_SELF, (strrpos($PHP_SELF, '.')+1)), $this->modules)) ) { $include_modules[] = array('class' => substr($module['id'], 0, strpos($module['id'], '_')), 'file' => substr($module['id'], 0, strpos($module['id'], '_')) . '.' . substr($PHP_SELF, (strrpos($PHP_SELF, '.')+1))); } else { reset($this->modules); while (list(, $value) = each($this->modules)) { $class = substr($value, 0, strrpos($value, '.')); $include_modules[] = array('class' => $class, 'file' => $value); } } for ($i=0, $n=sizeof($include_modules); $i<$n; $i++) { include(DIR_WS_LANGUAGES . $language . '/modules/shipping/' . $include_modules[$i]['file']); include(DIR_WS_MODULES . 'shipping/' . $include_modules[$i]['file']); $GLOBALS[$include_modules[$i]['class']] = new $include_modules[$i]['class']; } } } function quote($method = '', $module = '') { global $total_weight, $shipping_weight, $shipping_quoted, $shipping_num_boxes; $quotes_array = array(); if (is_array($this->modules)) { $shipping_quoted = ''; $shipping_num_boxes = 1; $shipping_weight = $total_weight; if (SHIPPING_BOX_WEIGHT >= $shipping_weight*SHIPPING_BOX_PADDING/100) { $shipping_weight = $shipping_weight+SHIPPING_BOX_WEIGHT; } else { $shipping_weight = $shipping_weight + ($shipping_weight*SHIPPING_BOX_PADDING/100); } if ($shipping_weight > SHIPPING_MAX_WEIGHT) { // Split into many boxes $shipping_num_boxes = ceil($shipping_weight/SHIPPING_MAX_WEIGHT); $shipping_weight = $shipping_weight/$shipping_num_boxes; } $include_quotes = array(); reset($this->modules); while (list(, $value) = each($this->modules)) { $class = substr($value, 0, strrpos($value, '.')); if (tep_not_null($module)) { if ( ($module == $class) && ($GLOBALS[$class]->enabled) ) { $include_quotes[] = $class; } elseif ($GLOBALS[$class]->enabled) { $include_quotes[] = $class; } } $size = sizeof($include_quotes); for ($i=0; $i<$size; $i++) { $quotes = $GLOBALS[$include_quotes[$i]]->quote($method); if (is_array($quotes)) $quotes_array[] = $quotes; } } return $quotes_array; } function cheapest() { if (is_array($this->modules)) { $rates = array(); reset($this->modules); while (list(, $value) = each($this->modules)) { $class = substr($value, 0, strrpos($value, '.')); if ($GLOBALS[$class]->enabled) { $quotes = $GLOBALS[$class]->quotes; for ($i=0, $n=sizeof($quotes['methods']); $i<$n; $i++) { if (isset($quotes['methods'][$i]['cost']) && tep_not_null($quotes['methods'][$i]['cost'])) { $rates[] = array('id' => $quotes['id'] . '_' . $quotes['methods'][$i]['id'], 'title' => $quotes['module'] . ' (' . $quotes['methods'][$i]['title'] . ')', 'cost' => $quotes['methods'][$i]['cost']); } } } } $cheapest = false; for ($i=0, $n=sizeof($rates); $i<$n; $i++) { if (is_array($cheapest)) { if ($rates[$i]['cost'] < $cheapest['cost']) { $cheapest = $rates[$i]; } } else { $cheapest = $rates[$i]; } } return $cheapest; } } } }?> Edited February 28, 2008 by nah01 Quote Link to comment Share on other sites More sharing options...
Jan Zonjee Posted February 28, 2008 Share Posted February 28, 2008 Please see if you can find the problem and get back to me soonest. I want to go live with my site 1st of March 2008. Neil, I see this is your first post so I probably shouldn't be too hard on you but it doesn't work that way. The fact that you use SPPC doesn't make me the person responsible for fixing your problems. The code looks fine but are you sure you installed shipping modules or left any shipping modules to checkout with? The errors seems to be pointing in that direction. Quote Link to comment Share on other sites More sharing options...
ronrrico Posted February 29, 2008 Share Posted February 29, 2008 Hi guys, I recently installed a copy of oscommerce-2.2rc2a and added Seperate Pricing Per Customer Version 4.2.0. I later installed (Graphical Borders) http://addons.oscommerce.com/info/1702 contribution and had sql errors on /specials.php page and the modules/new_products.php that apears in the index pages. <-------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 '&& language_id=1' at line 1 SELECT `products_description` FROM `products_description` WHERE products_id = && language_id=1 [TEP STOP] <-------error-------> When installing (Graphical Borders) part of the code, had to be intwined within the Seperate Pricing script. The two sprips are conflicting for some reason in /specials.php page and the modules/new_products.php Dese someone have a solution for this? Thanks, Ronnie Quote Link to comment Share on other sites More sharing options...
Guest Posted February 29, 2008 Share Posted February 29, 2008 Neil, I see this is your first post so I probably shouldn't be too hard on you but it doesn't work that way. The fact that you use SPPC doesn't make me the person responsible for fixing your problems. The code looks fine but are you sure you installed shipping modules or left any shipping modules to checkout with? The errors seems to be pointing in that direction. Good morning Jan. I am new to osC and totally not a programmer at all. I appreciate the fact that it is not your problem, but I have exhasted all other avenues at this late stage of my site going live. If you are open to helping me with your module I would be extremely grateful. Please, if you agree, can we discuss a few issues I have come across, via e-mail, in a more private forum. Thank you and looking forward to your assistance. Neil Harper Quote Link to comment Share on other sites More sharing options...
RudgeWorks Posted February 29, 2008 Share Posted February 29, 2008 OK im a newbe, please be kind! I have just downloaded and installed OS_Commerce. I need an option just like the one talked about here, where i can offer a SPECIFIC GROUP a set discount. I tried downloading "Seperate_Price_420.zip" as it seems to be exactly what I am looking for, but I cannot find and instruction as to what to do with all the files in the zip file. Am i being particularly dumb? Or can i get detailed instructions here somewhere? Trevor Quote Link to comment Share on other sites More sharing options...
Jan Zonjee Posted February 29, 2008 Share Posted February 29, 2008 I need an option just like the one talked about here, where i can offer a SPECIFIC GROUP a set discount. That is not in SPPC although with a single sql command you can add discounted prices to the database. I tried downloading "Seperate_Price_420.zip" as it seems to be exactly what I am looking for, but I cannot find and instruction as to what to do with all the files in the zip file. Am i being particularly dumb? Or can i get detailed instructions here somewhere? There is a folder in the zip called "new_installations". In it you will find an install.html. There is even more documentation how SPPC works in the folder called "documentation" the idea being you open index.htm and start reading and following links. 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.