Re: Four questions about extensions to OSCommerce /

[email protected] Thu, 21 Jul 2005 13:14:49 -0500
Newsgroups gmane.comp.cms.cms-forum.general
Message-ID <[email protected]>
We have used/customized OScommerce for clients, so I have at least some 
knowledge of the software.
I think you need to look through the Contributions on the OScommerce 
web site to see if some of these issues have already be solved or 
partially solved.
For example there are over 800 contributions in the "Features" area 
alone.

> 1. need to be able to put "unlimited" quantity for all of our
> products (since we aren't selling physical goods) -- leaving this
> field blank makes the cart behave as if there is 0 quantity for a
> particular product. Is there a way to do this with OSCommerce?

One way to "fix" that problem is to have a very high quantity and have 
a cron script reset the values in the database every night.
Another way would be to choose a quantity, say 1000, and change the PHP 
code so that if the quantity is exactly 1000, don't decrement it when a 
sale occurs.

> 2. we need a shopping cart that will allow us to sell one product at
> multiple levels which we can determine per-product. For example,
> software which is sold as single-user license for $100, 5-user
> license for $200, and a 10-user license for $300, etc. The shopping
> cart should present you with the level options when or during adding
> the item to your cart. The cart should not allow someone to add more
> than one of the same product (even at a different level).

I would have multiple entries, one for each user level. You could 
create a category for each product, with multiple "products," one 
"product" for each license level.
You would still need to add code to only allow the purchase of one 
license level. For one customization project, I took over or 
re-appropriated an unused product data field in the product page for my 
own purpose. For example, if truely none of your products have a 
quantity, you could change the quantity field to store a code that 
would allow you to "group" license levels for a product together ( you 
would still need to write code to check that in the cart ).

Now, you'll want to sell t-shirts and hats as well as software, and 
those _do_ have quantities, so that specific idea is right out.

> 3. We need a way to make relationships between two or more products
> to create a "main" product and "add-on" products. Essentially, the
> user can't purchase the add-ons unless they also purchase the main
> product.

I know there is a Contribution module that does this. It may fit your 
needs, or at least give you a leg up with code to modify.

> 4. We want to be able to offer discounts at least two levels of
> discount  on a per-product basis. That is, we want to specify that
> certain products have certain discounts. What qualifies a person for
> discount can be global to the system (not per-product), but the
> discounts must be able to be set on a product-by-product basis (for
> example, 5% for product A for members of club ABC, 10% for product A
> for members of club XYZ; 7% for product B for club ABC, 15% for
> product B for club XYZ, etc). Since these discounts must be
> product-by-product, the discount should not get applied to the
> invoice (cart) total, but must get applied on a lineitem basis.

I think I ran across a Contribution that did something like that.

OScommerce is not perfect, and the code that relates to a specific 
function can be hard to track down.
Because it is open source, the only thing limiting the customization is 
your skill and time.


Charles Dostale
System Admin - Silver Oaks Communications
http://www.silveroaks.com/
824 17th Street, Moline  IL  61265