Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Seperate Pricing Per Customer v3.3 (parse error)


RickChase

Recommended Posts

I installed this mod a while ago and it is working GREAT!!!! - but I get a parse error when viewing new products...

 

 

Parse error: parse error in /home/catalog/includes/modules/products_new.php on line 34

 

 

I can't seem to find the problem. Here is the entire document (catalog/includes/modules/products_new.php):

 

<?php

/*

 $Id: products_new.php,v 1.8 2002/04/26 20:28:07 dgw_ 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']) {



   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'])

 }



$currencies->display_price($products_new_array[$i]['specials_price'], tep_get_tax_rate($products_new_array[$i]['tax_class_id'])) . '</span>';

     } 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 '<a href="' . tep_href_link(FILENAME_PRODUCTS_NEW, tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $products_new_array[$i]['id'], 'NONSSL') . '">' . tep_image_button('button_in_cart.gif', IMAGE_BUTTON_IN_CART) . '</a>'; ?></td>

 </tr>

<?php

     if (($i+1) != sizeof($products_new_array)) {

?>

 <tr>

   <td colspan="3" class="main"> </td>

 </tr>

<?php

     }

   }

 }

?>

</table>

 

Thanks for looking,

Rick

Link to comment
Share on other sites

Might be a line break can't tell.

Ussually a parse error starts on the line mentioned OR the line above that.

 

Next time you're better of posting just a snippet, like line 32 to 35.

An mentioning that to us. You can't really expect us to count all the lines now can you :D

 

Mattice

"Politics is the art of preventing people from taking part in affairs which properly concern them"

Link to comment
Share on other sites

  • 1 month later...

Hi RickChase,

 

Did you ever find the problem? I am finding the same exact error and before I go crazy searching and debugging I was hoping that maybe you could save me the effort so I can concntrate on other problems as well.

 

Thanks!

 

Doug

Link to comment
Share on other sites

No, I never found it - actually I stopped looking because I wasn't real sure this contrib is what caused it. But now that you have confirmed my suspision, I will have to look more closely.

 

Sorry I couldn't be more help.

Rick

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