pulp999 Posted December 5, 2004 Posted December 5, 2004 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 Quote
boxtel Posted December 5, 2004 Posted December 5, 2004 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 <{POST_SNAPBACK}> yes, there is a group discount module Quote Treasurer MFC
pulp999 Posted December 5, 2004 Author Posted December 5, 2004 yes, there is a group discount module <{POST_SNAPBACK}> Great, thanks....I am a new user and have no idea where I can find that module.... Any help? cheers, Paul Quote
boxtel Posted December 5, 2004 Posted December 5, 2004 Great, thanks....I am a new user and have no idea where I can find that module.... Any help? cheers, Paul <{POST_SNAPBACK}> here you go : http://www.oscommerce.com/community/contributions,1671 Quote Treasurer MFC
pulp999 Posted December 5, 2004 Author Posted December 5, 2004 here you go : http://www.oscommerce.com/community/contributions,1671 <{POST_SNAPBACK}> Thanks heaps, you made my day... cheers, Paul :thumbsup: Quote
pulp999 Posted December 5, 2004 Author Posted December 5, 2004 Thanks heaps, you made my day... cheers, Paul :thumbsup: <{POST_SNAPBACK}> One two more question: where do I install this? is there any documentation for this? cheers, Paul Quote
boxtel Posted December 5, 2004 Posted December 5, 2004 One two more question: where do I install this? is there any documentation for this?cheers, Paul <{POST_SNAPBACK}> well, the instructions are in the module itself, follow them. Quote Treasurer MFC
pulp999 Posted December 5, 2004 Author Posted December 5, 2004 well, the instructions are in the module itself, follow them. <{POST_SNAPBACK}> 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 Quote
boxtel Posted December 5, 2004 Posted December 5, 2004 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 <{POST_SNAPBACK}> 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. Quote Treasurer MFC
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.