stormbringer Posted September 18, 2002 Share Posted September 18, 2002 I'm having trouble working out in my head a way to provide for quantity related ordering and discounts, and wanted to canvass opinion and ideas, or indeed if anyone has anything similar I can work from as a base. We require:- 1. Products are in units of 1, but are packaged in either 10, 25, 50, 100 or 500 packs 2. All pricing to be for the individual unit (ie 1 of product) 3. By product, set a minimum quantity, but this is also to be the quantity unit (so, if this is say 25, you can only order in multiples of 25, and if you enter something else, the system will round up to the next avaiable amount). This would also mean the "buy now" button in the product listing would need to buy the same quantity to match (ie 25) 4. Discounts based on the total number of units purchased. This ideally to be percentage based, and by product Now, I can set in "Product Attributes" things like:- Product Option = Quantity Option Values = Quantity, 1 to 10 packs Option Values = Quantity, 11 to 20 packs Option Values = Quantity, 21 to 30 packs Option Values = Quantity, 30 or more packs Product Attributes = ProductName, Quantity, 1 to 10 packs = - 0.0000 Product Attributes = ProductName, Quantity, 11 to 20 packs = - 0.0200 Product Attributes = ProductName, Quantity, 21 to 30 packs = - 0.0400 Product Attributes = ProductName, Quantity, 31 or more packs = - 0.0800 But there is no way I can see to associate this with the actual quantity ordered, and no way to force the quantity ordered to match the option values in some way. The only way I can see to do this is to create an additional table, and try to match back to product numbers. So, you would have a product like:- Product Description = Blank CDR discs - pack of 100 Produce Price per disc = 18p Minimum order quantity = 100 Quantity units in multiples of = 100 If customer orders 1 to 10 packs (therefore 100 to 1000 discs, no discount If customer orders 11 to 20 packs (therefore 1100 to 2000 discs, 2% discount If customer orders 21 to 30 packs (therefore 2100 to 3000 discs, 4% discount If customer orders 31 or more packs (therefore 3100 to ???? discs, 7% discount The discounts would need to be variable, and by product as some things you can discount better than others. I'm no php or sql expert, so this is going to be difficult for me to write. However, I've been looking through the code for TEPcontrib which provides multiplication for product attributes options. This would need extending to cater for the additional functionality of quantity units, but seems to provide most of whats needed. Any ideas or suggestions on a way forward? Link to comment Share on other sites More sharing options...
Jscheffler Posted October 11, 2002 Share Posted October 11, 2002 Staffelpreise 1.0 and BruttoAdmin V1.0 f?r OSC http://www.oscommerce.com Released under the GNU General Public License "staffelpreis" is a german word and means graduated price based on on tep_snapshot-20020914.zip -------------------------------------------------------------------------- Staffelpreise 1.0 Copyright 2002 Juergen Scheffler mailto: [email protected] http://www.thewebsite.de ------------------------------------------------------------------------- BruttoAdmin V1.0 Copyright 2002 Henri Schmidhuber mailto: [email protected] http://www.in-solution.de BruttoAdmin V1.0 is based on "Nettopreisberechnung" of Matthias Hinsche http://www.gamesempire.de ------------------------------------------------------------------------ With this addon you can manage graduated prices in the admin of oscommerce. the second effect all prices in admin are shown with tax included. Installation: You can adjust your version based on these files All changes for the graduated prices addon starts with "Start www.TheWebSite.de - Aenderung Staffelpreise" . All changes for the BruttoAdmin addon starts with START IN-SOLUTION t. generate this table in the database : DROP TABLE IF EXISTS products_staffelpreis; CREATE TABLE products_staffelpreis ( products_id int(11) NOT NULL default '0', quantity int(11) NOT NULL default '0', unitprice decimal(15,4) NOT NULL default '0.0000', KEY products_id (products_id) ) TYPE=MyISAM; 1.add folowing lines to your admin configure.php // for the BruttoAdmin define ('IN_PRICE_IS_BRUTTO','1'); //Show prizes with tax include define ('IN_PRICE_PRECISION','2'); // Shown precision auf prize define ('IN_TXT_NETTO', 'Netto:'); // Name of prize without tax // for the graduated prices addon define ('ST_STAFFELPREIS', '3'); // number of graduated prices 2. add folowing lines to your admin application_top.php define('TABLE_PRICES','products_staffelpreis'); 3. add folowing lines to your adminincludeslanguagesgermancategories.php define('TEXT_PRODUCT_SP', 'Staffelpreise<br><small><small>(Menge,Preis)</small></small>'); 4. add folowing lines to your adminincludeslanguagesenglishcategories.php define('TEXT_PRODUCT_SP', 'Graduated price<br><small><small>(quantity, price)</small></small>'); you can download it at http://www.thewebsite.de/internet/download...affelpreise.zip ://http://www.thewebsite.de/internet/d...lpreise.zip TEP CVS 2.2 , Snapshot vom 5.10.2002 ________________________________ mit freundlichen Gruessen Juergen Scheffler Link to comment Share on other sites More sharing options...
Holga Posted October 19, 2002 Share Posted October 19, 2002 Hi there, I have got a problem and no solution. Perhaps someone could help me? After installing the modification "Staffelpreise" I get an error message saying "Call to undefined function: tep_round() in c:apachehtdocsshop1catalogadmincategories.php on line 635". The function tep_round() is in admin/includes/functions/general.php and I don?t understand why it can?t be called. Any suggestions? Thx Holga Link to comment Share on other sites More sharing options...
majik Posted November 4, 2002 Share Posted November 4, 2002 Did you install the files that came with the mod, or just follow the directions above. There are a few files in the downloadable zip that you need to copy into place to get it to work. Now for my question. I got this mod working, but instead of *adding* a 7% tax, it SUBTRACTS it. Anyone run into this? Thanks. Link to comment Share on other sites More sharing options...
majik Posted November 4, 2002 Share Posted November 4, 2002 Actually, nevermind. I realized that it was the total price (tax included) that it wanted, and then set the displayed price accordingly. I can see where that would be cool, but I didn't need it so I was able to rip that whole section out of the files. >:) Link to comment Share on other sites More sharing options...
rubygirl Posted November 12, 2002 Share Posted November 12, 2002 Hello, I have been trying for days to get the graduated pricing module to work - nothing yet - I downloaded 2 files that claimed to have the module but both came with different number of folders - is there a more recent version available somewhere? I really need to be able to get this up and going asap! One of the errors I have received is in regards to TABLE_PRICES - but don't recall creating that table in the database with the directions. Please help!!! Link to comment Share on other sites More sharing options...
Holga Posted November 20, 2002 Share Posted November 20, 2002 This mod is indeed kind of confusing, but it works. Lots of informations are twice in the package. Filter them out and follow the instructions, then it should work. Link to comment Share on other sites More sharing options...
mikimoto Posted April 22, 2003 Share Posted April 22, 2003 ?Someone knows if Staffelpreise works fine on MS1? :?: Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.