Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Search the Community

Showing results for tags 'sppc'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • News and Announcements
    • News and Announcements
  • osCommerce v4.x
    • General Support
    • Migration from old osCommerce
    • Design and Templates
    • Apps / Add-ons
    • Translations
    • API and import/export
    • Marketplace integration
    • Manuals and How-to
    • Blog's discussion
  • osCommerce Online Merchant v2.x
    • General Support
    • osCommerce Online Merchant Community Bootstrap Edition
    • Add-Ons
  • Development
  • General
    • General Discussions
    • Live Shop Reviews
    • Security
    • Commercial Support Inquiries
    • Developer Feedback

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Real Name


Location


Interests


Website

Found 5 results

  1. Wholesale (SPPC lite) Simplified SPPC module, easy modularized installation. For Bootstrap and Standard osc 2.3.4. See develop topic: http://www.oscommerce.com/forums/topic/408481-sppc-lite/ Features: Posibility to asign customers to the wholesaler group Define individual wholesale prices to each product Optional tax exempt wholesalers Optional define individual wholesale prices to attributes Optional define global wholesale percentage discount to all products and attribute prices The global wholesale discount will not apply to products and attributes which have individual wholesale prices defined Optional setting to apply special price instead of wholesale price if the special price is lower than the wholesale price or discount. Optional payment and shipping modules Exclusion lists for Wholesalers and Retailers. Header text module to show different info text for guests, retailers and wholesalers. The texts are editable for each store language in the module settings. By default: Guests: no text Retailers: “Welcome to your Retailer Account.<br>Please <a class="btn btn-info btn-xs" role="button" href="contact_us.php">Contact Us</a> to apply for a Wholesaler Account. See <a class="btn btn-info btn-xs" role="button" href="conditions.php">Conditions</a>.” Wholesalers: “Welcome to your Wholesaler Account.<br>You can see your Wholesaler Prices on the Product Page and they will apply when you add the products of your choice to the Shopping Cart.” Product Info Content module to show the wholesaler price in addition to the normal price on the Product Info Page Only 2 Store file modifications. application_top.php one line added. Optional product_info.php attribute block modified to show wholesale attribute price. 3 admin files modified, categories.php, customers.php and product_attributes.php. Modified files for 2.3.4 standard, Bootstrap Gold and Bootstrap Edge included. The wholesale prices will be automatic applied when adding a product to the Shopping Cart. This is done via shopping cart class extension, no file modification needed. All database modifications and language definitions are integrated in the modules. Optional database columns removal to keep existing entances when removing the module NOTE: If you need more than one wholesaler group or other additional features, please consider to use the old, full version SPPC: http://addons.oscommerce.com/info/716 Thanks To @@greasemonkey for the initial idea, support, comments and testing To @@burt for the initial guideline exposed in the forum and his database installation-removing code examples used in the store module To @@wHiTeHaT for his help with the shopping cart class extension To @@Tsimi, @@Gergely, @@John W and @@14steve14 for their support, comments and testing Download: http://addons.oscommerce.com/info/9416
  2. I've added Separate Pricing Per Customer to my OSC 2.3.4 installation, and it all works! Haven't had any problems with it so far, EXCEPT that it doesn't seem to be loading my Group Configuration settings. If I set a shipping / payment option for the customer specifically, it works fine. But none of my "Cash Account" customer settings are loading automatically from the group itself. When I print out the Session Variables, it shows that : [sppc_customer_group_id] = 0 but it should be 2! I cannot for the life of me figure out why this is. Anyone have any thoughts? I'm assuming the call for that variable isn't connecting properly, but I've checked everywhere I know to, and it all looks like it should work fine . . . All other session variables look correct! Pointers? Not asking for anyone to do the work for me, obviously, just trying to deconstruct and figure out why it would be behaving like that.
  3. Hi every one , First i try to configure ( merge text ) to SPPC into my Product_list.php file I couple of hour to try many thing !!!! But not Succes .... My problem is i'm on a Template monster so ... I ask for support but they don't want support for additionnal addons ( contrib out of us ) The product_list.php change my template and my theme style so i want to knoe if someone can adapt both files to SPPC working and not changing my tempates Thank a lot for your patience and your work Have all nice Easter Weekend product_listing ( SPPC ).php product_listing ( My template ).php
  4. Hello all, I just installed the SPPC 4.2.2 for OsCommerce 2.3.3. I got everything work right except the "product_listing.php" page. My product detail page is able to show wholesale price but my product listing page couldn't. I installed a 3rd party theme so the code for the layout is a little different. I am having a hard time pluging the SPPC code into to the current layout. If possible, please take a look at the SPPC and my code below and let me know where to plug the code in properly. I really appreciate your help. Thank you for your time. Ryan --------------------------------------------- SPPC Script Begins ------------------------------------------------------------ <?php /* $Id$ adapted for Separate Pricing Per Customer v4.2 2007/08/23 osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2010 osCommerce Released under the GNU General Public License */ $listing_split = new splitPageResults($listing_sql, MAX_DISPLAY_SEARCH_RESULTS, 'p.products_id'); ?> <div class="contentText"> <?php if ( ($listing_split->number_of_rows > 0) && ( (PREV_NEXT_BAR_LOCATION == '1') || (PREV_NEXT_BAR_LOCATION == '3') ) ) { ?> <div> <span style="float: right;"><?php echo TEXT_RESULT_PAGE . ' ' . $listing_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y'))); ?></span> <span><?php echo $listing_split->display_count(TEXT_DISPLAY_NUMBER_OF_PRODUCTS); ?></span> </div> <br /> <?php } $prod_list_contents = '<div class="ui-widget infoBoxContainer">' . ' <div class="ui-widget-header ui-corner-top infoBoxHeading">' . ' <table border="0" width="100%" cellspacing="0" cellpadding="2" class="productListingHeader">' . ' <tr>'; for ($col=0, $n=sizeof($column_list); $col<$n; $col++) { $lc_align = ''; switch ($column_list[$col]) { case 'PRODUCT_LIST_MODEL': $lc_text = TABLE_HEADING_MODEL; $lc_align = ''; break; case 'PRODUCT_LIST_NAME': $lc_text = TABLE_HEADING_PRODUCTS; $lc_align = ''; break; case 'PRODUCT_LIST_MANUFACTURER': $lc_text = TABLE_HEADING_MANUFACTURER; $lc_align = ''; break; case 'PRODUCT_LIST_PRICE': $lc_text = TABLE_HEADING_PRICE; $lc_align = 'right'; break; case 'PRODUCT_LIST_QUANTITY': $lc_text = TABLE_HEADING_QUANTITY; $lc_align = 'right'; break; case 'PRODUCT_LIST_WEIGHT': $lc_text = TABLE_HEADING_WEIGHT; $lc_align = 'right'; break; case 'PRODUCT_LIST_IMAGE': $lc_text = TABLE_HEADING_IMAGE; $lc_align = 'center'; break; case 'PRODUCT_LIST_BUY_NOW': $lc_text = TABLE_HEADING_BUY_NOW; $lc_align = 'center'; break; } if ( ($column_list[$col] != 'PRODUCT_LIST_BUY_NOW') && ($column_list[$col] != 'PRODUCT_LIST_IMAGE') ) { $lc_text = tep_create_sort_heading($HTTP_GET_VARS['sort'], $col+1, $lc_text); } $prod_list_contents .= ' <td' . (tep_not_null($lc_align) ? ' align="' . $lc_align . '"' : '') . '>' . $lc_text . '</td>'; } $prod_list_contents .= ' </tr>' . ' </table>' . ' </div>'; if ($listing_split->number_of_rows > 0) { $rows = 0; $listing_query = tep_db_query($listing_split->sql_query); // BOF Separate Pricing per Customer $no_of_listings = tep_db_num_rows($listing_query); // global variable (session) $sppc_customer_group_id -> local variable customer_group_id if(isset($_SESSION['sppc_customer_group_id']) && $_SESSION['sppc_customer_group_id'] != '0') { $customer_group_id = $_SESSION['sppc_customer_group_id']; } else { $customer_group_id = '0'; } while ($_listing = tep_db_fetch_array($listing_query)) { $listing[] = $_listing; $list_of_prdct_ids[] = $_listing['products_id']; } // next part is a debug feature, when uncommented it will print the info that this module receives /* echo '<pre>'; print_r($listing); echo '</pre>'; */ // get all product prices for products with the particular customer_group_id // however not necessary for customer_group_id = 0 if ($customer_group_id != '0') { $pg_query = tep_db_query("select pg.products_id, customers_group_price as price from " . TABLE_PRODUCTS_GROUPS . " pg where products_id in (" . implode(',', $list_of_prdct_ids) . ") and pg.customers_group_id = '" . $customer_group_id . "'"); // $no_of_pg_products = tep_db_num_rows($pg_query) ; while ($pg_array = tep_db_fetch_array($pg_query)) { $new_prices[] = array ('products_id' => $pg_array['products_id'], 'products_price' => $pg_array['price'], 'specials_new_products_price' => '', 'final_price' => $pg_array['price']); } for ($x = 0; $x < $no_of_listings; $x++) { // replace products prices with those from customers_group table if(!empty($new_prices)) { for ($i = 0; $i < count($new_prices); $i++) { if( $listing[$x]['products_id'] == $new_prices[$i]['products_id'] ) { $listing[$x]['products_price'] = $new_prices[$i]['products_price']; $listing[$x]['final_price'] = $new_prices[$i]['final_price']; } } } // end if(!empty($new_prices) $listing[$x]['specials_new_products_price'] = ''; // makes sure that a retail specials price doesn't carry over to another customer group $listing[$x]['final_price'] = $listing[$x]['products_price']; // final price should not be the retail special price } // end for ($x = 0; $x < $no_of_listings; $x++) } // end if ($customer_group_id != '0') // an extra query is needed for all the specials $specials_query = tep_db_query("select products_id, specials_new_products_price from " . TABLE_SPECIALS . " where products_id in (" . implode(',', $list_of_prdct_ids) . ") and status = '1' and customers_group_id = '" . $customer_group_id . "'"); while ($specials_array = tep_db_fetch_array($specials_query)) { $new_s_prices[] = array ('products_id' => $specials_array['products_id'], 'products_price' => '', 'specials_new_products_price' => $specials_array['specials_new_products_price'] , 'final_price' => $specials_array['specials_new_products_price']); } // add the correct specials_new_products_price and replace final_price for ($x = 0; $x < $no_of_listings; $x++) { if(!empty($new_s_prices)) { for ($i = 0; $i < count($new_s_prices); $i++) { if( $listing[$x]['products_id'] == $new_s_prices[$i]['products_id'] ) { $listing[$x]['specials_new_products_price'] = $new_s_prices[$i]['specials_new_products_price']; $listing[$x]['final_price'] = $new_s_prices[$i]['final_price']; } } } // end if(!empty($new_s_prices) } // end for ($x = 0; $x < $no_of_listings; $x++) $prod_list_contents .= ' <div class="ui-widget-content ui-corner-bottom productListTable">' . ' <table border="0" width="100%" cellspacing="0" cellpadding="2" class="productListingData">'; // while ($listing = tep_db_fetch_array($listing_query)) { (was original code) for ($x = 0; $x < $no_of_listings; $x++) { $rows++; $prod_list_contents .= ' <tr>'; for ($col=0, $n=sizeof($column_list); $col<$n; $col++) { switch ($column_list[$col]) { case 'PRODUCT_LIST_MODEL': $prod_list_contents .= ' <td>' . $listing[$x]['products_model'] . '</td>'; break; case 'PRODUCT_LIST_NAME': if (isset($HTTP_GET_VARS['manufacturers_id']) && tep_not_null($HTTP_GET_VARS['manufacturers_id'])) { $prod_list_contents .= ' <td><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id'] . '&products_id=' . $listing[$x]['products_id']) . '">' . $listing[$x]['products_name'] . '</a></td>'; } else { $prod_list_contents .= ' <td><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing[$x]['products_id']) . '">' . $listing[$x]['products_name'] . '</a></td>'; } break; case 'PRODUCT_LIST_MANUFACTURER': $prod_list_contents .= ' <td><a href="' . tep_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $listing[$x]['manufacturers_id']) . '">' . $listing[$x]['manufacturers_name'] . '</a></td>'; break; case 'PRODUCT_LIST_PRICE': if (tep_not_null($listing[$x]['specials_new_products_price'])) { $prod_list_contents .= ' <td align="right"><del>' . $currencies->display_price($listing[$x]['products_price'], tep_get_tax_rate($listing[$x]['products_tax_class_id'])) . '</del> <span class="productSpecialPrice">' . $currencies->display_price($listing[$x]['specials_new_products_price'], tep_get_tax_rate($listing[$x]['products_tax_class_id'])) . '</span></td>'; } else { $prod_list_contents .= ' <td align="right">' . $currencies->display_price($listing[$x]['products_price'], tep_get_tax_rate($listing[$x]['products_tax_class_id'])) . '</td>'; } break; case 'PRODUCT_LIST_QUANTITY': $prod_list_contents .= ' <td align="right">' . $listing[$x]['products_quantity'] . '</td>'; break; case 'PRODUCT_LIST_WEIGHT': $prod_list_contents .= ' <td align="right">' . $listing[$x]['products_weight'] . '</td>'; break; case 'PRODUCT_LIST_IMAGE': if (isset($HTTP_GET_VARS['manufacturers_id']) && tep_not_null($HTTP_GET_VARS['manufacturers_id'])) { $prod_list_contents .= ' <td align="center"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id'] . '&products_id=' . $listing[$x]['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $listing[$x]['products_image'], $listing[$x]['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a></td>'; } else { $prod_list_contents .= ' <td align="center"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing[$x]['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $listing[$x]['products_image'], $listing['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a></td>'; } break; case 'PRODUCT_LIST_BUY_NOW': $prod_list_contents .= ' <td align="center">' . tep_draw_button(IMAGE_BUTTON_BUY_NOW, 'cart', tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing[$x]['products_id'])) . '</td>'; break; } } $prod_list_contents .= ' </tr>'; } $prod_list_contents .= ' </table>' . ' </div>' . '</div>'; echo $prod_list_contents; } else { ?> <p><?php echo TEXT_NO_PRODUCTS; ?></p> <?php } if ( ($listing_split->number_of_rows > 0) && ((PREV_NEXT_BAR_LOCATION == '2') || (PREV_NEXT_BAR_LOCATION == '3')) ) { ?> <br /> <div> <span style="float: right;"><?php echo TEXT_RESULT_PAGE . ' ' . $listing_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y'))); ?></span> <span><?php echo $listing_split->display_count(TEXT_DISPLAY_NUMBER_OF_PRODUCTS); ?></span> </div> <?php } ?> </div> --------------------------------------------- SPPC Script Ends ------------------------------------------------------------ --------------------------------------------- My Script (with 3rd party theme) Begins ------------------------------------------------------------ <?php /* $Id$ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2010 osCommerce Released under the GNU General Public License */ $listing_sql = str_replace('pd.products_name,', 'pd.products_name, pd.products_description, ', $listing_sql); $listing_split = new splitPageResults($listing_sql, MAX_DISPLAY_SEARCH_RESULTS, 'p.products_id'); $align = 0; ?> <div class="contentText contConteiner_listing"> <?php if ( ($listing_split->number_of_rows > 0) && ( (PREV_NEXT_BAR_LOCATION == '1') || (PREV_NEXT_BAR_LOCATION == '3') ) ) { ?> <div> <span class="f_right"><?php echo TEXT_RESULT_PAGE . ' ' . $listing_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y'))); ?></span> <span><?php echo $listing_split->display_count(TEXT_DISPLAY_NUMBER_OF_PRODUCTS); ?></span> </div> <br /> <?php } $prod_list_contents = '<div class="infoBoxContainer">'; if ( !empty($column_list) ) { $prod_list_contents .=' <div class="infoBoxHeading1 padding_pages_2 margin_bottom_1">' . ' <table class="table_style productListingHeader1">' . ' <tr>' . ' <td class="padding0"><b>'.TEXT_SORT_PRODUCTS.' '.TEXT_BY.':</b> '; for ($col=0, $n=sizeof($column_list); $col<$n; $col++) { $lc_align = ''; switch ($column_list[$col]) { case 'PRODUCT_LIST_MODEL': $lc_text = TABLE_HEADING_MODEL; $lc_align = ''; break; case 'PRODUCT_LIST_NAME': $lc_text = TABLE_HEADING_PRODUCTS; $lc_align = ''; break; case 'PRODUCT_LIST_MANUFACTURER': $lc_text = TABLE_HEADING_MANUFACTURER; $lc_align = ''; break; case 'PRODUCT_LIST_PRICE': $lc_text = TABLE_HEADING_PRICE; $lc_align = 'right'; break; case 'PRODUCT_LIST_QUANTITY': $lc_text = TABLE_HEADING_QUANTITY; $lc_align = 'right'; break; case 'PRODUCT_LIST_WEIGHT': $lc_text = TABLE_HEADING_WEIGHT; $lc_align = 'right'; break; case 'PRODUCT_LIST_IMAGE': $lc_text = TABLE_HEADING_IMAGE; $lc_align = 'center'; break; } if ( ($column_list[$col] != 'PRODUCT_LIST_BUY_NOW') && ($column_list[$col] != 'PRODUCT_LIST_IMAGE') ) { $lc_text = tep_create_sort_heading($HTTP_GET_VARS['sort'], $col+1, $lc_text); $prod_list_contents .= ' '.$lc_text.' ' ; } } $prod_list_contents .= '</td></tr></table></div>'; } if ($listing_split->number_of_rows > 0) { $rows = 0; $listing_query = tep_db_query($listing_split->sql_query); $counter = 0; $col = 0; $width = floor(100 / $dresscode_grids); $num_products = tep_db_num_rows($listing_query); while ($listing = tep_db_fetch_array($listing_query)) { $counter++; if (tep_not_null($listing['specials_new_products_price'])) { $products_price = '<s>' . $currencies->display_price($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</s> <span>' . $currencies->display_price($listing['specials_new_products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</span>'; $product['sticker'] = '<span class="product_sticker sticker_onsale_top_left sticker_onsale_display"></span>'; } else { $products_price = $currencies->display_price($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])); $product['sticker'] = ''; } $products_price = '<span class="new_price">'.$products_price.'</span>'; $product['id'] = $listing['products_id']; $product['name'] = $listing['products_name']; $product['price'] = $products_price; $product['price_special'] = $products_price_special; $product['name_url'] = tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $listing['products_id']); /*if product has big img*/ $current_product = $product['id']; $products_new_added_big_img_query = tep_db_query("select distinct pi.image, pi.products_id from " . TABLE_PRODUCTS_IMAGES . " pi where pi.products_id = '$current_product' order by pi.id ASC "); $products_new_added_big_img = tep_db_fetch_array($products_new_added_big_img_query); if (tep_not_null($products_new_added_big_img['image'])) { $product['image'] = tep_image(DIR_WS_IMAGES . $listing['products_image'], $listing['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'class="scale-with-grid"'). '<div class="roll_over_img">'.tep_image(DIR_WS_IMAGES . $products_new_added_big_img['image'], $products_new_added_big_img['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'class="scale-with-grid"').'</div>'; } else { $product['image'] = tep_image(DIR_WS_IMAGES . $listing['products_image'], $listing['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'class="scale-with-grid"'); } $product['cart_url'] = tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing['products_id']); require(DC_BLOCKS. 'dresscode_model_listing.php'); $prod_list_contents .= '<div class="four columns product_wrapper count_3cols_col_'.$col3.' count_2cols_col_'.$col2.'">'.$dresscode_listing_output.'</div>'; $col ++; if (($col >= $dresscode_grids) || ($counter == $num_products)) { while ( $col < $dresscode_grids ) { $col++; } $col = 0; } } $prod_list_contents .= '</div>'; echo $prod_list_contents; } else { ?> <p class="no_products"><?php echo TEXT_NO_PRODUCTS; ?></p> <?php } if ( ($listing_split->number_of_rows > 0) && ((PREV_NEXT_BAR_LOCATION == '2') || (PREV_NEXT_BAR_LOCATION == '3')) ) { ?> <div class="et_pager"> <span><?php echo '<label>'.TEXT_RESULT_PAGE.'</label>' . ' ' . $listing_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y'))); ?></span> </div> <?php } ?> </div> --------------------------------------------- My Script (with 3rd party theme) Ends ------------------------------------------------------------
  5. Hello! I am a novice and I am setting up a webshop for a small bussiness and we have both normal customers and wholesales so we really need SPPC which we will then combine with quantity break and "hide products from customer groups". The installation instructions for SPPC says I should use a compare tool when updateing my files but I don't know how to use it tbh, I understand how it works but I am not getting how and what I should update. I can follow instructions so if someone could give me some hints for the installation process of SPPC on osC 2.3.1 it would be much appreciated. br /Daniel
×
×
  • Create New...