Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Seperate Pricing Per Customer v3.5


scendent

Recommended Posts

This is driving me nuts!

 

I have installed Separate Pricing but i run into the same problem as others before me (I think!?): Everything works out ok until I try to edit a specials and a blank page comes up. (menu and page header displays ok)

 

I have checked for blank lines at the end of each edited file and i have added the extra } in line 195.....but it doesn't help!

 

Need help desparately - shop goes live in a few days...... :(

 

John

Link to comment
Share on other sites

I installed this CONTRIB and it works great. My only complaint is that when the "new_products.php" module gets to the end of the list of products it no longer ever changes. We want this module to always display random products. I have a feeling something we changed with this CONTRIB is the cause, but am not sure how to fix it. Does anyone else have this problem or know how to fix it? Thanks!

Link to comment
Share on other sites

  • 3 weeks later...

I've got to tell ya.... I just installed this thing and its the slickest damn thing I've ever seen. Good documentation and works slicker than baby poop. Good work! My hats off to you! Thanks a million.

Link to comment
Share on other sites

  • 2 weeks later...

In the admin area you can set a "Low Order Fee" which will charge your customers a fee for not reaching a minimum order amount. Unfortunately I have no idea how to set different "Low Order" values for individual customers.

 

Actually what I need is the ability to hide and show products based on customer groups. Only certain customers can buy special products and no one else should be able to see them at all. I f anyone knows how to do this I welcome any suggestions.

 

Anyone else have either one of these problems?

 

-Aaron

Link to comment
Share on other sites

I've scanned the entire thread and have not found anyone mentioning this, so maybe some of you already have it figured out;

 

The contribibution works well, but just one issue; for most of us who use this contribution, we create additional groups such as resell, wholesale, distributor... etc. All (or most) of these additional groups are tax exempt. How are you guys editing the code so that sales tax is not applied when these resellers / wholesalers / distributors, who happens to be in the same state, place an order online? (this would not be a problem for resellers out of state since out of state sales are not taxed anyway).

 

Your help is greatly appreciated.

 

Jimmyz008

I need to have this answered also. If you have a resellers license they are tax exempt. Any way to make this work with this contrib?

 

Thanks.

Link to comment
Share on other sites

Hey all,

 

I really didnt mean to double post but just found this forum and was hoping someone could help since it relates to this contribution...

 

I am trying to add another check in modules/shipping/freecount.php to check if the customers_group_id ( from seperate pricing per customer contribution) is 0 or not.

 

If the customer is retail ( customers_group_id will be 0 ) the free shipping will be enabled. If not ( value 1, 2, 3, etc.. ) it will check the check_flag as false.

 

Here is what I have so far but not working. Any help would greatly be appreciated.. I have commented the new code and described what I am trying to do..

 

    if ( ($this->enabled == true) && ((int)MODULE_SHIPPING_FREECOUNT_NUMBER <= $total_count) ) {
         if ( ($this->enabled == true) && ((int)MODULE_SHIPPING_FREECOUNT_ZONE > 0) ) {
           $check_flag = false;
           $check_query = tep_db_query("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_SHIPPING_FREECOUNT_ZONE . "' and zone_country_id = '" . $order->delivery['country']['id'] . "' order by zone_id");
           while ($check = tep_db_fetch_array($check_query)) {
             if ($check['zone_id'] < 1) {
               $check_flag = true;
               break;
             } elseif ($check['zone_id'] == $order->delivery['zone_id']) {
               $check_flag = true;
               break;
             }
           }
 //make query again to see if customer is dropship, wholesale or retail
 //retail customers have a customers_group_id with a value of 0 
 //all other customers groups have higher value like 1, 2, 3
 //attempting to make a query that will make the check flag false if the 
 //customer who is making the order has a customers_group_id that is not 0
 
 $check_group_query = tep_db_query("select customers_group_id from " . TABLE_CUSTOMERS . " where customers_id = $order['customers_id']");
           while ($check_group = tep_db_fetch_array($check_group_query)) {
             if ($check_group['customers_group_id'] != 0) {
               $check_flag = false;
               break;
             } 
    }
 //end of 2nd check query if customers_group_id is 0 then the $check_flag should still read last value before query
 
           if ($check_flag == false) {
             $this->enabled = false;
           }
         }
      }
      else{
          $this->enabled = false;
      }
   }

 

 

Any help would be very greatful, i think i have a mistake on the cutomers_id part of the querry..

 

Mike

Link to comment
Share on other sites

  • 2 weeks later...

anybody successfully installed the posted version on the website? I was looking at the manual installation write up and there is a certain line of code (that I am supposed to replace) that is missing.

 

hank

BeeHives.Biz - Preferred web/email Hosting Service Provider for Value Conscious Businesses/Individuals.

Link to comment
Share on other sites

I need the question/problem answered that was asked here a number of times, but didn't get an answer. I need to know how to put in the code in the products_new.php file that doesn't have the code that needs to be replaced.

 

catalog/products_new.php

 

Around line 83

 

Replace:

 

$products_price = $currencies->display_price($products_new['products_price'], tep_get_tax_rate($products_new['products_tax_class_id']));

 

With:

 

global $customer_id;

$customer_group_query = tep_db_query("select

 

I don't have that line of code, so there must be some other way that it has been used by new versions.

 

Can someone please help me out on this?

 

Thanks.

Link to comment
Share on other sites

Thank you James for your reply. Here is my products_new.php.

 

<?php

/*

$Id: products_new.php,v 1.28 2003/07/13 11:08:51 project3000 Exp $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2003 osCommerce

 

Released under the GNU General Public License

 

Shoppe Enhancement Controller - Copyright © 2003 WebMakers.com

Linda McGrath - [email protected]

*/

 

require('includes/application_top.php');

 

require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_PRODUCTS_NEW);

 

$breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_PRODUCTS_NEW));

?>

<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">

<html <?php echo HTML_PARAMS; ?>>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">

<?php

// BOF: WebMakers.com Changed: Header Tag Controller

// Replaced by header_tags.php

if ( file_exists(DIR_WS_INCLUDES . 'header_tags.php') ) {

require(DIR_WS_INCLUDES . 'header_tags.php');

} else {

?>

<title><?php echo TITLE; ?></title>

<?php

}

// EOF: WebMakers.com Changed: Header Tag Controller

?>

<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">

<link rel="stylesheet" type="text/css" href="stylesheet.css">

</head>

<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">

<!-- header //-->

<?php require(DIR_WS_INCLUDES . 'header.php'); ?>

<!-- header_eof //-->

 

<!-- body //-->

<table border="0" width="100%" cellspacing="3" cellpadding="3">

<tr>

<td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">

<!-- left_navigation //-->

<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>

<!-- left_navigation_eof //-->

</table></td>

<!-- body_text //-->

<td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0">

<tr>

<td><table border="0" width="100%" cellspacing="0" cellpadding="0">

<tr>

<td class="pageHeading"><?php echo HEADING_TITLE; ?></td>

<td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . 'picgift1_tb.jpg', HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>

</tr>

</table></td>

</tr>

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

<?php

$products_new_array = array();

 

// BOF: WebMakers.com Added: Shoppe Enhancement Controller

// set date filter

$new_fields= ', p.products_quantity';

// $products_new_query_raw = "select p.products_id, pd.products_name, p.products_image, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, p.products_date_added, m.manufacturers_name" . $new_fields . " from " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where p.products_status = '1'" . SHOW_PRODUCTS_NEW_SINCE2 . " order by p.products_date_added DESC, pd.products_name";

switch (SORT_ORDER_PRODUCTS_NEW) {

case ('1'): // sort by date descending and name

$order_by= " order by p.products_date_added DESC, pd.products_name";

break;

case ('2'): // model

$order_by= " order by p.products_model";

break;

default: // sort by products_name

$order_by= " order by pd.products_name";

break;

}

$products_new_query_raw = "select p.products_id, pd.products_name, p.products_image, p.products_price, p.products_tax_class_id, p.products_date_added, m.manufacturers_name" . $new_fields . " from " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on (p.manufacturers_id = m.manufacturers_id), " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1'" . SHOW_PRODUCTS_NEW_SINCE2 . " and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "'" . $order_by;

$products_new_split = new splitPageResults($products_new_query_raw, MAX_DISPLAY_PRODUCTS_NEW);

 

if (($products_new_split->number_of_rows > 0) && ((PREV_NEXT_BAR_LOCATION == '1') || (PREV_NEXT_BAR_LOCATION == '3'))) {

?>

<tr>

<td><table border="0" width="100%" cellspacing="0" cellpadding="2">

<tr>

<td class="smallText"><?php echo $products_new_split->display_count(TEXT_DISPLAY_NUMBER_OF_PRODUCTS_NEW); ?></td>

<td align="right" class="smallText"><?php echo TEXT_RESULT_PAGE . ' ' . $products_new_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y'))); ?></td>

</tr>

</table></td>

</tr>

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

<?php

}

?>

<tr>

<td><table border="0" width="100%" cellspacing="0" cellpadding="2">

<?php

if ($products_new_split->number_of_rows > 0) {

$products_new_query = tep_db_query($products_new_split->sql_query);

while ($products_new = tep_db_fetch_array($products_new_query)) {

// WebMakers.com Added: Shoppe Enhancement Controller

$displayed_price = tep_get_products_display_price($products_new['products_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['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $products_new['products_image'], $products_new['products_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['products_id']) . '"><b><u>' . $products_new['products_name'] . '</u></b></a><br>' . TEXT_DATE_ADDED . ' ' . tep_date_long($products_new['products_date_added']) . ($products_new['manufacturers_name'] ? '<br>' . TEXT_MANUFACTURER . ' ' . $products_new['manufacturers_name'] : '') . '<br><br>' . TEXT_PRICE . ' ' . $displayed_price; ?></td>

<?php

// WebMakers.com Added: Shoppe Enhancement Controller

// if call for price or showroom only

switch (true) {

// login to shop or login for prices cannot buy

case (LOGIN_CONTROLLER_ON=='true' and (LOGIN_TO_SHOW_PRICES=='true' or LOGIN_TO_SHOP=='true') and !tep_session_is_registered('customer_id')):

?>

<td align="right" valign="middle" class="main"><a href="<?php echo tep_href_link(FILENAME_LOGIN, '', 'SSL'); ?>"><?php echo tep_image_button('button_login.gif',LOGIN_TO_SHOW_PRICES_TEXT); ?></a></td>

<?php

break;

// call for price

case (tep_get_products_price_is_call($products_new['products_id'])):

?>

<td align="right" valign="middle" class="main"><?php echo '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products_new['products_id']) . '">' . PRODUCTS_PRICE_IS_CALL_FOR_PRICE_MORE_INFO_TEXT . '</a>'; ?></td>

<?php

break;

// showroom only

case (tep_get_products_price_is_showroom_only($products_new['products_id'])):

?>

<td align="right" valign="middle" class="main"><?php echo '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products_new['products_id']) . '">' . PRODUCTS_PRICE_IS_SHOWROOM_ONLY_MORE_INFO_TEXT . '</a>'; ?></td>

<?php

break;

// regular price

default:

$show_quantity_min_units=tep_get_products_quantity_min_units_display($products_new['products_id']);

?>

<?php

// WebMakers.com Added: show more info on products with attributes

if (tep_has_product_attributes($products_new['products_id'])) {

?>

<td align="right" valign="middle" class="main">

<?php

if (STOCK_ALLOW_CHECKOUT=='false' and $products_new['products_quantity'] <= 0) {

if (SOLD_OUT_IMAGE_ON=='1') {

echo tep_image(DIR_WS_IMAGES . SOLD_OUT_IMAGE, '', '', SOLD_OUT_TEXT) . '<br>';

} else {

echo SOLD_OUT_TEXT . '<br>';

}

}

echo '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products_new['products_id']) . '">' . PRODUCTS_NEW_MORE_INFO_TEXT . '</a>' . '<br>' . $show_quantity_min_units;

?>

</td>

<?php

} else {

?>

<td align="right" valign="middle" class="main">

<?php

if (STOCK_ALLOW_CHECKOUT=='false' and $products_new['products_quantity'] <= 0) {

if (SOLD_OUT_IMAGE_ON=='1') {

echo tep_image(DIR_WS_IMAGES . SOLD_OUT_IMAGE, '', '', SOLD_OUT_TEXT) . '<br>';

} else {

echo SOLD_OUT_TEXT . '<br>';

}

echo '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products_new['products_id']) . '">' . PRODUCTS_NEW_MORE_INFO_TEXT . '</a>' . '<br>' . $show_quantity_min_units;

} else {

echo '<a href="' . tep_href_link(FILENAME_PRODUCTS_NEW, tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $products_new['products_id']) . '">' . tep_image_button('button_in_cart.gif', IMAGE_BUTTON_IN_CART) . '</a>' . '<br>' . $show_quantity_min_units;

}

?>

</td>

 

</td>

<?php

} // has attributes

?>

<?php

break;

?>

<?php

}

// EOF: Shoppe Enhancement Controller

?>

 

</tr>

<tr>

<td colspan="3"><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

<?php

}

} else {

?>

<tr>

<td class="main"><?php echo TEXT_NO_NEW_PRODUCTS; ?></td>

</tr>

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

<?php

}

?>

</table></td>

</tr>

<?php

if (($products_new_split->number_of_rows > 0) && ((PREV_NEXT_BAR_LOCATION == '2') || (PREV_NEXT_BAR_LOCATION == '3'))) {

?>

<tr>

<td><table border="0" width="100%" cellspacing="0" cellpadding="2">

<tr>

<td class="smallText"><?php echo $products_new_split->display_count(TEXT_DISPLAY_NUMBER_OF_PRODUCTS_NEW); ?></td>

<td align="right" class="smallText"><?php echo TEXT_RESULT_PAGE . ' ' . $products_new_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y'))); ?></td>

</tr>

</table></td>

</tr>

<?php

}

?>

</table></td>

<!-- body_text_eof //-->

<td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">

<!-- right_navigation //-->

<?php require(DIR_WS_INCLUDES . 'column_right.php'); ?>

<!-- right_navigation_eof //-->

</table></td>

</tr>

</table>

<!-- body_eof //-->

 

<!-- footer //-->

<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>

<!-- footer_eof //-->

<br>

</body>

</html>

<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

 

Thanks again.

Link to comment
Share on other sites

I need the question/problem answered that was asked here a number of times, but didn't get an answer. I need to know how to put in the code in the products_new.php file that doesn't have the code that needs to be replaced.

 

catalog/products_new.php

 

Around line 83

 

Replace:

 

$products_price = $currencies->display_price($products_new['products_price'], tep_get_tax_rate($products_new['products_tax_class_id']));

 

With:

 

global $customer_id;

$customer_group_query = tep_db_query("select

 

I don't have that line of code, so there must be some other way that it has been used by new versions.

 

Can someone please help me out on this?

 

Thanks.

Where did everybody go? I still need help on this issue. I have $Id: products_new.php,v 1.28 2003/07/13 11:08:51.

 

According to other posts, the newer versions should have that line of code, but mine doesn't.

 

Please help.

Link to comment
Share on other sites

I need the question/problem answered that was asked here a number of times, but didn't get an answer. I need to know how to put in the code in the products_new.php file that doesn't have the code that needs to be replaced.

 

catalog/products_new.php

 

Around line 83

 

Replace:

 

        $products_price = $currencies->display_price($products_new['products_price'], tep_get_tax_rate($products_new['products_tax_class_id']));

 

With:

 

    global $customer_id;

    $customer_group_query = tep_db_query("select

 

I don't have that line of code, so there must be some other way that it has been used by new versions.

 

Can someone please help me out on this?

 

Thanks.

Where did everybody go? I still need help on this issue. I have $Id: products_new.php,v 1.28 2003/07/13 11:08:51.

 

According to other posts, the newer versions should have that line of code, but mine doesn't.

 

Please help.

tigerlady,

 

If you don't have the line, you probably deleted already with some other contrib. In that case you will need to read the code and figure out what needs to be either modified, deleted or just added to make this contrib work with your product_new. To get you started, I've include my product_new. You'll see where it has been commented out and in what context the new code has been added. Hope it helps.

 

<!-- body_text //-->

<td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0">

<tr>

<td><table border="0" width="100%" cellspacing="0" cellpadding="0">

<tr>

<td class="pageHeading"><?php echo HEADING_TITLE; ?></td>

<td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_products_new.gif', HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>

</tr>

</table></td>

</tr>

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

<?php

$products_new_array = array();

 

$products_new_query_raw = "select p.products_id, pd.products_name, p.products_image, p.products_price, p.products_tax_class_id, p.products_date_added, m.manufacturers_name from " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on (p.manufacturers_id = m.manufacturers_id), " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' order by p.products_date_added DESC, pd.products_name";

$products_new_split = new splitPageResults($products_new_query_raw, MAX_DISPLAY_PRODUCTS_NEW);

 

if (($products_new_split->number_of_rows > 0) && ((PREV_NEXT_BAR_LOCATION == '1') || (PREV_NEXT_BAR_LOCATION == '3'))) {

?>

<tr>

<td><table border="0" width="100%" cellspacing="0" cellpadding="2">

<tr>

<td class="smallText"><?php echo $products_new_split->display_count(TEXT_DISPLAY_NUMBER_OF_PRODUCTS_NEW); ?></td>

<td align="right" class="smallText"><?php echo TEXT_RESULT_PAGE . ' ' . $products_new_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y'))); ?></td>

</tr>

</table></td>

</tr>

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

<?php

}

?>

<tr>

<td><table border="0" width="100%" cellspacing="0" cellpadding="2">

<?php

if ($products_new_split->number_of_rows > 0) {

$products_new_query = tep_db_query($products_new_split->sql_query);

while ($products_new = tep_db_fetch_array($products_new_query)) {

if ($new_price = tep_get_products_special_price($products_new['products_id'])) {

$products_price = '<s>' . $currencies->display_price($products_new['products_price'], tep_get_tax_rate($products_new['products_tax_class_id'])) . '</s> <span class="productSpecialPrice">' . $currencies->display_price($new_price, tep_get_tax_rate($products_new['products_tax_class_id'])) . '</span>';

} else {

 

 

 

 

TIGERLADY1: THIS IS WHAT YOU'RE LOOKING FOR

//removed for price per customer contrib $products_price = $currencies->display_price($products_new['products_price'], tep_get_tax_rate($products_new['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 = '" . $products_new['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($products_new['products_tax_class_id']));

} else {

$products_price = $currencies->display_price($products_new['products_price'], tep_get_tax_rate($products_new['products_tax_class_id']));

}

} else {

$products_price = $currencies->display_price($products_new['products_price'], tep_get_tax_rate($products_new['products_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['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $products_new['products_image'], $products_new['products_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['products_id']) . '"><b><u>' . $products_new['products_name'] . '</u></b></a><br>' . TEXT_DATE_ADDED . ' ' . tep_date_long($products_new['products_date_added']) . '<br>' . TEXT_MANUFACTURER . ' ' . $products_new['manufacturers_name'] . '<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['products_id']) . '">' . tep_image_button('button_in_cart.gif', IMAGE_BUTTON_IN_CART) . '</a>'; ?></td>

</tr>

<tr>

<td colsp?an="3"><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

<?php

}

} else {

?>

<tr>

<td class="main"><?php echo TEXT_NO_NEW_PRODUCTS; ?></td>

</tr>

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

<?php

}

?>

</table></td>

</tr>

<?php

if (($products_new_split->number_of_rows > 0) && ((PREV_NEXT_BAR_LOCATION == '2') || (PREV_NEXT_BAR_LOCATION == '3'))) {

?>

<tr>

<td><table border="0" width="100%" cellspacing="0" cellpadding="2">

<tr>

<td class="smallText"><?php echo $products_new_split->display_count(TEXT_DISPLAY_NUMBER_OF_PRODUCTS_NEW); ?></td>

<td align="right" class="smallText"><?php echo TEXT_RESULT_PAGE . ' ' . $products_new_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y'))); ?></td>

</tr>

</table></td>

</tr>

<?php

}

?>

</table></td>

<!-- body_text_eof //-->

<td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">

<!-- right_navigation //-->

<?php require(DIR_WS_INCLUDES . 'column_right.php'); ?>

<!-- right_navigation_eof //-->

</table></td>

</tr>

</table>

<!-- body_eof //-->

Link to comment
Share on other sites

Hi James,

 

THANK YOU so much for your reply. I am hoping that I have it working right. I have received help and hope this is the answer.

 

I had: $displayed_price = tep_get_products_display_price($products_new['products_id']);

 

We added the replace code and put at the end:

...(code needed)

 

Added after:

/* CB mapping for customer discounts to work with SEC */

$displayed_price = $products_price;

 

It seems to work although I am not exactly sure how the Seperate Pricing works yet. I am still figuring out how to work it. Maybe you can tell me how to create a new group? It created Retail, but I find nothing in Admin to create wholesale etc. I am not sure if I am missing something.

 

Thanks SO MUCH for your reply!

Link to comment
Share on other sites

Hi anyone?

 

I finally got this installed and working through admin. In admin/customers, it shows properly for Retail and Wholesale. I selected one wholesale, and left the rest as retail.

 

In the admin/cats, on the product page (update or add) I have only one choice of checkbox for wholesale. I changed one product to have the wholesale pricing also. Ex: Retail is $36.00 Whole is $20.00

 

In the store, I cannot get the product_info page to show the correct wholesale price ($20). It still shows the regular retail price only ($36). Again, in the listing part of the cart (shopping_cart) it also still show the retail price ($36) instead of the wholesale price ($29). However, when I add it to the cart, it totals for the wholesale price ($20). Strange!

 

I have been over and over this. I cannot find the problem. Can someone PLEASE tell me where to look.

 

I am not using the section below the STOP HERE.

 

Thanks so much.

Link to comment
Share on other sites

Hi

 

Does anybody know what this proplem is casused by or how to fix it:

 

 

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/sac9829/sacotech-www/catalog/admin/includes/functions/database.php on line 99

 

Warning: reset(): Passed variable is not an array or object in /home/sac9829/sacotech-www/catalog/admin/includes/classes/object_info.php on line 17

 

Warning: Variable passed to each() is not an array or object in /home/sac9829/sacotech-www/catalog/admin/includes/classes/object_info.php on line 18

 

 

It happens when Im working in the admin section to allow a retail customer to become a wholesale customer. It also resets all the customers information.

Link to comment
Share on other sites

Hi anyone?

 

I finally got this installed and working through admin. In admin/customers, it shows properly for Retail and Wholesale. I selected one wholesale, and left the rest as retail.

 

In the admin/cats, on the product page (update or add) I have only one choice of checkbox for wholesale. I changed one product to have the wholesale pricing also. Ex: Retail is $36.00 Whole is $20.00

 

In the store, I cannot get the product_info page to show the correct wholesale price ($20). It still shows the regular retail price only ($36). Again, in the listing part of the cart (shopping_cart) it also still show the retail price ($36) instead of the wholesale price ($29). However, when I add it to the cart, it totals for the wholesale price ($20). Strange!

 

I have been over and over this. I cannot find the problem. Can someone PLEASE tell me where to look.

 

I am not using the section below the STOP HERE.

 

Thanks so much.

I still need help on this. I cannot get passed this. I have no idea why this is not working correctly. Can someone please give me a few pointers as to where to look?

 

Thanks

Link to comment
Share on other sites

Hi Scott.

 

I do not know is your still monitoring this post, but if you are. (or if any one else have an idea for me.) Love your work, but can't use it because of one thing.

 

I need in addition to your functionality, to be able to use the specials.php module to make an offer to a specified customer, on a specified products, for a specified period of time.

 

Example:

Have a customer on the phone. We agree on a specified price for a product.

I tell him that I will make this offer valid until next Wednesday, only for him.

 

I know that the CGDiscountSpecials contribution have this, but it does not let me make different discount on different products.

 

Does anyone have any ideas of how to combine these two contributions, or do you Scott, have anyone a plan of implement this functionality into this contribution?

 

Thanks in advanced

Knut

www.artracing.no - www.alexi.no - www.tvillingbutikken.no

Link to comment
Share on other sites

Hi,

I have added a specials table (using Specials on Default.php contribution) to my index.php so it shows my specials on the first page...and tried doing the specials addon for this seperate pricing per customer contribution, but i dont know what to change in this one php file to make it work correctly, any help would be greatly appreciated. Here is the code for my default_specials.php

 

<?php
/*
?$Id: default_specials.php,v 2.0 2003/06/13

?osCommerce, Open Source E-Commerce Solutions
?http://www.oscommerce.com

?Copyright (c) 2003 osCommerce

?Released under the GNU General Public License
*/

if ( (!isset($new_products_category_id)) || ($new_products_category_id == '0') ) {
?$new = 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 s.products_id = p.products_id and p.products_id = pd.products_id and pd.language_id = '" . $languages_id . "' and s.status = '1' order by s.specials_date_added DESC limit " . MAX_DISPLAY_SPECIAL_PRODUCTS);
} else {
?$new = tep_db_query("select distinct p.products_id, p.products_image, p.products_tax_class_id, if(s.status, s.specials_new_products_price, p.products_price) as products_price, s.specials_new_products_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c where p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and c.parent_id = '" . (int)$new_products_category_id . "' and p.products_status = '1' and s.status = '1' order by p.products_date_added desc limit " . MAX_DISPLAY_NEW_PRODUCTS);
}

if (tep_db_num_rows($new) > 0) {
?>
<!-- default_specials //-->

?<tr>
? ? ?</tr>
? ? ?<tr>
? ? ? ?<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
? ? ? ? ?<tr>
<?php
$info_box_contents = array();
?$info_box_contents[] = array('align' => 'left', 'text' => sprintf(TABLE_HEADING_DEFAULT_SPECIALS, strftime('%B')));
?//new infoBoxHeading($info_box_contents, false, false, tep_href_link(FILENAME_SPECIALS));
?new infoBoxHeading($info_box_contents,false,false);

?$info_box_contents = array();
?$row = 0;
?$col = 0;
?while ($default_specials = tep_db_fetch_array($new)) {
? ?$default_specials['products_name'] = tep_get_products_name($default_specials['products_id']);
? ?$info_box_contents[$row][$col] = array('align' => 'center',
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 'params' => 'class="smallText" width="33%" valign="top"',
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 'text' => '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $default_specials["products_id"]) . '">' . tep_image(DIR_WS_IMAGES . $default_specials['products_image'], $default_specials['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $default_specials['products_id']) . '">' . $default_specials['products_name'] . '</a><br><s>' . $currencies->display_price($default_specials['products_price'], tep_get_tax_rate($default_specials['products_tax_class_id'])) . '</s><br><span class="productSpecialPrice">' . $currencies->display_price($default_specials['specials_new_products_price'], tep_get_tax_rate($default_specials['products_tax_class_id'])) . '</span>');
? ?$col ++;
? ?if ($col > 2) {
? ? ?$col = 0;
? ? ?$row ++;
? ?}
?}
?new contentBox($info_box_contents);
}
?>

<!-- default_specials_eof //-->

Edited by theman
Link to comment
Share on other sites

Just an FYI, I have re-written the X-Sell Contribution and updated it at the Contribution site:

http://www.oscommerce.com/community/contributions,1415

 

Now this Contribution complies with the Separate Pricing Contribution so that the correct prices are displayed depending on the logged in customer's price level. If the visitor is not logged in it defaults to the "List" (or as some call it "Retail") price. This is a very good Contribution and another supporter has recently completely re-written the Admin end of it. Definitely worth a look.

 

Thanks,

Aaron

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