Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Recommended Posts

Posted

Hi, is there a way that I can have different prices for 'normal' customers and dealers, can I assign different users to different groups who will see difeerent prices?

 

cheers,

 

Paul

Posted
Hi, is there a way that I can have different prices for 'normal' customers and dealers, can I assign different users to different groups who will see difeerent prices?

 

cheers,

 

Paul

 

 

yes, there is a group discount module

Treasurer MFC

Posted
well, the instructions are in the module itself, follow them.

Excuse my ignorance, but you call this instructions?

 

<?php

 

if ($random_product = tep_random_select("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 limit " . MAX_RANDOM_SELECT_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));

 

$info_box_contents = array();

 

//GroupDiscount start

$info_box_contents[] = array('align' => 'center',

'text' => '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $random_product["products_id"]) . '">' . tep_image(DIR_WS_PRODUCT_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_nodiscount($random_product['products_price'], tep_get_tax_rate($random_product['products_tax_class_id'])) . '</s><br><span class="productSpecialPrice">' . $currencies->display_price_nodiscount($random_product['specials_new_products_price'], tep_get_tax_rate($random_product['products_tax_class_id'])) . '</span>');

//GroupDiscount end

 

// $info_box_contents[] = array('align' => 'center',

// 'text' => '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $random_product["products_id"]) . '">' . tep_image(DIR_WS_PRODUCT_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'])) . '</span>');

 

new infoBox($info_box_contents);

?>

</td>

</tr>

<TR>

<TD>

<?php if (BOX_SHADOW) {?>

<IMG SRC="images/infobox/info_box_right_shadow.gif" WIDTH=100% height=8></td>

<?php } else {echo tep_draw_separator('pixel_trans.gif', '100%', '10');}?>

</TR>

<?php

}

?>

 

This is all I got....

 

cheers,

 

Paul

Posted
Excuse my ignorance, but you call this instructions?

 

<?php

 

  if ($random_product = tep_random_select("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 limit " . MAX_RANDOM_SELECT_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));

 

    $info_box_contents = array();

 

//GroupDiscount start

    $info_box_contents[] = array('align' => 'center',

                                'text' => '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $random_product["products_id"]) . '">' . tep_image(DIR_WS_PRODUCT_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_nodiscount($random_product['products_price'], tep_get_tax_rate($random_product['products_tax_class_id'])) . '</s><br><span class="productSpecialPrice">' . $currencies->display_price_nodiscount($random_product['specials_new_products_price'], tep_get_tax_rate($random_product['products_tax_class_id'])) . '</span>');

    //GroupDiscount end

 

//    $info_box_contents[] = array('align' => 'center',

//                                'text' => '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $random_product["products_id"]) . '">' . tep_image(DIR_WS_PRODUCT_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'])) . '</span>');

 

    new infoBox($info_box_contents);

?>

</td>

</tr>

<TR>

<TD>

<?php if (BOX_SHADOW) {?>

<IMG SRC="images/infobox/info_box_right_shadow.gif" WIDTH=100% height=8></td>

<?php } else {echo tep_draw_separator('pixel_trans.gif', '100%', '10');}?>

</TR>

<?php

  }

?>

 

This is all I got....

 

cheers,

 

Paul

 

yes, the instructions are far from perfect but also far from disastrous.

 

basically what this contribution does is separate the normal display price function from the new diplay price nodiscount function.

 

it alters the display price function where it takes the discount groups into account but iinserts a nodiscount function where it does not want this discount like in special prices.

 

So everywhere where a call is made to display a price, there is an alteration.

Given the fact that the instructions are far from perfect, all you have to go by is look at the patched files where is says "groupdiscount start/end" determine the difference with your file and adapt it accordingly.

Treasurer MFC

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.

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