dfeenstra Posted January 28, 2003 Posted January 28, 2003 Hi, Is there anyone who already instalt the Seperate_Pricing_Per_Customer_v3_3 contribution on oscommerce 2.2?? I cant get it working, there is a piece of code diffent in general.php and already saw many other errors in my shop. Who can help me? Thanx in advance Daniel Quote
ocularmagic Posted January 28, 2003 Posted January 28, 2003 What are the errors that you are getting, that will give us a starting point on what may be happening. Quote 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????
Maldo Posted January 28, 2003 Posted January 28, 2003 I just installed it to and I keep getting some error also. After installing it everything appears to work great. Except for whan after loging in, when I click the "Would you like to see which new products are available to purchase?" link I get this error Parse error: parse error, unexpected '}' in c:program filesapache groupapachehtdocsbnscatalogincludesmodulesproducts_new.php on line 38 This is the code that comes with sppc v3.3 - catalog/includes/modules/products_new.php 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'])); $products_price = 'Price not Available'; } } I know the code repeats the else statement at the end, it does it in two other code replacements aswell, I removed the extra else statements and still get the same error. can anyone guide me to the light? :idea: Quote
strictlypc Posted January 28, 2003 Posted January 28, 2003 Hello, You are not supposed to remove the extra codes: Your Code should look something like this: (Don't cut and Paste if you made modifications to this file) <?php /* $Id: products_new.php,v 1.1.1.1 2002/11/28 23:22:27 wilt Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2002 osCommerce Released under the GNU General Public License */ ?> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <?php if (sizeof($products_new_array) == '0') { ?> <tr> <td class="main"><?php echo TEXT_NO_NEW_PRODUCTS; ?></td> </tr> <?php } else { for($i=0; $i<sizeof($products_new_array); $i++) { if ($products_new_array[$i]['specials_price']) { $products_price = '<s>' . $currencies->display_price($products_new_array[$i]['price'], tep_get_tax_rate($products_new_array[$i]['tax_class_id'])) . '</s> <span class="productSpecialPrice">' . $currencies->display_price($products_new_array[$i]['specials_price'], tep_get_tax_rate($products_new_array[$i]['tax_class_id'])) . '</span>'; } else { 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 = '" . $products_new_array[$i]['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($products_new_array[$i]['tax_class_id'])); } else { $products_price = $currencies->display_price($products_new_array[$i]['price'], tep_get_tax_rate($products_new_array[$i]['tax_class_id'])); } } else { $products_price = $currencies->display_price($products_new_array[$i]['price'], tep_get_tax_rate($products_new_array[$i]['tax_class_id'])); } } ?> <tr> <td width="<?php echo SMALL_IMAGE_WIDTH + 10; ?>" valign="top" class="main"><?php echo '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products_new_array[$i]['id'], 'NONSSL') . '">' . tep_image(DIR_WS_IMAGES . $products_new_array[$i]['image'], $products_new_array[$i]['name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a>'; ?></td> <td valign="top" class="main"><?php echo '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products_new_array[$i]['id'], 'NONSSL') . '"><b><u>' . $products_new_array[$i]['name'] . '</u></b></a><br>' . TEXT_DATE_ADDED . ' ' . $products_new_array[$i]['date_added'] . '<br>' . TEXT_MANUFACTURER . ' ' . $products_new_array[$i]['manufacturer'] . '<br><br>' . TEXT_PRICE . ' ' . $products_price; ?></td> <td align="right" valign="middle" class="main"><?php echo '<form name="buy_now_' . $products_new_array[$i]['id'] . '" method="post" action="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now', 'NONSSL') . '"><input type="hidden" name="products_id" value="' . $products_new_array[$i]['id'] . '">' . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART); ?></form></td> </tr> <?php if (($i+1) != sizeof($products_new_array)) { ?> <tr> <td colspan="3" class="main"> </td> </tr> <?php } } } ?> </table> Hope this helps, David Quote
ocularmagic Posted January 28, 2003 Posted January 28, 2003 Maldo, take a look at this, it may help. http://www.oscommerce.com/forums/viewtopic.php?t=31693 Quote 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????
Maldo Posted January 29, 2003 Posted January 29, 2003 THANK YOU!!! You guys ROCK! YEAH!!! :lol: :lol: :lol: :lol: :lol: I love you guys! Thank you so much! :D :D :D :D :D Quote
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.
Note: Your post will require moderator approval before it will be visible.