lushlongboards Posted February 7, 2004 Posted February 7, 2004 I tried master products contribution but it's not what I want and it looks like quite a few others have similar issues. The idea is to update the stock of a number of sub-products in a bundle when a single item is purchased. The cost of the single item does not need to be related to the total cost of the items in the bundle, so deals can be applied. All products in the bundle are normal, only the main product needs an extra field. Sub-products in a bundle may be used in any number of master products (eg bearings on a skateboard) I'm working on the following concept; my PHP and knowledge of OSC is still young so it will take a few weeks.... A) are there any other contribs that will do this? B) Shall I try and make it into a contribution module? Add a field into the products information (eg "bundle_contents") Insert into this field a string containing the codes/SKUs for the subproducts (eg "23&45&65&111"). I'm not sure what delimiter would be best at this point. When the product is displayed, PHP checks to see if the product has data in this field. If data exists, it prints a simple list of bundle contents in the product info part. This list may be extended to include a "saving" figure if I can get it to calculate the total cost of the contents and compare with the product price. No other changes are made until "callback" after order (I have not found this file yet). This file will check each product for bundle_contents before updating stock. If bundle_contents contains bundle data (product contains others) then it will expand and update the stock of each subproduct. If anybody sees any flaws or suggestions please submit here, or email me. If I can get it to work it may be worth a new contribution as it is a different approach to "Master Product" chris Quote
lushlongboards Posted February 22, 2004 Author Posted February 22, 2004 OK, the mod is done, I'll post it up once it's been running clean for a week or so after site launch (which is in 2 weeks) so give it 3 weeks or so. chris Quote
lushlongboards Posted March 18, 2004 Author Posted March 18, 2004 OK, bundles are now live on www.lushlongboards.com take a look at product http://www.lushlongboards.com/shop/product...&products_id=40 too see the user's view. bundles are created in admin section, and are all valid stock items which may be visible or not visible to the customer (using active/inactive as comes with OSC) stock of bundled items is checked before checkout ... ie the bundle is opened before stock check. likewise, after sale, stock of individual items is updated. 1 level of nesting is allowed, ie a bundle may contain another bundle, but not another bundle within that. would anyone like a contrib? Quote
safoo Posted March 19, 2004 Posted March 19, 2004 (edited) Hello, I didn't really see what was different with the item. Is the following text created by OSC?? This product contains the following items:? Hardware kit and assembly Black grip tape 8mm bearing spacer set 1 1/2 inch boltset Regular 1/2 inch riser Assembly charge ? Swiss ABEC 5 bearings ? Kryptonics True 65 wheels ? Lush L175 trucks ? Lush Kuni Deck Cost of separate parts: ?130.97 You save ?45.98 A contribution would be great! Edited March 19, 2004 by safoo Quote
lushlongboards Posted March 19, 2004 Author Posted March 19, 2004 yes, that is generated by OSC - it looks at the contents of the bundle, displays it to the user and calculates a saving over the cost of parts separately. chris Quote
lushlongboards Posted March 19, 2004 Author Posted March 19, 2004 that is correct. You add the bundle master (the bundle) as you would a normal product, then select it's contents on the admin page. the stock level of the bundle master is irrelevant and is never checked or updated, only the contents matter. This naturally makes it quite a complicated mod, and while it works well on my heavily hacked site, it will take some time to neaten up for an osC mod. I'll do it as soon as I can. chris Quote
safoo Posted March 19, 2004 Posted March 19, 2004 yes, that is generated by OSC - it looks at the contents of the bundle, displays it to the user and calculates a saving over the cost of parts separately. Awesome. Can't wait for the contribution. Quote
lushlongboards Posted March 29, 2004 Author Posted March 29, 2004 doing my best ... I could put a hacked undocumented version up now but I'd rather get it properly ready first ... I've not even read the tips on submitting contributions yet... Quote
lushlongboards Posted April 14, 2004 Author Posted April 14, 2004 here's the mod: http://www.oscommerce.com/community/contributions,2015 please post queries in this thread only! chris Quote
langers Posted April 14, 2004 Posted April 14, 2004 nice1 mate! going to give it a try now. How does it handle attributes of its child products? Quote
radders Posted April 14, 2004 Posted April 14, 2004 (edited) Sounds exciting! Just taking a look. Deleted my original question. Edited April 14, 2004 by radders Quote
CC Posted April 15, 2004 Posted April 15, 2004 Nice mod, and gonna give it a go now. The biggest issue behind this was the stock count for us, but it seems you have approached this problem well. Quote
CC Posted April 15, 2004 Posted April 15, 2004 Works a treat. Although there are some small bits missing: define('TEXT_PRODUCTS_BUNDLE', 'Create a Bundle:'); - (In categories language file) define('TABLE_PRODUCTS_BUNDLES', 'products_bundles'); - (application_top.php or database_tables.php depending on your version) Think that was about all tho. Works great even on our heavily modded site, no problems going in at all. Nice1 ;) Quote
cdamianou Posted April 16, 2004 Posted April 16, 2004 I am having trouble understanding the install of this mod. I am not a very advance oscommecer/ I was wondering if their was anyone that was willing to help with the install. Thanks Costas Quote
lushlongboards Posted April 16, 2004 Author Posted April 16, 2004 hi costas - what part of the install is troubling you? You need to edit your version of the files given in the instructions then upload them to your server. No extra files are needed. You also need to alter your database using an admin tool that should be provided by your server, such as myPhpAdmin. chris Quote
cdamianou Posted April 16, 2004 Posted April 16, 2004 I have access to PHPmy Admin, but not shure exactly how to acomplish that pasrt of the install. everything else looks straight forward. Thanks Costas Quote
CC Posted April 16, 2004 Posted April 16, 2004 You can use this to run the creation of products_bundles: CREATE TABLE `products_bundles` ( `bundle_id` smallint(6) NOT NULL default '0', `subproduct_id` smallint(6) NOT NULL default '0', `subproduct_qty` tinyint(4) NOT NULL default '0', PRIMARY KEY (`bundle_id`,`subproduct_id`) ) TYPE=MyISAM; And just add this into products table: `products_bundle` tinytext NOT NULL, Talking a 30 second job. CC. Quote
cdamianou Posted April 16, 2004 Posted April 16, 2004 Hi Sorry if i have got this wrong. I pressume i run the 2 above as 2 seperate SQL queries? Thanks Quote
CC Posted April 16, 2004 Posted April 16, 2004 Yes you can do that. The first can be run from SQL heading in phpmyadmin, just copy paste and go. The second you need something more like this if you dont know how to manually create the table: ALTER TABLE `products` ADD `products_bundle` tinytext NOT NULL AFTER `manufacturers_id` ; If you are going to get into OSC and adding/creating mods, I would suggest you make yourself familiar with phpMyAdmin, it is a major part of OSC if this is your chosen program for mySQL. Quote
CC Posted April 16, 2004 Posted April 16, 2004 BTW - BACKUP before you do any of it! First rule in ALL cases, BACKUP BACKUP BACKUP!! ... Then backup some more. ;) Quote
whoiswes Posted April 16, 2004 Posted April 16, 2004 we are running an almost completely custom OSC install - this is one of the last major mods we wanna set up. i had been working on my own version for a while until i did one last search and came up with this thread. i'm gonna install this sucker and see if it does what we need (and it sounds PERFECT!!!) will post my impressions later! thanks! Quote
lushlongboards Posted April 16, 2004 Author Posted April 16, 2004 cool :) I'd be interested to see some other sites that use this mod when you have it running ... chris Quote
cdamianou Posted April 16, 2004 Posted April 16, 2004 So far so good however i have encountered a confusion at the following part that says add 'products_bundle' => '', after $parameters = array('products_name' => '', (line 358) Dont understand this part. Thanks Quote
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.