Latest News: (loading..)
lushlongboards

Bundled products

332 posts in this topic

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

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 by safoo

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

So this:

 

? 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

 

Is a bunch of seperate products all available in your Store. Whereas this particular product : http://www.lushlongboards.com/shop/product...?products_id=40

 

is not a real product at all - it's simply a few products added together at a cheaper price than buying them all seperately?

 

Is that about right? If so, I think a lot of people would have a use for such a Mod, particularly Computer Sellers.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

Can you tell us what happens id one of the items in the bundle sells out of stock? Does the whole bundled product then go out of stock as well ?

 

Sounds like a great modification! Well done.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

nice1 mate! going to give it a try now.

 

How does it handle attributes of its child products?

Share this post


Link to post
Share on other sites

Sounds exciting! Just taking a look. Deleted my original question.

Edited by radders

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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 ;)

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

Hi

 

Sorry if i have got this wrong.

 

I pressume i run the 2 above as 2 seperate SQL queries?

 

Thanks

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

BTW - BACKUP before you do any of it!

First rule in ALL cases, BACKUP BACKUP BACKUP!!

 

...

Then backup some more. ;)

Share this post


Link to post
Share on other sites

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!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now