Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

installing Seperate_Pricing_Per_Customer_v3_3 on version 2.2


dfeenstra

Recommended Posts

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

Link to comment
Share on other sites

What are the errors that you are getting, that will give us a starting point on what may be happening.

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????

Link to comment
Share on other sites

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:

Link to comment
Share on other sites

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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...